Plotchart(3tk)

πŸ“¦
version 0.9 Β· 3 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

Plotchart(3tk) β€” Simple plotting and charting package. That's the whole vibe check, bestie. It plots. It charts. It slays. ✨


πŸŽ€ SYNOPSIS πŸŽ€

okay so first things first, the loading screen. you gotta package require the whole squad:

package require Tcl ?8.5?
package require Tk ?8.5?
package require Plotchart ?2.6.2?

then here's the full roster of plot-makers. every single one, no skips, no cuts πŸ”₯

::Plotchart::createXYPlot w xaxis yaxis args
::Plotchart::createStripchart w xaxis yaxis args
::Plotchart::createTXPlot w timeaxis xaxis args
::Plotchart::createXLogYPlot w xaxis yaxis args
::Plotchart::createLogXYPlot w xaxis yaxis args
::Plotchart::createLogXLogYPlot w xaxis yaxis args
::Plotchart::createPolarPlot w radius_data args
::Plotchart::createWindrose w radius_data sectors
::Plotchart::createIsometricPlot w xaxis yaxis stepsize
::Plotchart::createHistogram w xaxis yaxis args
::Plotchart::create3DPlot w xaxis yaxis zaxis args
::Plotchart::create3DRibbonPlot w yaxis zaxis
::Plotchart::createPiechart w
::Plotchart::createSpiralPie w
::Plotchart::createRadialchart w names scale style
::Plotchart::createBarchart w xlabels yaxis noseries args
::Plotchart::createHorizontalBarchart w xaxis ylabel noseries
::Plotchart::create3DBarchart w yaxis nobars
::Plotchart::create3DRibbonChart w names yaxis zaxis
::Plotchart::createBoxplot w xdata ydata orientation
::Plotchart::createTimechart w time_begin time_end args
::Plotchart::createGanttchart w time_begin time_end args
::Plotchart::createRightAxis w_or_plot yaxis
::Plotchart::createTableChart w columns ?widths?
::Plotchart::createTernaryDiagram w args
::Plotchart::createNormalPlot w xscale args
::Plotchart::createStatusTimeline w xaxis ylabel args
::Plotchart::createDendrogram w args

and then every plot object you make is like a little diva with her own methods πŸ’… β€” here's the generic stuff every plot can do:

$anyplot title text position
$anyplot subtitle text
$anyplot canvas
$anyplot saveplot filename args
$anyplot xtext text
$anyplot ytext text
$anyplot vtext text
$anyplot xsubtext text
$anyplot ysubtext text
$anyplot vsubtext text
$anyplot xconfig -option value ...
$anyplot yconfig -option value ...
$anyplot background part colour_or_image dir ?brightness?
$anyplot xticklines colour ?dash?
$anyplot yticklines colour ?dash?
$anyplot legend series text ?spacing?
$anyplot removefromlegend series
$anyplot legendconfig -option value ...
$anyplot balloon x y text dir
$anyplot balloonconfig args
$anyplot plaintext x y text dir
$anyplot plaintextconfig args
$anyplot object itemtype series args
$anyplot deletedata

and the xy-plot-flavoured extras (plus her normal-plot, histogram and contour cousins):

$xyplot plot series xcrd ycrd
$normalplot plot series mean stdev data
$normalplot diagonal
$xyplot plotlist series xlist ylist every
$xyplot region series xlist ylist
$xyplot minmax series xcrd ymin ymax
$histogram plotcumulative series xcrd ycrd
$xyplot trend series xcrd ycrd
$xyplot rchart series xcrd ycrd
$xyplot interval series xcrd ymin ymax ?ycentr?
$xyplot box-and-whiskers series xcrd ycrd
$xyplot violin series xcrd ycrd
$xyplot vector series xcrd ycrd ucmp vcmp
$xyplot vectorconfig series -option value ...
$xyplot dot series xcrd ycrd value
$xyplot dotconfig series -option value ...
$xyplot contourlines xcrd ycrd values ?classes?
$xyplot contourlinesfunctionvalues xvec yvec valuesmat ?classes?
$xyplot contourfill xcrd ycrd values ?classes?
$xyplot contourbox xcrd ycrd values ?classes?
$xyplot colorMap colours
$xyplot legendisolines values classes
$xyplot legendshades values classes
$xyplot grid xcrd ycrd
$xyplot xband ymin ymax
$xyplot yband xmin xmax
$xyplot labeldot x y text orient
$xyplot dataconfig series -option value ...

the polar girlies, the windrose, and the whole 3D situation πŸ¦‹:

$polarplot plot series radius angle
$windrose plot data colour
$plot3d plotfunc function
$plot3d plotfuncont function contours
$plot3d gridsize nxcells nycells
$plot3d plotdata data
$plot3d interpolatedata data contours
$plot3d colour fill border
$plot3d ribbon yzpairs
$plot3d plot yzpairs

pies, radials and bars (yes there are three $barchart plot/config pairs, they're all listed, don't @ me πŸ“):

$pie plot data
$pie colours colour1 colour2 ...
$pie explode segment
$radial plot data colour thickness
$pie colours colour1 colour2 ...
$barchart plot series ydata colour ?dir? ?brightness?
$barchart config -option value ...
$barchart plot series xdata colour ?dir? ?brightness?
$barchart config -option value ...
$barchart plot label yvalue colour
$barchart config -option value ...

ribbons and boxplots:

$ribbon line xypairs colour
$ribbon area xypairs colour
$boxplot plot series label values
$boxplot violin series label values

timecharts + ganttcharts (the calendar girlies πŸ‘‘):

$timechart period text time_begin time_end colour
$timechart addperiod time_begin time_end colour
$timechart milestone text time colour
$timechart addmilestone time colour
$timechart vertline text time colour
$timechart hscroll scrollbar
$timechart vscroll scrollbar
$ganttchart task text time_begin time_end completed
$ganttchart milestone text time colour
$ganttchart vertline text time
$ganttchart connect from to
$ganttchart summary text args
$ganttchart color keyword newcolor
$ganttchart font keyword newfont
$ganttchart hscroll scrollbar
$ganttchart vscroll scrollbar

isometric, tables, ternary, timelines, dendrograms:

$isoplot plot rectangle x1 y1 x2 y2 colour
$isoplot plot filled-rectangle x1 y1 x2 y2 colour
$isoplot plot circle xc yc radius colour
$isoplot plot filled-circle xc yc radius colour
$table row items
$table separator
$table formatcommand procname
$table cellconfigure args
$ternary plot series xcrd ycrd zcrd text dir
$ternary line series coords
$ternary fill series coords
$ternary text xtext ytext ztext
$ternary ticklines colour
$timeline plot series item start stop color
$timeline vertline text time args
$dendrogram plot series data

and finally the low-level ::Plotchart:: utility functions, plus the newer diagrams (target, performance, taylor, heatmap, circleplot) and the binding/packing bits ✨:

::Plotchart::viewPort w pxmin pymin pxmax pymax
::Plotchart::worldCoordinates w xmin ymin xmax ymax
::Plotchart::world3DCoordinates w xmin ymin zmin xmax ymax zmax
::Plotchart::coordsToPixel w x y
::Plotchart::coords3DToPixel w x y z
::Plotchart::polarCoordinates w radmax
::Plotchart::polarToPixel w rad phi
::Plotchart::pixelToCoords w x y
::Plotchart::pixelToIndex w x y
::Plotchart::determineScale xmin xmax inverted
::Plotchart::determineScaleFromList values inverted
::Plotchart::plotconfig charttype component property value
::Plotchart::plotstyle subcmd style args
::Plotchart::eraseplot anyplot
::Plotchart::createTargetDiagram w limits scale
$target plot series xvalues yvalues
::Plotchart::createPerformanceProfile w max
$performance plot series_and_data_pairs
::Plotchart::createTaylorDiagram w radius_data args
$taylor plot series stdev corr
::Plotchart::createHeatmap w rowlabels columnlabels args
$heatmap plot row label data
$heatmap plot column label data
$heatmap plot cell rowlabel columnlabel value
$heatmap scale values min max
$heatmap scale colours mincolour maxcolour
::Plotchart::createCircleplot w labels args
$circleplot connect label1 label2 colour width
$circleplot modify label args
::Plotchart::plotmethod charttype methodname plotproc
::Plotchart::plotpack w dir args
$anyplot bindplot event command args
$anyplot bindlast series event command

🌸 DESCRIPTION 🌸

okay so Plotchart is a Tcl-only package and its whole personality is making xy-plots, barcharts and other common types of graphical presentations actually easy. The emphasis is on ease of use, rather than flexibility β€” no cap. The procedures that create a plot use the entire canvas window, which means the layout of the plot is completely automatic. you literally do not have to think about it. iconic behaviour fr fr πŸ’…

the result? an xy-plot in, say, ten lines of code:

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"
⚠️ 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. that's the tradeoff, bestie, and we accept her as she is 😭

the advantage though? it offers a number of plot and chart types:

  • XY-plots like the one shown above with any number of data series.
  • 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.
  • Polar plots, where the coordinates are polar instead of cartesian.
  • Histograms, for plotting statistical information.
  • Barcharts, piecharts, Gantt charts, time charts.
  • 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.

