jayesjay
Number of posts : 2 Registration date : 2014-04-19
| Subject: Drawing a graph e.g. y=sin(x) Sat Apr 19, 2014 6:07 pm | |
| Can you confirm that there is no graphing function in Pan...
Do I have to generate a file of graph numbers (x, y1, y2 etc) and open it in say Excel. | |
|
papydall
Number of posts : 39 Age : 73 Localisation : TUNISIA Registration date : 2013-03-16
| Subject: Re: Drawing a graph e.g. y=sin(x) Sun Apr 20, 2014 12:42 am | |
| Hello jayesjay If that can help you. - Code:
-
dim x,y,xc,yc,p p = pi/180 xc = 250 : yc = 200 : ' Coordinates of the center caption 0, "GRAPH OF Y = SIN(X)" 2d_pen_color 255,0,0 2d_line 0,yc,2*xc,yc :' Axis X 2d_line xc,0,xc,2*yc :' Axis Y 2d_pen_color 0,0,255 : 2d_poly_from 00,yc : ' origin of graph for x = 0-8*pi to 8*pi step p y = sin(x) 2d_poly_to xc+10*x, yc-100*y next x - Code:
-
dim x,y,xc,yc,p p = pi/180 xc = 250 : yc = 200 : ' Coordinates of the center caption 0, "GRAPH OF Y = X/20 + SIN(X)" 2d_pen_color 255,0,0 2d_line 0,yc,2*xc,yc :' Axis X 2d_line xc,0,xc,2*yc :' Axis Y 2d_pen_color 0,0,255 : 2d_poly_from 00,yc : ' origin of graph for x = 0-8*pi to 8*pi step p y = x/20 + sin(x) 2d_poly_to xc+10*x, yc-100*y next x - Code:
-
dim x,y,xc,yc,p p = pi/180 xc = 250 : yc = 200 : ' Coordinates of the center caption 0, "GRAPH OF Y = SIN(X) / X" 2d_pen_color 255,0,0 2d_line 0,yc,2*xc,yc :' Axis X 2d_line xc,0,xc,2*yc :' Axis Y 2d_pen_color 0,0,255 : 2d_poly_from 00,yc : ' origin of graph for x = 0-8*pi to 8*pi step p y = sin(x)/x 2d_poly_to xc+10*x, yc-200*y next x | |
|