[metapost] Graph v New number systems

Toby Thurston thurston at eml.cc
Wed Nov 2 18:37:52 CET 2022


Can I draw your attention to this unanswered question on TeX.SE?

https://tex.stackexchange.com/q/507361/15036

the questioner had found that this graph is created correctly with the scaled number system

prologues := 3;
outputtemplate := "%j%c.%{outputformat}";
input graph
beginfig(1);
numeric width; width = 7cm;
draw begingraph(width, 0.618034 width);
  setrange((-4, 0), (11, 100));
  gdraw "setrange.data";
endgraph;
endfig;
end.

with the x-axis range from -4 to +11 but when they used any of the new number systems the range shown was +4 to +11.

So the new number systems was some how losing the sign of the min x value.  
I am afraid that the complexity of graph.mp is too much for me to tell where it might be.

The “setrange.data” file was just a list of squares

-10 100
-9 81
-8 64
-7 49
-6 36
-5 25
-4 16
-3 9
-2 4
-1 1
0 0
1 1
2 4
3 9
4 16
5 25
6 36
7 49
8 64
9 81
10 100




More information about the metapost mailing list.