|
From: Kim L. G. <kim...@gm...> - 2006-07-17 10:49:43
|
Hi all, I've been using the open source PlotWS software. http://www.soton.ac.uk/~ghydflex/plotws/ : "PlotWS provides a graph generation WebService. It is implemented as a wrapper around gnuplot and exposes a subset of gnuplot's functionality. The Web Service layer is implemented using Apache AXIS." Below, I like to share some steps I took to get the PlotWS software working on my Red Hat 9.0 system. Hopefully, they could be of help to others. 1) Modify GraphSoapBindingImpl.java and change exe.run(exeGnuPlot + " \"" + cmdsFile + "\"", _tempDir, null); to exe.run(exeGnuPlot + " " + cmdsFile, _tempDir, null); 2) After deploying PlotWS.war, make sure that the gnuplot executable has execute permissions. e.g.: chmod +x PlotWS/WEB-INF/exe/gnuplot Perhaps, PlotWS could be added to the links page, http://www.gnuplot.info/links.html under Java (where it says " Version for Java and others: please contribute.") Regards, KL P/S I'm using jakarta-tomcat-4.1.31 and j2sdk1.4.2_11. |
|
From: <br...@ph...> - 2006-07-17 20:10:06
|
Tino Wildenhain wrote: > why dont you use a popen() (pipe) call to feed > your commands w/o the need for a tempfile > into gnuplot? Well, last I looked Java didn't really have popen(), nor pipe(). |
|
From: Dave D. <dde...@es...> - 2006-07-18 09:12:20
|
Hans-Bernhard Br=F6ker <br...@ph...> writes: > Tino Wildenhain wrote: > >> why dont you use a popen() (pipe) call to feed >> your commands w/o the need for a tempfile >> into gnuplot?=20 > > Well, last I looked Java didn't really have popen(), nor pipe(). > It does have Runtime.exec() which creates an instance of java.lang.Process, and then you can getInputStream() and getOutputStream() to speak to the process. dd --=20 Dave Denholm <dde...@es...> http://www.esmertec= .com |
|
From: <br...@ph...> - 2006-07-17 20:17:12
|
Kim Leng Goh wrote: > "PlotWS provides a graph generation WebService. It is implemented as a > wrapper around gnuplot and exposes a subset of gnuplot's > functionality. The Web Service layer is implemented using Apache AXIS." > Below, I like to share some steps I took to get the PlotWS software > working on my Red Hat 9.0 system. Hopefully, they could be of help to others. I don't think that this is the right place to post this. This is the gnuplot mailing list. It has nothing to do with PlotWS. Any reports you want to make about that software should be addressed at its autors. > 1) Modify GraphSoapBindingImpl.java and change > exe.run(exeGnuPlot + " \"" + cmdsFile + "\"", _tempDir, null); > to > exe.run(exeGnuPlot + " " + cmdsFile, _tempDir, null); I don't think that's a good change. After your change, any use of a plot filename containing blanks would fail. This change breaks more than it fixes > Perhaps, PlotWS could be added to the links page, > http://www.gnuplot.info/links.html under Java (where it says " Version > for Java and others: please contribute.") Does it actually offer two-way interaction, i.e. are clicks onto the plot fed back into gnuplot? |
|
From: Kim L. G. <kim...@gm...> - 2006-07-18 02:16:33
|
Hi Broeker, On 7/18/06, Hans-Bernhard Br=F6ker <br...@ph...> wrote: > [...] > I don't think that this is the right place to post this. This is the > gnuplot mailing list. It has nothing to do with PlotWS. Any reports > you want to make about that software should be addressed at its autors. I was following the instructions from http://www.gnuplot.info/links.html : "This is a completely unorganised list of gnuplot related web and ftp sites. Please write to gnuplot-beta mailing list if you know any other useful links." > > > 1) Modify GraphSoapBindingImpl.java and change > > exe.run(exeGnuPlot + " \"" + cmdsFile + "\"", _tempDir, null); > > to > > exe.run(exeGnuPlot + " " + cmdsFile, _tempDir, null); > > I don't think that's a good change. After your change, any use of a > plot filename containing blanks would fail. This change breaks more > than it fixes Without the change, it doesn't work for me. Maybe it works on Windows. btw, the plot filename won't contain blanks (ah hah, thanks, now I what those quotes and back slashes were for): GraphSoapBindingImpl.java: cmdsFile =3D File.createTempFile("gnuplot_", ".cmds", _tempDir); > [...] > Does it actually offer two-way interaction, i.e. are clicks onto the > plot fed back into gnuplot? It's two-way interaction but not via clicking the plot but via something like a pull-down menu. e.g. http://www.soton.ac.uk/~ghydflex/images/General/hydroflex_graphs_large.gif (from: http://www.soton.ac.uk/~ghydflex/technologies/index.htm) |
|
From: Petr M. <mi...@ph...> - 2006-07-17 20:45:23
|
> I've been using the open source PlotWS software. > http://www.soton.ac.uk/~ghydflex/plotws/ : > > "PlotWS provides a graph generation WebService. It is implemented as a > wrapper around gnuplot and exposes a subset of gnuplot's > functionality. The Web Service layer is implemented using Apache AXIS." > > Perhaps, PlotWS could be added to the links page, > http://www.gnuplot.info/links.html under Java (where it says " Version > for Java and others: please contribute.") It's not for this category, but for Gnuplot used for generating web pages ?? It would be useful to write down few more examples of this use of gnuplot. If someone writes down such a review/short list, I will put it into gnuplot web pages. --- PM |
|
From: Kim L. G. <kim...@gm...> - 2006-07-18 02:40:12
|
Hi PM, On 7/18/06, Petr Mikulik <mi...@ph...> wrote: > > I've been using the open source PlotWS software. > > http://www.soton.ac.uk/~ghydflex/plotws/ : > > > > "PlotWS provides a graph generation WebService. It is implemented as a > > wrapper around gnuplot and exposes a subset of gnuplot's > > functionality. The Web Service layer is implemented using Apache AXIS." > > > > Perhaps, PlotWS could be added to the links page, > > http://www.gnuplot.info/links.html under Java (where it says " Version > > for Java and others: please contribute.") > > It's not for this category, but for > Gnuplot used for generating web pages > > ?? It' actually implemented in java. Strictly speaking, it's not used for generating web pages. PlotWS is used to generate graphs in the following formats: SVG, PNG and Postscript. An overview: http://www.soton.ac.uk/~ghydflex/plotws/web_page_doc/overview.html An implementation: http://www.soton.ac.uk/~ghydflex/images/General/hydroflex_graphs_large.gif (from: http://www.soton.ac.uk/~ghydflex/technologies/index.htm) > > It would be useful to write down few more examples of this use of gnuplot. > If someone writes down such a review/short list, I will put it into gnuplot > web pages. On a linux system, if the 2 steps I mentioned are followed (which I spent a long time figuring out), PlotWS should be very easy to use and deploy since it is just a war file. The only thing lacking for me is that time series graphs are not part of the functionalities yet (hopefully, someone can take this up, if not me). btw, "Build a static linked executable gnuplot" was mentioned in the instructions for using on linux (http://www.soton.ac.uk/~ghydflex/plotws/README.html) but I find that it may not be really necessary. if anyone really wants to build a static linked executable gnuplot on RH9, this may be useful: first download and install fontconfig (I used fontconfig-2.3.2.tar.gz), then for building gnuplot: ./configure --prefix=/home/anon/gnuplot --without-x LDFLAGS="-static -L/home/anon/fontconfig/lib Finally, I wanted to use gnuplot but was limited to using java in my application. I could have used JFreeChart but the documentation had a price tag (I've since found some short tutorials). That's why I chose PlotWS as a quick solution to my problem. Regards, KL |
|
From: Kim L. G. <kim...@gm...> - 2006-07-18 03:17:43
|
Sorry, I missed one pair of closing quotes for the configure command: > if anyone really wants to build a static linked executable gnuplot on > RH9, this may be useful: > > first download and install fontconfig (I used fontconfig-2.3.2.tar.gz), > then for building gnuplot: > ./configure --prefix=/home/anon/gnuplot --without-x LDFLAGS="-static > -L/home/anon/fontconfig/lib it should be: ./configure --prefix=/home/anon/gnuplot --without-x LDFLAGS="-static -L/home/anon/fontconfig/lib" |
|
From: Kim L. G. <kim...@gm...> - 2006-07-18 03:12:13
|
Hi PM, On 7/18/06, Petr Mikulik <mi...@ph...> wrote: > [...] > It would be useful to write down few more examples of this use of gnuplot. Another example of this use of gnuplot: http://www.omii.ac.uk/docs/2.3.3/managed_programme/plotws/about_plotws.htm Related links: http://www.omii.ac.uk/downloads/release.jsp?releaseid=64 http://www.omii.ac.uk/downloads/product.jsp?productid=49 http://download.omii.ac.uk/omii/downloads/documentation/omii_1_0/applications/cauchy_horizons/cauchy_prereqs.htm http://www.omii.ac.uk/docs/2.3.3/managed_programme/plotws/demo_plotws.htm http://www.omii.ac.uk/docs/2.3.3/troubleshooting/app_self_help.htm http://www.omii.ac.uk/docs/2.3.3/managed_programme/plotws/plotws_code_sample.htm |
|
From: Kim L. G. <kim...@gm...> - 2006-07-18 03:11:50
|
The below webpage is similar to the welcome page after you deploy the PlotWS.war: http://www.soton.ac.uk/~ghydflex/plotws/Web%20Content/PlotWS.html http://www.soton.ac.uk/~ghydflex/plotws/Web%20Content/ChangeHistory.html |
|
From: <br...@ph...> - 2006-07-18 18:30:05
|
Kim Leng Goh wrote: > I was following the instructions from http://www.gnuplot.info/links.html : > "This is a completely unorganised list of gnuplot related web and ftp > sites. Please write to gnuplot-beta mailing list if you know any other > useful links." For telling us about the program, you followed it correctly. But that doesn't mean we're interested in reading about possible bugs in other people's programs. Even if those programs use gnuplot. >> > 1) Modify GraphSoapBindingImpl.java and change >> > exe.run(exeGnuPlot + " \"" + cmdsFile + "\"", _tempDir, null); >> > to >> > exe.run(exeGnuPlot + " " + cmdsFile, _tempDir, null); >> >> I don't think that's a good change. After your change, any use of a >> plot filename containing blanks would fail. This change breaks more >> than it fixes > > Without the change, it doesn't work for me. Maybe it works on Windows. > > btw, the plot filename won't contain blanks (ah hah, thanks, now I > what those quotes and back slashes were for): How can you possibly be sure about that? For all you know, a user could well have set up his system such that > GraphSoapBindingImpl.java: cmdsFile = File.createTempFile("gnuplot_", > ".cmds", _tempDir); returns a pathname with a blank somewhere inside it. Note it doesn't have to be in the filename part of the pathname --- it could be in _tempDir, though. |
|
From: Kim L. G. <kim...@gm...> - 2006-07-20 01:59:42
|
Hi Broker,
On 7/19/06, Hans-Bernhard Br=F6ker <br...@ph...> wrote:
> [...]
> For telling us about the program, you followed it correctly. But that
> doesn't mean we're interested in reading about possible bugs in other
> people's programs. Even if those programs use gnuplot.
I apologize unreservedly for any issues caused.
> > [...]
> > btw, the plot filename won't contain blanks (ah hah, thanks, now I
> > what those quotes and back slashes were for):
>
> How can you possibly be sure about that? For all you know, a user could
> well have set up his system such that
>
> > GraphSoapBindingImpl.java: cmdsFile =3D File.createTempFile("gnuplot_"=
,
> > ".cmds", _tempDir);
>
> returns a pathname with a blank somewhere inside it. Note it doesn't
> have to be in the filename part of the pathname --- it could be in
> _tempDir, though.
Thanks for the explanation.
|
|
From: Petr M. <mi...@ph...> - 2006-07-18 20:25:09
|
> http://www.omii.ac.uk/docs/2.3.3/managed_programme/plotws/about_plotws.htm Well, I asked for *other* web software ... but maybe someone provides it; currently PlotWS is the only one in its category on the "Links" gnuplot web page section. --- PM |
|
From: Kim L. G. <kim...@gm...> - 2006-07-20 02:58:04
|
Hi PM On 7/19/06, Petr Mikulik <mi...@ph...> wrote: > > http://www.omii.ac.uk/docs/2.3.3/managed_programme/plotws/about_plotws.htm > > Well, I asked for *other* web software ... but maybe someone provides it; > currently PlotWS is the only one in its category on the "Links" gnuplot web > page section. Here's another gnuplot web service: http://coda.itsc.uah.edu/service-docs/gnuplots/ http://coda.itsc.uah.edu/service-docs/gnuplots/script.html |
|
From: Kim L. G. <kim...@gm...> - 2006-07-20 02:58:21
|
A "web-based" service (you can plot gnuplot in this wiki): http://gnuplot.flexkb.net/ http://gnuplot.flexkb.net/wc.dll?gnu~gnuPlotIssues > [...] > Here's another gnuplot web service: > > http://coda.itsc.uah.edu/service-docs/gnuplots/ > http://coda.itsc.uah.edu/service-docs/gnuplots/script.html |
|
From: Tino W. <ti...@wi...> - 2006-07-17 10:56:28
|
Kim Leng Goh wrote: > Hi all, > I've been using the open source PlotWS software. > > http://www.soton.ac.uk/~ghydflex/plotws/ : > > "PlotWS provides a graph generation WebService. It is implemented as a > wrapper around gnuplot and exposes a subset of gnuplot's > functionality. The Web Service layer is implemented using Apache AXIS." > > > Below, I like to share some steps I took to get the PlotWS software > working on my Red Hat 9.0 system. Hopefully, they could be of help to others. > > 1) Modify GraphSoapBindingImpl.java and change > exe.run(exeGnuPlot + " \"" + cmdsFile + "\"", _tempDir, null); > to > exe.run(exeGnuPlot + " " + cmdsFile, _tempDir, null); why dont you use a popen() (pipe) call to feed your commands w/o the need for a tempfile into gnuplot? It would also allow to read stderr/stdout from gnuplot. Regards Tino |