[LON-CAPA-dev] Future Directions Ideas: gnuplot
Guy Albertelli II
Wed, 9 May 2007 16:03:07 -0400 (EDT)
> 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
It doesn't currently exist since:
- it's a security issue (there is at least the system command that we
wouldn't want in there, along with all of the file manipulation
- it's a support issue, (when gnuplot changes how it works, problems
will occur where a resource works on one machine but not on another
since one is on a later version of gnuplot versus another)
- printing starts failing. (Some gnuplot features only work for display
- the original plan had hoped to make the <plot> tag and not make it
completely tied to gnuplot, so that we could replace the plotting
engine at a later date if we needed too.
- there is possibly an ease of use issue that could be brought up too,
but the ease of the XML is likely more due to the fact that we've
limited what can be done, so it is therefore easier.
> 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
This is the direction that QTI went.
So we could argue over which is the better approach. :-) Likely using
the same list of reasons as above...
> <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: email@example.com
> LON-CAPA-dev mailing list