scitools.easyviz.gnuplot_

This backend uses the Gnuplot plotting program together with the Gnuplot.py Python module. One can specify this backend by

python somefile.py –SCITOOLS_easyviz_backend gnuplot

or one can specify the backend in the SciTools configuration file scitools.cfg under the [easyviz] section

[easyviz] backend = gnuplot

and then

from scitools.std import *

or if just easyviz is needed

from scitools.easyviz import *

REQUIREMENTS:

Gnuplot >= 4.0 Gnuplot.py

Tip:

To close a figure window, press <q> when active
class scitools.easyviz.gnuplot_.GnuplotBackend[source]

Bases: scitools.easyviz.common.BaseClass

Methods

autumn([m]) Shades of red and yellow color map.
axes(*args, **kwargs) Create axes in specified positions.
axis(*args, **kwargs) Choose the axis limits and appearance.
bar(*args, **kwargs) Draw a bar graph.
bone([m]) Gray-scale with a tinge of blue color map.
box(*args) Display a box around the boundaries of the current axis.
brighten(*args) Brighten or darken the color map.
camdolly(*args) Dolly camera.
camlight(*args, **kwargs) Create or set position of a light.
camlookat(*args) Move camera and target to view specified objects.
campos(*args) Camera position.
camproj(*args) Camera projection.
camroll(*args) Roll camera.
camtarget(*args) Camera target.
camup(*args) Camera up vector.
camva(*args) Camera view angle.
camzoom(*args) Zoom camera.
caxis(*args) Set the limits for the color axis.
cla(*args) Clear the current axis.
clabel(*args) Control labeling of contours.
cleanup() Clean up data.
clf() Clear the current figure.Clear current figure.
close(*args) Close figure.
closefig([num]) Close figure window.
closefigs() Close all figure windows.Close figure windows and stop gnuplot.
colorbar(*args) Display a color bar.
colorcube([m]) Enhanced color-cube color map.
colormap(*args) Specify colormap.
coneplot(*args, **kwargs) Draw a 3D cone plot.
contour(*args, **kwargs) Draw a 2D contour plot.
contour3(*args, **kwargs) Draw 3D contour plot.
contourf(*args, **kwargs) Draw filled contour plot.
contourslice(*args, **kwargs) Draw contour lines in slice planes.
cool([m]) Shades of cyan and magenta color map.
copper([m]) Linear copper-tone color map.
daspect(*args) Change the data aspect ratio.
figure(*args, **kwargs) Create a new figure or switch between figures and return Figure object.
fill(*args, **kwargs) Draw filled 2D polygons.
fill3() Draw filled 3D polygons.
flag([m]) Alternating red, white, blue, and black color map.
gca() Return the current axis in the current figure.
gcf() Return current figure.
getp(*args) Get object properties or an attribute in this backend instance.
gray([m]) Linear gray-scale color map.
grid(*args) Toggle the display of grid lines.
hardcopy(filename, **kwargs) Save a hardcopy of the current figure to file (with the given filename).
hardcopy_old(filename, **kwargs) Currently supported extensions in Gnuplot backend:
hidden(*args) Toggle hidden line removal in the current axis.
hold(*args) Change the hold state of the current axis.
hot([m]) Black-red-yellow-white color map.
hsv([m]) Hue-saturation-value color map.
init() Initialize internal data structures.
ishold() Return the hold state (True if hold is on, and False if it is off).
isocaps(*args, **kwargs) Draw isosurface end caps.
isosurface(*args, **kwargs) Draw isosurfaces from 3D scalar fields.
jet([m]) Variant of hsv.
legend(*args, **kwargs) Add legend(s) to the current plot.
light(**kwargs) Add a light to the current axis.
lines([m]) Color map with the line colors.
loglog(*args, **kwargs) Draw a loglog plot with logarithmic scaling on x- and y-axis.
m1(*args) Add a label to the z-axis.
m2([m]) Shades of blue and green color map.
material(*args) Set the material reflectance mode.
mesh(*args, **kwargs) Draw a 3D mesh surface.
meshc(*args, **kwargs) Draw a mesh with a contour plot beneath.
openfig([filename]) Load figures saved in a file (with the given filename).
pcolor(*args, **kwargs) Draw a 2D pseudocolor plot.
pink([m]) Pastel shades of pink color map.
plot(*args, **kwargs) Draw line and scatter plots.
plot3(*args, **kwargs) Draw lines and points in 3D space.
prism([m]) Prism color map.
quiver(*args, **kwargs) Draw arrows from a 2D vector field.
quiver3(*args, **kwargs) Draw velocity vectors in 3D space.
savefig([filename]) Save all current figures to a file (with the given filename).
semilogx(*args, **kwargs) Draw a semilog plot with logarithmic scaling on x-axis.
semilogy(*args, **kwargs) Draw a semilog plot with logarithmic scaling on y-axis.
setp(*args, **kwargs) Set object properties or attributes in this backend instance.
shading(*args) Control the color shading of surfaces.
show() Redraw the current figure.
slice_(*args, **kwargs) Draw volumetric slice plot.
spring([m]) Shades of magenta and yellow color map.
stem(*args, **kwargs) Draw a stem plot.
streamline(*args, **kwargs) Draw streamlines from 2D or 3D vector data.
streamribbon(*args, **kwargs) Draw stream ribbons from 3D vector data.
streamslice(*args, **kwargs) Draw streamlines in axis aligned slice planes.
streamtube(*args, **kwargs) Draw stream tubes from 3D vector data.
subplot(*args, **kwargs) Create axes in tiled positions.
summer([m]) Shades of green and yellow color map.
surf(*args, **kwargs) Draw a 3D solid surface.
surfc(*args, **kwargs) Draw a solid surface with contours beneath.
surfl(*args, **kwargs) 3D shaded surface with lighting.
text(x, y, text[, fontname, fontsize]) Write text at position (x,y) in a curveplot.
title(*args) Add title to the current plot.
vga([m]) Windows colormap for 16 colors.
view(*args) Specify viewpoint.
white([m]) All white color map.
winter([m]) Shades of blue and green color map.
xlabel(*args) Add a label to the x-axis.
xlim(*args) Set or get limits on x axis.
ylabel(*args) Add a label to the y-axis.
ylim(*args) Set or get limits on y axis.
zlabel(*args) Add a label to the z-axis.
zlim(*args) Set or get limits on z axis.
autumn(m=0)[source]

