Difference between revisions of "MPgraph"
Jump to navigation
Jump to search
m (link to m-graph) |
|||
(10 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
MPgraph is a plotting package based on [[MetaPost]]. | MPgraph is a plotting package based on [[MetaPost]]. | ||
Line 7: | Line 5: | ||
== Example == | == Example == | ||
− | + | {{todo|update or provides .dat files to have a MWE}} | |
− | < | + | (Data on low-temperature thermal expansion coefficients downloaded from [http://cryogenics.nist.gov/]) (and more specifically [https://trc.nist.gov/cryogenics/materials/RegeneratorMaterials/Regenerator%20Materials%20rev%2009-22-06.htm on this page] but there is a need to reshape the .dat files). |
+ | |||
+ | <texcode> | ||
+ | \usemodule[graph] | ||
\setupcolors[state=start] | \setupcolors[state=start] | ||
− | \startuseMPgraphic{nist} | + | \startuseMPgraphic{graph::nist} |
color orange; | color orange; | ||
orange = (1,.5,0); | orange = (1,.5,0); | ||
Line 35: | Line 36: | ||
endgraph; | endgraph; | ||
\stopuseMPgraphic | \stopuseMPgraphic | ||
− | \useMPgraphic{nist} | + | \useMPgraphic{graph::nist} |
− | </ | + | </texcode> |
+ | |||
+ | [[Image:MPgraph_example.png]] | ||
== See also == | == See also == | ||
− | [[source:m-graph. | + | * [[source:m-graph.mkiv|m-graph]] |
+ | |||
+ | |||
+ | [[Category:Sciences]] | ||
+ | [[Category:Graphics]] | ||
+ | [[Category:Modules]] |
Latest revision as of 12:22, 12 May 2024
MPgraph is a plotting package based on MetaPost.
An alternative package is Pgfplot using TikZ.
Example
TODO: update or provides .dat files to have a MWE (See: To-Do List) |
(Data on low-temperature thermal expansion coefficients downloaded from [1]) (and more specifically on this page but there is a need to reshape the .dat files).
\usemodule[graph] \setupcolors[state=start] \startuseMPgraphic{graph::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{graph::nist}