[Top] [Contents] [Index] [ ? ]

pychart manual

pychart Manual

yasushi@cs.washington.edu

1. Introduction  
2. Examples  
3. Anatomy of a chart  
5. Attributes  
6. Unit of length  
7. Coordinate system  
8. Input data  
9. Area  
10. Axes  
11. Line and scatter plots  
12. Range plots  
13. Bar plots  
14. Pie plots  
15. Legends  
16. Line styles  
17. Tick marks  
18. Colors  
19. Fill styles  
20. Texts  
21. Annotation  
22. Arrows  
23. Error Bars  
24. Tricks  
Index  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1. Introduction

pychart is a Python library for creating "professional" quality charts. It produces line plots, bar plots, range-fill plots, and pie charts in Postscript or PDF.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2. Examples


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.1 Line plot example

linetest

This example draws a simple line plot. Below is the source code used to produce this chart.

linetest.py:
 
# This line imports all the chart modules.
from pychart import *

# We have 10 sample points total.  The first value in each tuple is
# the X value, and subsequent values are Y values for different lines.
data = [(10, 20, 30), (20, 65, 33),
	(30, 55, 30), (40, 45, 51),
	(50, 25, 27), (60, 75, 30),
	(70, 80, 42), (80, 62, 32),
	(90, 42, 39), (100, 32, 39)]

# The format attribute speficies the text to be drawn at each tick mark.
# Here, texts are rotated -60 degrees ("/a-60"), left-aligned ("/hL"),
# and numbers are printed as integers ("%d"). 
xaxis = axis.X(format="/a-60/hL%d", tic_interval = 20, label="Stuff")
yaxis = axis.Y(tic_interval = 20, label="Value")

# Define the drawing area. "y_range=(0,None)" tells that the Y minimum
# is 0, but the Y maximum is to be computed automatically. Without
# y_ranges, Pychart will pick the minimum Y value among the samples,
# i.e., 20, as the base value of Y axis.
ar = area.T(x_axis=xaxis, y_axis=yaxis, legend=legend.T(),
  	    y_range=(0,None))

# The first plot extracts the X values from the 1st column ("xcol=0")
# of DATA ("data=data"), and the Y values from the 2nd column
# ("ycol=1") of DATA.
plot = line_plot.T(label="foo", data=data, xcol=0, ycol=1, tick_mark=tick_mark.star)

plot2 = line_plot.T(label="bar", data=data, xcol=0, ycol=2, tick_mark=tick_mark.square)

ar.add_plot(plot, plot2)

# The call to ar.draw() usually comes at the end of a program.  It
# draws the axes, the plots, and the legend (if any).

ar.draw()

To produce the chart, just feed the file to Python.

 
python linetest.py >linetest.eps

Or, to produce a PDF chart, run python like below (see section 4. Options).

 
% setenv PYCHART_OPTIONS "output=pdf"
% python linetest.py >linetest.pdf

Every pychart program starts with from pychart import * to import all the objects and functions provided by pychart. Each chart is represented by the area object, which defines the size , the coordinate system (linear, log, etc), and all the plots to be drawn in the chart. The final line of the program should end with area.draw() that draws all the components of the chart to the standard output.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.2 Bar plot example

bartestv

Above example is a little more complicated chart. the below program generates this chart.

 
from pychart import *;

data = [(10, 20, 30, 5), (20, 65, 33, 5),
	(30, 55, 30, 5), (40, 45, 51, 7),
	(50, 25, 27, 3), (60, 75, 30, 5),
	(70, 80, 42, 5), (80, 62, 32, 5),
	(90, 42, 39, 5), (100, 32, 39, 4)]

# The attribute y_coord_system="category" tells that the Y axis values
# should be taken from samples, y_category_col'th column of
# y_category_data.  Thus, in this example, Y values will be
# [40,50,60,70,80].
ar = area.T(y_coord_system = 'category', 
            y_category_data = data[3:8], y_category_col = 0,
            x_range = (0,100), 
            x_axis=axis.X(label="X label", tic_interval=20, 
                          grid_interval=20, grid_style=line_style.gray5dash1),
            y_axis=axis.Y(label="Y label"), legend = legend.T(),
            bg_style = fill_style.gray9, border_line_style = line_style.default)

# Below call sets the default attributes for all bar plots.
chart_object.set_defaults(bar_plot.T, direction="horizontal", data=data)

ar.add_plot(bar_plot.T(label="foo", cluster=(0,3)))
ar.add_plot(bar_plot.T(label="bar", hcol=2, cluster=(1,3), fill_style=fill_style.diag))
ar.add_plot(bar_plot.T(label="baz", hcol=3, cluster=(2,3), fill_style=fill_style.rdiag))

ar.draw()




[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3. Anatomy of a chart

A chart comprises a set of components. Each component belongs to a certain class, from which an instance tailored for a particular chart is generated. The standard set of component classes follow:

area.T
The area class defines the size, the location, and the coordinate system (linear, logarithmic, etc) of a chart (see section 9. Area). It also contains axes, plots, and legends, as described below. At least one Area needs to be created in any chart.

axis.X
axis.Y
The axis class defines the look of an axis. You can specify, for example, the interval and the style of tick marks and grid lines (see section 10. Axes). pychart provides two types of axes, axis.X and axis.Y, corresponding to horizontal and vertical axes.

plot.T
The plot class actually draws a chart. Several subclasses of plots are provided by pychart, including line plots (see section 11. Line and scatter plots), range-fill plots (see section 12. Range plots), bar plots (see section 13. Bar plots), and pie plots (see section 14. Pie plots). You can draw multiple plots in a single chart, and most of the times you can even mix different types of plots, e.g., line plots and bar plots.

legend.T
The legend class is an optional rectangular box that describes what each plot means (see section 15. Legends).

text_box.T
The text_box is an optional rectangular box that contains arbitrary text. It can also contain arrows (see section 21. Annotation).

canvas.T
The canvas is a "virtual paper" that defines graph-drawing primitives, such as lines, rectangles, and texts. Canvas is used by other components in the graph, and usually it is not manipulated directly by users. It's handy, however, if you want to draw a line/circle/text/etc, directly on the Postscript or PDF file (see section 24.1 Drawing arbitrary objects).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4. Options

Environment variable `PYCHART_OPTIONS' is used to control the behavior of pychart. The variable is a sequence of `var=val' separated by commas (no space between commas allowed). Below is an example:

 
PYCHART_OPTIONS="output=pdf,font-family=Times"


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5. Attributes

Each component in a chart (see section 3. Anatomy of a chart) is described by a collection of attributes. For example, Axis (see section 10. Axes) includes the integer tic_len attribute that defines the length of "tick" lines drawn perpendicular to the axis. It also has the integer tic_interval attribute that defines the separation between tick lines (for the full list of Axis's attributes, See section 10. Axes).

Attributes are usually specified via named arguments while creating components:

 
ax = axis.X(tic_len = 3, tic_interval = 50)

Attributes can also be changed after a component is created, but before area.draw(), the main drawing function (see section 9. Area), is called. The below example has the same effect as the above.

 
ax = axis.X()
ax.tic_len = 3
ax.tic_interval = 50

Each attribute has a default value that supposedly gives you a standard look to the chart. You can change the default values by using the chart_object module. For example, the below example has the same effect as above, except that all the X axes that may be created afterwards have the new default values.

 
chart_object.set_defaults(axis.X, tic_len=3, tic_interval=50)
ax = axis.X()


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6. Unit of length

Lengths are measured by "Postscript points", which coincides with TeX points. One point is equal to 1/72 inch.

Variable: scaling.scale_factor
Defines the scaling factor of charts drawn on the canvas. The default value is 1.0. For example, when scaling.scale_factor = 3, then everything is drawn three times larger.

Function: area.x_pos VALUE
Converts X VALUE to points.

Function: area.y_pos VAL
Converts Y VALUE to points.

 
ar = area.T(loc=(50, 50), size=(100, 100), 
            xrange=(0,200), yrange=(0, 1000))
px = ar.x_pos(50)
py = ar.y_pos(100)

In the above example, the chart is drawn on the area defined by rectangle (50, 50) - (150, 150). The point (px, py) will be at (75, 60), which is the screen location at which the point (50, 100) would be drawn (i.e., 50 + 100 * 50/200 = 75, 50 + 100 * 100 / 1000 = 60).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7. Coordinate system

In pychart, X axis grows to the right, and Y axis grows up (same as Postscript, but different from X and Windows).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8. Input data

The basic function of pychart is to draw sample points in a variety of ways. Sample points are simply a sequence of sequences, where "sequence" is a Python term that stands for either a tuple (comma-separated numbers enclosed in parenthesis) or a list (comma-separated numbers enclosed in square brackets). Data are given to plots through the "data" attribute:

 
data = [(10,20), (11,38), (12,29)]
l = line_plot.T(data=data, xcol=0, ycol=1)

In the above example, three sample points will be drawn along with line segments that connect the points: (10, 20) - (11, 38) - (12, 29). Attribute xcol tells the plot where to find the X values (0th column of each sample in data), and ycol similarly tell she plot where to find the Y values (next column of each sample in data).

Module chart_data is provided to create data in various ways.

Function: chart_data.read_csv FILE, DELIM = ','

This function reads comma-separated samples from FILE. Empty lines and lines beginning with "`#'" are ignored. DELIM specifies how values in each line are separated. If it does not contain the letter "%", then DELIM is simply used to split each line into values. Otherwise, this function acts like scanf in C:

 
chart_data.read_csv("file", "%d,%s:%d")

This function currently supports only three conversion specifiers: "d"(int), "f"(double), and "s"(string).

Function: chart_data.fread_csv FP, DELIM=','
This function acts similarly as read_csv, but this function reads from an open file handle FP.

 
fp = open("foo", "r")
data = chart_data.fread_csv(fp, ",")

Function: chart_data.read_str DELIM, LINES
Similar to read_csv, but this function reads data from the list of lines.

 
fp = open("foo", "r")
data = chart_data.read_str(",", fp.readlines())

Function: chart_data.func F, FROM, TO, STEP

Create sample points from function F, which must be a single-parameter function that returns a number (e.g., math.sin). FROM and TO are the first and last X values. STEP specfies the sampling interval.

 
sin_samples = chart_data.func(math.sin, 0, math.pi*4, 0.1)

Function: chart_data.filter F, DATA

F must be a single-argument function that takes a sequence (i.e., a sample point) and returns a boolean. Filter calls F on each element in data and returns a list comprising elements for which which F returns true.

 
data = [[1,5], [2,10], [3,13], [4,16]]
data2 = chart_data.filter(lambda x: x[1] % 2 == 0, data)
# data2 will become [[2,10], [4,16]].

Function: chart_data.extract_rows DATA, ROWS...

Extract the rows specified in the argument list and returns a new data.

 
data2 = chart_data.extract_rows([[10,20], [30,40], [50,60]], 1, 2)
# data2 will become [[30,40],[50,60]].

Function: chart_data.extract_columns DATA, COLS...

Extract the columns specified in the argument list and returns a new data. For example,

 
data2 = chart_data.extract_columns([[10,20], [30,40], [50,60]], 0)
# data2 will become [[10],[30],[50]].

Function: chart_data.transform F, DATA

Apply the function F on each element in DATA, and return the list consisting of the return values from F.

 
data = [[10,20], [30,40], [50,60]]
data2 = chart_data.transform(lambda x: [x[0], x[1]+1], data)
# data2 will become [[10, 21], [30, 41], [50, 61]].

Function: chart_data.moving_average DATA, XCOL, YCOL, WIDTH

Compute the moving average of YCOL'th column of each sample point in DATA. In particular, for each element I in DATA, this function extracts up to WIDTH*2+1 elements, consisting of I itself, WIDTH elements before I, and WIDTH elements after I. It then computes the mean of the YCOL'th column of these elements, and it composes a two-element sample consisting of XCOL'th element and the mean.

 
data = [[10,20], [20,30], [30,50], [40,70], [50,5]]
data2 = chart_data.moving_average(data, 0, 1, 1)

In the above example, data2 will be computed as:

 
[(10, (20+30)/2), (20, (20+30+50)/3), (30, (30+50+70)/3), 
  (40, (50+70+5)/3), (50, (70+5)/2)]


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9. Area

Class area.T defines the location and the size of a chart. It also defines coordinate systems (linear, log, or enumeration) of the X and Y axes.

Attribute Type Default Description
bg_style fill_style.T None Background of the chart. See section 19. Fill styles.
border_line_style line_style.T None Line style of the frame that surrounds the chart. See section 16. Line styles.
legend legend.T None The legend of the chart. See section 15. Legends.
loc pair of int (0, 0) Bottom-left corner of the chart.
size pair of int (120, 110) Size of the chart drawing area, excluding axis labels, legends, tick marks, etc.
x_axis axis.X None The X axis. See section 10. Axes..
x_category_col int 0 Selects values from 'x_category_data'.
x_category_data list None Meaningful only when 'x_coord_system' is 'category'. 'x_category_col'th column of each tuple in x_category_data defines the set of X values.
x_coord_system 'linear'/'log'/'category' linear Either 'linear', 'log' or 'category'. Linear and log makes x coordinate scaled linearly or logarithmically. Category enumerates the X values through x_category_data and x_category_col attributes.
x_grid_over_plot int 0 If true, grid lines are drawn over plots.
x_log_base int 10
x_range pair of int None The minimum and maximum X values.
y_axis axis.Y None The Y axis. See section 10. Axes..
y_category_col int 1 See x_category_col.
y_category_data list None See x_category_data.
y_coord_system 'linear'/'log'/'category' linear Set the Y coordinate scaling. See also x_coord_system.
y_grid_over_plot int 0 See x_grid_over_plot.
y_log_base int 10
y_range pair of int None The minimum and maximum Y values.
y_zap pair of int None Compress the section.
y_zap_entire_area int None If 1, then the entire area is horizontally `zapped'.

Below are the methods defined in area.T objects:

Function: add_plot PLOT, ...
Add plots. plot must be a plot. See section 11. Line and scatter plots, section 13. Bar plots, section 14. Pie plots, section 12. Range plots.

Function: draw
Draw plots, axes, and the legend. This procedure must be called at the end of every pychart application.

Function: x_pos VAL
Converts X VAL to Postscript points. See section 6. Unit of length

Function: y_pos VAL
Converts Y VAL to Postscript points. See section 6. Unit of length


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10. Axes

Module Axis defines the look of an axis and grid lines. Two classes, `axis.X' and `axis.Y', are provided by this module.

axis.X

Attribute Type Default Description
first_tic_value number None The location of the first tick mark. Defaults to the minimum value of the axis.
format printf format string %s The format string for tick labels. It can be a `printf' style format string, or a single-parameter function that returns a string. See section 20. Texts..
grid_interval A number of a function 0 When the value is a number, it specifies the interval with which grid lines are drawn. Otherwise, the value must be a function. It must take no argument and return the list of numbers, which specifies the X or Y points where grid lines are drawn.
grid_style line_style.T None The style of grid lines. See section 16. Line styles.
label string axis label The description of the axis. See section 20. Texts..
label_offset pair of int (None, None) The location where the axis label is drawn. Relative to the left-bottom corner of the axis.
line_style line_style.T black The style of tick lines. See section 16. Line styles.
minor_tic_interval A number of a function None When the value is a number, it specifies the interval with which minor tick marks are drawn. Otherwise, the value must be a function. It must take no argument and return the list of numbers, which specifies the X or Y points where minor tick marks are drawn.
minor_tic_len number 3 The length of minor tick marks.
tic_interval A number of a function None When the value is a number, it specifies the interval with which tick marks are drawn. Otherwise, the value must be a function. It must take no argument and return the list of numbers, which specifies the X or Y points where tick marks are drawn.
tic_label_offset pair of int (0, 0) The location where the tick labels is drawn. Relative to the tip of the tick mark.
tic_len number 6 The length of tick lines

axis.Y

Attribute Type Default Description
first_tic_value number None The location of the first tick mark. Defaults to the minimum value of the axis.
format printf format string %s The format string for tick labels. It can be a `printf' style format string, or a single-parameter function that returns a string. See section 20. Texts..
grid_interval A number of a function 0 When the value is a number, it specifies the interval with which grid lines are drawn. Otherwise, the value must be a function. It must take no argument and return the list of numbers, which specifies the X or Y points where grid lines are drawn.
grid_style line_style.T gray7dash3 See section 16. Line styles.
label string axis label The description of the axis. See section 20. Texts..
label_offset pair of int (None, None) The location where the axis label is drawn. Relative to the left-bottom corner of the axis.
line_style line_style.T black The style of tick lines. See section 16. Line styles.
minor_tic_interval A number of a function None When the value is a number, it specifies the interval with which minor tick marks are drawn. Otherwise, the value must be a function. It must take no argument and return the list of numbers, which specifies the X or Y points where minor tick marks are drawn.
minor_tic_len number 3 The length of minor tick marks.
tic_interval A number of a function None When the value is a number, it specifies the interval with which tick marks are drawn. Otherwise, the value must be a function. It must take no argument and return the list of numbers, which specifies the X or Y points where tick marks are drawn.
tic_label_offset pair of int (0, 0) The location where the tick labels is drawn. Relative to the tip of the tick mark.
tic_len number 6 The length of tick lines


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

11. Line and scatter plots

Attribute Type Default Description
data any None Specifies the data points. See section 8. Input data.
data_label_format printf format string None The format string for label printed besides each sample point. It can be a `printf' style format string, or a two-parameter function that takes the (x, y) values and returns a string. See section 20. Texts..
data_label_offset pair of int (0, 5) Location of the data label relative to the sample point.
error_bar error_bar.Base None The style of the error bar. See section 23. Error Bars.
label string ??? The label to be displayed in the legend. See section 15. Legends., See section 20. Texts.
line_style line_style.T <function <lambda> at 0x8223804> The style of the line. See section 16. Line styles.
q_max_col int None See section 23. Error Bars.
q_min_col int None See section 23. Error Bars.
tick_mark tick_mark.Base None Tick marks to be displayed at each sample point.
xcol int 0 The X values of sample points are extracted from XCOL'th column of data. See section 8. Input data.
y_max_col int None The height of the errorbar is extracted from this column in data. See section 23. Error Bars.
y_min_col int 2 The depth of the errorbar is extracted from this column in data. See section 23. Error Bars.
ycol int 1 The X values of sample points are extracted from YCOL'th column of data. See section 8. Input data.

linetest3

Sample line plot

Below is the source code that produces Figure \ref{fig:linetest3}.
 
from pychart import *

data = chart_data.read_csv("lines.csv")

xaxis=axis.X(label="X", tic_interval=10)
yaxis=axis.Y(label="Y", tic_interval=10)
ar = area.T(x_range=(0,100), y_range=(0,100), x_axis=xaxis, y_axis=yaxis)
eb = error_bar.error_bar2(tic_len=5, hline_style=line_style.gray5)
ar.add_plot(line_plot.T(label="foo", data=data, error_bar=eb, y_min_col=3),
            line_plot.T(label="bar", data=data, ycol=2, error_bar=eb, y_min_col=3))
ar.draw()

tb = text_box.T(loc=(40, 130), text="This is\nimportant!", line_style=None)
tb.add_arrow((ar.x_pos(data[6][0]), ar.y_pos(data[6][1])), "cb")
tb.draw()

ar = area.T(loc=(200, 0), x_range=(0,100), y_range=(0,100),
            x_axis=xaxis, y_axis=yaxis, legend=legend.T())
ar.add_plot(line_plot.T(label="foo", data=data, data_label_format="/8{}%d"),
            line_plot.T(label="bar", data=data, ycol=2))
ar.draw()

Scatter plots can be created by setting the lineStyle attribute to None. See the next example.

scattertest

Sample scatter plot

Below is the source code that produces Figure \ref{fig:scattertest}.
 
from pychart import *
import whrandom

def randomdata():
    data = []
    for i in range(0, 30):
        data.append((whrandom.random() * 1000, whrandom.random() * 1000))
    return data

font.default_size = 9
chart_object.set_defaults(line_plot.T, line_style=None)

tick1 = tick_mark.Circle(size=2)
tick2 = tick_mark.Circle(size=2, fill_style=fill_style.black)
xaxis = axis.X(label="foo", format="/a-60{}%d")
yaxis = axis.Y(label="bar")

ar = area.T(x_axis=xaxis, y_axis=yaxis, 
            legend = legend.T(loc=(350, 50)), loc = (0, 0))

ar.add_plot(line_plot.T(label="plot1", data=randomdata(), tick_mark=tick1))
ar.add_plot(line_plot.T(label="plot2", data=randomdata(), tick_mark=tick2))
ar.draw()

xaxis = axis.X(label="foo", format="/a-30{}%d",
               grid_interval=10, grid_style=line_style.gray7dash3)
yaxis = axis.Y(label="bar")
ar = area.T(x_axis=xaxis, y_axis=yaxis, 
            x_coord_system='log', y_coord_system='log',
            legend=None, loc = (200, 0))

ar.add_plot(line_plot.T(label="plot1", data=randomdata(), tick_mark=tick1))
ar.add_plot(line_plot.T(label="plot2", data=randomdata(), tick_mark=tick2))
ar.draw()


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

12. Range plots

Attribute Type Default Description
data any None Specifies the data points. See section 8. Input data.
fill_style fill_style.T default See section 19. Fill styles.
label string ??? The label to be displayed in the legend. See section 15. Legends., See section 20. Texts.
line_style line_style.T black The style of the boundary line. See section 16. Line styles.
max_col int 2 The upper bound of the sweep is extracted from this column of data.
min_col int 1 The lower bound of the sweep is extracted from this column of data.
xcol int 0 The X values of sample points are extracted from XCOL'th column of data. See section 8. Input data.

rangetest

Sample range plot

Below is the source code that produces Figure \ref{fig:rangetest}.
 
from pychart import *

data = [ (0, 10, 30, 40, 60),
         (10, 20, 40, 50, 55),
         (20, 10, 35, 38, 43),
         (30, 8, 30, 35, 39),
         (40, 8, 20, 28, 39) ]

ar = area.T(x_axis = axis.X(label="X axis"),
            y_axis = axis.Y(label="Y axis", grid_interval = 10, grid_style = line_style.white),
            y_grid_over_plot=1, legend = legend.T())

ar.add_plot(range_plot.T(label="foo", data=data, fill_style = fill_style.gray9))
ar.add_plot(range_plot.T(label="bar", data=data, min_col=2, max_col=3, fill_style = fill_style.white))
ar.add_plot(range_plot.T(label="baz", data=data, min_col=3, max_col=4, fill_style = fill_style.gray5))
ar.draw()


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

13. Bar plots

Attribute Type Default Description
bcol int 0 Base (i.e., X when DIRECTION is vertical, Y otherwise) value of each bar is extracted this column in data.
cluster tuple (0, 1) foo
cluster_sep number 0 Separation between clustered boxes
data any None Specifies the data points. See section 8. Input data.
data_label_format printf format string None The format string for label printed besides each bar. It can be a `printf' style format string, or a two-parameter function that takes (x,y) values and returns a string. See section 20. Texts..
data_label_offset pair of int (0, 5) Location of data label relative to the sample point.
direction string vertical The direction the bars grows. Either 'horizontal' or 'vertical'.
error_bar error_bar.Base None The style of the error bar. See section 23. Error Bars.
fill_style fill_style.T <function <lambda> at 0x822ae64> Fill style of each box. See section 19. Fill styles.
hcol int 1 Height of each bar is extracted this column in data.
label string ??? The label to be displayed in the legend. See section 15. Legends., See section 20. Texts.
line_style line_style.T black The style of the outer frame of each box. See section 16. Line styles.
q_max_col int None
q_min_col int None
stack_on any None Each bar of this plot is stacked on top of the plot specified by this value.
width number 5 Width of each box.
y_max_col int None The depth of the errorbar is extracted from this column in data.
y_min_col int 2 The depth of the errorbar is extracted from this column in data.

bartest

Sample bar charts

Below is the source code that produces Figure \ref{fig:bartest}.
 
from pychart import *

data = [(10, 20, 30, 5),
        (20, 65, 33, 5),
        (30, 55, 30, 5),
        (40, 45, 51, 7),
        (50, 25, 27, 3)]

chart_object.set_defaults(area.T, size = (150, 120), y_range = (0, None),
                          x_coord_system = 'category',
                          x_category_data = data, x_category_col = 0)

chart_object.set_defaults(bar_plot.T, data = data)

# Draw the 1st graph. The Y upper bound is calculated automatically.
ar = area.T(legend = legend.T(), 
            x_axis=axis.X(label="X label", format="/a-30{}%d"),
            y_axis=axis.Y(label="Y label", tic_interval=10))

ar.add_plot(bar_plot.T(label="foo", cluster=(0, 3)),
            bar_plot.T(label="bar", hcol=2, cluster=(1, 3), fill_style=fill_style.diag),
            bar_plot.T(label="baz", hcol=3, cluster=(2, 3), fill_style=fill_style.rdiag))
ar.draw()

ar = area.T(legend = legend.T(), loc=(250,0),
            x_axis=axis.X(label="X label", format="/a-30{}%d"),
            y_axis=axis.Y(label="Y label", tic_interval=10))

plot1=bar_plot.T(label="foo")
plot2=bar_plot.T(label="bar", hcol=2, stack_on = plot1, fill_style=fill_style.diag)
plot3=bar_plot.T(label="baz", hcol=3, stack_on = plot2, fill_style=fill_style.rdiag)

ar.add_plot(plot1, plot2, plot3)
ar.draw()


bartestv

Vertical bar chart

Below is the source code that produces Figure \ref{fig:bartestv}.
 
from pychart import *;

data = [(10, 20, 30, 5), (20, 65, 33, 5),
	(30, 55, 30, 5), (40, 45, 51, 7),
	(50, 25, 27, 3), (60, 75, 30, 5),
	(70, 80, 42, 5), (80, 62, 32, 5),
	(90, 42, 39, 5), (100, 32, 39, 4)]

# The attribute y_coord_system="category" tells that the Y axis values
# should be taken from samples, y_category_col'th column of
# y_category_data.  Thus, in this example, Y values will be
# [40,50,60,70,80].
ar = area.T(y_coord_system = 'category', 
            y_category_data = data[3:8], y_category_col = 0,
            x_range = (0,100), 
            x_axis=axis.X(label="X label", tic_interval=20, 
                          grid_interval=20, grid_style=line_style.gray5dash1),
            y_axis=axis.Y(label="Y label"), legend = legend.T(),
            bg_style = fill_style.gray9, border_line_style = line_style.default)

# Below call sets the default attributes for all bar plots.
chart_object.set_defaults(bar_plot.T, direction="horizontal", data=data)

ar.add_plot(bar_plot.T(label="foo", cluster=(0,3)))
ar.add_plot(bar_plot.T(label="bar", hcol=2, cluster=(1,3), fill_style=fill_style.diag))
ar.add_plot(bar_plot.T(label="baz", hcol=3, cluster=(2,3), fill_style=fill_style.rdiag))

ar.draw()




[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

14. Pie plots

Attribute Type Default Description
arc_offsets list None
center pair of int None
data any None
data_col int 1
fill_styles list ['black', 'gray7', 'diag', 'gray3', 'rdiag', 'gray1', 'diag2', 'white', 'rdiag2', 'vert', 'diag3', 'gray5', 'horiz', 'gray9', 'rdiag3', 'wave', 'vwave', 'stitch', 'lines']
label_fill_style fill_style.T default See section 19. Fill styles.
label_line_style line_style.T None See section 16. Line styles.
label_offset number None
lable_col int 0
line_style line_style.T black See section 16. Line styles.
radius number None
shadow <function ShadowType at 0x814f20c> None
start_angle number 90

pietest

Sample pie chart

Below is the source code that produces Figure \ref{fig:pietest}.
 
from pychart import *

import sys
data = [("foo", 10),("bar", 20), ("baz", 30), ("ao", 40)]

ar = area.T(size=(150,150), legend=legend.T())

plot = pie_plot.T(data=data, arc_offsets=[0,10,0,10],
                  shadow = (2, -2, fill_style.gray5))
ar.add_plot(plot)
ar.draw()



[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

15. Legends

Attribute Type Default Description
bottom_fudge number 3 Amount of space below the last line.
frame_fill_style fill_style.T white See section 19. Fill styles.
frame_line_style line_style.T black See section 16. Line styles.
inter_row_sep number 0 Space between each entry in the legend.
left_fudge number 5 Amount of space left of the legend.
loc pair of int None Bottom-left corner of the legend.
right_fudge number 5 Amount of space right of the legend.
shadow <function ShadowType at 0x814f20c> None
top_fudge number 0 Amount of space above the first line.

The default location of a legend is the bottom-right end of the chart.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

16. Line styles

Attribute Type Default Description
cap_style int 0 Line cap style. 0: butt cap, 1: round cap, 2: projecting square cap. See also Postscript/PDF reference.
color color.T default See section 18. Colors.
dash tuple None The 2N'th value specifies the length of the line, and 2N+1'th value specfies the length of the blank. None draws a solid line.
join_style int 0 Join style. 0: Miter join, 1: round join, 2: bevel join
width number default_line_width Width of the line, in points.

linestyles

Standard line styles. These styles are referred to by names line_style.name, where name is the labels below them.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

17. Tick marks

Tick marks are used in conjunction with line plots (see section 11. Line and scatter plots) to show where sample points are. pychart defines several standard tick marks shown below.

Attribute Type Default Description
fill_style fill_style.T white See section 19. Fill styles.
line_style line_style.T black See section 16. Line styles.
size number 5 Size of the tick mark.

Several tick mark classes, which are subtypes of tick_mark.Base, are provided by pychart. They include: tick_mark.Circle, tick_mark.Square, tick_mark.Triangle, tick_mark.DownTriangle, tick_mark.X, TIckMark.Plus, tick_mark.Diamond, tick_mark.Star, tick_mark.Null.

Specific instance of tick mark classes are also defined for your convenience. Below is the list of such standard tick marks. They are refered to by as "tick_mark.name", where name is the labels below them.

tickmarks


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

18. Colors

Attribute Type Default Description
b number default_font_angle Intensity of blue.The value is between 0 and 1.
g number default_font_angle Intensity of green.The value is between 0 and 1.
r number default_font_angle Intensity of red. The value is between 0 and 1.

You can use all the colors defined in X rgb.txt (usually at `/usr/X11R6/lib/X11/rgb.txt'). The below shows some of the standard colors defined in the module. They are refereed to by the names color.name (e.g., color.gray1).

colors


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

19. Fill styles

The class fill_style.T determins the color and the pattern of the background of a region.

Attribute Type Default Description
bgcolor color.T white The background color. See section 18. Colors.
line_interval number 3 The interval between successive stitch lines.
line_style line_style.T black The style of the line. See section 16. Line styles.

The actual background patterns are offered by subclasses of fill_style.T:

Function: fill_style.Plain

This class just fills the region in the specified color. The attributes `line_style' and `line_interval' are ignored.

Function: fill_style.Diag
Fills the region with diagonal lines.

Function: fill_style.Rdiag
Fills the region with diagonal lines (but tilted in the opposite direction from `fill_style.Diag').

Function: fill_style.Vert
Fills the region with vertical lines.

Function: fill_style.Horiz
Fills the region with horizontal lines.

Function: fill_style.Stitch
Fills the region with horizontal and vertical lines.

Function: fill_style.Wave
Fills the region with horizontal wavy lines.

Function: fill_style.Vwave
Fills the region with vertical wavy lines.

Function: fill_style.Lines
Fills the region with a series of short line segments.

The below picture shows the standard set of fill styles. They are named like fill_style.name, where name are the labels shown in the picture.

fillstyles

Just for your information, the "rdiag3" style shown in the picture can be created manually by the following code:

 
rdiag3 = fill_style.Rdiag(line_style=line_style.T(width=3, color=color.gray5),
                          line_interval=6)    


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

20. Texts

Text strings may contain escape characters that control the appearance of the text. See section 21. Annotation for the example of an use of escape sequences.

Sequence Meaning
/add Specifies the angle the text is drawn. The parameter dd is a value between -360 to 360. The value 0 means left-to-right text, 90 means bottom-to-up, etc. If you want to print numbers right after the angle specification, put {} between the angle and the number. For example, the below displays "100" at 60-degree angle.
 
"/a60{}100"
/hA Specifies horizontal alignment of the text. A is one of "L" (left alignment), "R" (right alignment), "C" (center alignment).
/vA Specifies vertical alignment of the text. A is one of "B" (bottom), "T" (top), "M" (middle).
/T Switch to Times-Roman font family.
/H Switch to Helvetica font family.
/C Switch to Courier font family.
/B Switch to Bookman-Demi font family.
/A Switch to AvantGarde-Book font family.
/P Switch to Palatino font family.
/S Switch to Symbol font family.
/b Switch to bold typeface.
/i Switch to italic typeface.
/o Switch to oblique typeface.
/dd Set the font size to dd points.
 
"/20{}2001 space odyssey!"
`/c'dd Set the grayscale to 0.dd. Grayscale of 0 means black, 1 means white. `//', `/{', `/}' Display `/', `}', or `{'. `{ ... }' Limit the scope of escape sequences. `\n' Break the line.

Restriction: `/h', `/v', and `/a' commands must appear at the beginning of a string.

The font module defines several procedures, described below, for manipulating fonts.

Function: font.text_height TEXT
Get the height of the text in points.

Function: font.text_width TEXT
Get the width of the text in points.

Function: font.get_dimension TEXT
Returns a tuple (xmin, xmax, ymin, ymax)

Variable: font.default_family
Default font family (Helvetica).

Variable: font.default_size
Default font size (9).

Variable: font.default_halign
Default horizontal alignment (h)

Variable: font.default_valign
Default vertical alignment (b)

Variable: font.default_angle
Default angle (0)

fonttest

 
from pychart import *

x = 100
y = 500

def show_text(str):
    global x, y
    canvas.show(x, y, str)
    y = y - 20

show_text("/20{}/HHelvetica")
show_text("/20{}/CCourier")
show_text("/20{}/NHelvetica-Narrow")
show_text("/20{}/PPalatino-Roman")
show_text("/20{}/BBookman-Demi")
show_text("/20{}/AAvantgarde")
show_text("/20{}/T/iTimes-Roman")
show_text("/20{}/SSymbol")





[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

21. Annotation

Attribute Type Default Description
arrows list new_list List of arrows. Not to be touched by the application directly
bottom_fudge number 5 Space below the last line
fill_style fill_style.T white Box fill style. See section 19. Fill styles.
left_fudge number 5 Space left of the box
line_style line_style.T black Frame box style. See section 16. Line styles.
loc tuple (0, 0) Location of the text box.
radius number 0 Radius of the four corners of the rectangle.
right_fudge number 5 Space right of the box
text string ??? Text body. See section 20. Texts.
top_fudge number 0 Space above the first line

In addition to the above attributes, it provides the following methods.

Function: add_arrow TIP, TAIL=None, ARROW=arrow.default

Adds a straight arrow to the text box that points to `tip', which is a tuple of integers. `Tail' is a string consisting of the following letters: 'l', 'c', or 'r' means to start the arrow from the left, center, or right of the text box, respectively. 't', 'm', or 'b' means to start the arrow from the top, middle or bottom of the text box. For example, when `tail = 'tc'' then arrow is drawn from top-center point of the text box. `arrow' specifies the style of the arrow. See section 22. Arrows.

annotations

 
from pychart import *

a1 = text_box.T(loc=(100,100), text="Without frame")
a1.add_arrow((50, 100))
a1.add_arrow((180, 100))
a1.draw()

a1 = text_box.T(loc=(100,130), text="/hCMulti\n/bLine")
a1.add_arrow((50, 120))
a1.add_arrow((180, 100))
a1.draw()

a1 = text_box.T(loc=(100,160), text="Fat arrow", line_style=None)
a1.add_arrow((180, 140), tail='rm', arrow = arrow.fat1)
a1.draw()

a1 = text_box.T(loc=(180, 100), text="/a90Funny background", fill_style = fill_style.gray7)
a1.draw()

a1 = text_box.T(loc=(180, 140), text="/hL/20Big/oText\n/24/bHuge/oText", fill_style = None)
a1.draw()


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

22. Arrows

Attribute Type Default Description
head_color color.T default color of the arrow head. See section 18. Colors.
head_len number 8 Length of the arrow head.
head_style int 1 0 draws a triangular arrow head. 1 draws a swallow-tail arrow head
line_style line_style.T black Line style. See section 16. Line styles.
thickness number 4 Length of the base of the arrow head.

arrows


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

23. Error Bars

error_bar.error_bar1
Attribute Type Default Description
line_style line_style.T black See section 16. Line styles. See section 16. Line styles.
tic_len number 10 Length of the horizontal bars

error_bar.error_bar2
Attribute Type Default Description
hline_style line_style.T black The style of the horizontal bars. See section 16. Line styles.. See section 16. Line styles.
tic_len number 10 The length of the horizontal bars
vline_style line_style.T None The style of the vertical bar. See section 16. Line styles.

error_bar.error_bar3
Attribute Type Default Description
line_style line_style.T black See section 16. Line styles.

error_bar.error_bar4
Attribute Type Default Description
boxWidth number 4
fill_style fill_style.T gray7 See section 19. Fill styles.
line_style line_style.T black See section 16. Line styles.
tic_len number 4

errorbars


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

24. Tricks

24.1 Drawing arbitrary objects  
24.2 Clipping  
24.3 Changing the output  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

24.1 Drawing arbitrary objects

The `canvas' object, used internally by pychart, can be invoked manually if you desire so.

Function: canvas.line LINESTYLE, X1, Y1, X2, Y2

 
# draw a line from (10,20) to (100, 200)
canvas.line(line_style.blackdash1, 10, 20, 100, 200)    

Function: canvas.polygon LINESTYLE, FILLSTYLE, [(X1,Y1), ..., (Xn, Yn)]

LINESTYLE can be None, in which case no perimeter lines are drawn. FILLSTYLE can also be None, in which the internal of the polygon are left undrawn.

 
canvas.polygon(line_style.default, fill_style.default, [(10, 20), (100, 200), (300,300)])

Function: canvas.rectangle LINESTYLE, FILLSTYLE, X1, Y1, X2, Y2, SHADOW=None

Parameter shadow, if none, draws a drop-shadow. It should be a tuple of three values, (x_off, y_off, fill).

 
canvas.rectangle(line_style.default, fill_style.default, 10, 20, 300, 300)

Function: canvas.ellipsis LINESTYLE, FILLSTYLE, X, Y, RADIUS, Y-ELONGATION=1, START=0, END=360, SHADOW=None

The start and end angles are specified in degrees; i.e., between 0 and 360. Parameter shadow, if none, draws a drop-shadow. It should be a tuple of three values, (x_off, y_off, fill). .

Function: canvas.round_rectangle LINESTYLE, FILLSTYLE, X1,Y2,X2,Y2,RADIUS,SHADOW=None

Parameter shadow, if none, draws a drop-shadow. It should be a tuple of three values, (x_off, y_off, fill). .

Function: canvas.curve LINESTYLE, [(X1,Y2), ..., (Xn, Yn)]
Draw a Bezier curve.

Function: canvas.show X, Y, TEXT

TEXT supports font manipulation, as defined in See section 20. Texts.

Function: canvas.verbatim STR

This procedure outputs an arbitrary Postscript code STR.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

24.2 Clipping

A rectangle, polygon, or ellipsis region can be defined for clipping. Any drawing commands (see section 24.1 Drawing arbitrary objects) issued afterwards are confined in the region. You can even nest multiple clipping regions, in which case, drawings will be clipped to the intersection of the regions. canvas.endclip() ends the clipping. Clipping and endclip() must nest properly.

cliptest

 
from pychart import *

data = [(10, 20), (20, 65), (30, 55), (40, 45)]

# tic_angle is the angle X values are displayed below the axis.
xaxis = axis.X(label="Stuff")
yaxis = axis.Y(label="Value")

ar = area.T(x_axis=xaxis, y_axis=yaxis)

plot = line_plot.T(label="foo", data=data, xcol=0, ycol=1, tick_mark=tick_mark.star)

ar.add_plot(plot)

canvas.ellipsis(line_style.T(width=1.5,dash=(4,4)), None, 30, 20, 80, 0.8)
canvas.clip_ellipsis(30, 20, 80, 0.8)
ar.draw()
canvas.endclip()


Function: canvas.clip X1, Y1, X2, Y2,

This function starts clipping on the rectangular region.

 
canvas.clip(x,y,x2,y2)
draw something ...
canvas.endclip()

Function: canvas.clip_ellipsis X, Y, RADIUS, Y_ELONGATION

 
canvas.clip_ellipsis(x,y,radius,ratio)
draw something ...
canvas.endclip()

Function: canvas.clip_polygon [(X1,Y2),(X2,Y2), ..., (Xn, Yn)]
 
canvas.clip_polygon([(x1,y1),(x2,y2),...,(xn,yn)])
draw something ...
canvas.endclip()


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

24.3 Changing the output

To change the output stream to something other than stdout, do like below:

 
fp = open(...)
canvas.newcanvas(fp)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Index

Jump to:   A   B   C   D   E   F   G   H   I   J   L   M   P   Q   R   S   T   U   V   W   X   Y  

Index Entry Section

A
add_arrow21. Annotation
add_plot9. Area
alignment (text)20. Texts
annotation21. Annotation
arc_offsets14. Pie plots
area9. Area
area.T3. Anatomy of a chart
area.T3. Anatomy of a chart
area.x_pos6. Unit of length
area.y_pos6. Unit of length
arrow21. Annotation
arrows21. Annotation
attribute5. Attributes
average8. Input data
axis7. Coordinate system
axis10. Axes
axis.X3. Anatomy of a chart
axis.X3. Anatomy of a chart
axis.X10. Axes
axis.X10. Axes
axis.Y3. Anatomy of a chart
axis.Y3. Anatomy of a chart
axis.Y10. Axes
axis.Y10. Axes

B
b18. Colors
bar plot13. Bar plots
bcol13. Bar plots
Bezier curve24.1 Drawing arbitrary objects
bg_style9. Area
bgcolor19. Fill styles
border_line_style9. Area
bottom_fudge15. Legends
bottom_fudge21. Annotation
boxWidth23. Error Bars

C
canvas.clip24.2 Clipping
canvas.clip_ellipsis24.2 Clipping
canvas.clip_polygon24.2 Clipping
canvas.curve24.1 Drawing arbitrary objects
canvas.ellipsis24.1 Drawing arbitrary objects
canvas.endclip24.2 Clipping
canvas.line24.1 Drawing arbitrary objects
canvas.polygon24.1 Drawing arbitrary objects
canvas.rectangle24.1 Drawing arbitrary objects
canvas.round_rectangle24.1 Drawing arbitrary objects
canvas.show24.1 Drawing arbitrary objects
canvas.T3. Anatomy of a chart
canvas.T3. Anatomy of a chart
canvas.verbatim24.1 Drawing arbitrary objects
cap_style16. Line styles
center14. Pie plots
chart_data.extract_columns8. Input data
chart_data.extract_rows8. Input data
chart_data.filter8. Input data
chart_data.fread_csv8. Input data
chart_data.func8. Input data
chart_data.moving_average8. Input data
chart_data.read_csv8. Input data
chart_data.read_str8. Input data
chart_data.transform8. Input data
chart_object5. Attributes
clipping24.2 Clipping
cluster13. Bar plots
cluster_sep13. Bar plots
color16. Line styles
colors18. Colors
coordinate7. Coordinate system

D
dash16. Line styles
data8. Input data
data12. Range plots
data13. Bar plots
data14. Pie plots
data_col14. Pie plots
data_label_format11. Line and scatter plots
data_label_format13. Bar plots
data_label_offset11. Line and scatter plots
data_label_offset13. Bar plots
default attribute values5. Attributes
direction13. Bar plots
draw5. Attributes

E
ellipsis24.1 Drawing arbitrary objects
error bar23. Error Bars
error_bar11. Line and scatter plots
error_bar13. Bar plots

F
fill_style12. Range plots
fill_style13. Bar plots
fill_style17. Tick marks
fill_style21. Annotation
fill_style23. Error Bars
fill_style.Diag19. Fill styles
fill_style.Horiz19. Fill styles
fill_style.Lines19. Fill styles
fill_style.Plain19. Fill styles
fill_style.Rdiag19. Fill styles
fill_style.Stitch19. Fill styles
fill_style.Vert19. Fill styles
fill_style.Vwave19. Fill styles
fill_style.Wave19. Fill styles
fill_styles14. Pie plots
Filter8. Input data
first_tic_value10. Axes
first_tic_value10. Axes
font20. Texts
font.default_angle20. Texts
font.default_family20. Texts
font.default_halign20. Texts
font.default_size20. Texts
font.default_valign20. Texts
font.get_dimension20. Texts
font.text_height20. Texts
font.text_width20. Texts
format10. Axes
format10. Axes
frame_fill_style15. Legends
frame_line_style15. Legends

G
g18. Colors
grid_interval10. Axes
grid_interval10. Axes
grid_style10. Axes
grid_style10. Axes

H
hcol13. Bar plots
head_color22. Arrows
head_len22. Arrows
head_style22. Arrows
hline_style23. Error Bars

I
inter_row_sep15. Legends

J
join_style16. Line styles
justification (text)20. Texts

L
label10. Axes
label10. Axes
label11. Line and scatter plots
label12. Range plots
label13. Bar plots
label_fill_style14. Pie plots
label_line_style14. Pie plots
label_offset10. Axes
label_offset10. Axes
label_offset14. Pie plots
lable_col14. Pie plots
left_fudge15. Legends
left_fudge21. Annotation
legend9. Area
legend.T3. Anatomy of a chart
legend.T3. Anatomy of a chart
line24.1 Drawing arbitrary objects
line plot11. Line and scatter plots
line_interval19. Fill styles
line_style10. Axes
line_style10. Axes
line_style11. Line and scatter plots
line_style12. Range plots
line_style13. Bar plots
line_style14. Pie plots
line_style17. Tick marks
line_style19. Fill styles
line_style21. Annotation
line_style22. Arrows
line_style23. Error Bars
line_style23. Error Bars
line_style23. Error Bars
loc9. Area
loc15. Legends
loc21. Annotation

M
marquee24.1 Drawing arbitrary objects
max_col12. Range plots
mean8. Input data
min_col12. Range plots
minor_tic_interval10. Axes
minor_tic_interval10. Axes
minor_tic_len10. Axes
minor_tic_len10. Axes

P
PDF4. Options
pie plot14. Pie plots
plot.T3. Anatomy of a chart
plot.T3. Anatomy of a chart
points6. Unit of length
polygon24.1 Drawing arbitrary objects
Postscript4. Options
Postscript6. Unit of length
Postscript9. Area
Postscript24.1 Drawing arbitrary objects
PYCHART_OPTIONS4. Options

Q
q_max_col11. Line and scatter plots
q_max_col13. Bar plots
q_min_col11. Line and scatter plots
q_min_col13. Bar plots

R
r18. Colors
radius14. Pie plots
radius21. Annotation
range plot12. Range plots
rectangle24.1 Drawing arbitrary objects
rgb.txt18. Colors
right_fudge15. Legends
right_fudge21. Annotation
round_rectangle24.1 Drawing arbitrary objects

S
samples8. Input data
scale_factor6. Unit of length
scaling.scale_factor6. Unit of length
scanf8. Input data
Scatter plot11. Line and scatter plots
scatter plot11. Line and scatter plots
set_defaults5. Attributes
shadow14. Pie plots
shadow15. Legends
size9. Area
size17. Tick marks
stack_on13. Bar plots
start_angle14. Pie plots

T
text21. Annotation
text20. Texts
text24.1 Drawing arbitrary objects
text_box21. Annotation
text_box.T3. Anatomy of a chart
text_box.T3. Anatomy of a chart
thickness22. Arrows
tic_interval10. Axes
tic_interval10. Axes
tic_label_offset10. Axes
tic_label_offset10. Axes
tic_len10. Axes
tic_len10. Axes
tic_len23. Error Bars
tic_len23. Error Bars
tic_len23. Error Bars
tick mark17. Tick marks
tick_mark11. Line and scatter plots
top_fudge15. Legends
top_fudge21. Annotation

U
unit of length6. Unit of length

V
vline_style23. Error Bars

W
width13. Bar plots
width16. Line styles

X
X axis7. Coordinate system
X axis10. Axes
x_axis9. Area
x_category_col9. Area
x_category_data9. Area
x_coord_system9. Area
x_grid_over_plot9. Area
x_log_base9. Area
x_pos9. Area
x_range9. Area
xcol8. Input data
xcol11. Line and scatter plots
xcol12. Range plots

Y
Y axis7. Coordinate system
Y axis10. Axes
y_axis9. Area
y_category_col9. Area
y_category_data9. Area
y_coord_system9. Area
y_grid_over_plot9. Area
y_log_base9. Area
y_max_col11. Line and scatter plots
y_max_col13. Bar plots
y_min_col11. Line and scatter plots
y_min_col13. Bar plots
y_pos9. Area
y_range9. Area
y_zap9. Area
y_zap_entire_area9. Area
ycol8. Input data
ycol11. Line and scatter plots

Jump to:   A   B   C   D   E   F   G   H   I   J   L   M   P   Q   R   S   T   U   V   W   X   Y  


[Top] [Contents] [Index] [ ? ]

Table of Contents


[Top] [Contents] [Index] [ ? ]

Short Table of Contents

1. Introduction
2. Examples
3. Anatomy of a chart
4. Options
5. Attributes
6. Unit of length
7. Coordinate system
8. Input data
9. Area
10. Axes
11. Line and scatter plots
12. Range plots
13. Bar plots
14. Pie plots
15. Legends
16. Line styles
17. Tick marks
18. Colors
19. Fill styles
20. Texts
21. Annotation
22. Arrows
23. Error Bars
24. Tricks
Index

[Top] [Contents] [Index] [ ? ]

About this document

This document was generated by Yasushi Saito on March, 3 2001 using texi2html

The buttons in the navigation panels have the following meaning:

Button Name Go to From 1.2.3 go to
[ < ] Back previous section in reading order 1.2.2
[ > ] Forward next section in reading order 1.2.4
[ << ] FastBack previous or up-and-previous section 1.1
[ Up ] Up up section 1.2
[ >> ] FastForward next or up-and-next section 1.3
[Top] Top cover (top) of document  
[Contents] Contents table of contents  
[Index] Index concept index  
[ ? ] About this page  

where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:

This document was generated by Yasushi Saito on March, 3 2001 using texi2html