Difference between revisions of "Pgfplot"
Jump to navigation
Jump to search
m (→Example: added missing star/stop text) |
m |
||
Line 47: | Line 47: | ||
[[Category:Modules]] | [[Category:Modules]] | ||
[[Category:Graphics]] | [[Category:Graphics]] | ||
− | [[Category: | + | [[Category:Sciences]] |
Latest revision as of 17:29, 8 June 2020
Pgfplots is a data plotting package based on PGF/TikZ. It is now included as a (third party) module for ConTeXt (with TikZ)
An alternative package is MPgraph using MetaPost.
Example
(Data on low-temperature thermal expansion coefficients downloaded from [1]).
\setupcolors[state=start] \usemodule[tikz] \usemodule[pgfplots] \starttext \starttikzpicture \startaxis[ xmin=0,xmax=300, title=http://cryogenics.nist.gov/, xlabel=$T$ (K), ylabel=$(L-L_{293})/L_{293}$, legend style={at={(0.95,0.05)},anchor=south east}, width=16cm ] \addplot[mark=none,color=red] plot file {sapphire.dat}; \addlegendentry{sapphire} \addplot[mark=none,color=green] plot file {Be.dat}; \addlegendentry{Be} \addplot[mark=none,color=blue] plot file {BeCu.dat}; \addlegendentry{BeCu} \addplot[mark=none,color=cyan] plot file {SS304.dat}; \addlegendentry{SS304} \addplot[mark=none,color=magenta] plot file {Al6061-T6.dat}; \addlegendentry{Al6061-T6} \addplot[mark=none,color=orange] plot file {nylon.dat}; \addlegendentry{nylon} \stopaxis \stoptikzpicture \stoptext