Shades of red and yellow color map.

bone(m=0)[source]

Gray-scale with a tinge of blue color map.

cleanup()[source]

Clean up data.

clf()[source]

Clear the current figure.Clear current figure.

closefig(num=None)[source]

Close figure window.

closefigs()[source]

Close all figure windows.Close figure windows and stop gnuplot.

cmd = 'zlabel'
colorcube(m=0)[source]

Enhanced color-cube color map.

cool(m=0)[source]

Shades of cyan and magenta color map.

copper(m=0)[source]

Linear copper-tone color map.

figure(*args, **kwargs)[source]

Create a new figure or switch between figures and return Figure object. num is the figure number of the new or existing figure.

flag(m=0)[source]

Alternating red, white, blue, and black color map.

gray(m=0)[source]

Linear gray-scale color map.

hardcopy(filename, **kwargs)[source]

Save a hardcopy of the current figure to file (with the given filename). The file format (image type) is determined from the extension of the filename. If any changes have been made by working directly on the backend instance, set the keyword argument replot to False to stop Easyviz from replotting the current figure and destroying those changes.

Currently supported extensions in Gnuplot backend:

‘.ps’ (PostScript) ‘.eps’ (Encapsualted PostScript) ‘.png’ (Portable Network Graphics) ‘.pdf’ (Portable Document Format)

Optional arguments for PostScript output:

Argument Description
color If True, create a plot with colors. If False (default), create a plot in black and white.
enhanced If True (default), enable enhanced text mode features like subscripts, superscripts, and mixed fonts.
orientation Set orientation to ‘portrait’ or ‘landscape’. Default is to leave this unchanged. This option has no effect on EPS or PDF output.
solid If True, force lines to become solid (i.e., not dashed). Default is False.
fontname Set the font to be used for titles, labels, etc. Must be a valid PostScript font or an oblique version of the Symbol font (called “Symbol-Oblique”) which is useful for mathematics. Default font is “Helvetica”.
fontsize Set the size of the font in points. Default is 20 for for PostScript output and 8 for PDF output.
hardcopy_old(filename, **kwargs)[source]

Currently supported extensions in Gnuplot backend:

‘.ps’ (PostScript) ‘.eps’ (Encapsualted PostScript) ‘.png’ (Portable Network Graphics)

Optional arguments:

color – True (colors) or False (black and white). fontname – default is Helvetica. fontsize – default is 16. orientation – ‘portrait’ or ‘landscape’ (default). Only available

for PostScript output.
hot(m=0)[source]

Black-red-yellow-white color map.

hsv(m=0)[source]

Hue-saturation-value color map.

jet(m=0)[source]

Variant of hsv.

lines(m=0)[source]

Color map with the line colors.

m1(*args)

Add a label to the z-axis.

Calling:

zlabel(s)

adds the text given in s beside the z-axis on the current axis.

Calling:

zlabel(ax, ...)

adds the zlabel to the Axis object ax instead of the current axis.

m2(m=0)

Shades of blue and green color map.

pink(m=0)[source]

Pastel shades of pink color map.

prism(m=0)[source]

Prism color map.

spring(m=0)[source]

Shades of magenta and yellow color map.

summer(m=0)[source]

Shades of green and yellow color map.

text(x, y, text, fontname='Helvetica', fontsize=12)[source]

Write text at position (x,y) in a curveplot.

vga(m=0)[source]

Windows colormap for 16 colors.

white(m=64)[source]

All white color map.

winter(m=0)[source]

Shades of blue and green color map.

scitools.easyviz.gnuplot_.arrayconverter(a)[source]
scitools.easyviz.gnuplot_.get_gnuplot_version()[source]

Return Gnuplot version used in Gnuplot.py.

scitools.easyviz.gnuplot_.write_array(f, set, item_sep=' ', nest_prefix='', nest_suffix='\n', nest_sep='')[source]

Write an array of arbitrary dimension to a file.

A general recursive array writer. The last four parameters allow a great deal of freedom in choosing the output format of the array. The defaults for those parameters give output that is gnuplot-readable. But using ‘(”,”, “{”, “}”, ”,
”)’ would output

an array in a format that Mathematica could read. ‘item_sep’ should not contain ‘%’ (or if it does, it should be escaped to ‘%%’) since it is put into a format string.

The default 2-d file organization:

set[0,0] set[0,1] ...
set[1,0] set[1,1] ...

The 3-d format:

set[0,0,0] set[0,0,1] ...
set[0,1,0] set[0,1,1] ...

set[1,0,0] set[1,0,1] ...
set[1,1,0] set[1,1,1] ...

Previous topic

scitools.easyviz.dx_

This Page