Pari/GP Reference Documentation |
Contents - Index - Meta commands |

And library mode ? Functions for PostScript output: High-level plotting functions Low-level plotting functions plot plotbox plotclip plotcolor plotcopy plotcursor plotdraw ploth plothraw plothsizes plotinit plotkill plotlines plotlinetype plotmove plotpoints plotpointsize plotpointtype plotrbox plotrecth plotrecthraw plotrline plotrmove plotrpoint plotscale plotstring psdraw psploth psplothraw | |

High-level plotting functions | |

| |

Low-level plotting functions | |

| |

Functions for PostScript output | |

in the same way that | |

And library mode ? | |

plot*.c) should be readable enough for you to achieve something. | |

plot(X = a,b,expr,{Ymin},{Ymax}) | |

crude
ASCII plot of the function represented by expression | |

plotbox(w,x2,y2) | |

let (x1,y1) be the current position of the
virtual cursor. Draw in the rectwindow w the outline of the rectangle which
is such that the points (x1,y1) and (x2,y2) are opposite corners. Only
the part of the rectangle which is in w is drawn. The virtual cursor does
| |

plotclip(w) | |

`clips' the content of rectwindow w, i.e
remove all parts of the drawing that would not be visible on the screen.
Together with | |

plotcolor(w,c) | |

set default color to c in rectwindow w.
In present version 1 = black, 2 = blue, 3 = sienna, 4 = red, 5 = green, 6 = grey, 7 = gainsborough. Note that it should be fairly easy for you to hardwire some more colors by
tweaking the files | |

plotcopy(w1,w2,dx,dy) | |

copy the contents of rectwindow w1 to rectwindow w2, with offset (dx,dy). | |

plotcursor(w) | |

give as a 2-component vector the current (scaled) position of the virtual cursor corresponding to the rectwindow w. | |

plotdraw(list) | |

physically draw the rectwindows given in list which must be a vector whose number of components is divisible by 3. If list = [w1,x1,y1,w2,x2,y2,...], the windows w1, w2, etc.are physically placed with their upper left corner at physical position (x1,y1), (x2,y2),...respectively, and are then drawn together. Overlapping regions will thus be drawn twice, and the windows are considered transparent. Then display the whole drawing in a special window on your screen. | |

ploth(X = a,b,expr,{flag = 0},{n = 0}) | |

high precision
plot of the function y = f(x) represented by the expression
n specifies the number of reference point on the graph (0 means use the hardwired default values, that is: 1000 for general plot, 1500 for parametric plot, and 15 for recursive plot). If no The binary digits of
For instance:
to see why. Hence, it's usually a good idea to try and plot the same curve with slightly different parameters. The other values toggle various display options:
| |

plothraw(listx,listy,{flag = 0}) | |

given
| |

plothsizes() | |

return data corresponding to the output window
in the form of a 6-component vector: window width and height, sizes for ticks
in horizontal and vertical directions (this is intended for the | |

plotinit(w,x,y,{flag}) | |

initialize the rectwindow w,
destroying any rect objects you may have already drawn in w. The virtual
cursor is set to (0,0). The rectwindow size is set to width x and height
y. If The plotting device imposes an upper bound for x and y, for instance the
number of pixels for screen output. These bounds are available through the
| |

plotkill(w) | |

erase rectwindow w and free the corresponding
memory. Note that if you want to use the rectwindow w again, you have to
use | |

plotlines(w,X,Y,{flag = 0}) | |

draw on the rectwindow w
the polygon such that the (x,y)-coordinates of the vertices are in the
vectors of equal length X and Y. For simplicity, the whole
polygon is drawn, not only the part of the polygon which is inside the
rectwindow. If X and Y are allowed to be scalars (in this case, both have to).
There, a single segment will be drawn, between the virtual cursor current
position and the point (X,Y). And only the part thereof which
actually lies within the boundary of w. Then | |

plotlinetype(w,type) | |

change the type of lines
subsequently plotted in rectwindow w. | |

plotmove(w,x,y) | |

move the virtual cursor of the rectwindow w to position (x,y). | |

plotpoints(w,X,Y) | |

draw on the rectwindow w the
points whose (x,y)-coordinates are in the vectors of equal length X and
Y and which are inside w. The virtual cursor does As was the case with the | |

plotpointsize(w,size) | |

changes the "size" of following
points in rectwindow w. If w = -1, change it in all rectwindows.
This only works in the | |

plotpointtype(w,type) | |

change the type of
points subsequently plotted in rectwindow w. | |

plotrbox(w,dx,dy) | |

draw in the rectwindow w the outline of
the rectangle which is such that the points (x1,y1) and (x1+dx,y1+dy) are
opposite corners, where (x1,y1) is the current position of the cursor.
Only the part of the rectangle which is in w is drawn. The virtual cursor
does | |

plotrecth(w,X = a,b,expr,{flag = 0},{n = 0}) | |

writes to
rectwindow w the curve output of | |

plotrecthraw(w,data,{flag = 0}) | |

plot graph(s) for
| |

plotrline(w,dx,dy) | |

draw in the rectwindow w the part of the segment (x1,y1)-(x1+dx,y1+dy) which is inside w, where (x1,y1) is the current position of the virtual cursor, and move the virtual cursor to (x1+dx,y1+dy) (even if it is outside the window). | |

plotrmove(w,dx,dy) | |

move the virtual cursor of the rectwindow w to position (x1+dx,y1+dy), where (x1,y1) is the initial position of the cursor (i.e.to position (dx,dy) relative to the initial cursor). | |

plotrpoint(w,dx,dy) | |

draw the point (x1+dx,y1+dy) on the rectwindow w (if it is inside w), where (x1,y1) is the current position of the cursor, and in any case move the virtual cursor to position (x1+dx,y1+dy). | |

plotscale(w,x1,x2,y1,y2) | |

scale the local coordinates of the
rectwindow w so that x goes from x1 to x2 and y goes from y1 to
y2 (x2 < x1 and y2 < y1 being allowed). Initially, after the initialization
of the rectwindow w using the function | |

plotstring(w,x,{flag = 0}) | |

draw on the rectwindow w the
String x (see Section [
| |

psdraw(list) | |

same as | |

psploth(X = a,b,expr) | |

same as | |

psplothraw(listx,listy) | |

same as | |