PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.unix.shell > cool app to generate 2D plots directly to an image file from theshell
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

cool app to generate 2D plots directly to an image file from theshell

Réponse
 
LinkBack Outils de la discussion
Vieux 29/12/2007, 20h47   #1
Glenn MacGougan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut cool app to generate 2D plots directly to an image file from theshell

http://plot2d.sourceforge.net
"
plot2d -f plot2d_options.txt
USAGE: Plot2D -h // display
USAGE: Plot2D -c <option file name> // create a default options file
USAGE: Plot2D -f <option file name> // create plot based on this file
/srv/www/htdocs/upload/result.bmp generated.
"
Check it out. It's still in Alpha so it needs design feedback.


Does anyone know if there is another way to do this from the shell?
aside from some crazy way to script using octave and gnuplot.

glenneo
  Réponse avec citation
Vieux 29/12/2007, 20h50   #2
Glenn MacGougan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: cool app to generate 2D plots directly to an image file from theshell

On Dec 29, 1:47 pm, Glenn MacGougan <glenn.macgou...@gmail.com> wrote:
> http://plot2d.sourceforge.net
> "
> plot2d -f plot2d_options.txt
> USAGE: Plot2D -h // display
> USAGE: Plot2D -c <option file name> // create a default options file
> USAGE: Plot2D -f <option file name> // create plot based on this file
> /srv/www/htdocs/upload/result.bmp generated.
> "
> Check it out. It's still in Alpha so it needs design feedback.
>
> Does anyone know if there is another way to do this from the shell?
> aside from some crazy way to script using octave and gnuplot.
>
> glenneo


BTW

The unix/linux makefile is in the source download.
/apps/plot2d/unix/makfile
  Réponse avec citation
Vieux 29/12/2007, 20h51   #3
Glenn MacGougan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: cool app to generate 2D plots directly to an image file from theshell

On Dec 29, 1:50 pm, Glenn MacGougan <glenn.macgou...@gmail.com> wrote:
> On Dec 29, 1:47 pm, Glenn MacGougan <glenn.macgou...@gmail.com> wrote:
>
> >http://plot2d.sourceforge.net
> > "
> > plot2d -f plot2d_options.txt
> > USAGE: Plot2D -h // display
> > USAGE: Plot2D -c <option file name> // create a default options file
> > USAGE: Plot2D -f <option file name> // create plot based on this file
> > /srv/www/htdocs/upload/result.bmp generated.
> > "
> > Check it out. It's still in Alpha so it needs design feedback.

>
> > Does anyone know if there is another way to do this from the shell?
> > aside from some crazy way to script using octave and gnuplot.

>
> > glenneo

>
> BTW
>
> The unix/linux makefile is in the source download.
> /apps/plot2d/unix/makfile


Make the Release
.../apps/plot2d/unix/make release

Make the Debug
.../apps/plot2d/unix/make release

creates plot2d.bin
  Réponse avec citation
Vieux 30/12/2007, 03h19   #4
Icarus Sparry
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: cool app to generate 2D plots directly to an image file fromtheshell

On Sat, 29 Dec 2007 12:47:44 -0800, Glenn MacGougan wrote:

> http://plot2d.sourceforge.net
> "
> plot2d -f plot2d_options.txt
> USAGE: Plot2D -h // display USAGE: Plot2D -c
> <option file name> // create a default options file USAGE: Plot2D -f
> <option file name> // create plot based on this file
> /srv/www/htdocs/upload/result.bmp generated. "
> Check it out. It's still in Alpha so it needs design feedback.



From a "unix" point of view, if I was going to use this, there are
several things I would like changed.

1) You have to edit the options file to change the input and output files.
One would expect that the program would read standard input for its data
at least, and would write to standard output. By all means have command
line options that override these, but do not expect us to have to write a
program to edit the options file.

2) It is not clear how much the program can infer without the options.
For instance if you have an options file that just specifies the input
and output filenames will it produce a reasonable graph? If it doesn't,
then that makes the program a lot less useful to me. If it does, then
once you have go rid of the requirements to specify the input and output
files (point 1), then you can loose the options file.

3) Why restrict the output to a ".bmp" file? For instance on a system
using X why not have it able to pipe the output into 'xwud', or be able
to output techtronix 4014 escape sequences so the output can be viewed
using xterm? Why not have it capable of drawing simple ASCII art graphs?

4) Why does the data have to be "column based". I gave it a data file
which contained "1 2 3 4" and didn't get a very useful graph. I then put
the numbers one per line, and the program objected - "Problem in
attempting to plot series 0".

