Macaulay2 » Documentation
Packages » Graphics :: pgfPicture(Picture)
next | previous | forward | backward | up | index | toc

pgfPicture(Picture) -- create a pgf picture from a Picture object

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 : pgfPicture(mypict)

o4 = \begin{tikzpicture}
     \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

Ways to use this method: