[comment {-*- tcl -*- doctools manpage}]
[manpage_begin Plotchart n 0.9]
[copyright {2004 Arjen Markus <arjenmarkus@users.sourceforge.net>}]
[moddesc   Plotchart]
[titledesc {Simple plotting and charting package}]
[require Tcl [opt 8.3]]
[require Plotchart [opt 0.9]]

[description]
[para]

Plotchart is a Tcl-only package that focuses on the easy creation of
xy-plots, barcharts and other common types of graphical presentations.
The emphasis is on ease of use, rather than flexibility. The procedures
that create a plot use the entire canvas window, making the layout
of the plot completely automatic.

[para]

This results in the creation of an xy-plot in, say, ten lines of code:

[para]
[example {
    package require Plotchart

    canvas .c -background white -width 400 -height 200
    pack   .c -fill both

    #
    # Create the plot with its x- and y-axes
    #
    set s [::Plotchart::createXYPlot .c {0.0 100.0 10.0} {0.0 100.0 20.0}]

    foreach {x y} {0.0 32.0 10.0 50.0 25.0 60.0 78.0 11.0 } {
        $s plot series1 $x $y
    }

    $s title "Data series"
}]
[para]

A drawback of the package might be that it does not do any data
management. So if the canvas that holds the plot is to be resized, the
whole plot must be redrawn.

The advantage, though, is that it offers a number of plot and chart
types:

[list_begin bullet]

[bullet]
XY-plots like the one shown above with any number of data series.

[bullet]
Stripcharts, a kind of XY-plots where the horizontal axis is adjusted
automatically. The result is a kind of sliding window on the data
series.

[bullet]
Polar plots, where the coordinates are polar instead of cartesian.

[bullet]

Isometric plots, where the scale of the coordinates in the two
directions is always the same, i.e. a circle in world coordinates
appears as a circle on the screen.

[nl]

You can zoom in and out, as well as pan with these plots ([emph Note:]
this works best if no axes are drawn, the zooming and panning routines
do not distinguish the axes), using the mouse buttons with the control
key and the arrow keys with the control key.

[bullet]
Piecharts, with automatic scaling to indicate the proportions.

[bullet]
Barcharts, with either vertical or horizontal bars, stacked bars or
bars side by side.

[bullet]
Timecharts, where bars indicate a time period and milestones or other
important moments in time are represented by triangles.

[bullet]
3D plots (both for displaying surfaces and 3D bars)
[list_end]

[section "PLOT CREATION COMMANDS"]

You create the plot or chart with one single command and then fill the
plot with data:

[list_begin definitions]

[call [cmd ::Plotchart::createXYPlot] [arg w] [arg xaxis] [arg yaxis]]

Create a new xy-plot.

[list_begin arg]
[arg_def widget w in]
Name of the [emph existing] canvas widget to hold the plot.

[arg_def list xaxis in]
A 3-element list containing minimum, maximum and stepsize for the x-axis, in this order.

[arg_def list yaxis in]
A 3-element list containing minimum, maximum and stepsize for the y-axis, in this order.

[list_end]
[nl]


[call [cmd ::Plotchart::createStripchart] [arg w] [arg xaxis] [arg yaxis]]

Create a new strip chart. The only difference to a regular XY plot is
that the x-axis will be automatically adjusted when the x-coordinate
of a new point exceeds the maximum.

[list_begin arg]
[arg_def widget w in]
Name of the [emph existing] canvas widget to hold the plot.

[arg_def list xaxis in]
A 3-element list containing minimum, maximum and stepsize for the x-axis, in this order.

[arg_def list yaxis in]
A 3-element list containing minimum, maximum and stepsize for the y-axis, in this order.

[list_end]
[nl]


[call [cmd ::Plotchart::createPolarPlot] [arg w] [arg radius_data]]

Create a new polar plot.

[list_begin arg]
[arg_def widget w in]
Name of the [emph existing] canvas widget to hold the plot.

[arg_def list radius_data in]
A 2-element list containing maximum radius and stepsize for the radial
axis, in this order.

[list_end]
[nl]


[call [cmd ::Plotchart::createIsometricPlot] [arg w] [arg xaxis] [arg yaxis] [arg stepsize]]

Create a new isometric plot, where the vertical and the horizontal
coordinates are scaled so that a circle will truly appear as a circle.

[list_begin arg]
[arg_def widget w in]
Name of the [emph existing] canvas widget to hold the plot.

[arg_def list xaxis in]
A 2-element list containing minimum, and maximum for the x-axis, in this order.

[arg_def list yaxis in]
A 2-element list containing minimum, and maximum for the y-axis, in this order.

[arg_def float|[const noaxes] stepsize in]

Either the stepsize used by both axes or the keyword [const noaxes] to
signal the plot that it should use the full area of the widget, to not
draw any of the axes.

[list_end]
[nl]


[call [cmd ::Plotchart::create3DPlot] [arg w] [arg xaxis] [arg yaxis] [arg zaxis]]

Create a new 3D plot.

[list_begin arg]
[arg_def widget w in]
Name of the [emph existing] canvas widget to hold the plot.

[arg_def list xaxis in]
A 3-element list containing minimum, maximum and stepsize for the x-axis, in this order.

[arg_def list yaxis in]
A 3-element list containing minimum, maximum and stepsize for the y-axis, in this order.

[arg_def list zaxis in]
A 3-element list containing minimum, maximum and stepsize for the z-axis, in this order.

[list_end]
[nl]


[call [cmd ::Plotchart::createPiechart] [arg w]]

Create a new piechart.

[list_begin arg]
[arg_def widget w in]
Name of the [emph existing] canvas widget to hold the plot.

[list_end]
[nl]


[call [cmd ::Plotchart::createBarchart] [arg w] [arg xlabels] [arg yaxis] [arg noseries]]

Create a new barchart with vertical bars. The horizontal axis will
display the labels contained in the argument [arg xlabels]. The number
of series given by [arg noseries] determines both the width of the
bars, and the way the series will be drawn.

[nl]

If the keyword [const stacked] was specified the series will be drawn
stacked on top of each other. Otherwise each series that is drawn will
be drawn shifted to the right.

[list_begin arg]
[arg_def widget w in]
Name of the [emph existing] canvas widget to hold the plot.

[arg_def list xlabels in]
List of labels for the x-axis. Its length also determines the number of
bars that will be plotted per series.

[arg_def list yaxis in]
A 3-element list containing minimum, maximum and stepsize for the y-axis, in this order.

[arg_def int|[const stacked] noseries in]
The number of data series that will be plotted. This has to be an
integer number greater than zero (if [const stacked] is not used).

[list_end]
[nl]


[call [cmd ::Plotchart::createHorizontalBarchart] [arg w] [arg xlabels] [arg yaxis] [arg noseries]]

Create a new barchart with horizontal bars. The vertical axis will
display the labels contained in the argument [arg ylabels]. The number
of series given by [arg noseries] determines both the width of the
bars, and the way the series will be drawn.

[nl]

If the keyword [const stacked] was specified the series will be drawn
stacked from left to right. Otherwise each series that is drawn will
be drawn shifted upward.

[list_begin arg]
[arg_def widget w in]
Name of the [emph existing] canvas widget to hold the plot.

[arg_def list ylabels in]
List of labels for the y-axis. Its length also determines the number of
bars that will be plotted per series.

[arg_def list yaxis in]
A 3-element list containing minimum, maximum and stepsize for the x-axis, in this order.

[arg_def int|[const stacked] noseries in]
The number of data series that will be plotted. This has to be an
integer number greater than zero (if [const stacked] is not used).

[list_end]
[nl]


[call [cmd ::Plotchart::createTimechart] [arg w] [arg time_begin] [arg time_end] [arg noitems]]

Create a new timechart.

The time axis (= x-axis) goes from [arg time_begin] to [arg time_end],
and the vertical spacing is determined by the number of items to plot.

[list_begin arg]
[arg_def widget w in]
Name of the [emph existing] canvas widget to hold the plot.

[arg_def string time_begin in]
The start time given in a form that is recognised by the [cmd "clock scan"]
command (e.g. "1 january 2004").

[arg_def string time_end in]
The end time given in a form that is recognised by the [cmd "clock scan"]
command (e.g. "1 january 2004").

[arg_def int noitems in]
Expected/maximum number of items. This determines the vertical
spacing.

[list_end]
[list_end]

[section "PLOT METHODS"]

Each of the creation commands explained in the last section returns
the name of a new object command that can be used to manipulate the
plot or chart. The subcommands available to a chart command depend on
the type of the chart.

[para]

General subcommands for all types of charts. $anyplot is the command
returned by the creation command:

[list_begin definitions]
[call [cmd \$anyplot] title [arg text]]

Specify the title of the whole chart.

[list_begin arg]
[arg_def string text in]
The text of the title to be drawn.

[list_end]
[nl]


[call [cmd \$anyplot] saveplot [arg filename]]

Draws the plot into a file, using PostScript.

[list_begin arg]
[arg_def string filename in]
Contain the path name of the file to write the plot to.

[list_end]
[nl]


[call [cmd \$anyplot] xtext [arg text]]

Specify the title of the x-axis, for those plots that have a straight
x-axis.

[list_begin arg]
[arg_def string text in]
The text of the x-axis label to be drawn.

[list_end]
[nl]


[call [cmd \$anyplot] ytext [arg text]]

Specify the title of the y-axis, for those plots that have a straight
y-axis.

[list_begin arg]
[arg_def string text in]
The text of the y-axis label to be drawn.

[list_end]
[nl]


[call [cmd \$anyplot] xconfig [option -option] [arg value] ...]

Set one or more configuration parameters for the x-axis.

The following options are known:

[list_begin opt]

[opt_def format fmt]
The format for the numbers along the axis.

[opt_def ticklength length]
The length of the tickmarks (in pixels).

[opt_def ticklines boolean]
Whether to draw ticklines ([const true]) or not ([const false]).

[opt_def scale scale_data]
New scale data for the axis, i.e. a 3-element list containing minimum,
maximum and stepsize for the axis, in this order.

[nl]
[emph Beware:] Setting this option will clear all data from the plot.

[list_end]
[nl]


[call [cmd \$anyplot] yconfig [option -option] [arg value] ...]

Set one or more configuration parameters for the y-axis. This method
accepts the same options and values as the method [method xconfig].

[list_end]
[para]

[emph Note:] The commands [method xconfig] and [method yconfig] are
currently implemented only for XY-plots
and only the option [option -format] has any effect.

[para]

For [emph {xy plots}] and [emph stripcharts]:

[list_begin definitions]
[call [cmd \$xyplot] plot [arg series] [arg xcrd] [arg ycrd]]

Add a data point to the plot.

[list_begin arg]
[arg_def string series in]
Name of the data series the new point belongs to.

[arg_def float xcrd in]
X-coordinate of the new point.

[arg_def float ycrd in]
Y-coordinate of the new point.

[list_end]
[list_end]
[para]

For [emph {polar plots}]:

[list_begin definitions]
[call [cmd \$polarplot] plot [arg series] [arg radius] [arg angle]]

Add a data point to the polar plot.

[list_begin arg]
[arg_def string series in]
Name of the data series the new point belongs to.

[arg_def float radius in]
Radial coordinate of the new point.

[arg_def float angle in]
Angular coordinate of the new point (in degrees).

[list_end]
[list_end]
[para]

For [emph {3D plots}]:

[list_begin definitions]
[call [cmd \$plot3d] plotfunc [arg function]]

Plot a function defined over two variables [var x] and [var y].

The resolution is determined by the set grid sizes (see the method
[method gridsize] for more information).