5) Why would I want a graph drawing library to calculate mean and
standard deviation? I am sure you have a particular need that you are
hoping this program will fill, but I can't see such a need for myself.

> Does anyone know if there is another way to do this from the shell?
> aside from some crazy way to script using octave and gnuplot.
>
> glenneo


Your idea of "crazy" may not agree 100% with the definition that the
other six and a half thousand million people that share the planet with
you use. 10th Edition Unix at least has the "plot" command, which could
be driven by an awk script to draw graphs. There are other graphics
libraries out there, e.g. www.libgd.org. which can be called from
interfaces from scripting languages.

I have not needed to do this myself, but I expect you can use the
spreadsheet in OpenOffice to do this kind of drawing as well.
  Réponse avec citation
Vieux 30/12/2007, 05h38   #5
Glenn MacGougan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: cool app to generate 2D plots directly to an image file from theshell

On Dec 29, 8:19 pm, Icarus Sparry <use...@icarus.freeuk.com> wrote:
> On Sat, 29 Dec 2007 12:47:44 -0800, Glenn MacGougan wrote:
> >http://plot2d.sourceforge.net
> > "
> > plot2d -f plot2d_options.txt
> > USAGE: Plot2D -h // display USAGE: Plot2D -c
> > <option file name> // create a default options file USAGE: Plot2D -f
> > <option file name> // create plot based on this file
> > /srv/www/htdocs/upload/result.bmp generated. "
> > Check it out. It's still in Alpha so it needs design feedback.

>
> From a "unix" point of view, if I was going to use this, there are
> several things I would like changed.
>
> 1) You have to edit the options file to change the input and output files.
> One would expect that the program would read standard input for its data
> at least, and would write to standard output. By all means have command
> line options that override these, but do not expect us to have to write a
> program to edit the options file.
>
> 2) It is not clear how much the program can infer without the options.
> For instance if you have an options file that just specifies the input
> and output filenames will it produce a reasonable graph? If it doesn't,
> then that makes the program a lot less useful to me. If it does, then
> once you have go rid of the requirements to specify the input and output
> files (point 1), then you can loose the options file.
>
> 3) Why restrict the output to a ".bmp" file? For instance on a system
> using X why not have it able to pipe the output into 'xwud', or be able
> to output techtronix 4014 escape sequences so the output can be viewed
> using xterm? Why not have it capable of drawing simple ASCII art graphs?
>
> 4) Why does the data have to be "column based". I gave it a data file
> which contained "1 2 3 4" and didn't get a very useful graph. I then put
> the numbers one per line, and the program objected - "Problem in
> attempting to plot series 0".
>
> 5) Why would I want a graph drawing library to calculate mean and
> standard deviation? I am sure you have a particular need that you are
> hoping this program will fill, but I can't see such a need for myself.
>
> > Does anyone know if there is another way to do this from the shell?
> > aside from some crazy way to script using octave and gnuplot.

>
> > glenneo

>
> Your idea of "crazy" may not agree 100% with the definition that the
> other six and a half thousand million people that share the planet with
> you use. 10th Edition Unix at least has the "plot" command, which could
> be driven by an awk script to draw graphs. There are other graphics
> libraries out there, e.g.www.libgd.org. which can be called from
> interfaces from scripting languages.
>
> I have not needed to do this myself, but I expect you can use the
> spreadsheet in OpenOffice to do this kind of drawing as well.



Feedback appreciated thanks,

I just reviewed the GNU graph command and it fits your unix point of
view well.

(1) The software does need better command line handling and the
ability to run solely from the terminal without the options file. It
should be easy enough to strike a balance so that both an options file
and command arguments are supported.
(2) The software needs to know the input file(s) but this could be
supported via command arguments as well.
(3) Bitmap was fastest to implement to get the project going.
(4) Most numeric data files that I've dealt with are column based. A
flag could be added to support row based.
(5) The stats are useful to add to the figure for many applications
I've worked with.
  Réponse avec citation
Vieux 30/12/2007, 12h21   #6
Maxwell Lol
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: cool app to generate 2D plots directly to an image file from the shell

Glenn MacGougan <glenn.macgougan@gmail.com> writes:

> Does anyone know if there is another way to do this from the shell?
> aside from some crazy way to script using octave and gnuplot.


One of my favorite 2D plotting programs is Grace.

http://plasma-gate.weizmann.ac.il/Grace/

It's powerful, and can be complicated to generate all of the data from
the shell.

Typically I first use the defaultrs to display the data, and use the
interactive features to design the plot, with legends, style, title,
subtitle, axis labeling, etc.


