[metapost] New numbersystems for the graph package?

Densing Martin (PSI) martin.densing at psi.ch
Mon Feb 18 16:51:37 CET 2019


Dear Luigi,

Thanks you very much. On my computer, the provided test.mp seems still not to work:

The output with numbersystem=decimal is attached (test-1-decimal.mps); the y-axis is still wrong.
The usual output is test-1.mps; the y-axis labelling  is correct (includes negative values).

My point is not this particular example, because I do not need this particular code (by introducing your very good hack).  But still, thank you very much for your good help!
My point is:  It seems that the graph-macros were not tested with the new numbersystems, and because you or Taco Hoekwater have introduced the new numbersystems, it would be nice to have a short comment on this how to proceed regarding the new numbersystems and the graph-macro.

Best regards,
Martin



From: luigi scarso <luigi.scarso at gmail.com>
Sent: Montag, 18. Februar 2019 01:32
Cc: metapost at tug.org
Subject: Re: [metapost] New numbersystems for the graph package?

This should be ok

% 0  1.4
% 1  3.2
% 2  -4.5
% 3  8.0
% 4  9.0
% 5  4.0

% Data-file for graph can be included at beginning of source-file,
% because %<space>0 1.4 etc. is read by gdata marco until empty line

input graph

prologues := 3;
outputtemplate := "%j-%c.mps";
if numbersystem="decimal":
%% numberprecision:=6;
 vardef Mabs primary x = x/10*10 enddef;
fi

beginfig(1)
  draw begingraph(10cm,10cm);
    path p;
    gdata("test.mp<http://test.mp>", $, augment.p(i, scantokens $2););
    gdraw p;
  endgraph;
endfig;

end

--
luigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/metapost/attachments/20190218/e8839e57/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-1.mps
Type: application/octet-stream
Size: 35780 bytes
Desc: test-1.mps
URL: <https://tug.org/pipermail/metapost/attachments/20190218/e8839e57/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-1-decimal.mps
Type: application/octet-stream
Size: 21669 bytes
Desc: test-1-decimal.mps
URL: <https://tug.org/pipermail/metapost/attachments/20190218/e8839e57/attachment-0003.obj>


More information about the metapost mailing list