Some issues exsist:
- Empty lines turns into
<p /> on edit / save roundtrip (only cosmetic issue, does not effect rendering.)
- Ploticus help topic not added yet
- Should probably filter on "bad" procs (mentioned in plugin topic)
In other words, feel free to contribute
--
SteffenPoulsen - 27 Apr 2006
Thanks Steffen for contributing yet another Plugin. Wow!
I added relevant tags to the Plugin topic. Please do the same if you feel this Plugin should bubble up to the beginning in the tag search.
BTW, the PLOTICUSPATH setting is a severe security issue. This Plugin should not be used on a public site. The setting should be moved into a configuration setting.
--
PeterThoeny - 27 Apr 2006
Yep, quite fascinating all this plotting.
Thanks for helping out with the tagging / categorization work here in plugins, I think the plugins cloud is starting to make a lot of sense.
I have uploaded a new version with PLOTICUSPATH out of the way.
BTW: Also added a filter on the bad procs/directives. This together should take care of the obvious security issues with ploticus.
--
SteffenPoulsen - 27 Apr 2006
This Looks great!
I am amazed at the variety of graphs it can create.
I had a quick look at the differences between Ploticus and Gnuplot (Used in
GnuPlotPlugin). Both can plot data from files (with different delimeters) but Ploticus has more types of graphs that you can use to present your data. Gnuplot has the ability to plot 3D plots and more complex mathematical functions. I would say that if you are not into serious mathematical plots and 3D data
PloticusPlugin is the way to go!
--
AbieSwanepoel - 27 Apr 2006
Could this plugin be used to create
Sparklines?
--
ArthurClemens - 28 Apr 2006
Ah, yes, sparklines. I believe it would work OK with ploticus, but it would take a bit of work plugin-wise to reach an acceptable syntax, getting the edit button out of the way and so on (setting up the entire plotting area, defining colors etc etc for each sparkline might be a bit over the top).
The work already done in i.e. BitWorking (where an url like
http://bitworking.org/projects/sparklines/spark.cgi?type=smooth&d=88,84,82,92,82,86,66,82,44,64,66,88,96,80,24,26,14,0,0,26,8,6,6,24,52,66,36,6,10,14,30&height=10&min-m=false&max-m=false&last-m=false&min-color=red&max-color=blue&last-color=green&step=2
translates into

) is not too far from the syntax one would like to use, I suppose? - Or is this too simple featurewise?
I do agree
PloticusPlugin has a bit of sparkline touch, I'd like to hear your opinion on where the compromise on features / flexibility / ease-of-use / visual appeal lies or should lie.
--
SteffenPoulsen - 28 Apr 2006
More inspiration for parameters to potentially bring in:
http://intepid.com/stuff/sparklines/
(with php source for manipulating GD).
--
SteffenPoulsen - 28 Apr 2006
Steffen, how about removing all
DISABLED functions from the plugin bloating it up to
660 lines of code. This will slim it down to about 150. And please, please use the TWiki::Sandbox
for any interaction with the external environment. TWiki has a bad record of security alerts because of
insecure plugins (
ImageGalleryPlugin) for not doing so.
Yes, I know the TWiki::Sandbox is not reachable via TWiki::Func. But that is a different issue.
The same holds for the
GnuPlotPlugin.
How about fixing the (c)opyright notion? That is Andrea Sterbini and Peter Thoeny right now
copy-pasted in from the
EmptyPlugin.
You wrote that stuff, didn't you?
The
EmptyPlugin POD docu is still in there
This is an empty TWiki plugin ....
--
MichaelDaum - 28 Apr 2006
It might be easier to
SupportSparklines by extending the
GaugePlugin. It is already used in a similar way.
--
PeterThoeny - 28 Apr 2006
Please fix security before doing any sparkines feature. You already released and
the code is in the wild.
--
MichaelDaum - 28 Apr 2006
Yep, would be cool to have sparklines in
GaugePlugin; it has lighter dependencies. On top an implementation in perl will work on more platforms by default.
Michael, feel free to clean up what you find - added sandbox to
DirectedGraphPlugin recently; that can be used as inspiration. All contributions appreciated!