You can zoom in and out, as well as pan with these plots (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. πŸ¦‹

  • Piecharts, with automatic scaling to indicate the proportions.
  • Barcharts, with either vertical or horizontal bars, stacked bars or bars side by side.
  • Timecharts, where bars indicate a time period and milestones or other important moments in time are represented by triangles.
  • 3D plots (both for displaying surfaces and 3D bars)

and some lore 🫢: with version 1.5 a new command has been introduced: plotconfig, which can be used to configure the plot options for particular types of plots and charts (cf. CONFIGURATION OPTIONS AND OTHER COMMANDS). With version 1.8.3 several new features were introduced, which allow more interactivity (cf. INTERACTIVE USE). With version 2.0 it has become possible to put several plots or charts in one canvas. glow-up after glow-up, honestly ✨


πŸ’œ PLOT CREATION COMMANDS πŸ’œ

the whole workflow is: you create the plot or chart with one single command, and then you fill the plot with data. that's it. that's the pipeline πŸ’–

  • ::Plotchart::createXYPlot w xaxis yaxis args β€” Create a new xy-plot (configuration type: xyplot).
    • widget w (in) β€” Name of the existing canvas widget to hold the plot.
    • list xaxis (in) β€” A 3-element list containing minimum, maximum and stepsize for the x-axis, in this order. For an inverted axis, where the maximum appears on the left-hand side, use: maximum, minimum and a negative stepsize.

🧚 bestie we are SO not done, this page is a whole saga and that was just part 1 πŸ’…
  • list yaxis (in) β€” a 3-element list holding minimum, maximum and stepsize for the y-axis, in that exact order, bestie. Want an inverted axis where the biggest value chills at the bottom? Then you go: maximum, minimum, and a negative stepsize. That's it, that's the trick πŸ’…
  • list args (in) β€” zero or more options that decide how your plot is gonna serve looks-wise:
    • -xlabels {labels} β€” custom labels for the x-axis πŸŽ€ If your labels are numeric, they get positioned according to the given scale; if they're not, they get spread out at equal distance based on how many labels there are. > ⚠️ Heads up: this only works if the stepsize of the xaxis argument is the empty string. No cap.
    • -ylabels {labels} β€” same energy, but for the y-axis ✨
    • -box {measures} β€” go read ARRANGING MULTIPLE PLOTS IN A CANVAS for this one.
    • -axesbox {measures} β€” also ARRANGING MULTIPLE PLOTS IN A CANVAS, go look πŸ‘€
    • -timeformat format β€” see USING DATE/TIME LABELS
    • -gmt 0/1 β€” see USING DATE/TIME LABELS
    • -axestozero β€” draws the axes at the origin (1), or at the sides of the plot area (0, which is the default). Lowkey only implemented for XY plots, just so you know 🫢
    • -isometric β€” rescales the axes so that a square in the coordinates actually shows up as a square on screen (1), or just uses the given extremes (0, the default). Again: XY plots only, don't come for me πŸ’€

πŸ¦‹ ::Plotchart::createStripchart w xaxis yaxis args

Creates a new strip chart (configuration type: stripchart). The only difference from a regular XY plot? The x-axis auto-adjusts itself whenever the x-coordinate of a new point goes past the maximum. It just ✨knows✨.

  • widget w (in) β€” name of the existing canvas widget that's gonna hold the plot.
  • list xaxis (in) β€” a 3-element list with minimum, maximum and stepsize for the x-axis, in that order. > 🚫 Note that an inverted x-axis is not supported for this type of plot. Periodt.
  • list yaxis (in) β€” a 3-element list with minimum, maximum and stepsize for the y-axis, in that order. Inverted axis, max at the bottom? Use: maximum, minimum and a negative stepsize.
  • list args (in) β€” zero or more options β€” go peek at the XY-plot for more info πŸ‘‘

🌸 ::Plotchart::createTXPlot w timeaxis xaxis args

Creates a new time-x-plot (configuration type: txplot). The horizontal axis is the date/time of your data, and the vertical axis is the values themselves. It's giving calendar-girl energy πŸ“…

  • widget w (in) β€” name of the existing canvas widget to hold the plot.
  • list timeaxis (in) β€” a 3-element list containing the minimum and maximum date/time to be shown, plus the stepsize in days, in that order. > 🚫 An inverted time-axis is not supported, sorry bestie.
  • list xaxis (in) β€” a 3-element list with minimum, maximum and stepsize for the vertical axis, in that order. For an inverted axis where the max appears at the bottom: maximum, minimum and a negative stepsize.
  • list args (in) β€” zero or more options β€” see the XY-plot for more πŸ’œ

⭐ ::Plotchart::createXLogYPlot w xaxis yaxis args

Creates a new xy-plot where the y-axis has a logarithmic scale (configuration type: xlogyplot).

Give the data like you would for a linear scale β€” the logarithmic transformation gets taken of internally, so you don't gotta do a thing 🫢

  • widget w (in) β€” name of the existing canvas widget to hold the plot.
  • list xaxis (in) β€” a 3-element list with minimum, maximum and stepsize for the x-axis, in that order. For an inverted axis where the maximum appears on the left-hand side: maximum, minimum and a negative stepsize.
  • list yaxis (in) β€” a 2-element list with minimum and maximum for the y-axis, in that order. > 🚫 An inverted logarithmic axis is not supported.
  • list args (in) β€” zero or more options β€” see the XY-plot 🌈

πŸ’– ::Plotchart::createLogXYPlot w xaxis yaxis args

Creates a new xy-plot where the x-axis has a logarithmic scale (configuration type: logxyplot).

Data goes in like it's a linear scale β€” the log transformation is taken of internally ✨

  • widget w (in) β€” name of the existing canvas widget to hold the plot.
  • list xaxis (in) β€” a 2-element list with minimum and maximum for the x-axis, in that order. > 🚫 Inverted logarithmic axis? Not supported, nope.
  • list yaxis (in) β€” a 3-element list with minimum, maximum and stepsize for the y-axis, in that order. Inverted, with the maximum appearing on the left-hand side: maximum, minimum and a negative stepsize.
  • list args (in) β€” zero or more options β€” see the XY-plot πŸ’«

πŸŽ€ ::Plotchart::createLogXLogYPlot w xaxis yaxis args

Creates a new xy-plot where both the x-axis and the y-axis have a logarithmic scale (configuration type: logxlogyplot). Double log, double iconic.

Data should be given as for a linear scale, because the logarithmic transformation is taken of internally πŸ’…

  • widget w (in) β€” name of the existing canvas widget to hold the plot.
  • list xaxis (in) β€” a 2-element list with minimum and maximum for the x-axis, in that order. > 🚫 Inverted logarithmic axis: not supported.
  • list yaxis (in) β€” a 2-element list with minimum and maximum for the y-axis, in that order. > 🚫 And again: inverted logarithmic axis is not supported.
  • list args (in) β€” zero or more options β€” see the XY-plot πŸ¦‹

🌈 ::Plotchart::createPolarPlot w radius_data args

Creates a new polar plot (configuration type: polarplot). It's giving math-class main character energy 🧚

  • widget w (in) β€” name of the existing canvas widget to hold the plot.
  • list radius_data (in) β€” a 2-element list with the maximum radius and the stepsize for the radial axis, in that order.
  • list args (in) β€” zero or more options β€” see the XY-plot πŸ“

πŸŒͺ️ ::Plotchart::createWindrose w radius_data sectors

Creates a new windrose diagram. It's made of concentric circles as defined by the radius_data argument, plus a number of sectors (given by the sectors argument). The sectors are drawn in the "nautical" convention, meaning: the first one sits at the positive y-axis, the second one is to the right, and so on going clockwise. Very directional, very slay 🧭

  • widget w (in) β€” name of the existing canvas widget to hold the diagram
  • list radius_data (in) β€” a 2-element list: first element is the maximum radius, second is the step to be used for the circles.
  • int sectors β€” number of sectors to use (defaults to 16).

πŸ‘‘ ::Plotchart::createIsometricPlot w xaxis yaxis stepsize

Creates a new isometric plot, where the vertical and the horizontal coordinates get scaled so that a circle will truly appear as a circle (configuration type: isometric). No more cursed ellipse situation, we love to see it 😭

  • widget w (in) β€” name of the existing canvas widget to hold the plot.
  • list xaxis (in) β€” a 2-element list with minimum and maximum for the x-axis, in that order.
  • list yaxis (in) β€” a 2-element list with minimum and maximum for the y-axis, in that order.
  • float|noaxes stepsize (in) β€” either the stepsize used by both axes, or the keyword noaxes to signal to the plot that it should use the full area of the widget and not draw any of the axes. Pick your fighter πŸ’…

πŸ“Š ::Plotchart::createHistogram w xaxis yaxis args

Creates a new histogram (configuration type: histogram). Bars, but make it cute ✨

  • widget w (in) β€” name of the existing canvas widget to hold the plot.
  • list xaxis (in) β€” a 3-element list with minimum, maximum and stepsize for the x-axis, in that order.
  • list yaxis (in) β€” a 3-element list with minimum, maximum and stepsize for the y-axis, in that order.
  • list args (in) β€” zero or more options β€” see the XY-plot 🫢

🧊 ::Plotchart::create3DPlot w xaxis yaxis zaxis args

Creates a new 3D plot. We're going to the third dimension, bestie πŸš€

  • widget w (in) β€” name of the existing canvas widget to hold the plot.
  • list xaxis (in) β€” a 3-element list with minimum, maximum and stepsize for the x-axis, in that order.
  • list yaxis (in) β€” a 3-element list with minimum, maximum and stepsize for the y-axis, in that order.
  • list zaxis (in) β€” a 3-element list with minimum, maximum and stepsize for the z-axis, in that order.
  • list args (in) β€” optional list of options (keyword-value pairs). Currently supported: -xlabels to set the labels for the x-axis.

🎁 ::Plotchart::create3DRibbonPlot w yaxis zaxis

Creates a new 3D ribbon plot. It's a simplification of the full 3D plot and lets you draw a ribbon only β€” the x-axis gets dropped entirely, she's not invited πŸŽ€

  • widget w (in) β€” name of the existing canvas widget to hold the plot.
  • list yaxis (in) β€” a 3-element list with minimum, maximum and stepsize for the y-axis, in that order.
  • list zaxis (in) β€” a 3-element list holding minimum, maximum and stepsize for the z-axis, in that exact order. πŸ’…

::Plotchart::createPiechart w

New piechart, bestie! Configuration type: piechart. πŸ₯§

  • widget w (in) β€” the name of the existing canvas widget that's gonna hold the plot.

::Plotchart::createSpiralPie w

Okay so this one's a "spiral pie" β€” config type spiralpie β€” and it's basically a glow-up variant of the regular piechart. The value scales the radius instead of the angle. And by default the data get sorted. ✨

  • widget w (in) β€” name of the existing canvas widget to hold the plot.

::Plotchart::createRadialchart w names scale style

A radial chart, where the data get drawn as a line connecting the spokes of the diagram. Config type: radialchart. 🎑

  • widget w (in) β€” name of the existing canvas widget to hold the plot.
  • list names (in) β€” the names for the spokes.
  • float scale (in) β€” a scale value that decides where the data sit along the spokes.
  • string style (in) β€” style of the chart, and it's optional. Pick one:
    • lines β€” the default: data get drawn as independent polylines.
    • cumulative β€” data get drawn as polylines where the data are accumulated.
    • filled β€” data get drawn as filled polygons where the data are accumulated.

::Plotchart::createBarchart w xlabels yaxis noseries args

A barchart with vertical bars, config type vertbars. The horizontal axis shows whatever labels are in the xlabels argument. And the number of series, given by noseries, decides both how wide the bars are and how the series get drawn. πŸ‘‘

If you specified the keyword stacked, the series get drawn stacked on top of each other. Otherwise, every series that gets drawn is shifted to the right.

The number of series also sets the width of the bars, so there's space for that many bars. And listen β€” if you use a floating-point number like 2.2 instead of an integer like 2, you get a lil gap between the sets of bars, and how wide that gap is depends on the fractional part. 🀏

  • widget w (in) β€” name of the existing canvas widget to hold the plot.
  • list xlabels (in) β€” list of labels for the x-axis. Its length also determines how many bars get plotted per series.
  • list yaxis (in) β€” a 3-element list with minimum, maximum and stepsize for the y-axis, in this order.
  • int|stacked noseries (in) β€” how many data series get plotted. This has to be an integer greater than zero (unless stacked is used).
  • string args (in) β€” one or more key-value pairs defining the options. Specific to barcharts:
    • -xlabelangle value β€” the angle the labels get drawn under. Defaults to 0, i.e. horizontal text. This one is especially useful when your labels are pretty long.

::Plotchart::createHorizontalBarchart w xaxis ylabel noseries

Same energy, but the bars go sideways. Config type: horizbars. The vertical axis displays the labels from the ylabels argument. And noseries decides both the width of the bars and how the series get drawn. 🌈

If you specified the keyword stacked, the series get drawn stacked from left to right. Otherwise, each series that gets drawn is shifted upward.

  • widget w (in) β€” name of the existing canvas widget to hold the plot.
  • list xaxis (in) β€” a 3-element list with minimum, maximum and stepsize for the x-axis, in this order.
  • list ylabels (in) β€” list of labels for the y-axis. Its length also determines how many bars get plotted per series.
  • int|stacked noseries (in) β€” the number of data series that get plotted. Has to be an integer greater than zero (unless stacked is used).

::Plotchart::create3DBarchart w yaxis nobars

3D vertical bars, babes. Config type: 3dbars. The horizontal axis shows the labels per bar, and nobars sets the position and the width of the bars. The colours can vary per bar. (Fun fact from the page itself: this type of chart was inspired by the Wiki page on 3D bars by Richard Suchenwirth.) πŸŽ€

  • widget w (in) β€” name of the existing canvas widget to hold the plot.
  • list yaxis (in) β€” a 3-element list containing minimum, maximum and stepsize for the y-axis, in this order.
  • int nobars (in) β€” the number of bars that will be plotted.

::Plotchart::create3DRibbonChart w names yaxis zaxis

A "ribbon chart", config type 3dribbon. πŸŽ—οΈ It's a chart where the data series are represented as ribbons inside a three-dimensional axis system. Along the x-axis (which goes "into" the screen) the names get plotted, each one representing a single series. The first plot command draws the furthest series, the second draws the series in front of that, and so on.

  • widget w (in) β€” name of the existing canvas widget to hold the plot.
  • widget w (in) β€” names of the series, plotted as labels along the x-axis. (Yeah the page literally says widget w again here, we're not gonna fight it πŸ’€)
  • list yaxis (in) β€” a 3-element list containing minimum, maximum and stepsize for the y-axis (drawn horizontally!), in this order.
  • list zaxis (in) β€” a 3-element list containing minimum, maximum and stepsize for the z-axis (drawn vertically), in this order.
  • int nobars (in) β€” the number of bars that will be plotted.

::Plotchart::createBoxplot w xdata ydata orientation

A boxplot with horizontal or vertical boxes β€” box-and-whiskers, iconic behaviour β€” config type boxplot. Depending on the orientation, either the x- or the y-axis gets drawn with labels. And the boxes are drawn from the raw data, which you feed in with the plot subcommand for this plot type. πŸ“¦

  • widget w (in) β€” name of the existing canvas widget to hold the plot.
  • list xdata (in) β€” this is either a 3-element list with minimum, maximum and stepsize for the x-axis, in this order (when orientation is horizontal), or a list of labels for the x-axis (when orientation is vertical). The length of the label list also determines how many boxes can be plotted. Those labels also get used in the plot subcommand.
  • list ydata (in) β€” this is either a 3-element list with minimum, maximum and stepsize for the y-axis, in this order (when orientation is vertical), or a list of labels for the y-axis (when orientation is horizontal). The length of the label list also determines how many boxes can be plotted. Those labels also get used in the plot subcommand.
  • string orientation (in) β€” if given, horizontal or vertical decides the orientation of the boxes. This optional value (default: horizontal) also decides how xdata and ydata get interpreted.

::Plotchart::createTimechart w time_begin time_end args

New timechart, config type timechart. ⏰ The time axis (which is the x-axis) runs from time_begin to time_end, and the vertical spacing is decided by how many items you're plotting.

  • widget w (in) β€” name of the existing canvas widget to hold the plot.
  • string time_begin (in) β€” the start time, in a form recognised by the clock scan command (like "1 january 2004").
  • string time_end (in) β€” the end time, in a form recognised by the clock scan command (like "1 january 2004").
  • arguments args (in) β€” whatever's left can be:
    • The expected/maximum number of items. This decides the vertical spacing. (If you give it, it must be the first argument after "time_end".)
    • The keyword -barheight and the number of pixels per bar. This is an alternative way to decide the vertical spacing.
    • The keyword -ylabelwidth and the number of pixels to reserve for the labels at the y-axis.

::Plotchart::createGanttchart w time_begin time_end args

A Gantt chart, config type ganttchart. πŸ“Š The time axis (= the x-axis) goes from time_begin to time_end, and the vertical spacing is decided by how many items you're plotting. Then, through the specific commands, you can add tasks and connections between those tasks.

  • widget w (in) β€” name of the existing canvas widget to hold the plot.
  • string time_begin (in) β€” the start time, in a form recognised by the clock scan command (like "1 january 2004").
  • string time_end (in) β€” the end time, in a form recognised by the clock scan command (like "1 january 2004").
  • arguments args (in) β€” whatever's left can be:
    • The expected/maximum number of items. This decides the vertical spacing. (If you give it this way, it must be the first argument after "time_end".)
    • The expected/maximum width of the descriptive text β€” roughly in characters, because for the actual space reserved for the text it's assumed that a character is about ten pixels wide. Defaults to 20. (If you give it this way, it must be the second argument after "time_end".)
  • The keyword -barheight plus the number of pixels per bar. This is an alternative method to determine the vertical spacing.
    • The keyword -ylabelwidth plus the number of pixels to reserve for the labels at the y-axis.

::Plotchart::createRightAxis w_or_plot yaxis 🫢

Okay bestie, this one is giving ambidextrous energy. It creates a plot command that uses a right axis instead of the left axis (configuration type: inherited from the existing plot). Your canvas widget must already contain an ordinary plot, because the horizontal axis and the other properties get reused. πŸ’…

Big sis advice: preferably use the plot command β€” because with multiple plots in one canvas (and yeah, even when you're redefining an existing plot!), the wrong geometry might be used. Not me being dramatic, that's just what happens. 😭

So to plot data using the right axis, you use this shiny new command. To plot data using the left axis, you use the original plot command. Two commands, two axes, one canvas. Periodt. ✨

  • w_or_plot (widget, in) β€” Name of the existing canvas widget to hold the plot, or preferably the plot command for the plot with the left axis.
  • yaxis (list, in) β€” A 3-element list containing minimum, maximum and stepsize for the y-axis, in this order. πŸŽ€

::Plotchart::createTableChart w columns ?widths? πŸ“

Creates a command to draw a table. You can use a whole variety of commands to draw the actual rows of the table, but heads up β€” the number of columns is fixed. (See TABLE CHARTS for an example πŸ’–)

  • w (widget, in) β€” Name of the canvas widget to hold the table.
  • columns (list, in) β€” The headers of the columns in the table. The number of elements determines the number of columns. So like, the list is the column count, iykyk. πŸ‘‘
  • widths (list, in) β€” If given, it's either a single value β€” the width in pixels for all columns β€” or, for each column, the width of that column. If not given, the table is spread out over the width of the canvas (minus the margins). Lowkey the no-widths version is the chill one. 🌸

::Plotchart::createTernaryDiagram w args πŸ¦‹

Creates a command to draw a ternary diagram (configuration type: ternary). You can draw individual (labelled) data points in the diagram, plus lines and filled polygons. Versatile queen. ✨

  • w (widget, in) β€” Name of the canvas widget to hold the ternary diagram.
  • args (list, in) β€” Zero or more option-value pairs to influence the position and the appearance of the diagram. In addition to the positioning options (-box and -axesbox) the diagram supports:
    • -fractions yes/no β€” to display numbers 0 to 1 instead of 0 to 100%.
    • -steps number β€” to influence the number of labels along the three sides.

::Plotchart::createNormalPlot w xscale args 🌈

Creates a command to draw a normal plot β€” which is genuinely useful for investigating whether a data set is normally distributed or not. If it is, the data will fall on or near the diagonal. So yeah, it's a specialised plotting procedure. No cap. πŸ’…

Fun fact drop: the details of the plotting procedure have been adopted from the qqnorm in the "R" stats package and described on Wikipedia. πŸ“š

Important: because this plot type's implementation relies on the math::statistics package, it is only available if that package can be loaded. If it can't load, bestie, it's just not happening. 😭
  • w (widget, in) β€” Name of the canvas widget to hold the normal plot.
  • xscale (list, in) β€” A 3-element list containing minimum, maximum and stepsize for the x-axis, in this order. The scaling of the y-axis is determined from that.
Do not skip this one: the scale is to be given in terms of the normalised data β€” that is: 0 represents the mean of the data, 1 one standard deviation away from the mean, etc. πŸŽ€
  • args (list, in) β€” Zero or more option-value pairs to influence the position and the appearance of the plot β€” see the XY-plot for more details.

::Plotchart::createStatusTimeline w xaxis ylabel args πŸ”₯

Creates a command to draw a so-called status timeline. Its layout is similar to a horizontal barchart, but the bars are drawn in different colours, each one representing the status of the item as it varies over time (the horizontal axis). It's giving ✨progress bar but make it fashion✨.

  • w (widget, in) β€” Name of the canvas widget to hold the ternary diagram.
lmao yes it literally says "ternary diagram" right there in the original πŸ’€ we are not fixing it, we are reporting it. Carry on.
  • xaxis (list, in) β€” A 3-element list containing minimum, maximum and stepsize for the x-axis, in this order.
  • ylabels (list, in) β€” List of labels for the y-axis. Its length also determines the number of bars that will be plotted per series. πŸ‘‘
  • args (list, in) β€” Zero or more option-value pairs to influence the position and the appearance of the diagram. In addition to the positioning options (-box and -axesbox) the diagram supports:
    • -xaxis yes/no β€” to turn displaying the numeric labels on or off.

::Plotchart::createDendrogram w args 🧚

Creates a dendrogram to plot hierarchically organised data. The labels that identify the endpoints of the hierarchy can all be drawn on the same level, or wherever their branch ends. This is controlled by the option "-extend". 🌸

The data are organised as nested lists, like:

\$dendrogram plot data { {"Label1"  "Label2"} {F {A B} {C {D E}}} }

Sublists with more than one element are considered a branching and are drawn in that way. Sublists with only one element are considered a leaf and are drawn as text. 🌿

And because a string with two or more words can not be distinguished from a list with two or more elements, a provision is made for this situation: if the first element is "LEAF", then the list is considered to consist of leafs only, and all elements (even if they are actually nested lists themselves) are drawn as text:

\$dendrogram plot data { {LEAF "Label 1"  "Label 2"} {F {A B} {C {D E}}} }
  • w (widget, in) β€” Name of the canvas widget to hold the dendrogram.
  • args (list, in) β€” Zero or more option-value pairs:
    • The option "-direction" takes one of the following values: left-right, right-left, top-bottom, bottom-top, with "top-bottom" as the default. The tree will be drawn according to this option, and the labels appear either horizontally or vertically at the end of the tree. 🌈
    • The option "-extend" with value 1 (default) or 0 (no extension) to indicate that the labels should all appear at the same level. πŸ’–

✨ 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. πŸ‘‘

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

$anyplot title text position πŸ‘‘

Specify the title of the whole chart. Main character moment, obviously.

  • text (string, in) β€” The text of the title to be drawn.
  • position (string, in) β€” The position of the title. The default position is "center", but you can alternatively use "left" or "right". And yes, you can use multiple titles with different positions. Slay. πŸ’…

$anyplot subtitle text πŸŽ€

Specify the subtitle of the whole chart.

  • text (string, in) β€” The text of the subtitle to be drawn.

$anyplot canvas πŸ¦‹

Return the name of the canvas (or the alias if you use more than one plot within a canvas). Use this value for the coordinate transformations. Lowkey essential, ngl. ✨

$anyplot saveplot filename args πŸ’Ύ

Draws the plot into a file, using PostScript.

  • filename (string, in) β€” Contains the path name of the file to write the plot to.
  • args (list, in) β€” If the standard PostScript output is used, the option -plotregion can be specified to save the whole plot (value: bbox) regardless of what is visible in the window. The default (value: window) is to only plot the visible part of the plot.

Optionally you can specify the option -format "some picture format" to store the plot in a different file than a PostScript file. This, however, relies on the Img package to do the actual job. πŸŽ€

Note, bestie: because the window holding the plot must be fully visible before Img can successfully grab it, it is raised first. On some systems, for instance Linux with KDE, raising a window is not done automatically β€” instead you need to click on the window in the task bar. Similar things happen on Windows XP. 😭 There seems to be something wrong under some circumstances, so instead of waiting for the visibility of the window, the procedure simply waits two seconds. It is not ideal, but it seems to work better. We report, we don't judge. πŸ’€

$anyplot xtext text 🌸

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

  • text (string, in) β€” The text of the x-axis label to be drawn.

$anyplot ytext text 🌈

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

  • text (string, in) β€” The text of the y-axis label to be drawn.

$anyplot vtext text 🫢

Draw a vertical label to the y-axis.

Note: this requires Tk 8.6 or later β€” for older versions it does nothing. Nothing at all. Ghost behaviour. πŸ‘»
  • text (string, in) β€” Text to drawn to the y-axis.

$anyplot xsubtext text πŸ’œ

Specify the subtext of the (horizontal) x-axis, for those plots that have a straight x-axis. This text is drawn below the primary text.

Since this involves positioning the primary text and setting margins, you need to set the option "usesubtext" for the bottom axis via the plotstyle command. The relevant options are: usesubtext, subtextcolor and subtextfont. ✨

  • text (string, in) β€” The secondary text of the x-axis label to be drawn.

πŸ’– more plot methods, bestie, we're still going πŸ’–

  • $anyplot ysubtext text β€” sets the subtext for the (vertical) y-axis, but only for the plots that have a straight y-axis, okay? This text goes below the primary text, and it does that for both the left and the right axis. ✨

The way that this involves positioning the primary text and setting margins means you have to set the usesubtext option for the left or right axis through the plotstyle command. The relevant options are: usesubtext, subtextcolor and subtextfont.

  • string text (in) β€” the secondary text of the y-axis label that's gonna get drawn. πŸŽ€
  • $anyplot vsubtext text β€” sets the subtext of the (vertical) y-axis, again only for plots with a straight y-axis. This one gets drawn to the right of the primary text, for both axes on the left and the right.

Same deal as above: since it involves positioning the primary text and setting margins, you need to set the usesubtext option for the left or right axis via the plotstyle command. The relevant options here are: usevsubtext, vsubtextcolor and vsubtextfont. (note the "v" β€” it's there to keep this option distinct from the text at the top of a vertical axis, which is drawn via $anyplot ytext or $anyplot ysubtext. iykyk πŸ’…)

  • string text (in) β€” the secondary (vertical) text of the y-axis label to be drawn.

  • $anyplot xconfig -option value ... β€” set one or more config parameters for the x-axis. Here's what's supported, bestie:
    • format fmt β€” the format for the numbers along the axis.
    • ticklength length β€” the length of the tickmarks, in pixels.
    • ticklines boolean β€” whether to draw ticklines (true) or not (false).
    • scale scale_data β€” brand new scale data for the axis, aka a 3-element list holding minimum, maximum and stepsize for the axis, in that exact order.
⚠️ Beware: setting this option will clear all data from the plot. like, all of it. gone. πŸ’€
  • $anyplot yconfig -option value ... β€” set one or more config parameters for the y-axis. This method takes the same options and values as xconfig does. easy. πŸ¦‹

  • $anyplot background part colour_or_image dir ?brightness? β€” sets the background of a part of the plot. 🎨
    • string part β€” which part of the plot we're talking about: "axes" for the axes area and "plot" for the inner part. How it's interpreted depends on the type of plot. There are two further possibilities though:
      • image β€” in which case a predefined image gets loaded into the background of the plot.
      • gradient β€” in which case the background is coloured in different shades of the given colour. The dir argument says which direction the colour gets whiter. 🌈
    • string colour_or_image β€” the colour for that part, or the name of the image if part is image.
    • string dir β€” the direction of the gradient. One of: top-down, bottom-up, left-right or right-left.
    • string brightness β€” says whether the colour should get brighter (bright) or darker (dark). Defaults to bright. ✨
  • $anyplot xticklines colour ?dash? β€” draws vertical ticklines at each tick location. πŸ“
    • string colour β€” colour of the lines. Passing an empty colour ("") removes them again. Defaults to "black".
    • string dash β€” optional argument for the dash pattern of the lines. Defaults to "lines". Possible values: lines, dots1, dots2, dots3, dots4, dots5. The actual effect depends on the platform, so don't come for me if it looks different on yours. πŸ™ˆ
  • $anyplot yticklines colour ?dash? β€” draws horizontal ticklines at each tick location. same energy, rotated 90Β° πŸ’…
    • string colour β€” colour of the lines. An empty colour ("") removes them again. Defaults to "black".
    • string dash β€” optional argument for the dash pattern of the lines. Defaults to "lines". Possible values: lines, dots1, dots2, dots3, dots4, dots5. The actual effect depends on the platform.

  • $anyplot legend series text ?spacing? β€” adds an entry to the legend. The series decides which graphical symbol gets used. (as a lil side effect, the legend actually gets drawn. main character behaviour tbh πŸ‘‘)
    • string series β€” name of the data series. This is what determines the colour of the line and the symbol (if there is one) that will be drawn.
    • string text β€” the text to be drawn next to the line/symbol.
    • integer spacing β€” optional argument for the vertical spacing between the entries, in pixels. (heads up: this spacing will be reused later. noted. 🫢)
  • $anyplot removefromlegend series β€” removes an entry for a series from the legend and redraws it. bye bestie πŸ‘‹
    • string series β€” name of the data series to be removed.
  • $anyplot legendconfig -option value ... β€” sets one or more options for the legend. The legend is drawn as a rectangle with text and graphics inside it. πŸ“¦
    • background colour β€” set the colour of the background (the default colour is white). Set it to the empty string for a transparant legend. ✨
    • border colour β€” set the colour of the border (the default colour is black). Set it to the empty string if you don't want a border.
    • canvas c β€” draw the legend in a different canvas widget. This gives you the freedom to position the legend outside the actual plot. lowkey iconic 🌟
    • font font β€” set the font used to draw the text next to the symbol.
    • legendtype type β€” override the type of the legend, the one that's pre-defined for the current type of plot. May be one of: rectangle or line.
    • position corner β€” set the position of the legend. May be one of: top-left, top-right, bottom-left or bottom-right. (Default value is top-right.)
    • spacing pixels β€” set the vertical spacing between entries in the legend, in pixels. bottom-left or bottom-right. (Default value is 10 pixels.)
    • order string β€” determines the ordering of the legend entries: "normal" means the order in which the entries are defined, "reverse" is exactly the opposite. (Default: normal)

  • $anyplot balloon x y text dir β€” adds balloon text to the plot (except for 3D plots, sorry 3D girlies 😭). The arrow will point to the given x- and y-coordinates. For xy-graphs and such, the coordinates are directly related to the axes; for vertical barcharts the x-coordinate is measured as the number of bars minus 1, and similar for horizontal barcharts. 🎈
    • float x β€” x-coordinate of the point that the balloon's arrow will point to.
    • float y β€” y-coordinate of the point that the balloon's arrow will point to.
    • string text β€” the text to be drawn in the balloon.
    • string dir β€” direction of the arrow, one of: north, north-east, east, south-east, south, south-west, west or north-west.
  • $anyplot balloonconfig args β€” configures the balloon text for the plot. The new settings get used for the next balloon text. πŸŽ€
    • font fontname β€” font to be used for the text.
    • justify left|center|right β€” the way to justify multiline text.
    • textcolour colour β€” colour for the text (synonym: textcolor).
    • background colour β€” background colour for the balloon.
    • outline colour β€” colour of the outline of the balloon.
    • margin value β€” margin around the text, in pixels.
    • rimwidth value β€” width of the outline of the balloon, in pixels.
    • arrowsize value β€” length factor for the arrow, in pixels.
  • $anyplot plaintext x y text dir β€” adds plain text to the plot (except for 3D plots again πŸ™ˆ). The text is positioned at the given x- and y-coordinates. For xy-graphs and such, the coordinates are directly related to the axes; for vertical barcharts the x-coordinate is measured as the number of bars minus 1, and similar for horizontal barcharts. πŸ“
    • float x β€” x-coordinate of the text position.
    • float y β€” y-coordinate of the text position.
    • string text β€” the text to be drawn.
    • string dir β€” anchor for the text, one of: north, north-east, east, south-east, south, south-west, west or north-west.
  • $anyplot plaintextconfig args β€” configures the plain text annotation for the plot. The new settings get used for the next plain text. ✨
    • font fontname β€” font to be used for the text.
    • justify left|center|right β€” the way to justify multiline text.
    • textcolour colour β€” colour for the text (synonym: textcolor).

  • $anyplot object itemtype series args β€” draws a canvas item in the plot, where the coordinates get scaled using the coordinate system of the plot. On top of the standard canvas types, it also supports circles, dots and crosses. πŸ¦‹
Note: currently implemented for xy-plots, (vertical and horizontal) barcharts, and piecharts.
Note: to add an entry in the legend for the object, you can use the dataconfig subcommand with a type "rectangle". This will cause a rectangle to be shown. πŸ’…
  • string itemtype (in) β€” name of a standard canvas item, or "circle", "dot" or "cross".
  • string series (in) β€” the data series it belongs to, used for setting the default drawing options.
  • list args (in) β€” list of coordinates and drawing options.
  • $anyplot deletedata β€” removes the lines, symbols and other graphical object associated with the actual data from the plot. poof. πŸ’¨
Note: currently implemented for xy-plots only.
Note: the existing options for data series and the legend entry are kept as they were. 🫢

⚠️ Note: Currently there are side effects if the canvas contains more than one plot. πŸ’€
⚠️ Note: The commands xconfig and yconfig are currently implemented only for XY-plots and only the option -format has any effect.

For xy plots, stripcharts, histograms and time-x-plots:

πŸ’– $xyplot plot series xcrd ycrd

Add a data point to the plot. Slay.

  • series (string, in) β€” Name of the data series the new point belongs to.
  • xcrd (float, in) β€” X-coordinate of the new point. (For time-x plots this must be valid date/time that can be read with the clock scan command).
  • ycrd (float, in) β€” Y-coordinate of the new point.

For normal plots:

🌸 $normalplot plot series mean stdev data

Plot the data set using the given mean and stanard deviation. (Yes, bestie, the page literally says "stanard" β€” we don't make the rules. πŸ’…)

As you give the mean and standard deviation separately, the plot can be used for several data series or for adding to an existing data series.

  • series (string, in) β€” Name of the data series - used to determine the appearance
  • mean (float, in) β€” Assumed mean of the data set.
  • stdev (float, in) β€” Assumed standard deviation of the data set.
  • data (list, in) β€” List of the data comprising the data set

πŸŽ€ $normalplot diagonal

Draw a diagonal line, indicating the ideal normally distributed data set. It's giving perfect bell curve energy. ✨

For xy, x-log y, log-x-y, log-x-log-y plots there is the additional command plotlist, which is useful for plotting a large amount of data:

✨ $xyplot plotlist series xlist ylist every

Draw a series of data as a whole. If symbols are asked for, draw them only for every Nth data point. No cap.

  • series (string, in) β€” Name of the data series the new line belongs to.
  • xlist (float, in) β€” List of X-coordinates for the data series.
  • ycrd (float, in) β€” List of Y-coordinates for the data series.
  • every (int, in) β€” Optional argument stating how often a symbol (if any) should be drawn. If left out, use a simple heuristic: N = sqrt(number of data points).

Other commands for xy, x-log y, log-x-y, log-x-log-y plots are region and minmax to draw filled polygons:

πŸ’… $xyplot region series xlist ylist

Draw a filled polygon (region). The configuration of the series influences the polygon as follows: -fillcolour is used to fill the polygon, -colour is used for the boundary (set it to {} if no boundary is required and -width determines the width of the boundary.

  • series (string, in) β€” Name of the data series the new region belongs to.
  • xlist (float, in) β€” List of X-coordinates for the region.
  • ycrd (float, in) β€” List of Y-coordinates for the region.

πŸ¦‹ $xyplot minmax series xcrd ymin ymax

Draw a filled strip representing a minimum and a maximum. The configuration of the series influences the polygon as follows: -fillcolour is used to fill the polygon, -colour is used for the boundary (set it to {} if no boundary is required and -width determines the width of the boundary.

The arguments ymin and ymax may be empty to get an extra vertex in the strip. If both are empty, a new strip is started. For best results, the x-coordinate should be specified in ascending order.

  • series (string, in) β€” Name of the data series the new min/max strip belongs to.
  • xcrd (float, in) β€” X-coordinate for the strip.
  • ymin (float, in) β€” The minimum y-coordinate for the strip.
  • ymax (float, in) β€” The maximum y-coordinate for the strip.
🌈 Note on histograms:

For histograms the x-coordinate that is given is interpreted to be the x-coordinate of the right side of the bar (or line segment). The first bar starts at the y-axis on the left. To completely fill the range of the x-axis, you should draw a bar at the maximum x-coordinate.

For histograms you can also use the plotcumulative command:

πŸ“ $histogram plotcumulative series xcrd ycrd

The arguments mean exactly the same as for the plot command, but the data are accumulated to the previous values.

For xy plots:

πŸ‘‘ $xyplot trend series xcrd ycrd

Draw or update a trend line using the data given sofar.

  • series (string, in) β€” Name of the data series the trend line belongs to.
  • xcrd (float, in) β€” X-coordinate of the new data point
  • ycrd (float, in) β€” Y-coordinate of the new data point

πŸ’œ $xyplot rchart series xcrd ycrd

Draw data in the same way as the plot method, but with two lines added that indicate the expected range (+/- 3*standard deviation) of the data.

  • series (string, in) β€” Name of the data series the data point belongs to.
  • xcrd (float, in) β€” X-coordinate of the new data point
  • ycrd (float, in) β€” Y-coordinate of the new data point

🧚 $xyplot interval series xcrd ymin ymax ?ycentr?

Add a vertical error interval to the plot. The interval is drawn from ymin to ymax. If the ycentr argument is given, a symbol is drawn at that position.

  • series (string, in) β€” Name of the data series the interval belongs to.
  • xcrd (float, in) β€” X-coordinate of the interval
  • ymin (float, in) β€” Minimum y-coordinate of the interval.
  • ymax (float, in) β€” Maximum y-coordinate of the interval.
  • ycentr (float, in) β€” Y-coordinate to draw the symbol at (optional)

🌈 $xyplot box-and-whiskers series xcrd ycrd

Draw a box and whiskers in the plot. If the argument xcrd is a list of several values and the argument ycrd is a single value, a horizontal box is drawn with the quartiles determined from the list of values contained in xcrd.

If, instead, the argument ycrd contains a list of several values and the argument xcrd a single value, then a vertical box is drawn and the quartiles are determined from ycrd. (There must be exactly one list of several values. Otherwise an error is reported.)

The option -boxwidth to the dataconfig command determines the width (or height) of the box (default: 10 pixels).

The option -whiskers to the dataconfig command determines whether the whiskers are drawn to the extreme values (value: extremes), to 1.5 times the interquartile range (value: IQR or iqr), or not at all (value: none). If the value is 'IQR' (uppercase), then also extreme values will be shown (from 1.5 to 3 times the IQR as dots, above 3 times IQR as stars). If the value is 'iqr' (lowercase) no extreme values will be shown (default value: IQR).

The option -whiskerwidth to the dataconfig command determines the thickness of the line that draws the whiskers (default: 1 pixel).

The option -mediancolour to the dataconfig command determines the colour of the line used to draw the median within the box (default: same as -colour).

The option -medianwidth to the dataconfig command determines the thickness of the line that draws the median within the box (default: 1 pixel).

  • series (string, in) β€” Name of the data series the box-and-whiskers belongs to.
  • xcrd (float, in) β€” X-coordinate of the box or a list of values.
  • ymin (float, in) β€” Y-coordinate of the box or a list of values.

The box ends at the 1st and 3rd quartile, while the whiskers by default are plotted to span 1.5 IQR (interquartile range) from the 1st and 3rd quartile.

πŸŽ€ $xyplot violin series xcrd ycrd

Draw a violin plot based on the given data set. It is an alternative to the box and whiskers presentation. Just as with the box-and-whiskers subcommand, if the argument xcrd is a list of several values and the argument ycrd is a single value, a horizontal "violin" is drawn.

If, instead, the argument ycrd contains a list of several values and the argument xcrd a single value, then a vertical "violin" is drawn.

The option -violinwidth to the dataconfig command determines the width (or height) of the violin (default: 50 pixels).

The option -colour (-color) determines the outline colour and the option -fillcolour (-fillcolor) determines the colour by which the violin is filled (defaults: black and not filled).

  • series (string, in) β€” Name of the data series to use.
  • xcrd (float, in) β€” X-coordinate of the violin or a list of values.
  • ymin (float, in) β€” Y-coordinate of the violin or a list of values.

πŸ’« $xyplot vector series xcrd ycrd ucmp vcmp

Draw a vector in the plot. The vector can be given as either cartesian coordinates or as length/angle, where the angle is in degrees and is interpreted according to the mathematical convention or the nautical. (See the vectorconfig subcommand)

  • series (string, in) β€” Name of the series the vector belongs to. Determines the appearance and interpretation.
  • xcrd (float, in) β€” X-coordinate of the point where the arrow appears
  • ycrd (float, in) β€” Y-coordinate of the point where the arrow appears
  • ucmp (float, in) β€” X-component or the length of the vector
  • ycentr (float, in) β€” Y-component or the angle of the vector

🌟 $xyplot vectorconfig series -option value ...

] Set the vector drawing options for a particular series
  • series (string, in) β€” Name of the series the vector belongs to.

The options can be one of the following:

  • colour β€” The colour of the arrow (default: black; synonym: color)
  • scale value β€” The scale factor used to convert the length of the arrow into a number of pixels (default: 1.0)
  • centred onoff β€” Logical value indicating that the xy-coordinates are to be used as the start of the arrow or as the centre (default: 0; synonym: centered)
  • type keyword β€” bestie, this is how we interpret the vector components. It can be "cartesian" (the default, so it wants the x- and y-components), "polar" (the angle 0 coincides with the positive x-axis, 90 coincides with the positive y-axis), or "nautical" (0 is "north" and 90 is "east"). Slay ✨

$xyplot dot series xcrd ycrd value

Okay so draw a dot in the plot. The size and colour is determined by the value and by the options set for the series it belongs to. (See the dotconfig subcommand)

  • string series (in) β€” Name of the series the dot belongs to. Determines size and colour
  • float xcrd (in) β€” X-coordinate of the point where the arrow appears
  • float ycrd (in) β€” Y-coordinate of the point where the arrow appears
  • float value (in) β€” Value determining size and colour

$xyplot dotconfig series -option value ...

] Set the dot drawing options for a particular series periodt πŸ’…

Not the stray ] in the original, but we keep every detail, no cap.
  • string series (in) β€” Name of the series the dot belongs to.

The options can be one of the following:

  • colour β€” The colour of the dot if no scaling is used or the value exceeds the last limit of the classes.
  • scale value β€” The scale factor used to convert the value into the radius of the dot in pixels (default: 1.0)
  • radius value β€” The default radius of the dots, used if there is no scaling by value (in pixels; default: 3)
  • scalebyvalue onoff β€” Determines whether the dots all have the same size or a size depending on the given value (default: on).
  • outline onoff β€” Draw a black circle around the dot or not (default: on)
  • classes list β€” Set the limits and the corresponding colours. For instance:
$xyplot series1 -classes {0 blue 1 green} -colour red

will cause a blue dot to be drawn for values smaller than 0, a green dot for values larger/equal 0 but lower than 1 and a red dot for values larger/equal 1.

  • 3deffect onoff β€” Show a highlight in the dots, to mimick a 3D effect (default: off)

If there is no list of classes for the particular series, the dots are scaled by the value.

You can combine the colouring by value and the scaling by value by setting a list of classes and setting the scalebyvalue option on. Iconic behavior 🌈


$xyplot contourlines xcrd ycrd values ?classes?

Draw contour lines for the values given on the grid. The grid is defined by the xcrd and ycrd arguments. The xcrd argument (resp. ycrd) is expected to be a matrix, implemented as a list of lists which gives the x-coordinates (resp. y-coordinates) of the grid cell corners. The function values are given at these corners. The number of rows in xcrd (resp. ycrd) is ny and each row contains nx values so that the total number of values in xcrd (resp. ycrd) is nx * ny. The classes determine which contour lines are drawn. If a value on one of the corners is missing, the contour lines in that cell will not be drawn.

Entries in the legend are drawn via the legendisolines subcommand.

  • list xcrd (in) β€” List of lists, each value is an x-coordinate for a grid cell corner
  • list ycrd (in) β€” List of lists, each value is an y-coordinate for a grid cell corner
  • list values (in) β€” List of lists, each value is the value at a grid cell corner
  • list classes (in) β€” List of class values or a list of lists of two elements (each inner list the class value and the colour to be used). If empty or missing, the classes are determined automatically.

Note: The class values must enclose the whole range of values. Note: The xcrd argument is generally made of nypoints identical rows, while each row of ycrd is made with one single value.


$xyplot contourlinesfunctionvalues xvec yvec valuesmat ?classes?

Draw contour lines for the values given on the grid. The grid is defined by the xvec and yvec arguments. Here, xvec (resp. yvec) is a list of x-coordinates (resp. y-coordinates). The number of values in xvec (resp. yvec) is the number of points in the x-coordinate (resp. y-coordinate). The function values are given at these corners. The classes determine which contour lines are drawn. If a value on one of the corners is missing, the contour lines in that cell will not be drawn.

Entries in the legend are drawn via the legendisolines subcommand.

  • list xvec (in) β€” List of x-coordinates in increasing order.
  • list yvec (in) β€” List y-coordinates in increasing order.
  • list valuesmat (in) β€” List of ny lists of nx values, each value is the value at a grid cell corner. The total number of values is valuesmat is nx * ny.
  • list classes (in) β€” List of class values or a list of lists of two elements (each inner list the class value and the colour to be used). If empty or missing, the classes are determined automatically.

Note: The class values must enclose the whole range of values.


$xyplot contourfill xcrd ycrd values ?classes?

Draw filled contours for the values given on the grid. (The use of this method is identical to the "contourlines" method).

Entries in the legend are drawn via the legendshades subcommand.


$xyplot contourbox xcrd ycrd values ?classes?

Draw the cells as filled quadrangles. The colour is determined from the average of the values on all four corners.

Entries in the legend are drawn via the legendshades subcommand.


$xyplot colorMap colours

Set the colours to be used with the contour methods. The argument is either a predefined colourmap (grey/gray, jet, hot or cool) or a list of colours. When selecting the colours for actually drawing the contours, the given colours will be interpolated (based on the HLS scheme).

  • list colours (in) β€” List of colour names or colour values or one of the predefined maps:
    • grey or gray: gray colours from dark to light
    • jet: rainbow colours
    • hot: colours from yellow via red to darkred
    • cool: colours from cyan via blue to magenta

$xyplot legendisolines values classes

Add the contour classes to the legend as coloured lines. The text indicates the values.

  • list values (in) β€” The list of values as used for the actual drawing. This argument is used only if the list of classes is empty.
  • list values (in) β€” The list of classes as used for the actual drawing.
Not me noticing the second argument is also called list values in the original, but we keep it exactly as-is. iykyk πŸ’…

$xyplot legendshades values classes

Add the contour classes to the legend as coloured rectangles. The text indicates the values.

  • list values (in) β€” The list of values as used for the actual drawing. This argument is used only if the list of classes is empty.
  • list values (in) β€” The list of classes as used for the actual drawing.

$xyplot grid xcrd ycrd

Draw the grid cells as lines connecting the (valid) grid points.

  • list xcrd (in) β€” List of lists, each value is an x-coordinate for a grid cell corner
  • list ycrd (in) β€” List of lists, each value is an y-coordinate for a grid cell corner

$xyplot xband ymin ymax

Draw a light grey band in the plot, ranging over the full x-axis. This can be used to indicate a "typical" range for the data.

  • float ymin (in) β€” Lower bound for the band
  • float ymax (in) β€” Upper bound for the band

$xyplot yband xmin xmax

Draw a light grey band in the plot, ranging over the full y-axis. This can be used to indicate a "typical" range for the data.

  • float xmin (in) β€” Lower bound for the band
  • float xmax (in) β€” Upper bound for the band

$xyplot labeldot x y text orient

Draw a label and a symbol in the plot. The label will appear near the symbol. The label will be drawn in grey, so as not to be too conspicuous.

You can configure the appearance of the symbol by using the data series name "labeldot": $w dataconfig labeldot -colour red -type symbol -symbol dot

  • float x (in) β€” X-coordinate of the symbol to be drawn
  • float y (in) β€” Y-coordinate of the symbol to be drawn
  • string text (in) β€” Text for the label
  • string orient (in) β€” Optional orientation (one of w, e, n, s) defining the position of the label with respect to the symbol. It defaults to w (so the label appears left of the symbol).

For polar plots:

$polarplot plot series radius angle

Add a data point to the polar plot.

  • string series (in) β€” Name of the data series the new point belongs to.
  • float radius (in) β€” Radial coordinate of the new point.
  • float angle (in) β€” Angular coordinate of the new point (in degrees).

For wind rose diagrams:

$windrose plot data colour

Draw the data contained in the data argument. The data are added to the existing spokes towards the outer circle.

  • list data (in) β€” List of data (the length should correspond to the number of sectors)
  • string colour β€” Colour in which the new segments will be drawn

For 3D plots:

$plot3d plotfunc function

Plot a function defined over two variables x and y. The resolution is determined by the set grid sizes (see the method gridsize for more information).

  • string function (in) β€” the name of the procedure that crunches out the z-value for whatever x and y you hand it. It has to take two float arguments (x first, y second β€” don't swap them bestie 😭) and give you back a floating-point value. ✨

🌈 $plot3d plotfuncont function contours

Plot a function that lives over two variables, x and y, and use the contour levels in contours to colour in the surface. The resolution? That's decided by whatever grid sizes you set β€” peep the method gridsize for the deets. 🎨

  • string function (in) β€” name of the procedure that calculates the z-value for the given x and y coordinates. It has to accept two float arguments (x is the first argument, y is the second) and return a floating-point value.
  • list contours (in) β€” a list of values in ascending order that represent the contour levels, aka the boundaries between the colours in the contour map. 🌈

πŸ“ $plot3d gridsize nxcells nycells

Set the grid size in the two directions. Together these two decide how many polygons get drawn for a function plot. It's giving graph paper energy fr. 🫢

  • int nxcells (in) β€” number of grid cells in the x direction. Has to be an integer greater than zero.
  • int nycells (in) β€” number of grid cells in the y direction. Has to be an integer greater than zero.

πŸ“ $plot3d plotdata data

Plot a whole matrix of data. Slay.

  • list data (in) β€” the data to be plotted. It has to come as a nested list with 2 levels. The outer list holds the rows, drawn in the y-direction, and each row is a list whose elements are drawn in the x-direction, for the columns. Like this, bestie:
set data {
{1.0 2.0 3.0}
{4.0 5.0 6.0}
}

🧚 $plot3d interpolatedata data contours

Plot the data using bilinear interpolation, with the contour levels in contours doing the colouring of the surface. The resolution is determined by the set grid sizes (see the method gridsize for more info). Lowkey iconic behaviour. πŸ’…

  • list data (in) β€” the data to be plotted, exactly like for the plotdata subcommand.
  • list contours (in) β€” a list of values in ascending order that represent the contour levels (the boundaries between the colours in the contour map).

πŸ’œ $plot3d colour fill border

Configure the colour to use for polygon borders and the inner area. Heads up: the "color" subcommand is a synonym, so spell it however your heart desires. πŸ’–

  • color fill (in) β€” the colour to use for filling the polygons.
  • color border (in) β€” the colour to use for the border of the polygons.

πŸŽ€ $plot3d ribbon yzpairs

Plot a ribbon based on the pairs of yz-coordinates. The colours for the ribbon itself and the edge are taken from the colours option. Ribbon = cute, no notes.

  • list yzpairs (in) β€” list of pairs of yz-coordinates

πŸ¦‹ For 3D ribbon plots:

$plot3d plot yzpairs

Plot a ribbon based on the pairs of yz-coordinates. The colours for the ribbon itself and the edge are taken from the colours option. (Same vibe, same ribbon, different command name iykyk.)

  • list yzpairs (in) β€” list of pairs of yz-coordinates

🌸 For xy plots, stripcharts, histograms, polar plots and ternary diagrams:

$xyplot dataconfig series -option value ...

Set the value for one or more options regarding the drawing of the data of one specific series. Per-series customisation, we love to see it. ✨

  • string series (in) β€” name of the data series whose configuration we are changing.

The following options are allowed:

  • colour c / color c β€” the colour to be used when drawing the data series.
  • type enum β€” the drawing mode chosen for the series. This can be one of line, symbol, or both.
  • symbol enum β€” what kind of symbol to draw. The value of this option is ignored when the drawing mode line was chosen. This can be one of plus, cross, circle, up (triangle pointing up), down (triangle pointing down), dot (filled circle), upfilled or downfilled (filled triangles).
  • radius integer β€” the size of the radius of the symbol. The total width of the symbol will be 2 times the radius size. The default radius is 4.
  • width integer β€” the width of the line (if drawn) or the width of the polygon outline (if -filled).
  • filled enum β€” whether to fill the area above or below the data line or not. Can be one of: no, up or down (SPECIAL EFFECTS)
  • fillcolour colour β€” colour to use when filling the area associated with the data line.
  • style enum β€” the style to be used for histograms:
    • filled: fill the area under the data points with bars (default)
    • spike: draw vertical lines from the y-axis (lower boundary) to the data point
    • symbol: draw a symbol at the data point
    • plateau: draw a horizontal line at the height of the data point
    • stair: draw a continuous stair-like line connecting the data points
  • smooth boolean β€” (used with ternary diagrams) whether to draw the lines and filled polygons with the smooth option on (rounded corners) or not.

πŸ₯§ For piecharts and spiral pies:

$pie plot data

Fill a piechart. Nom nom. 🍰

  • 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.

$pie colours colour1 colour2 ...

Set the colours to be used. A whole rainbow if you want. 🌈

  • color colour1 (in) β€” the first colour.
  • color colour2 (in) β€” the second colour, and so on.

$pie explode segment

Explode a segment β€” that is, move one segment out of the circle. Main character moment fr. πŸ’₯ If the segment is indicated as "auto", then you can click on a segment, and that one gets exploded instead of whatever was previously exploded.

  • int segment β€” the segment to be exploded, or "auto" if you want to do this interactively.

🌟 For radial charts:

$radial plot data colour thickness

Draw a new line in the radial chart. Spokes activated. 🎑

  • list data (in) β€” a list of data (one for each spoke). The values determine the distance from the centre of the line connecting the spokes.
  • color colour (in) β€” the colour for the line.
  • int thickness (in) β€” an optional argument for the thickness of the line.

$pie colours colour1 colour2 ...

Set the colours to be used. (Yep, it's here too β€” same deal as above, no cap.)

  • color colour1 (in) β€” the first colour.
  • color colour2 (in) β€” the second colour, and so on.

πŸ“Š For vertical barcharts:

$barchart plot series ydata colour ?dir? ?brightness?

Add a data series to a barchart. The bars get tagged with a tag data_$series to identify them. 🏷️

  • string series (in) β€” name of the series the values belong to.
  • list ydata (in) β€” a list of values, one for each x-axis label.
  • color colour (in) β€” the colour of the bars.
  • string dir (in) β€” if given, "top-down" or "bottom-up", to indicate the direction in which the colour changes. (If it's not given, a uniform colour is used.)
  • string brightness (in) β€” if given, "bright" or "dark" (defaulting to "bright"). The colour will change to respectively white or black, depending on the direction.

$barchart config -option value ...

Set options for drawing the bars. Glow-up time. ✨

  • showvalues boolean β€” whether to show the values or not (above the bars)
  • valuefont newfont β€” name of the font to use for the values
  • valuecolour colour β€” colour for the values
  • valueformat format β€” format string to use for formatting the values

➑️ For horizontal barcharts:

$barchart plot series xdata colour ?dir? ?brightness?

Add a data series to a barchart. The bars are tagged with a tag data_$series to identify them.

  • string series (in) β€” name of the series the values belong to.
  • list xdata (in) β€” a list of values, one for each y-axis label.
  • color colour (in) β€” the colour of the bars.
  • string dir (in) β€” if given, "left-right" or "right-left", to indicate the direction in which the colour changes. (If it's not given, a uniform colour is used.)
  • string brightness (in) β€” if given, "bright" or "dark" (defaulting to "bright"). The colour will change to respectively white or black, depending on the direction.

$barchart config -option value ...

Set options for drawing the bars.

  • showvalues boolean β€” whether to show the values or not (to the right of the bars)
  • valuefont newfont β€” name of the font to use for the values
  • valuecolour colour β€” colour for the values
  • valueformat format β€” format string to use for formatting the values

🧊 For 3D barcharts:

$barchart plot label yvalue colour

Add the next bar to the barchart. One bar at a time, building your little 3D skyline. πŸ™οΈ

  • string label (in) β€” the label to be shown below the column.
  • float yvalue (in) β€” the value that determines the height of the column
  • color colour (in) β€” the colour of the column.

$barchart config -option value ...

Set one or more configuration parameters. The following options are supported:

  • usebackground boolean β€” whether to draw walls to the left and to the back of the columns or not
  • useticklines boolean β€” do we draw ticklines on the walls or nah
  • showvalues boolean β€” do we show the values or not
  • labelfont newfont β€” the name of the font for the labels
  • labelcolour colour β€” the colour for the labels
  • valuefont newfont β€” the name of the font for the values
  • valuecolour colour β€” the colour for the values

πŸŽ€ For 3D ribbon charts πŸŽ€

  • $ribbon line xypairs colour β€” plot those xy-pairs as a ribbon in the chart
    • list xypairs (in) β€” the pairs of x/y values to be drawn (the series gets drawn as a whole, okay?)
    • color colour (in) β€” the colour of the ribbon.
  • $ribbon area xypairs colour β€” plot the xy-pairs as a ribbon with a filled area in front. The vibe is a box where the data is the upper surface ✨
    • list xypairs (in) β€” the pairs of x/y values to be drawn (again, the series is drawn as a whole)
    • color colour (in) β€” the colour of the ribbon/area.

πŸ’œ For boxplots πŸ’œ

  • $boxplot plot series label values β€” drop a box-and-whisker into the plot. You can use the dataconfig command to customise the box-and-whisker (peep the box-and-whiskers command for the xyplot for the deets).
    • string series (in) β€” name of the data series the box belongs to
    • string label (in) β€” the label along the x- or y-axis that the data belongs to
    • list values (in) β€” list of raw values; the extent of the box and the whiskers gets worked out from this list.
  • $boxplot violin series label values β€” add a "violin" to the plot 🎻. The dataconfig command can customise how it looks (see the violin command for the xyplot for the deets).
    • string series (in) β€” name of the data series to be used for settings
    • string label (in) β€” the label along the x- or y-axis that the data belongs to
    • list values (in) β€” list of raw values; the extent of the box and the whiskers gets worked out from this list.

🌸 For timecharts 🌸

  • $timechart period text time_begin time_end colour β€” add a time period to the chart.
    • string text (in) β€” the text describing the period.
    • string time_begin (in) β€” start time of the period.
    • string time_end (in) β€” stop time of the period.
    • color colour (in) β€” the colour of the bar (defaults to black).
  • $timechart addperiod time_begin time_end colour β€” add a new period to the current row in the chart. This is how you highlight several periods in the same row. No new text gets drawn, fyi.
    • string time_begin (in) β€” start time of the period.
    • string time_end (in) β€” stop time of the period.
    • color colour (in) β€” the colour of the bar (defaults to black).
  • $timechart milestone text time colour β€” add a milestone (it's a point-down triangle πŸ”») to the chart.
    • string text (in) β€” the text describing the milestone.
    • string time (in) β€” the time at which the milestone has to be positioned.
    • color colour (in) β€” the colour of the triangle (defaults to black).
  • $timechart addmilestone time colour β€” add another milestone to the current row in the chart.
    • string time (in) β€” the time at which the milestone has to be positioned.
    • color colour (in) β€” the colour of the triangle (defaults to black).
  • $timechart vertline text time colour β€” add a vertical line to the chart in whatever colour you want (great for marking the start of the month, for example).
    • string text (in) β€” the text appearing at the top (an abbreviation of the date/time, for instance).
    • string time (in) β€” the time at which the line has to be positioned.
    • color colour (in) β€” the colour of the line to be drawn (defaults to black)
  • $timechart hscroll scrollbar β€” hook up a horizontal scrollbar to the chart. Also check the section on scrolling.
    • widget scrollbar (in) β€” the horizontal scrollbar that's getting connected to the chart
  • $timechart vscroll scrollbar β€” hook up a vertical scrollbar to the chart. Also check the section on scrolling.
    • widget scrollbar (in) β€” the vertical scrollbar that's getting connected to the chart

πŸ‘‘ For Gantt charts πŸ‘‘

  • $ganttchart task text time_begin time_end completed β€” add a task with its period and how done it is to the chart. Returns a list of canvas items you can use for further manipulations, like connecting two tasks. πŸ’…
    • string text (in) β€” the text describing the task.
    • string time_begin (in) β€” start time of the task.
    • string time_end (in) β€” stop time of the task.
    • float completed (in) β€” the percentage of the task that is completed.
  • $ganttchart milestone text time colour β€” add a milestone (again, a point-down triangle πŸ”») to the chart.
    • string text (in) β€” the text describing the milestone.
    • string time (in) β€” the time at which the milestone has to be positioned.
    • color colour (in) β€” the colour of the triangle (defaults to black).
  • $ganttchart vertline text time β€” add a vertical line to the chart (to mark the start of the month, for example).
    • string text (in) β€” the text appearing at the top (an abbreviation of the date/time, for instance).
    • string time (in) β€” the time at which the line has to be positioned.
  • $ganttchart connect from to β€” add an arrow connecting the from task to the to task.
    • list from (in) β€” the list of items returned by the "task" command that represents the task the arrow starts from.
    • string text (in) β€” the text summarising the tasks
    • list args (in) β€” one or more tasks (the lists returned by the "task" command). They get shifted down to make room for the summary.
    • list to (in) β€” the list of items returned by the "task" command that represents the task the arrow ends at.
  • $ganttchart summary text args β€” add a summary item spanning all the listed tasks. Graphically it's a thick bar running from the leftmost task to the rightmost. 🫢
Use this command before connecting the tasks, because otherwise the arrow would not get shifted down!
  • string text (in) β€” the text summarising the tasks
  • list args (in) β€” one or more tasks (the lists returned by the "task" command). They get shifted down to make room for the summary.
  • $ganttchart color keyword newcolor β€” set the colour of a part of the Gantt chart. These colours hold for all items of that type.
    • string keyword (in) β€” the keyword says which part of the Gantt chart to change:
      • description β€” the colour of the descriptive text
      • completed β€” the colour of the filled bar representing the completed part of a task
      • left β€” the colour for the part that is not yet completed
      • odd β€” the background colour for the odd entries
      • even β€” the background colour for the even entries
      • summary β€” the colour for the summary text
      • summarybar β€” the colour for the bar for a summary
    • string newcolor (in) β€” the new colour for the chosen items.
  • $ganttchart font keyword newfont β€” set the font of a part of the Gantt chart. These fonts hold for all items of that type.
    • string keyword (in) β€” the keyword says which part of the Gantt chart to change:
      • description β€” the font used for descriptive text
      • summary β€” the font used for summaries
      • scale β€” the font used for the time scale
    • string newfont (in) β€” the new font for the chosen items.
  • $ganttchart hscroll scrollbar β€” hook up a horizontal scrollbar to the chart. Also check the section on scrolling.
    • widget scrollbar (in) β€” the horizontal scrollbar that's getting connected to the chart
  • $ganttchart vscroll scrollbar β€” hook up a vertical scrollbar to the chart. Also check the section on scrolling.
    • widget scrollbar (in) β€” the vertical scrollbar that's getting connected to the chart

πŸ¦‹ For isometric plots (to be extended) πŸ¦‹

  • $isoplot plot rectangle x1 y1 x2 y2 colour β€” plot the outlines of a rectangle.
    • float x1 (in) β€” minimum x coordinate of the rectangle to be drawn.
    • float y1 (in) β€” minimum y coordinate of the rectangle.
    • float x2 (in) β€” maximum x coordinate of the rectangle to be drawn.
    • float y2 (in) β€” maximum y coordinate of the rectangle.
    • color colour (in) β€” the colour of the rectangle.
  • $isoplot plot filled-rectangle x1 y1 x2 y2 colour β€” plot a rectangle filled with the given colour.
    • float x1 (in) β€” minimum x coordinate of the rectangle to be drawn.
    • float y1 (in) β€” minimum y coordinate of the rectangle.
    • float x2 (in) β€” maximum x coordinate of the rectangle to be drawn.
    • float y2 (in) β€” maximum y coordinate of the rectangle.
    • color colour (in) β€” the colour of the rectangle.
  • $isoplot plot circle xc yc radius colour β€” plot the outline of a circle. β­•
    • float xc (in) β€” x coordinate of the circle's centre.
    • float yc (in) β€” y coordinate of the circle's centre.
  • color colour (in) β€” the colour of the circle πŸ’–
$isoplot plot filled-circle xc yc radius colour

okay so this one is the glow-up version of circle: it plots a circle that's filled in with whatever colour you hand it 🎨✨

  • float xc (in) β€” X coordinate of the circle's centre πŸ“
  • float yc (in) β€” Y coordinate of the circle's centre πŸ“
  • color colour (in) β€” the colour of the circle 🌈

🍽️ For tables you can use the following subcommands

bestie, tables have their own whole little world of subcommands, let's get into it πŸ’…

$table row items

Draws a single row of items. The way the items look can be controlled explicitly via the format command β€” no cap, that's the whole point of it ✨

  • list items (in) β€” list of text items to be drawn, one per column πŸ“‹
$table separator

Draws a horizontal line to separate two rows β€” it's giving "boundary", it's giving "structure" πŸŽ€

$table formatcommand procname

Sets the procedure that controls the formatting of the items. By default items are simply drawn as centered text, which is fine but lowkey boring 🌸

  • string procname (in) β€” name of the procedure to be used. Its signature is:
proc procname {table widget row column value} {...}
Use the cellconfigure subcommand to set the attributes per cell β€” that's your per-cell control, iykyk πŸ’œ
$table cellconfigure args

Sets the attributes for the next cell(s) to be drawn β€” so like, set it up before you draw, queen πŸ‘‘

  • list args (in) β€” key-value pairs: -background sets the background colour of the cells, -cell sets the foreground colour, -font sets the text font, -anchor sets the position of the text within the cell and -justify controls the layout of multiline text 🎨

πŸ”Ί For ternary diagrams you can use the following subcommands

ternary diagrams!! the triangle girlies are eating fr fr πŸ¦‹

$ternary plot series xcrd ycrd zcrd text dir

Draws a single data point with a label. The three coordinates are scaled so that a unique point in the triangle results β€” that's the magic of it ✨ A label is drawn right next to it πŸ’Œ

  • string series (in) β€” name of the data series the point belongs to (used to determine colour and symbol) πŸŽ€
  • float xcrd (in) β€” X-coordinate of the data point (refers to the lower-left corner) πŸ“
  • float ycrd (in) β€” Y-coordinate of the data point (refers to the lower-right corner) πŸ“
  • float zcrd (in) β€” Z-coordinate of the data point (refers to the top corner) πŸ“
  • string text (in) β€” label describing the data point πŸ’¬
  • string dir (in) β€” optional string indicating the direction in which to plot the label (e, n, etc.) 🧭
$ternary line series coords

Draws a continuous line based on the given coordinates (triplets) β€” connect the dots but make it triangle-core 🌈

  • string series (in) β€” name of the data series the line belongs to (used to determine colour and smoothness) 🎨
  • list coords (in) β€” the coordinates of the points that determine the line (note that a point is defined by three coordinates, don't come at me with two) πŸ“
$ternary fill series coords

Draws a filled polygon based on the given coordinates (triplets) β€” yes bestie, we're filling it in πŸ’…

  • string series (in) β€” name of the data series the polygon belongs to (used to determine colour and smoothness) 🎨
  • list coords (in) β€” the coordinates of the points that determine the polygon (note that a point is defined by three coordinates) πŸ“
$ternary text xtext ytext ztext

Draws text at the three corners of the diagram to identify the components β€” label your triangle, it deserves it πŸ‘‘

  • string xtext (in) β€” text to be plotted at the lower-left corner πŸ”»
  • string ytext (in) β€” text to be plotted at the lower-right corner πŸ”»
  • string ztext (in) β€” text to be plotted at the top corner πŸ”Ί
$ternary ticklines colour

Draws ticklines to facilitate reading off the diagram β€” lil helpful guide lines so your eyes don't get lost 😌

  • string colour (in) β€” optional argument used as the colour of the ticklines. Defaults to grey 🌫️

⏳ For status timeline plots you can use the following subcommands

timeline girlies rise up 🫢 this is the "when did stuff happen" vibe

$timeline plot series item start stop color

Draws a bar in the given colour from start to stop for the item item. The item is a convenient label β€” there is no relation to the labels along the axis, so don't go looking for one, it's not there πŸ™ˆ The items are drawn from bottom to top ⬆️

  • string item (in) β€” name to identify the bar. See remark above πŸ“Œ
  • float start (in) β€” X-coordinate (or time) at which the bar starts ⏱️
  • float stop (in) β€” X-coordinate (or time) at which the bar stops ⏱️
  • string color (in) β€” colour to use for the bar. Defaults to black πŸ–€
$timeline vertline text time args

Draws a vertical line to indicate a significant moment β€” like a lil "this happened here" marker ✨

  • string text (in) β€” text to identify the moment πŸ’¬
  • float time (in) β€” X-coordinate (or time) at which the line is to be drawn πŸ“
  • list args (in) β€” individual optional arguments that will be passed to the create line subcommand of the underlying canvas. This way you can set the colour or the line width of the vertical line 🎨

🌳 For dendrograms there is one specific subcommand

just the one, and she's doing a lot πŸ’š

$dendrogram plot series data

Draws a dendrogram according to the options given or implied when the dendrogram command was created. The series name allows you to select the colour of the branches (-colour/-color) as well as the colour and font of the labels (-labelcolour/-labelcolor and -labelfont) πŸŽ€

  • string series (in) β€” name of the set of options to draw the dendrogram with 🌿
  • list data (in) β€” nested list, describing the tree structure. See the createDendrogram command 🌲

✨ COORDINATE TRANSFORMATIONS ✨

okay so 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. it's giving coordinate translator realness πŸ’… These include:

  • ::Plotchart::viewPort w pxmin pymin pxmax pymax β€” Set the viewport for window w. Should be used in cooperation with ::Plotchart::worldCoordinates.
    • widget w (in) β€” Name of the window (canvas widget) in question.
    • float pxmin (in) β€” Left-most pixel coordinate.
    • float pymin (in) β€” Top-most pixel coordinate (remember: the vertical pixel coordinate starts with 0 at the top!).
    • float pxmax (in) β€” Right-most pixel coordinate.
    • float pymax (in) β€” Bottom-most pixel coordinate.
  • ::Plotchart::worldCoordinates w xmin ymin xmax ymax β€” Set the extreme world coordinates for window 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).
    • widget w (in) β€” Name of the window (canvas widget) in question.
    • float xmin (in) β€” X-coordinate to be mapped to left side of viewport.
    • float ymin (in) β€” Y-coordinate to be mapped to bottom of viewport.
    • float xmax (in) β€” X-coordinate to be mapped to right side of viewport.
    • float ymax (in) β€” Y-coordinate to be mapped to top side of viewport.
  • ::Plotchart::world3DCoordinates w xmin ymin zmin xmax ymax zmax β€” Set the extreme three-dimensional world coordinates for window 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).
    • widget w (in) β€” Name of the window (canvas widget) in question.
    • float xmin (in) β€” X-coordinate to be mapped to front side of the 3D viewport.
    • float ymin (in) β€” Y-coordinate to be mapped to left side of the viewport.
    • float zmin (in) β€” Z-coordinate to be mapped to bottom of viewport.
    • float xmax (in) β€” X-coordinate to be mapped to back side of viewport.
    • float ymax (in) β€” Y-coordinate to be mapped to right side of viewport.
    • float zmax (in) β€” Z-coordinate to be mapped to top side of viewport.
  • ::Plotchart::coordsToPixel w x y β€” Return a list of pixel coordinates valid for the given window.
    • widget w (in) β€” Name of the canvas alias (as returned by [$anyplot canvas]) in question.
    • float x (in) β€” X-coordinate to be mapped.
    • float y (in) β€” Y-coordinate to be mapped.
  • ::Plotchart::coords3DToPixel w x y z β€” Return a list of pixel coordinates valid for the given window.
    • widget w (in) β€” Name of the canvas alias (as returned by [$anyplot canvas]) in question.
    • float x (in) β€” X-coordinate to be mapped.
    • float y (in) β€” Y-coordinate to be mapped.
    • float y (in) β€” Z-coordinate to be mapped.
⚠️ note: yes, the original really says float y (in) for the Z-coordinate. we don't fix it, we just vibe with it. πŸ’€
  • ::Plotchart::polarCoordinates w radmax β€” Set the extreme polar coordinates for window 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. 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.
    • widget w (in) β€” Name of the canvas alias (as returned by [$anyplot canvas]) in question.
    • float radmax (in) β€” Maximum radius.
  • ::Plotchart::polarToPixel w rad phi β€” Wrapper for a call to ::Plotchart::coordsToPixel. Note: This procedure has been deprecated - you should use the procedure ::Plotchart::coordsToPixel instead.
    • widget w (in) β€” Name of the canvas alias (as returned by [$anyplot canvas]) in question.
    • float rad (in) β€” Radius of the point.
    • float phi (in) β€” Angle to the positive x-axis.
  • ::Plotchart::pixelToCoords w x y β€” Return a list of world coordinates valid for the given window.
    • widget w (in) β€” Name of the canvas alias (as returned by [$anyplot canvas]) in question.
    • float x (in) β€” X-pixel to be mapped.
    • float y (in) β€” Y-pixel to be mapped.
  • ::Plotchart::pixelToIndex w x y β€” Return the index of the pie segment containing the pixel coordinates (x,y)
    • widget w (in) β€” Name of the canvas alias (as returned by [$anyplot canvas]) in question, holding a piechart.
    • float x (in) β€” X-pixel to be mapped.
    • float y (in) β€” Y-pixel to be mapped.

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

  • ::Plotchart::determineScale xmin xmax inverted β€” 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.
    • float xmin (in) β€” Rough minimum value for the scaling
    • float xmax (in) β€” Rough maximum value for the scaling.
    • boolean inverted (in) β€” Optional argument: if 1, then the returned list produces an inverted axis. Defaults to 0 (the axis will be from minimum to maximum)
  • ::Plotchart::determineScaleFromList values inverted β€” Determine "pretty" numbers from the given list of values and return a list containing the minimum, maximum and stepsize that can be used for a (linear) axis.
    • float values (in) β€” List of values that will be examined. May contain missing values (empty strings)
    • boolean inverted (in) β€” Optional argument: if 1, then the returned list produces an inverted axis. Defaults to 0 (the axis will be from minimum to maximum)

✨ MISSING VALUES ✨

bestie, often data that need to be plotted contain gaps - in a series of measurement data, they can occur because the equipment failed, a sample was not collected correctly or for many other reasons. The Plotchart handles these gaps by assuming that one or both coordinates of such data points are an empty string:

#
# 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 {} 25.0 60.0 78.0 11.0 } {
    $s plot series1 $x $y
}

The effect varies according to the type of plot:

  • For xy-plots, radial plots and strip charts the missing data point causes a gap in the line through the points.
  • For barchats, missing values are treated as if a value of zero was given.
  • For time charts and Gantt charts missing values cause errors - there is no use for them there.

✨ OTHER OUTPUT FORMATS ✨

Besides output to the canvas on screen, the module is capable, via 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.

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.

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.

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 create subcommand is used to create the lines, texts and other items. But also the raise and 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).

Furthermore, the module uses the 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.

In summary:

  • Emulate the create subcommand to create all the items in the correct format
  • Emulate the cget subcommand for the options -width and -height to allow the correct calculation of the rectangle's position and size
  • Solve the problem of raising and lowering the items so that they are properly clipped, for instance by redefining the routine DrawMask.
  • Take care of the currently fixed text size properties

✨ SPECIAL EFFECTS ✨

As an example of some special effects you can achieve, here is the code for a plot where the area below the data line varies in colour:

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

set s [::Plotchart::createXYPlot .c {0.0 100.0 10.0} {0.0 100.0 20.0}]

$s background gradient green top-down

$s dataconfig series1 -filled up -fillcolour white

$s plot series1  0.0 20.0
$s plot series1 10.0 20.0
$s plot series1 30.0 50.0
$s plot series1 35.0 45.0
$s plot series1 45.0 25.0
$s plot series1 75.0 55.0
$s plot series1 100.0 55.0

$s plaintext 30.0 60.0 "Peak" south

The trick is to fill the background with a colour that changes from green at the top to white at the bottom. Then the area above the data line is filled with a white polygon. Thus the green shading varies with the height of the line.


🌱 ROOM FOR IMPROVEMENT 🌱

okay bestie, real talk: this version is still a work in progress and there's a whole list of stuff that hasn't been implemented yet. not gonna gatekeep, here it is:

  • More robust handling of incorrect calls (fr fr, right now the procedures may fail when called incorrectly):
    • The axis drawing routines can not handle inverse axes right now. 😭
    • If the user provides an invalid date/time string, the routines simply throw an error.

πŸͺŸ RESIZING πŸͺŸ

so, Plotchart was not designed to create plots and charts that keep track of the data that are put in. which means: if an application needs to let the user resize the window holding the plot or chart, it has to take care to redraw the complete plot. no shortcuts, bestie.

the code below is a simple example of how to do that:

package require Plotchart

grid [canvas .c -background white] -sticky news
grid columnconfigure . 0 -weight 1
grid rowconfigure . 0 -weight 1

bind .c <Configure> {doResize}

proc doPlot {} {
    #
    # Clean up the contents (see also the note below!)
    #
    .c delete all

    #
    # (Re)draw the bar chart
    #
    set p [::Plotchart::createBarchart .c {x y z} {0 100 10} 3]
    $p plot R {10 30 40} red
    $p plot G {30 40 60} green
}

proc doResize {} {
    global redo

    #
    # To avoid redrawing the plot many times during resizing,
    # cancel the callback, until the last one is left.
    #
    if { [info exists redo] } {
        after cancel $redo
    }

    set redo [after 50 doPlot]
}
⚠️ Please note: The code above will work fine for barcharts and many other types of plots, but as Plotchart keeps some private information for xy plots, more is needed in these cases. This actually requires a command "destroyPlot" to take care of such details. A next version of Plotchart may have that. πŸ‘€

Alternatively, you can use the xyplot package which is built on top of Plotchart. This package supports zooming in and zooming out, as well as resizing the plot as a whole. here's a small demonstration program:

# xyplot_demo.tcl --
#     Demonstration of the xyplot package
#

package require xyplot

set xydata1 {}
set xydata2 {}
set xydata3 {}
set xydata4 {}
for { set i 0 } { $i < 1024 } { incr i } {
    lappend xydata1 [expr {$i-1000}] [expr {$i * sin($i/4096.0*3.1415*2) * (sin($i/256.0*3.1415*2))}]
    lappend xydata2 [expr {$i-1000}] [expr {$i * sin($i/4096.0*3.1415*2) * (sin($i/256.0*3.1415*2) + 0.25 * sin($i/256.0*3.1415*6))}]
    lappend xydata3 [expr {$i-1000}] [expr {$i * sin($i/4096.0*3.1415*2) * (sin($i/256.0*3.1415*2) + 0.25 * sin($i/256.0*3.1415*6) + 0.0625 * sin($i/256.0*3.1415*10))}]
    lappend xydata4 [expr {$i-1000}] [expr {$i * sin($i/4096.0*3.1415*2) * (sin($i/256.0*3.1415*2) + 0.25 * sin($i/256.0*3.1415*6) + 0.0625 * sin($i/256.0*3.1415*10) + 0.015625 * sin($i/256.0*3.1415*14))}]
}

set xyp [xyplot .xyp -xformat "%5.0f" -yformat "%5.0f" -title "XY plot testing" -background gray90]
pack $xyp -fill both -expand true

set s1 [$xyp add_data sf1 $xydata1 -legend "Serie 1 data" -color red]
set s2 [$xyp add_data sf2 $xydata2 -legend "Serie 2 data" -color green]
set s3 [$xyp add_data sf3 $xydata3 -legend "Serie 3 data" -color blue]
set s4 [$xyp add_data sf4 $xydata4 -legend "Serie 4 data" -color orange]

set xyp2 [xyplot .xyp2 -xticks 8 -yticks 4 -yformat %.2f -xformat %.0f]
pack $xyp2 -fill both -expand true

set s1 [$xyp2 add_data sf1 $xydata1]
set s2 [$xyp2 add_data sf2 $xydata2]
set s3 [$xyp2 add_data sf3 $xydata3]
set s4 [$xyp2 add_data sf4 $xydata4]

Zooming in is done by selecting a rectangle with the left mouse button pressed. Zooming out is done by pressing the right mouse button. If you resize the window, the canvases inside are resized too. And if you zoom in, you can scroll the plot via the scrollbars that are automatically attached. iconic behaviour honestly. πŸ–±οΈβœ¨


πŸ” ZOOMING IN πŸ”

so here's the tea: since the Plotchart package does not keep track of the data itself, rescaling an existing plot β€” for instance when zooming in β€” would have to be done by redefining the plot and redrawing the data. but bestie, the canvas widget offers a way out by scaling and moving items, so that zooming in becomes a bit simpler. 🧚

whether zooming is actually useful depends on the type of plot. Currently it is defined for XY-plots only. The method is called "rescale" and simply redraws the axes and scales and moves the data items so that they conform to the new axes. The drawback? Any symbols are scaled by the same amount. 😬 So the rescale method works best for plots that only have lines, not symbols.

The method works very simply:

$p rescale {newxmin newxmax newxstep} {newymin newymax newystep}

CONFIGURATION OPTIONS AND OTHER COMMANDS ✨

okay bestie, this is the customisation era πŸŽ€ β€” like, you've made your plot, now you get to dress it up. Three commands live here: plotconfig and plotstyle let you fiddle with literally every knob and dial, and eraseplot is the nuclear option that wipes a chart off the face of your canvas πŸ’…. Here's the syntax:

::Plotchart::plotconfig charttype component property value

Sets a new value for the property of a component in a particular chart or plot type β€” or queries its current value. And hmm, important: changed properties only affect the plots you make next, not the ones already chilling on your canvas. Each argument is optional, so you can go as vague or as specific as you want πŸ¦‹.

Note: the plotstyle command offers a more flexible way to control the configuration options. iykyk ✨
  • charttype (in) β€” the type of chart or plot (peep the configuration type mentioned for each create command). Leave it out or leave it empty and you get back a list of chart types. Give it a value and the properties for that particular type get used πŸ‘‘
  • component (in) β€” which bit of the plot/chart you're talking about: leftaxis, rightaxis, background, margin, and so on. Leave it out or empty β†’ you get a list of components back. Fill it in β†’ the properties for that component get set for that chart type πŸ’–
  • property (in) β€” the property of that component: textcolor, thickness of the axis line, whatever. Empty or missing β†’ list of properties, coming right up. Given β†’ that one property on that one component gets set for that one chart type 🌸
  • value (in) β€” the new value, obviously. Empty β†’ you get the current value back. Set it to "default" β†’ the default value is restored, no drama 🫢
Note, that in some cases an empty value is useful. Use "none" in this case β€” it can be useful for colours and for formats. (yes bestie, empty and "none" are different things, don't come for me 😭)

::Plotchart::plotstyle subcmd style args

Manipulates the style in which subsequent plots will be drawn. The default style is literally called "default", but you can define and load any number of other styles β€” go off, become a stylist πŸ’…

  • subcmd (in) β€” the subcommand to execute:
    • configure β€” this one lets you set the options per chart type. Takes the exact same options as the plotconfig command πŸŽ€
    • current β€” returns the current style
    • load β€” makes the given style the active style for subsequent plots and charts 🌈
    • names β€” returns the list of currently defined styles
  • style (in) β€” the name of the plot style you're manipulating
  • args (in) β€” the new options for the style. Each option is described by: chart type, component of the chart, property of the component, and the new value for the property β€” see the plotconfig command for the deets ⭐

Below is a detailed list of the components and properties β€” the whole menu, fr fr:

  • Axes come in a wide variety:
    • leftaxis, rightaxis, topaxis, bottomaxis β€” for the plots with a rectangular shape πŸ“
    • xaxis, yaxis and zaxis β€” used for the 3D plots
    • axis β€” this represents the radial and tangential axes of a polar plot πŸŒ€

All axes have the following properties:

  • color β€” the colour of the line and the tickmarks
  • thickness β€” the width of the line of the axis itself, not the tickmarks
  • ticklength β€” the length of the tickmarks in pixels. Positive value is outward, negative is inward πŸ‘€
  • font β€” the font for the labels and the text at the axis
  • format β€” the format for rendering the (numerical) labels. For the time axis it's the format for a date and time
  • textcolor β€” the colour for the labels and the text
  • labeloffset β€” space (in pixels) between the tickmark and the actual label
  • minorticks β€” number of minor tickmarks between the major tickmarks
  • shownumbers β€” show the numbers/labels or not
  • showaxle β€” show the axis line or not
  • The margin is important for the layout. Currently only the rectangular plots allow the margins to be set: left, right, top and bottom. The values are in pixels πŸ“
  • The text component is meant for any text appearing via the plaintext subcommand. Its properties are: textcolor, font and anchor (positioning of the text relative to the given coordinates) πŸ’¬
  • The background has two properties: outercolor, the colour outside of the actual plot, and innercolor, the colour inside the plot. (Note: only "outercolor" has now been implemented πŸ™ˆ)
  • The mask has one property only: draw. Set it to 1 (the default) and white rectangles are drawn to mimick the effects of clipping β€” excess data get made invisible this way. Otherwise those rectangles are not drawn. This is useful to control the layout more tightly, for instance with multiple plots in one canvas 🎨
  • The title component has the same properties as the text component (but it's independent of that component). It also has a background property: if not set (or set to the empty string) this is the same as the outercolor property of the background component, otherwise it's a separate colour πŸ‘‘
  • The legend has three properties: background, border and position. See the legend subcommand for the meaning πŸ”
  • The bar component is used for all barchart-like plots and has three properties: barwidth (relative width of the bars in relation to the items along the axis), innermargin (the relative width of the gaps between bars or groups of bars) and the outline colour πŸ“
  • The labels component describes the appearance of the labels of piecharts and "spiral" piecharts. The properties are:
    • textcolor β€” colour of the label text
    • font β€” font to be used for the label text
    • placement β€” out of the circle or in the circle πŸ₯§
    • sorted β€” the data are sorted in ascending order first
    • shownumbers β€” the labels are combined with the numbers according to the format
    • format β€” the format to be used (defaults to: "%s (%g)") if the numbers are to be shown. The format command gets the label first, then the number
    • formatright β€” if given, the format to be used for labels and numbers appearing to the right of the pie. The format command gets the number first, then the label. (Defaults to "")
  • The slice component has properties to control the appearance of the sections in the pie diagram:
    • outline β€” the colour of the line around the slices (default: black)
    • outlinewidth β€” width of the line around the slices (default: 1 pixel)
    • startangle β€” the angle w.r.t. positive x-axis where the first slice starts
    • direction β€” the direction in which to draw the slices (default: +, that is clockwise) πŸ”„
  • The table charts use the general components title and margin and further more the specific components header, oddrow, evenrow, cell and frame:
    • header, oddrow and evenrow have the properties: background, font, color, height and anchor, with obvious meanings πŸ“‹
    • The cell component defines in addition leftspace, rightspace and topspace for fine-grained control of the spacing inside the cell. These are not set via the cellconfigure subcommand however πŸ‘€
    • Finally the frame component uses color, outerwidth (for the width of the line surrounding the whole table) and innerwidth (for the width of lines separating columns and rows) πŸ–ΌοΈ
  • The target diagram and the Taylor diagram use the limits component in addition to the various general components. The limits component has one property: the color of the circles and circle segments 🎯

For the Taylor diagram you can specify the color of the reference circles via the reference component ✨


::Plotchart::eraseplot anyplot

Erase the plot/chart with all resources connected to it. Like, gone-gone. Not a vibe check, a full exorcism πŸ’€

  • anyplot (in) β€” the plot/chart command. All canvas items associated with this command and all internal resources get removed, including the plot/chart command itself 😭

See the examples in plotdemos7.tcl for its use πŸ¦‹

✨ SCROLLING FOR TIMECHARTS AND GANTT CHARTS ✨

okay bestie so two types of plots got the auto-scroll glow-up: timecharts and Gantt charts. The subcommands hscroll and vscroll link up (already-existing) scrollbars to your plot, and it works basically the same way it does for text and canvas widgets. πŸ’…

Once you've made that lil association, the scrollbars update all by themselves whenever:

  • You add an item with a period wider than the current one. πŸ¦‹
  • You add a vertical line for a time beyond the current bounds.
  • You add an extra item beyond the number that was used to create the chart. πŸ‘‘

fr fr, here's what that looks like in the wild:

package require Plotchart

canvas .c -width 400 -height 200
scrollbar .y -orient vertical
scrollbar .x -orient horizontal

grid .c .y -sticky news
grid .x    -sticky news

source plotchart.tcl

set s [::Plotchart::createTimechart .c "1 january 2004"  "31 december 2004" 4]

$s period "Spring" "1 march 2004" "1 june 2004" green
$s period "Summer" "1 june 2004" "1 september 2004" yellow
$s vertline "1 jan" "1 january 2004"
$s vertline "1 apr" "1 april 2004"
$s vertline "1 jul" "1 july 2004"
$s vertline "1 oct" "1 october 2004"
$s vertline "1 jan" "1 january 2005"
$s vertline "1 apr" "1 april 2005"
$s vertline "1 jul" "1 july 2005"
$s milestone "Longest day" "21 july 2004"
$s milestone "Longest day 2" "21 july 2004"
$s milestone "Longest day 3" "21 july 2004"
$s milestone "Longest day 4" "21 july 2004"
$s milestone "Longest day 5" "21 july 2004"
$s milestone "Longest day 6" "21 july 2004"
$s title "Seasons (northern hemisphere)"

$s vscroll .y
$s hscroll .x

so like β€” the chart's original extent runs from 1 january 2004 to 31 december 2004. But because we added vertical lines in 2005 and more items than was specified at the creation of the chart, both the horizontal and the vertical scrollbar get enabled. no cap. πŸŽ€


✨ SPECIALISED PLOTS ✨

Okay bestie, so most of the plot and chart types we've been yapping about have a pretty general vibe β€” you just prep the data yourself and off you go πŸ’…. But this section? This is where things get specialised, meaning these plot types have very specific purposes and you hand over raw data that then gets processed inside the plotting routines. It's giving "the plot does the homework for you". πŸŽ€

Right now there are these types:

  • Target diagrams are used to assess the capacity of numerical models to reproduce measurement data. They're described in detail in:

Jason K. Joliff et al. Summary diagrams for coupled hydrodynamic-ecosystem model skill assessment Journal of Marine Systems 76 (2009) 64-82 DOI: 10.1016/j.jmarsys.2008.05.014

  • Performance profiles are used for comparing the performance of numerical methods or implementations thereof with each other. For more information:

Desmond Higham and Nicholas Higham Matlab Guide SIAM, 2005, Philadephia

Most of the general methods for XY-plots work for these plots as well, but their creation and the methods to plot the data are very specific. No cap. πŸ¦‹


::Plotchart::createTargetDiagram w limits scale

Create a new target diagram with circles indicating specific limits. The x-axis represents the unbiased "root-mean-square difference" (typically varying between -1 and 1) and the y-axis represents the normalised bias. 🎯

Data points closer to the origin represent better results than data points further away. It's giving "the closer to home, the better you did".

  • widget w (in) β€” Name of the existing canvas widget to hold the plot.
  • list limits (in) β€” List of radii for the circles that represent the limits (for instance: 0.5 and 0.7).
  • double scale (in) β€” Scale for the axes β€” defaults to 1, but if the model results are a poor fit, then that may be too small a value. Both axes are scaled in the same way. πŸ™ˆ

$target plot series xvalues yvalues

The plot method takes two series of data of the same length, the first one representing the model results, the second one represent the measurements or, more general, the data that need to be reproduced.

  • string series (in) β€” Name of the series (it will be plotted as a symbol that is configured via the $target dataconfig command (see the XY-plot equivalent for an explanation).
  • list xvalues (in) β€” List of model results (missing values are represented as empty strings).
  • list yvalues (in) β€” List of measured values (missing values are represented as empty strings; only if both the x and the y values are given, is the pair used in the computations). ✨

::Plotchart::createPerformanceProfile w max

Create a diagram to show the performance of various numerical methods (or solvers). The idea is to first run these methods on a set of problems and measure their performance. The smaller the number the better. Then these methods are compared via a so-called performance profile: the data are scaled and ordered, such that the best method ends up highest. πŸ‘‘

Because of the nature of the plot all data must be given at once.

  • widget w (in) β€” Name of the existing canvas widget to hold the plot.
  • float max (in) β€” Maximum value for the x-axis (the x-axis is the scaled performance of the series).

$performance plot series_and_data_pairs

Plot the data for each given method. The data are identified by the series name and the appearance is controlled via prior dataconfig subcommand.

  • list series_and_data_pairs (in) β€” List of series names and data. All data must be given at once. πŸ”₯

::Plotchart::createTaylorDiagram w radius_data args

Create a new Taylor diagram (one quadrant) with circles indicating the distance to the reference point.

The data points are given as the standard deviation and the correlation to the reference.

  • widget w (in) β€” Name of the existing canvas widget to hold the plot.
  • list radius_data (in) β€” A list of the maximum radius for the standard deviation and the step size. Quarter circles are drawn with the axis labels.

Currently one option is supported:

  • reference value β€” Reference value for the data points to be compared with. It appears as a dot at the x-axis. Along with this dot circle segments are drawn at the same spacing as the axis labels to indicate the distance of the data points from the reference. 🫢

$taylor plot series stdev corr

The plot method takes the standard deviation and the correlation to the reference as input and draws a symbol as a representation. The standard deviation serves as the distance from the origin and the correlation determines the angle. 🌈

  • string series (in) β€” Name of the series (it will be plotted as a symbol that is configured via the $target dataconfig command (see the XY-plot equivalent for an explanation).
  • float stdev (in) β€” Standard deviation of the data point.
  • list corr (in) β€” Correlation coefficient with the reference dataset.

::Plotchart::createHeatmap w rowlabels columnlabels args

Create a heatmap, i.e. a tableau of rectangles whose colours depend on some data. The row and column labels are used as identifiers when filling in the data. The number of them determines the size of the tableau. 🎨

The data are passed by row, by column or per individual cell.

  • widget w (in) β€” Name of the existing canvas widget to hold the heatmap.
  • list rowlabels (in) β€” List of labels to display at each row. The labels also serve as identifiers.
  • list columnlabels (in) β€” List of labels to display at each column. The labels also serve as identifiers.
  • list args (in) β€” Zero or more arguments to influence the size of the heatmap. See XY plot for more information.

$heatmap plot row label data

Use the given data to fill the rectangles belonging to the row "label".

  • string label (in) β€” String indicating which row to use.
  • list data (in) β€” List of numerical data to be used for the colouring of the rectangles.

$heatmap plot column label data

Use the given data to fill the rectangles belonging to the column "label".

  • string label (in) β€” String indicating which column to use.
  • list data (in) β€” List of numerical data to be used for the colouring of the rectangles.

$heatmap plot cell rowlabel columnlabel value

Use the given value to fill the rectangle belonging to the cell with the given row and column labels.

  • string rowlabel (in) β€” String indicating which row to use.
  • string columnlabel (in) β€” String indicating which column to use.
  • float value (in) β€” Value to be used for the colouring of the cell. πŸ’œ

$heatmap scale values min max

Set the range for the values β€” they are mapped to a colour via linear interpolation.

  • float min (in) β€” Minimum value to be used.
  • float max (in) β€” Maximum value to be used.

$heatmap scale colours mincolour maxcolour

Set the colours to be used for the minimum and the maximum values. The actual colour is determined via linear interpolation of the RGB values. 🌸

  • string mincolour (in) β€” Colour to be used at the minimum value.
  • string maxcolour (in) β€” Colour to be used at the maximum value.

::Plotchart::createCircleplot w labels args

Create a circle plot, i.e. a circle with labels that can be connected by coloured arcs. Typical use: present the relationship between the items on the circle in a graphical way. 🧚

The connections can be drawn pair by pair.

  • widget w (in) β€” Name of the existing canvas widget to hold the circle plot.
  • list rowlabels (in) β€” List of labels to display along the circle. Each label is accompanied by a filled dot.
  • list args (in) β€” Zero or more arguments to influence the size of the circle plot. See XY plot for more information.

$circleplot connect label1 label2 colour width

Connect the two labels via a coloured arc of given width (the arc is actually a parabola).

  • string label1 (in) β€” String indicating the first label to connect.
  • string label2 (in) β€” String indicating the second label to connect.
  • string colour (in) β€” Colour to use for the connected arc.
  • string width (in) β€” Width for the connected arc. ✨

$circleplot modify label args

Modify the appearance of the label and the accompanying dot.

  • string label (in) β€” String indicating which label to modify.
  • list args (in) β€” List of key-value pairs:
    • -textcolour colour β€” colour of the text to be used (alternative: "-textcolor")
    • -font font β€” font for the text
    • -dotcolour colour β€” colour for the dot (alternative: "-dotcolor") πŸŽ€

πŸ’« ADDING SPECIFIC PLOT METHODS πŸ’«

okay so the plotmethod command is literally how you add brand-new methods to a particular plot or chart type. it's built for helping you develop your own specialised graphical displays, bestie β€” go off πŸ’…

  • ::Plotchart::plotmethod charttype methodname plotproc β€” adds a new method for the given plot or chart type. the method gets implemented by the command or procedure you hand over in the plotproc argument. that procedure will get called with two extra arguments: the name of the created plot, and the canvas widget that contains it (peep the example below πŸ‘‡)
    • string charttype (in) β€” the type of plot or chart the new method should be added to.
    • string methodname (in) β€” name of the method to be used.
    • string plotproc (in) β€” name of the command or procedure that implements the method.

here's a trivial little example of how to use it, no cap:

#
# The custom method "doodle" always adds the text "DOODLE"
# to the plot
#
proc doodle {p w x y} {
    $p plaintext $x $y "DOODLE"
}
::Plotchart::plotmethod xyplot doodle doodle

#
# Use it
pack [canvas .c]

set p [::Plotchart::createXYPlot .c {0 100 10} {0 20 5}]

$p doodle 40 10

πŸŽ€ TABLE CHARTS πŸŽ€

to show what you can do with table charts, here's a simple example that plots a bunch of random data. the colours depend on the range that the data belong to. for this the procedure setColor is used πŸ“

package require Plotchart

pack [canvas .c -bg white -height 300] -fill both -expand yes

::Plotchart::plotconfig table frame outerwidth 3
::Plotchart::plotconfig table frame color red

set t [::Plotchart::createTableChart .c {"Column 1" "Column 2" "Column 3"} 80]

proc setColor {table widget row col value} {
    $table cellconfigure -background white -color black
    if { $value < 2.0 } {
        $table cellconfigure -background red -color white
    }
    if ( $value > 6.0 ) {
        $table cellconfigure -background green
    }

    return [format "%6.3f" $value]
}

# Command must already exist ...
$t formatcommand setColor

$t title "Demonstration of table charts"
$t separator

for {set i 0} {$i < 9} {incr i} {
    set row {}

    for {set j 0} {$j < 3} {incr j} {
        lappend row [expr {10.0 * rand()}]
    }

    if { $i == 3 } {
        $t separator
    }

    $t row $row
}

πŸ‘€ CONTROL DISPLAYS πŸ‘€

TODO


πŸ•°οΈ USING DATE/TIME LABELS πŸ•°οΈ

the options -timeformat and -gmt are what control the display of date/time labels along the x-axis, for those plot types where it actually makes sense. these options were implemented to take care of date/time labels for stripcharts, since you can also use custom labels (the option -xlabels) if the axis is "static". but because that's not the case for stripcharts, this was not an option (Tcllib/Tklib bug 3613718 😭). you can also specify the -locale option to get a localised date/time label. the example below illustrates how to use the -timeformat option. the -gmt option merely suppresses the handling of daylight saving time by the [clock format] command. periodt.

package require Plotchart

pack [canvas .c -width 500 -bg white]

#
# Note that we need to present the x values as clock seconds
#
set start [clock scan  "0:00"]
set stop  [clock scan "10:00"]
set s [Plotchart::createStripchart .c [list $start $stop 7200] {0 10 1} -timeformat "%H:%M"]

# With a locale like "de":
#set s [Plotchart::createStripchart .c [list $start $stop 7200] {0 10 1} -timeformat "%H:%M" -locale de]

foreach {x y} {0 0 2 5 5 2 9 9 12 10} {
    set x [expr {$start + 3600 * $x}] ;# Convert hour to clock seconds
    $s plot a $x $y
}

the plot subcommand simply interprets the x and y data as straightforward numbers, so you need to do the conversion from date/time to "clock seconds" yourself. iykyk πŸ’–


🌈 ARRANGING MULTIPLE PLOTS IN A CANVAS 🌈

the command plotpack lets you copy the contents of a plot into another canvas widget. this canvas widget does not act as a composite plot, but it can be saved as a PostScript file for instance. note: the command simply takes a snapshot of the plots/charts as they are at that moment β€” it's giving ✨candid photo✨ energy.

  • ::Plotchart::plotpack w dir args β€” copy the contents of the plots/charts into another widget, in a manner similar to the pack geometry manager.
    • widget w (in) β€” the name of the canvas widget to copy the plots/charts into.
    • string dir (in) β€” the direction of the arrangement β€” top, left, bottom or right.
    • list args (in) β€” list of plots/charts to be copied.

for example:

set p1 [createXYPlot ...]
set p2 [createBarchart ...]

... fill the plots ...

toplevel .t
pack [canvas .t.c2 -width ...]

#
# Copy the two plots above each other in the new canvas
#
plotpack .t.c2 top $p1 $p2

a different method is to use the -box and -axesbox options when creating the plot. these control the area in the canvas where the plot or chart will be drawn.

the -box option takes as its value a list of four numbers:

  • X-coordinate of the upper-left corner of the area that will contain the plot or chart (simply a canvas coordinate)
  • Y-coordinate of the upper-left corner
  • Width of the area
  • Height of the area

specifying the width and height makes it easier to reposition the area with respect to other plots. slay.

the -axesbox option is meant to make aligning the axes of a plot with those of other plots easier. the option takes a list of six arguments:

  • Identification of the plot with respect to which it should be positioned (the command returned by the creation command).
  • The anchor position that should be used (n, nw, ...)
  • X-coordinate of the upper-left corner of the area that will contain the plot or chart. This coordinates is taken relative to the anchor position
  • Y-coordinate of the upper-left corner
  • Width of the axis area
  • Height of the axis area

with this option the area the axes occupy is first determined and the complete area is derived from the margins.

for example:

set p2 [::Plotchart::createXYPlot .c {0 10 1} {-5 5 2.5} -axesbox [list $p1 ne 0 0 200 200]]

will create a second plot whose left axis coincides with the right axis of plot $p1 and the top of the axis is at the same heigt as well β€” because the axes are positioned at a point 0 pixels to the left and 0 pixels below the north-east corner. iconic fr fr πŸ‘‘


πŸ–±οΈ INTERACTIVE USE πŸ–±οΈ

Plotchart has several features for interactive use (cf. NOTES ON TAGS):

  • The legend can be moved around by pressing mouse button 1 in the legend's box and keeping it down.
  • You can use the bindplot and bindlast commands to define actions that are to be taken when the user clicks on an element of the plot or chart. (see below, see also the sample code in plotdemos12.tcl)
  • Piecharts can show an "exploded" segment that you can select with mouse button 1.

if you require different forms of interaction, not covered by Plotchart itself, you can use the tags on the various canvas elements to define other bindings. main character energy tbh πŸ’…

the bindplot and bindlast are defined as follows:

  • $anyplot bindplot event command args β€” register a command that will be run whenever the given event occurs in the plot.
    • string event β€” the event that you want to bind the command to.
    • string command β€” name of the command/procedure that you want to run. the following arguments are prefixed: the x- and y-coordinates of the point in the plot (the world coordinates!), so that the procedure has the signature:
cmd $xworld $yworld $string1 $string2 $string3

assuming the argument "command" is: {cmd A B C}

  • $anyplot bindlast series event command β€” register a command that will be run when the event occurs within the neighbourhood of the last point added to the given series. (you can use directly after inserting a data point. all such commands will remain active).
    • string event β€” the event that you want to bind the command to.
    • list command β€” name of the command/procedure that you want to run. the following arguments are prefixed: the x- and y-coordinates of the point in the plot (the world coordinates!), so that the procedure has the signature:
cmd $xworld $yworld $string1 $string2 $string3

assuming the argument "command" is: {cmd A B C}

here's an example β€” show the values of the data points in an annotation (from the sample code in plotdemos12.tcl):

#
# Procedure for showing an annotation
#
proc showAnnotation {xcoord ycoord plot w} {

    $plot balloon $xcoord $ycoord "Data point: [format "%.3f, %.3f" $xcoord $ycoord]" north

    after 2000 [list removeAnnotation $w]
}

#
# Procedure for erase an annotation
#
proc removeAnnotation {w} {

    # Use the tags to remove all annotations
    $w delete BalloonText
    $w delete BalloonFrame
}

#
# Create a simple plot and a label
#
pack [canvas .c -bg white] [label .l -textvariable coords]

set p [::Plotchart::createXYPlot .c {0 1000 200} {0 10 1}]

$p dataconfig series1 -type both -symbol cross

foreach x {1 2 5 10 20 50 100 200 500 1000} {
    $p plot series1 $x [expr {log($x)}]

    #
    # Show the annotation for each data point
    #
    $p bindlast series1 <Enter> [list showAnnotation $p %W]
}

wait wait wait, one thing before you go β€” in the setColor example above, the check is written as if ( $value > 6.0 ) {. that's a typo that lives in the original docs, so i'm keeping it exactly as-is. bestie, don't copy that one into real code unless you want Tcl to yell at you 🫢

✨ NOTES ON TAGS ✨

Okay so real talk, bestie: Plotchart is literally obsessed with the canvas's ability to identify graphical objects by tags and to change the drawing order of the objects. This section is the tag lore. 🏷️✨

Heads up: the tags are not always used consistently β€” see the notes that show up next to the various tags. This section describes the current state. No cap.

General graphical objects:

  • mask β€” used to manipulate the opaque rectangles that make sure data outside the viewport are <em>not</em> shown. 🫣
  • topmask, horizmask, vertmask β€” specialised tags, used for scrollable plots. πŸ“œ
  • title β€” used for title strings. ✨
  • BalloonText, BalloonFrame β€” used to manipulate balloon text. 🎈
  • PlainText β€” used to manipulate ordinary text without any decoration. plain and iconic. πŸ’…
  • background β€” tag used for gradient and image backgrounds (and for gradient-filled bars). 🌈
  • xaxis, yaxis β€” tags used for all objects related to horizontal or vertical axes. (also: both for numerical axes and axes with labels as in barcharts). Note, however, that the text along the axes has no particular tag. πŸ“Š
  • raxis β€” tag used for all objects related to a right axis. ➑️
  • taxis β€” tag used for all objects related to a time axis. ⏰
  • axis3d β€” tag used for 3D axes. 🧊
  • xtickline, ytickline β€” tags used for ticklines. πŸ“
  • legend, legengb, legendobj β€” tags used for the legend. The latter is used to manipulate the legend as a whole. πŸ‘‘
  • legend_series β€” tag used to control the appearance of the legend entry ("series" should be replaced by the series name). 🏷️
  • object β€” used as standard tag for all objects drawn with the ::Plotchart::drawobject procedure. Tags given at object creation time are added to this tag. 🧩

XY-plots (all types of axes):

  • data β€” the general tag to identify graphical objects associated with data.
  • data_seriesname β€” the tag specific to a data series ("seriesname" should be replaced). 🫢
  • band β€” the horizontal or vertical band drawn with the xband otr yband subcommands have this tag by the actual name). πŸŽ—οΈ
  • xtext β€” the text labelling the xaxis. πŸ“
  • ytext β€” the text labelling hte yaxis horizontically. πŸ“
  • vtext β€” the text labelling the yaxis vertically. πŸ“

Items such as labelled dots only have the data tag.

Piecharts and spiral pies: πŸ₯§

  • segment_segmentnumber β€” the tag identifying the segment, the string "segmentnumber" should be replaced by the actual number. This tag is used to explode the segments. πŸ’₯

Barcharts: πŸ“Š

Barcharts use the same tags as xy-plots (but for gradient-filled bars the data_seriesname is not used).

Histograms and isometric plots: πŸ“ˆ

Currently the only tag used is data.

Time-charts: ⏳

As these plots are scrollable, several tags are used specific to the scrolling: vertscroll, horizscroll, below, lowest, above, timeline, tline. Each item also has a tag of the form item_number, where "number" is to be replaced by the actual sequence number of the item.

Gantt charts: πŸ“…

In addition to the tags described for the time-charts, the following tags are used: description, completed, summary and summarybar.

Radial charts and polar plots: 🎯

Currently the radial lines indicating the grid have no tags. The graphical objects associated with data only have the data tag.

Windroses: 🌬️

Only the tag data_number is currently used ("number" should be replaced by the sequence number of the data, starting at 0.

Contour and isoline plots: πŸ—ΊοΈ

No tags are used. πŸ’€

3D plots and 3D ribbon plots: 🧊

Tags are used for the axes and for the data objects:

  • data β€” the general tag to identify graphical objects associated with data.
  • line β€” the tag used for lines created with the plotline subcommand.

Charts decorated with 3D effects: ✨

The following tags are used to identify various types of graphical objects: platform, background, d, u, ticklines.

The text associated with the bars has no tags. The ribbon lines and areas have no tags either.

Tables: πŸ“‹

Tags used are: frame, cellbg and celltext

Special plot types (target diagrams, Taylor diagrams: 🎯

Tags used are: limits, limit_labels, reference In addition: To implement multiple plots and charts in a single canvas, all items also get as a tag the plot/chart they belong to. This enables Plotchart to manipulate only those items.

πŸ’­ TODO - SOME PRIVATE NOTES πŸ’­

I have the following wishlist: ✨

  • Isometric plots β€” allow new items to be implemented easily. 🧊
  • A general 3D viewer β€” emphasis on geometry, not a ray-tracer. πŸŽ₯
  • Several improvements for boxplots:
    • Height of the box scales with the logarithm of the number of points πŸ“
    • Marker line to indicate a "current" value πŸ“
    • Box drawn from quantiles πŸ“¦

<

πŸ› BUGS, IDEAS, FEEDBACK πŸ’Œ

This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category plotchart of the Tklib Trackers [http://core.tcl.tk/tklib/reportlist]. Please also report any ideas for enhancements you may have for either package and/or documentation. <

Copyright (c) 2022 Arjen Markus <arjenmarkus@users.sourceforge.net>

That's the whole tag saga, bestie. This page is from tklib 2.6.2, Plotchart(3tk) β€” and the footer didn't show a date, so no date to spill. πŸ’…βœ¨
πŸ“¦ where this page comes from