[metapost] graph: no spline in log-log plot
sanjoy at mrao.cam.ac.uk
Mon Jan 16 03:40:01 CET 2006
I cannot graph smooth curves if I use log-log coordinates. Below I've
included the simplest example file that shows the problem.
With dolog set to 0, it makes a linear-linear plot; the .. in the path
correctly produces a spline.
With dolog 1, it produces a log-log plot at the same absolute locations
as the linear plot (by construction). However, the curve comes out
polygonal rather than as a spline. Is this behavior a bug? Perhaps
when graph.mp converts the coordinates to linear-linear axes, it forgets
the .. connectors?
[MetaPost, Version 0.641 (Web2C 7.5.4), linux i386, tetex 3.0]
beginfig(1) % log-log graph of cd vs Re
dolog := 1;
draw begingraph (2.3in,1.5in);
if dolog > 0:
p := (0.1,10)..(1,0.1)..(10,0.1);
p := (-1,1)..(0,-1)..(1,-1);
for i=0 upto 2:
gdotlabel (btex etex, point i of p);
`A society of sheep must in time beget a government of wolves.'
- Bertrand de Jouvenal
More information about the metapost