[LON-CAPA-dev] Future Directions Ideas: gnuplot

Peter Riegler lon-capa-dev@mail.lon-capa.org
Wed, 09 May 2007 20:32:47 +0200


I was trying to implement a problem requiring the display of a contour 
plot. After realizing that contour plots (set contour; splot ...) 
possibly are not part of loncapa's subset of gnuplot I found myself 
confirmed by Phil's and Guy's discussion. I would like to add the 
following to it:
Wouldn't it be easier to make a slim xml-structure allowing access to 
all of gnuplot's functionality? I think that this will be happily used 
by people who are familiar with gnuplot (or have time to make themselves 
By slim xml-structure I mean something like
         <script type="loncapa/perl">
	$myfunction = "sin(&random(1,5,1)*x)";
	set xlabel "t"; plot [-4:4] [-3:3] $myfunction
where the shellcommand-tag can contain ANY valid gnuplot command.

Gnuplot is far too powerful to have a detailed xml-structure in loncapa. 
Imagine the authoring of a perl-script blocks would require a detailed 
xml-structure, like
<function arguments="0,10,1">&random</function>


Guy Albertelli II wrote:

> Hi Phil,
>>* upgrade gnuplot to version 4.2 (currently using 4.0)
>>* 3 dimensional graphing, both in wire grid and surface form
>>* arrows and vector fields given data
>>* RGB and hex color options for individual portions of graphs (bug 874)
>>* new features of gnuplot that solve existing LON-CAPA bugs
>>     *  symbols and sub/superscript in graph labels (bugs 2135 and 3994)
>>     *  implement line thickness (bug 4794)
>>     *  implement new graph tic options (bug 2201)
>>* multiple plots on a single graph
> Hmm, though that this works aready. At least I can add multiple curves
> to 1 gnuplot object...
>>* support polar and cylindrical graphing
> Isn't Polar is fully supported?
>>* parametric functions
>>* fitting curves to data
>>In order to add a good chunk of this without overbloating the current XML
>>structure used by authors to create plots, I am working on a more detailed
>>document detailing a proposed new XML schema to incorporate these new
>>features in a coherant manner for both XML authors and colorful-editor
> Well I generally argue in favor of evolution rather than revolution.
> This it might be better to try to add in some of the features rather
> than trying to design a complete revamp?
> And as for direction I guess I'd start with trying to satisfy the
> filed bugs first. And see how that goes.

Peter Riegler
Fachhochschule Braunschweig/Wolfenbüttel
Salzdahlumer Str. 46/48, 38302 Wolfenbüttel
Tel. +49 5331 939 6314, Fax. +49 5331 939 6002
email: p.riegler@fh-wolfenbuettel.de