[list_begin arg]
[arg_def string function in]
Name of the procedure that calculates the z-value for the given x and
y coordinates. The procedure has to accept two float arguments (x is
first argument, y is second) and return a floating-point value.

[list_end]
[nl]


[call [cmd \$plot3d] gridsize [arg nxcells] [arg nycells]]

Set the grid size in the two directions. Together they determine how
many polygons will be drawn for a function plot.

[list_begin arg]
[arg_def int nxcells in]
Number of grid cells in x direction. Has to be an integer number
greater than zero.

[arg_def int nycells in]
Number of grid cells in y direction. Has to be an integer number
greater than zero.

[list_end]
[nl]


[call [cmd \$plot3d] plotdata [arg data]]

Plot a matrix of data.

[list_begin arg]
[arg_def list data in]
The data to be plotted. The data has to be provided as a nested list
with 2 levels. The outer list contains rows, drawn in y-direction, and
each row is a list whose elements are drawn in x-direction, for the
columns. Example:

[nl]
[example {
    set data {
    {1.0 2.0 3.0}
    {4.0 5.0 6.0}
    }
}]

[list_end]
[nl]


[call [cmd \$plot3d] colours [arg fill] [arg border]]

Configure the colours to use for polygon borders and inner area.

[list_begin arg]

[arg_def color fill in]
The colour to use for filling the polygons.

[arg_def color border in]
The colour to use for the border of the polygons.

[list_end]
[list_end]
[para]

For [emph {xy plots}], [emph stripcharts] and [emph {polar plots}]:

[list_begin definitions]
[call [cmd \$xyplot] dataconfig [arg series] [option -option] [arg value] ...]

Set the value for one or more options regarding the drawing of data of
a specific series.

[list_begin arg]
[arg_def string series in]
Name of the data series whose configuration we are changing.

[list_end]
[nl]

The following option are known:

[list_begin opt]
[opt_def colour c]
[opt_def color c]
The colour to be used when drawing the data series.

[opt_def type enum]
The drawing mode chosen for the series.
This can be one of [const line], [const symbol], or [const both].

[opt_def symbol enum]

What kind of symbol to draw. The value of this option is ignored when
the drawing mode [const line] was chosen. This can be one of

[const plus], [const cross], [const circle], [const up] (triangle
pointing up), [const down] (triangle pointing down), [const dot]
(filled circle), [const upfilled] or [const downfilled] (filled
triangles).

[list_end]
[list_end]
[para]

For [emph piecharts]:

[list_begin definitions]
[call [cmd \$pie] plot [arg data]]

Fill a piechart.

[list_begin arg]
[arg_def list data in]
A list of pairs (labels and values). The values determine the relative
size of the circle segments. The labels are drawn beside the circle.

[list_end]

[call [cmd \$pie] colours [arg colour1] [arg colour2] ...]

Set the colours to be used.

[list_begin arg]
[arg_def color colour1 in]
The first colour.

[arg_def color colour2 in]
The second colour, and so on.

[list_end]
[list_end]
[para]

For [emph {vertical barcharts}]:

[list_begin definitions]
[call [cmd \$barchart] plot [arg series] [arg ydata] [arg colour]]

Add a data series to a barchart.

[list_begin arg]
[arg_def string series in]
Name of the series the values belong to.

[arg_def list ydata in]
A list of values, one for each x-axis label.

[arg_def color colour in]
The colour of the bars.

[list_end]
[list_end]
[para]

For [emph {horizontal barcharts}]:

[list_begin definitions]
[call [cmd \$barchart] plot [arg series] [arg xdata] [arg colour]]

Add a data series to a barchart.

[list_begin arg]
[arg_def string series in]
Name of the series the values belong to.

[arg_def list xdata in]
A list of values, one for each y-axis label.

[arg_def color colour in]
The colour of the bars.

[list_end]
[list_end]
[para]

For [emph timecharts]:

[list_begin definitions]
[call [cmd \$timechart] period [arg text] [arg time_begin] [arg time_end] [arg colour]]

