# Difference between revisions of "MPgraph"

From ConTeXt wiki

m (link to m-graph) |
|||

Line 9: | Line 9: | ||

(Data on low-temperature thermal expansion coefficients downloaded from [http://cryogenics.nist.gov/]). | (Data on low-temperature thermal expansion coefficients downloaded from [http://cryogenics.nist.gov/]). | ||

− | < | + | <texcode> |

\setupcolors[state=start] | \setupcolors[state=start] | ||

Line 36: | Line 36: | ||

\stopuseMPgraphic | \stopuseMPgraphic | ||

\useMPgraphic{nist} | \useMPgraphic{nist} | ||

− | </ | + | </texcode> |

== See also == | == See also == | ||

[[source:m-graph.tex|m-graph]] | [[source:m-graph.tex|m-graph]] |

## Revision as of 07:14, 26 January 2009

MPgraph is a plotting package based on MetaPost.

An alternative package is Pgfplot using TikZ.

## Example

(Data on low-temperature thermal expansion coefficients downloaded from [1]).

\setupcolors[state=start] \startuseMPgraphic{nist} color orange; orange = (1,.5,0); input graph draw begingraph(16cm,12cm); setrange(0,whatever,300,whatever); glabel.bot(btex $T$ (K) etex, OUT); glabel.lft(btex $(L-L_{293})/L_{293}$ etex rotated 90, OUT); glabel.top(btex http://cryogenics.nist.gov/ etex, OUT); gdraw "sapphire.dat" withcolor red; glabel.urt(btex sapphire etex, 0); gdraw "Be.dat" withcolor green; glabel.urt(btex Be etex, 0); gdraw "BeCu.dat" withcolor blue; glabel.urt(btex BeCu etex, 0); gdraw "SS304.dat" withcolor cyan; glabel.urt(btex SS304 etex, 0); gdraw "Al6061-T6.dat" withcolor magenta; glabel.urt(btex Al6061-T6 etex, 0); gdraw "nylon.dat" withcolor orange; glabel.urt(btex nylon etex, 0); endgraph; \stopuseMPgraphic \useMPgraphic{nist}