Then I save the (meta) parameters it a separate file from the data.

I generate the new data using a script, and view the graph with new
data and old graph parameters.

At times I have used a shell script to modify the parameters for a
series of plots.
  Réponse avec citation
Vieux 30/12/2007, 15h59   #7
Glenn MacGougan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: cool app to generate 2D plots directly to an image file from theshell

On Dec 30, 5:21 am, Maxwell Lol <nos...@com.invalid> wrote:
> Glenn MacGougan <glenn.macgou...@gmail.com> writes:
> > Does anyone know if there is another way to do this from the shell?
> > aside from some crazy way to script using octave and gnuplot.

>
> One of my favorite 2D plotting programs is Grace.
>
> http://plasma-gate.weizmann.ac.il/Grace/
>
> It's powerful, and can be complicated to generate all of the data from
> the shell.
>
> Typically I first use the defaultrs to display the data, and use the
> interactive features to design the plot, with legends, style, title,
> subtitle, axis labeling, etc.
>
> Then I save the (meta) parameters it a separate file from the data.
>
> I generate the new data using a script, and view the graph with new
> data and old graph parameters.
>
> At times I have used a shell script to modify the parameters for a
> series of plots.


I've evaluated Grace and gnu graph now and I'm impressed with both
packages. But I still think there is much room for creating more
usability. I think a good requirement for the plot2d project is
minimizing the time it takes a novice user to create a plot of their
data.

Plot2d is lacking in terms of the overall power of the software
(just .bmp output, and fairly constrained look and feel with only one
real font choice for now) - But for quick plotting of user data and
getting quick stats, it aims to be fast and very easy to use. I think
reducing the learning curve is the key feature of the software.

For experienced unix users, it's not likely to be top choice - but for
the novice user it has benefits.

I'm going to add the following to the project goals/design:
1. Plot2D aims to facilitate new users plotting their data within
minutes.
2. Plot2D needs real Unix usability with complete command line options
- I'll based the options on the gnu graph arguments.
3. A cross-platform GUI to write the options file and/or write the
complete shell command. (and create the figure from the GUI of
course).

  Réponse avec citation
Vieux 30/12/2007, 23h08   #8
lihao0129@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: cool app to generate 2D plots directly to an image file from theshell

On Dec 29, 3:47pm, Glenn MacGougan <glenn.macgou...@gmail.com> wrote:
> http://plot2d.sourceforge.net
> "
> plot2d -f plot2d_options.txt
> USAGE: Plot2D -h // display
> USAGE: Plot2D -c <option file name> // create a default options file
> USAGE: Plot2D -f <option file name> // create plot based on this file
> /srv/www/htdocs/upload/result.bmp generated.
> "
> Check it out. It's still in Alpha so it needs design feedback.
>
> Does anyone know if there is another way to do this from the shell?
> aside from some crazy way to script using octave and gnuplot.


