File: USAGE

package info (click to toggle)
plplot 5.10.0%2Bdfsg2-0.4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 25,792 kB
  • ctags: 13,517
  • sloc: ansic: 83,001; xml: 27,081; ada: 18,878; cpp: 15,966; tcl: 11,651; python: 7,075; f90: 7,058; ml: 6,974; java: 6,665; perl: 5,029; sh: 2,208; makefile: 210; lisp: 75; sed: 25; fortran: 7
file content (198 lines) | stat: -rw-r--r-- 5,711 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
You must add the plplot_octave script installation directory to Octave
path *before* the standard Octave path if you want to use plplot 
graphics by default. The best way to do this is to create a .octaverc 
file in your home directory. 

With octave 2.1 or earlier you can use LOADPATH, e.g.

LOADPATH = [ ":<install-directory>/share/plplot_octave//", LOADPATH ]

With octave 2.9 and later, LOADPATH has been depreciated and you need to
use addpath instead. You also need to explicitly add in any 
subdirectories you wish to search, e.g.

addpath("<install-directory>/share/plplot_octave", ...
        "<install-directory>/share/plplot_octave/support")

If you also want to use Octave's standard plotting package, gnuplot, you
can use the command "toggle_plplot_use" to switch between the two plot 
packages. Read the INSTALL file for more details.

Then, invoke Octave and create a vector, say

	octave:1> x=-pi:0.1:pi;

and plot it

	plot(x,sin(x))

change the legend:

	plot(x,sin(x),';Sin(x);')

set the title and plot data points
	
	title "My first plot";
	plot(x,sin(x),'-o;Sin(x);')

change the legend position

	legend ("opaque",0.8,0.5);
	plot(x,sin(x),';Sin(x);');

save you plot in color postscript

	save_fig ("~/sin.ps","psc")

and see the result
	
	system("gv ~/sin.ps")

create a new plot window using the tk driver

	fig(1,"tk")

Use uper an subscript in captions

	title("Sin(x#u2#d)")
	plot(x,sin(x),'-o;Sin(x#u2#d);',x,cos(x),'y');

close the previous window

	closefig(0)

read the online help

	help plot
	help __pl_opt

and try it! Bellow is a short description of the available commands.
You also have access to the PLplot API, 

	help plfill

		plfill(x, y)

		   Original PLplot call documentation:

		   plfill(n, x, y) ...

NOTES: - You don't need to specify vector or matrix dimensions.
       - When setting the plplot variable "pl_automatic_replot = 1", 
         changes take effect immediately, otherwise they only take 
         effect at the next plot.

--- Plot window control
fig,
figure		-- Set the current plot window or creates a new one.

closefig	-- Close a plot window.
closeallfig	-- Close all plot windows.

free_fig	-- Return the number of an unused plot figure.

save_fig	-- Save or prints the current plot figure.
lp_setup	-- Set printer command and options for use with `save_fig'.

--- 2D Plots
loglog,
semilogx,
semilogy,	-- Make 2D plots in log scales.
plot		-- Plot scalar, vector or matrices in various point and line styles.
mplot		-- Plot multiple plots per figure.
polar		-- Make a 2D polar plot.
contour		-- Draws a contour plot.
shade		-- Shaded/contour plot of matrix.
label_plot	-- Plot data with point style, marking each point with a number or label.
fill 		-- Draw filled 2-D polygons.
arrows		-- Plot an array of arrows.

--- 3D plots
mesh		-- Mesh surface plot.
meshc		-- mesh() with contour at base xy plane.
meshz		-- mesh() with a courtain.
plot3		-- Three-dimensional analogue of plot.
surf		-- Surface plot
surfc		-- surf() with contour at base xy plane.
surfl		-- surf() with lighting.
shading		-- Specifies how the surface in the surf plots is done.

--- Plot control and decorations
top_title,
bottom_title	-- don't work in PLplot!
title		-- Defines a title for the next plot. 

ylabel,
xlabel,
zlabel		-- Defines a label for the x/y/z-axis of the next plot.

xticks,
yticks		-- set the x/yticks interval.

plot_border	-- Don't work in PLplot.
plot_margin	-- Set/return the status of the plot margin around the plot.

autostyle	-- If set increases line style after each plot. 
legend		-- Sets the legend position and mode.
grid		-- Turn on/off grid lines at major/minor ticks.

axis		-- Sets the axis limits, plot scales and axis decoration.
axis_set	-- Return current axis status.

plclg,
plclearplot	-- Clear the plot window.
fig_state	-- save/restore current figure axis and hold state.
shg		-- Show the graph window. 
stopdraw	-- Stop drawing plots, but still store them.
drawnow		-- Plot all stored plots.

--- Interative plots
stripc,
stripc_add,
stripc_del,	-- creates/plot/delete a four pen stripchart.
comet		-- Displays an animated comet plot of one the vector. 
plrb		-- Iteractively selects a rectangular region of the plot. 

--- Interative utilities
text		-- Place text on a 2-D graph at x y positions.
set_view 	-- Set up the altitude and azimute in degrees for posterior 3d plots.
arrow		-- Plot one arrow. 
zoom		-- Select left botton and right top area for setting axis.

--- Multiple plots
multiplot	-- Sets and resets multiplot mode. 	
oneplot		-- Switches from multiplot to single plot mode.
subplot		-- Sets plot in multiplot mode.
subwindow	-- Sets subwindow position in multiplot mode for next plot.

--- Colormaps and color utilities
blue, bone,
cool, green,
hot, copper,
pink, prism,
red, hsv, bgr	-- Several colormaps.

colormap	-- Set colormap1.
hls2rgb		-- Hue-lightness-saturation to red-green-blue conversion. 
rgb2hls		-- red-green-blue to hue-lightness-saturation conversion. 
rgbplot		-- Plot color map.

--- Interative mouse usage
ginput		-- Return the current mouse position in plot.
gtext		-- Place text on a 2-D graph using a mouse.

--- Utilities
clip 		-- Clip values outside the range to the value at the boundary of the range.
tdeblank	-- Remove trailing amd leading blanks from string.

--- Misc
pldef		-- set your defaults.
plsetopt	-- set/view/reset/aplly plplot options.
plimage		-- display octave images.
plimagefr	-- display octave images with transformation.
griddata	-- grid irregularly sampled data

toggle_plplot_use	-- use plplot or gnuplot.
plplot_octave_path	-- set or return octave_plplot scripts directory path.

plplot_stub	-- Definition of all implemented plplot API functions.