next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Graphics :: pgfPicture(Picture,HashTable)

pgfPicture(Picture,HashTable) -- create a pgf picture from a Picture object with some options

Synopsis

Description

i1 : myfgp1 = formatGraphicPrimitives({point(20,30)},hashTable {"fill"=>"black"})

o1 = FormattedGraphicPrimitives{{Point2D{20, 30}}, HashTable{fill => black}}

o1 : FormattedGraphicPrimitives
i2 : myfgp2 = formatGraphicPrimitives({circle(point(20,30),10),point(50,60)},hashTable {"fill"=>"red","fill-opacity"=>"0.2"})

o2 = FormattedGraphicPrimitives{{Circle{Point2D{20, 30}, 10}, Point2D{50, 60}}, HashTable{fill => red        }}
                                                                                          fill-opacity => 0.2

o2 : FormattedGraphicPrimitives
i3 : mypict = picture {myfgp1,myfgp2}

o3 = Picture{FormattedGraphicPrimitives{{Point2D{20, 30}}, HashTable{fill => black}}, FormattedGraphicPrimitives{{Circle{Point2D{20, 30}, 10}, Point2D{50, 60}}, HashTable{fill => red        }}}
                                                                                                                                                                           fill-opacity => 0.2

o3 : Picture
i4 : myoptions = hashTable{"scale"=>"0.5","x"=>"0.1cm","y"=>"0.2cm"}

o4 = HashTable{scale => 0.5}
               x => 0.1cm
               y => 0.2cm

o4 : HashTable
i5 : pgfPicture(mypict,myoptions)

o5 = \begin{tikzpicture}[x=0.1cm,y=0.2cm,scale=0.5]
     \draw[fill=black] (20,30) circle (0.1);
     \draw[fill=red] (20,30) circle (10);
     \draw[fill=red] (50,60) circle (0.1);
     \end{tikzpicture}

See also