Re: New numbersystems for the graph package?

luigi scarso <[email protected]> Mon, 18 Feb 2019 01:31:34 +0100
Newsgroups gmane.comp.tex.metapost
Message-ID <CAG5iGsAPrN_ZbGMvA-FGP31NAyr1Yc2-TsYPy7nF+xAzCYdhmg@mail.gmail.com>
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", $, augment.p(i, scantokens $2););
    gdraw p;
  endgraph;
endfig;

end

-- 
luigi

--
http://tug.org/metapost/