I can pretty much do the same thing with Perl and modules like
GD::Graph(with some simple input, I can get plots with output formats
like png, gif...).. I used this way to export plots to monitor the web
traffic. (in a web context, I dont even need a temporary image file to
make a figure online :-

lihao(XC)
  Réponse avec citation
Vieux 31/12/2007, 00h09   #9
Dave
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: cool app to generate 2D plots directly to an image file fromthe shell

Glenn MacGougan wrote:
> http://plot2d.sourceforge.net
> "
> plot2d -f plot2d_options.txt
> USAGE: Plot2D -h // display
> USAGE: Plot2D -c <option file name> // create a default options file
> USAGE: Plot2D -f <option file name> // create plot based on this file
> /srv/www/htdocs/upload/result.bmp generated.
> "
> Check it out. It's still in Alpha so it needs design feedback.
>
>
> Does anyone know if there is another way to do this from the shell?
> aside from some crazy way to script using octave and gnuplot.
>
> glenneo


It suffers from GNUism or LINIXism - isfinite is not standard C.


CC -g -Wall -c -o cplot.o ../../../src/cplot.c
CC: Warning: Option -Wall passed to ld, if ld is invoked, ignored otherwise
"../../../src/cplot.c", line 3899: Error: The function "isfinite" must
have a prototype.
"../../../src/cplot.c", line 3930: Error: The function "isfinite" must
have a prototype.
2 Error(s) detected.
*** Error code 2
make: Fatal error: Command failed for target `cplot.o'


There are also some unprintable characters in the makefile.
Also,

DEBUG_CFLAGS = -g -Wall


-Wall is not a debug flag.

i.e. not portable.


The above is on a Sun Blade 2000 running Solaris 10.


kestrel /tmp/apps/plot2d/unix % cat /etc/release
Solaris 10 8/07 s10s_u4wos_12b SPARC
Copyright 2007 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 16 August 2007


  Réponse avec citation
Vieux 31/12/2007, 05h56   #10
Glenn MacGougan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: cool app to generate 2D plots directly to an image file from theshell

On Dec 30, 5:09 pm, Dave <f...@coo.com> wrote:
> Glenn MacGougan wrote:
> >http://plot2d.sourceforge.net
> > "
> > plot2d -f plot2d_options.txt
> > USAGE: Plot2D -h // display
> > USAGE: Plot2D -c <option file name> // create a default options file
> > USAGE: Plot2D -f <option file name> // create plot based on this file
> > /srv/www/htdocs/upload/result.bmp generated.
> > "
> > Check it out. It's still in Alpha so it needs design feedback.

>
> > Does anyone know if there is another way to do this from the shell?
> > aside from some crazy way to script using octave and gnuplot.

>
> > glenneo

>
> It suffers from GNUism or LINIXism - isfinite is not standard C.
>
> CC -g -Wall -c -o cplot.o ../../../src/cplot.c
> CC: Warning: Option -Wall passed to ld, if ld is invoked, ignored otherwise
> "../../../src/cplot.c", line 3899: Error: The function "isfinite" must
> have a prototype.
> "../../../src/cplot.c", line 3930: Error: The function "isfinite" must
> have a prototype.
> 2 Error(s) detected.
> *** Error code 2
> make: Fatal error: Command failed for target `cplot.o'
>
> There are also some unprintable characters in the makefile.
> Also,
>
> DEBUG_CFLAGS = -g -Wall
>
> -Wall is not a debug flag.
>
> i.e. not portable.
>
> The above is on a Sun Blade 2000 running Solaris 10.
>
> kestrel /tmp/apps/plot2d/unix % cat /etc/release
> Solaris 10 8/07 s10s_u4wos_12b SPARC
> Copyright 2007 Sun Microsystems, Inc. All Rights Reserved.
> Use is subject to license terms.
> Assembled 16 August 2007


Thanks, I'll look at a work around.

  Réponse avec citation
Vieux 31/12/2007, 18h23   #11
Glenn MacGougan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: cool app to generate 2D plots directly to an image file from theshell

On Dec 30, 10:56 pm, Glenn MacGougan <glenn.macgou...@gmail.com>
wrote:
> On Dec 30, 5:09 pm, Dave <f...@coo.com> wrote:
>
>
>
> > Glenn MacGougan wrote:
> > >http://plot2d.sourceforge.net
> > > "
> > > plot2d -f plot2d_options.txt
> > > USAGE: Plot2D -h // display
> > > USAGE: Plot2D -c <option file name> // create a default options file
> > > USAGE: Plot2D -f <option file name> // create plot based on this file
> > > /srv/www/htdocs/upload/result.bmp generated.
> > > "
> > > Check it out. It's still in Alpha so it needs design feedback.

>
> > > Does anyone know if there is another way to do this from the shell?
> > > aside from some crazy way to script using octave and gnuplot.

>
> > > glenneo

>
> > It suffers from GNUism or LINIXism - isfinite is not standard C.

>
> > CC -g -Wall -c -o cplot.o ../../../src/cplot.c
> > CC: Warning: Option -Wall passed to ld, if ld is invoked, ignored otherwise
> > "../../../src/cplot.c", line 3899: Error: The function "isfinite" must
> > have a prototype.
> > "../../../src/cplot.c", line 3930: Error: The function "isfinite" must
> > have a prototype.
> > 2 Error(s) detected.
> > *** Error code 2
> > make: Fatal error: Command failed for target `cplot.o'

>
> > There are also some unprintable characters in the makefile.
> > Also,

>
> > DEBUG_CFLAGS = -g -Wall

>
> > -Wall is not a debug flag.

>
> > i.e. not portable.

>
> > The above is on a Sun Blade 2000 running Solaris 10.

>
> > kestrel /tmp/apps/plot2d/unix % cat /etc/release
> > Solaris 10 8/07 s10s_u4wos_12b SPARC
> > Copyright 2007 Sun Microsystems, Inc. All Rights Reserved.
> > Use is subject to license terms.
> > Assembled 16 August 2007

>
> Thanks, I'll look at a work around.


Thanks all for the initial feedback.

I've released a revised version with much better command line
capabilities. I still have to fix the isfinite issue but that should
be done shortly.

More feedback is greatly appreciated.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 06h59.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,21514 seconds with 19 queries