Add a time period to the chart.

[list_begin arg]
[arg_def string text in]
The text describing the period.

[arg_def string time_begin in]
Start time of the period.

[arg_def string time_end in]
Stop time of the period.

[arg_def color colour in]
The colour of the bar (defaults to black).

[list_end]
[nl]


[call [cmd \$timechart] milestone [arg text] [arg time] [arg colour]]

Add a [term milestone] (represented as an point-down triangle) to the
chart.

[list_begin arg]
[arg_def string text in]
The text describing the milestone.

[arg_def string time in]
Time at which the milestone must be positioned.

[arg_def color colour in]
The colour of the triangle (defaults to black).

[list_end]
[nl]


[call [cmd \$timechart] vertline [arg text] [arg time]]

Add a vertical line (to indicate the start of the month for instance)
to the chart.

[list_begin arg]
[arg_def string text in]
The text appearing at the top (an abbreviation of the
date/time for instance).

[arg_def string time in]
Time at which the line must be positioned.

[list_end]
[list_end]
[para]

For [emph {isometric plots}] (to be extended):

[list_begin definitions]
[call [cmd \$isoplot] plot rectangle [arg x1] [arg y1] [arg x2] [arg y2] [arg colour]]

Plot the outlines of a rectangle.

[list_begin arg]
[arg_def float x1 in]
Minimum x coordinate of the rectangle to be drawn.

[arg_def float y1 in]
Minimum y coordinate of the rectangle.

[arg_def float x2 in]
Maximum x coordinate of the rectangle to be drawn.

[arg_def float y2 in]
Maximum y coordinate of the rectangle.

[arg_def color colour in]
The colour of the rectangle.

[list_end]
[nl]


[call [cmd \$isoplot] plot filled-rectangle [arg x1] [arg y1] [arg x2] [arg y2] [arg colour]]

Plot a rectangle filled with the given colour.

[list_begin arg]
[arg_def float x1 in]
Minimum x coordinate of the rectangle to be drawn.

[arg_def float y1 in]
Minimum y coordinate of the rectangle.

[arg_def float x2 in]
Maximum x coordinate of the rectangle to be drawn.

[arg_def float y2 in]
Maximum y coordinate of the rectangle.

[arg_def color colour in]
The colour of the rectangle.

[list_end]
[nl]


[call [cmd \$isoplot] plot circle [arg xc] [arg yc] [arg radius] [arg colour]]

Plot the outline of a circle.

[list_begin arg]
[arg_def float xc in]
X coordinate of the circle's centre.

[arg_def float yc in]
Y coordinate of the circle's centre.

[arg_def color colour in]
The colour of the circle.

[list_end]
[nl]


[call [cmd \$isoplot] plot filled-circle [arg xc] [arg yc] [arg radius] [arg colour]]

Plot a circle filled with the given colour.

[list_begin arg]
[arg_def float xc in]
X coordinate of the circle's centre.

[arg_def float yc in]
Y coordinate of the circle's centre.

[arg_def color colour in]
The colour of the circle.

[list_end]
[list_end]
[para]

There are a number of public procedures that may be useful in specific
situations: [emph "Pro memorie"].


[section {COORDINATE TRANSFORMATIONS}]

Besides the commands that deal with the plots and charts directly,
there are a number of commands that can be used to convert world
coordinates to pixels and vice versa.

These include:

[list_begin definitions]

[call [cmd ::Plotchart::viewPort] [arg w] [arg pxmin] [arg pymin] [arg pxmax] [arg pymax]]

Set the viewport for window [arg w]. Should be used in cooperation
with [cmd ::Plotchart::worldCoordinates].

[list_begin arg]
[arg_def widget w in]
Name of the window (canvas widget) in question.

[arg_def float pxmin in]
Left-most pixel coordinate.

[arg_def float pymin in]
Top-most pixel coordinate (remember: the vertical pixel coordinate
starts with 0 at the top!).

[arg_def float pxmax in]
Right-most pixel coordinate.

[arg_def float pymax in]
Bottom-most pixel coordinate.

[list_end]
[nl]


[call [cmd ::Plotchart::worldCoordinates] [arg w] [arg xmin] [arg ymin] [arg xmax] [arg ymax]]

Set the extreme world coordinates for window [arg w]. The world
coordinates need not be in ascending order (i.e. xmin can be larger
than xmax, so that a reversal of the x-axis is achieved).

[list_begin arg]
[arg_def widget w in]
Name of the window (canvas widget) in question.

[arg_def float xmin in]
X-coordinate to be mapped to left side of viewport.

[arg_def float ymin in]
Y-coordinate to be mapped to bottom of viewport.

[arg_def float xmax in]
X-coordinate to be mapped to right side of viewport.

[arg_def float ymax in]
Y-coordinate to be mapped to top side of viewport.

[list_end]
[nl]


[call [cmd ::Plotchart::world3DCoordinates] [arg w] [arg xmin] [arg ymin] [arg zmin] [arg xmax] [arg ymax] [arg zmax]]

Set the extreme three-dimensional world coordinates for window
[arg w]. The world coordinates need not be in ascending order (i.e. xmin
can be larger than xmax, so that a reversal of the x-axis is
achieved).

[list_begin arg]
[arg_def widget w in]
Name of the window (canvas widget) in question.

[arg_def float xmin in]
X-coordinate to be mapped to front side of the 3D viewport.

[arg_def float ymin in]
Y-coordinate to be mapped to left side of the viewport.

[arg_def float zmin in]
Z-coordinate to be mapped to bottom of viewport.

[arg_def float xmax in]
X-coordinate to be mapped to back side of viewport.

[arg_def float ymax in]
Y-coordinate to be mapped to right side of viewport.

[arg_def float zmax in]
Z-coordinate to be mapped to top side of viewport.

[list_end]
[nl]


[call [cmd ::Plotchart::coordsToPixel] [arg w] [arg x] [arg y]]

Return a list of pixel coordinates valid for the given window.

[list_begin arg]
[arg_def widget w in]
Name of the window (canvas widget) in question.

[arg_def float x in]
X-coordinate to be mapped.

[arg_def float y in]
Y-coordinate to be mapped.

[list_end]
[nl]


[call [cmd ::Plotchart::coords3DToPixel] [arg w] [arg x] [arg y] [arg z]]

Return a list of pixel coordinates valid for the given window.

[list_begin arg]
[arg_def widget w in]
Name of the window (canvas widget) in question.

[arg_def float x in]
X-coordinate to be mapped.

[arg_def float y in]
Y-coordinate to be mapped.

[arg_def float y in]
Z-coordinate to be mapped.

[list_end]
[nl]


[call [cmd ::Plotchart::polarCoordinates] [arg w] [arg radmax]]

Set the extreme polar coordinates for window [arg w]. The angle always
runs from 0 to 360 degrees and the radius starts at 0. Hence you only
need to give the maximum radius.

[emph Note:] If the viewport is not square, this procedure will not
adjust the extremes, so that would result in an elliptical plot. The
creation routine for a polar plot always determines a square viewport.

[list_begin arg]
[arg_def widget w in]
Name of the window (canvas widget) in question.

[arg_def float radmax in]
Maximum radius.

[list_end]
[nl]


[call [cmd ::Plotchart::polarToPixel] [arg w] [arg rad] [arg phi]]

Wrapper for a call to [cmd ::Plotchart::coordsToPixel], which assumes
the world coordinates and viewport are set appropriately. Converts
polar coordinates to pixel coordinates.

[emph Note:] To be useful it should be accompanied by a matching
[cmd ::Plotchart::worldCoordinates] procedure. This is automatically
taken care of in the creation routine for polar plots.

[list_begin arg]
[arg_def widget w in]
Name of the window (canvas widget) in question.

[arg_def float rad in]
Radius of the point.

[arg_def float phi in]
Angle to the positive x-axis.

[list_end]
[nl]


[call [cmd ::Plotchart::pixelToCoords] [arg w] [arg x] [arg y]]

Return a list of world coordinates valid for the given window.

[list_begin arg]
[arg_def widget w in]
Name of the window (canvas widget) in question.

[arg_def float x in]
X-pixel to be mapped.

[arg_def float y in]
Y-pixel to be mapped.

[list_end]
[list_end]
[para]

Furthermore there is a routine to determine "pretty" numbers for use
with an axis:

[list_begin definitions]
[call [cmd ::Plotchart::determineScale] [arg xmin] [arg xmax]]

Determine "pretty" numbers from the given range and return a list
containing the minimum, maximum and stepsize that can be used for a
(linear) axis.

[list_begin arg]
[arg_def float xmin in]
Rough minimum value for the scaling

[arg_def float xmax in]
Rough maximum value for the scaling.

[list_end]
[list_end]


[section {OTHER OUTPUT FORMATS}]

Besides output to the canvas on screen, the module is capable, via
[cmd {canvas postscript}], of producing PostScript files. One may wonder
whether it is possible to extend this set of output formats and the
answer is "yes". This section tries to sum up the aspects of using this
module for another sort of output.
[para]
One way you can create output files in a different format, is by
examining the contents of the canvas after everything has been drawn and
render that contents in the right form. This is probably the easiest
way, as it involves nothing more than the re-creation of all the
elements in the plot that are already there.
[para]
The drawback of that method is that you need to have a display, which is
not always the case if you run a CGI server or something like that.
[para]
An alternative is to emulate the canvas command. For this to work, you
need to know which canvas subcommands are used and what for. Obviously,
the [emph create] subcommand is used to create the lines, texts and
other items. But also the [emph raise] and [emph lower] subcommands are
used, because with these the module can influence the drawing order -
important to simulate a clipping rectangle around the axes. (The routine
DrawMask is responsible for this - if the output format supports proper
clipping areas, then a redefinition of this routine might just solve
this).
[para]
Furthermore, the module uses the [emph cget] subcommand to find out the
sizes of the canvas. A more mundane aspect of this is that the module
currently assumes that the text is 14 pixels high and that 80 pixels in
width suffice for the axis' labels. No "hook" is provided to customise
this.
[para]
In summary:
[list_begin bullet]
[bullet]
Emulate the [emph create] subcommand to create all the items in the
correct format

[bullet]
Emulate the [emph cget] subcommand for the options -width and -height to
allow the correct calculation of the rectangle's position and size

[bullet]
Solve the problem of [emph raising] and [emph lowering] the items so
that they are properly clipped, for instance by redefining the
routine DrawMask.

[bullet]
Take care of the currently fixed text size properties

[list_end]


[section {ROOM FOR IMPROVEMENT}]

In this version there are a lot of things that still need to
be implemented:

[list_begin bullet]
[bullet]
General options like legends and text to the axes.

[bullet]
More robust handling of incorrect calls (right now the procedures may
fail when called incorrectly):

[list_begin bullet]
[bullet]
The axis drawing routines can not handle inverse axes right now.

[bullet]
If the user provides an invalid date/time string, the routines simply
throw an error.

[list_end]
[list_end]


[section {TODO - SOME PRIVATE NOTES}]

I have the following wishlist:

[list_begin bullet]
[bullet]
Isometric plots - allow new items to be implemented easily.

[bullet]
Add support for histograms where the independent axis is numerical.

[bullet]
A general 3D viewer - emphasis on geometry, not a ray-tracer.

[list_end]


[keywords {graphical presentation} plotting charts {xy-plots}]
[keywords {bar charts} {strip charts} {polar plots}]
[keywords {isometric plots} {pie charts} {time charts}]
[keywords {3D surfaces} {3D bars} {coordinates}]
[keywords {coordinate transformations}]
[manpage_end]
