Post Reply 
Plot Values from a List Gen. by Program
01-14-2015, 11:21 PM (This post was last modified: 01-15-2015 12:11 AM by Snorre.)
Post: #5
RE: Plot Values from a List Gen. by Program
Hello hof,

you can also set the plot window to show axis labels and numbers (only the current view limits per axis) by .
For more sophisticated graphing you should implement it by yourself as suggested by DrD, but that will be a tremendous task if you want to all the features of the builtin plot function (zooming, panning, tracing etc.).

It may be easier to define a VIEW function within an existing app which TEXTOUTs the numbers onto your current plot.
A skeleton might look like (but leaves much room for improvements):
Code:
VIEW "Show tick labels" ShowTickLabels()
BEGIN
  LOCAL d:=PX→C(C→PX(0,0)+4),
        x:=Xmin - Xmin MOD Xtick,
        y:=Ymin - Ymin MOD Ytick;
  WHILE x<Xmax DO
    TEXTOUT(x,x,d(2),1);
    x:=x+Xtick;
  END;
  WHILE y<Ymax DO
    TEXTOUT(y,d(1),y,1);
    y:=y+Ytick;
  END; 
END;

Greetings
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Plot Values from a List Gen. by Program - Snorre - 01-14-2015 11:21 PM



User(s) browsing this thread: 4 Guest(s)