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

pgfObject(Picture) -- create the string describing a series of graphic primitives in pgf

Synopsis

Description

The options that are not given in the hash table parts of the various FormattedGraphicPrimitives in the picture are set at their default values if they are contained in defaultPGFOptions. Options not listed in possiblePGFOptions are discarded.

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

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

o1 : FormattedGraphicPrimitives
i2 : myfgp2=formatGraphicPrimitives({circle(point(20.,30.),10)},hashTable {"fill"=>"red"})

o2 = FormattedGraphicPrimitives{{Circle{Point2D{20, 30}, 10}}, HashTable{"fill" => red}}

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

o3 = Picture{FormattedGraphicPrimitives{{Point2D{20, 30}, Point2D{30, 40}}, HashTable{"fill" => black}}, FormattedGraphicPrimitives{{Circle{Point2D{20, 30}, 10}}, HashTable{"fill" => red}}}

o3 : Picture
i4 : pgfObject(mypict)

o4 = \draw[fill=black] (20,30) circle (0.1);
     \draw[fill=black] (30,40) circle (0.1);
     \draw[fill=red] (20,30) circle (10);

Ways to use this method: