On Wed, 14 Aug 2019, Otared Kavian wrote:

Hi Hans,

Thank you very much for the new features! I haven't yet read all the 
mag-1104-mkiv.pdf where you explain some of them, but after modifying one of 
your examples, I noticed that some funtions get a strange graph, which is 
probably due to the fact that metafun2 is interpolating between points in a way 
which is not correct.
For instance, in the following example (which is a slight modification of 
yours), the curve drawn is not a graph, in the sense that for some values of x 
it seems to be two or more values of y.

How does metafun 2 traces the curve between two discretization points?

Best regards: OK

%%% begin draw-2.tex

draw lmt_function [
        xmin =  1.0, xmax = 2.5066283, xstep = .1,
        ymin = -2, ymax =  2,
%       xticks = "bottom", xsmall = 80, xlarge = 20,
%       yticks = "left", ysmall = 40, ylarge = 4,
        code = "1.5 * math.sin(2*x^2)",
        xlabels = "yes",
        ylabels = "yes",
        ycaption = "\strut\tfd \rotate[rotation=90]{vertical}",
        xcaption = "\strut\tfd horizontal",
        pointsymbol = "dot", pointsize = 4, pointcolor = "orange",
        sx = 2mm, sy = 4mm, linewidth = .025mm, offset = .1mm,
        xsized 8cm ;


This looks like a typical .. vs -- issue. I think there is a way to change how the points are connected, but I'll have to look at the code again.

If your question is of interest to others as well, please add an entry to the 

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net

Reply via email to