Else I will probably return to it in a few weeks time and add clientside map support together with a sandbox. - If you feel like descriping the attack that is currently possible, I will put this up in priority.
(And yes, you are right,
GnuPlotPlugin and this are 98% the same, so any issues found here should be merged - as well as the other way around).
--
SteffenPoulsen - 28 Apr 2006
Oh dear, I fill your inbox and you mine. In the meantime users deploy insecure code. Can we
at least move the code off twiki.org for now?
--
MichaelDaum - 28 Apr 2006
I'm just curious. I've tried a lot of ways to get something thrown down
$plotName (various escapings, encodings and "stuffings"), but I couldn't provoke anything .. would very much like to see the trick.
--
SteffenPoulsen - 28 Apr 2006
OK, giving in (still curious, though!) - can you give me a hint on how to set the working dir in the sandbox? Neither
gnuplot or
ploticus has command line options to set their working dirs - and the working dir needs to be attachment directory for data file input to work.
--
SteffenPoulsen - 28 Apr 2006
Sandbox added. Had to add a little perl helper script to get support for a) setting the working dir and b) catching STDERR output.
--
SteffenPoulsen - 29 Apr 2006
How do you create the initial plot?
I tried to just add the tag. I can then press the button and paste in some data. But when I save it says it cannot load the name.gif file. Am I supposed to upload some dummy gif?
Also the filename.ploticus is created but not shown as attached. I have to attach the file on top which I cannot because it is already there.
--
KennethLavrsen - 05 May 2006
To create an initial plot, it should be enough to update paths in Plot.pm, insert a
%PLOTICUSPLOT{"TestPlot"}% tag, save, and do an edit/save on the plot settings (just accept defaults).
I'm curious to why it talks about gifs, it is setup to create pngs only - perhaps your ploticus binary needs to be recompiled to support this? (Else the plugin code can probably be changed to send -gif instead of -png parameter).
Try to enable debug in
tools/ploticus.pl (learn what is going on), and perhaps try to simulate actions manually (redo where it fails).
--
SteffenPoulsen - 06 May 2006
I installed the
PloticusPlugin under windows just yesterday. The native binary version just produces gif files - and the plugin is configured to accept png files.
Several options are available:
- compile your own version with PNG support. I managed to build it, but then the pics come out completely garbled. I am quite sure there's a problem with my libraries. In the mailing list, there's a post about a successful png/win32 build, but the author has not replied to my email.
- use the Cygwin build, which has png support
- change the perl code, replacing everything png with gif. Bear in mind, though, that plugins relying on this one will have to be modified as well (
EasyTimeline for one), and updates may entail a bit more work. Finally, the gif format is a bit unhealthy, considering all those patent issues. I'm still trying windows builds - hopefully I'll manage to get a decent version.
--
RenatoSerodio - 23 May 2006
although
png is technically superior to
gif in every way, the
LZW patent expired several years ago
, so don't let that issue (any longer) deter you.
--
WillNorris - 24 May 2006
I'd rather use
png, indeed. The problems compiling ploticus in a windows system deterred me from doing it, however. My problem with using GIF is the way the plugin is built: one has to edit the module to add support for it, either replacing the occurrences of png, or adding some lines to allow png/gif to be passed as an option. I chose the former, but just started working on getting png running in ploticus/win32.
--
RenatoSerodio - 26 Jun 2006
I'm getting a TWiki internal error after updating to 4.0.3. Anyone experiencing the same issue? It appears to get stuck when passing the ploticus arguments (along with the exeCmd function) to the sandbox object - and indeed the new Sandbox.pm differs in line 225, where the trace pops out. I've been trying to debug it, but can't find a sensible strategy. Would anyone care to comment?
--
RenatoSerodio - 27 Jun 2006
I think you can just use the old Sandbox.pm if that was more well-behaved (if I remember correctly pipes are handled differently in 4.0.3 on some platforms).
Enabling debug
is the way to go (any output in the plugin debug log file created?).
--
SteffenPoulsen - 27 Jun 2006
I found this plugin really useful, except that I had a few problems. Every plot was giving me an error - "Illegal Seek". I've fixed this by updating the tools/ploticus.pl script. Also, as I've got parts of my twiki locked down, it turned out that this plugin would ignore any user login and never check permissions for editting -- so anyone could edit the plot. I've borrowed a piece from
EditRowPlugin and hacked that into this plugin. It's not particularly neat, but from what I can tell it works -- tested on TWiki 4.1.2 running on Solaris.
As the Plugin page is marked as free to contribute, I've uploaded the changes to the main plugin page.
--
SallyHoughton - 14 Dec 2007
I had a problem with this plugin with Freetown release (4.2). I kept getting the error
Can't call method "sysCommand" on an undefined value
After trying quite a few things and was about to give up, I finally found a fix thanks to the LatexModePlugin by
Main.ScottHoge. The line in
lib/TWiki/Plugins/PloticusPlugin/Plot.pm
my $sandbox = $TWiki::sharedSandbox ;
needed to be modified for TWiki 4.2:
my $sandbox = $TWiki::sharedSandbox || $TWiki::sandbox ;
This fixed my problem. GnuPlotPlugin needs the same fix.
Also, should the plugin be modified to write to WorkingDir/tmp rather than /tmp?
--
TonyLiu - 01 Feb 2008
Thanks Tony. I am working on a new version with this fixed (using your fix) and additional changes. Installing this plugin requires hacking code and the last version uploaded contains the most strange non-standard paths so it for sure works for noone. I am changing this.
--
KennethLavrsen - 02 Feb 2008
These are the changes I made to fix it...
~/wd/tmp/pltcs/lib/TWiki/Plugins/PloticusPlugin$ diff Plot.pm.old Plot.pm
43,45c43,45
< my $ploticusPath = "/opt/local/bin/pl";
< my $ploticusHelperPath = "/home/httpd/twiki/tools/ploticus.pl";
< my $execCmd = "/usr/bin/perl %HELPERSCRIPT|F% %PLOTICUS|F% %WORKDIR|F% %INF
ILE|F% %FORMAT|S% %OUTFILE|F% %ERRFILE|F% ";
---
> my $ploticusPath = "/usr/bin/pl";
> my $ploticusHelperPath = "/var/www/twiki/tools/ploticus.pl";
> my $execCmd = "/usr/local/bin/perl %HELPERSCRIPT|F% %PLOTICUS|F% %WORKDIR|F
% %INFILE|F% %FORMAT|S% %OUTFILE|F% %ERRFILE|F% ";
50c50
< my $sandbox = $TWiki::sharedSandbox;
---
> my $sandbox = $TWiki::sharedSandbox || $TWiki::sandbox;
107,109c107,109
< my $ploticusPath = "/opt/local/bin/pl";
< my $ploticusHelperPath = "/www/htdocs/tools/ploticus.pl";
< my $execCmd = "/opt/coolstack/bin/perl %HELPERSCRIPT|F% %PLOTICUS|F% %WORKD
IR|F% %INFILE|F% %FORMAT|S% %OUTFILE|F% %ERRFILE|F% ";
---
> my $ploticusPath = "/usr/bin/pl";
> my $ploticusHelperPath = "/var/www/twiki/tools/ploticus.pl";
> my $execCmd = "/usr/local/bin/perl %HELPERSCRIPT|F% %PLOTICUS|F% %WORKDIR|F
% %INFILE|F% %FORMAT|S% %OUTFILE|F% %ERRFILE|F% ";
114c114
< my $sandbox = $TWiki::sharedSandbox;
---
> my $sandbox = $TWiki::sharedSandbox || $TWiki::sandbox;
--
PeterStephens - 10 Mar 2008
Could you please also update the Plugin to save installers from going through this thread?
Also it's no 100% obvious to everyone (at least wasn't for me) what each updated path referred to from the info in the plugin home, i.e. $execCmd needs the perl path and so on.
Attached I'm leaving the modified Plot.pm for the
TWikiVM.
--
FernandoEblagon - 24 Jun 2008
I like what I saw as screenshots from this plugin a lot. I am looking forward to using this internally. Cool stuff!
--
MartinSeibert - 06 Oct 2008
Thank you Yaojun for updating this plugin. Does this work on the latest TWiki releases? Could you update the "TestedOnTWiki" form field?
--
Peter Thoeny - 2013-04-01