Advice on module for plotting graphs

Discussion in 'Perl Misc' started by Vicky Conlan, Sep 30, 2008.

  1. Vicky Conlan

    Vicky Conlan Guest

    I'm currently writing a small system to automate a process of
    "cut+paste into excel, output as a graph" someone is currently
    having to do. Importing and munging the data I'm happy* with,
    creating a graph I have absolutely no experience of.

    I've had a look around CPAN, but there appear to be a million
    and one modules that may do what I'm looking for, does anyone
    have any experience (good or bad) or advice on which direction
    to go?

    (One option is always to output excel-importable data and then
    carry on using excel to create the graphs, but that's not really
    very nice)

    Given I don't think gnuplot is available, I'm currently looking
    at SVG::Graph, but if there was something available that came
    bundled with the standard distribution, that would probably win
    the convenience vote.

    Any hints and advice appreciated.

    --
     
    Vicky Conlan, Sep 30, 2008
    #1
    1. Advertising

  2. Vicky Conlan

    Ben Morrow Guest

    Quoth (Vicky Conlan):
    > I'm currently writing a small system to automate a process of
    > "cut+paste into excel, output as a graph" someone is currently
    > having to do. Importing and munging the data I'm happy* with,
    > creating a graph I have absolutely no experience of.
    >
    > I've had a look around CPAN, but there appear to be a million
    > and one modules that may do what I'm looking for, does anyone
    > have any experience (good or bad) or advice on which direction
    > to go?


    If you're on Win32 and have Excel, you can use Win32::OLE to
    remote-control Excel into producing the graph for you. If you record a
    macro in Excel that does what you want and then examine the VB code it
    generates, it's usually trivial to convert that into Perl.

    Ben

    --
    I must not fear. Fear is the mind-killer. I will face my fear and
    I will let it pass through me. When the fear is gone there will be
    nothing. Only I will remain.
    Frank Herbert, 'Dune'
     
    Ben Morrow, Sep 30, 2008
    #2
    1. Advertising

  3. Vicky Conlan

    Vicky Conlan Guest

    According to <>:
    >If you're on Win32 and have Excel, you can use Win32::OLE to
    >remote-control Excel into producing the graph for you. If you record a
    >macro in Excel that does what you want and then examine the VB code it
    >generates, it's usually trivial to convert that into Perl.


    I'm not on Win32, if I was going to go the excel route, it would involve
    outputting the data to a solaris machine then importing it via (some
    other method). That would be the backup method if I couldn't find a
    better solution. I'd rather have a Perl module that outputs pretty
    graphs as gifs (or something similar).
    --
     
    Vicky Conlan, Sep 30, 2008
    #3
  4. Vicky Conlan

    Jim Gibson Guest

    In article <gbtdlj$15mj$>, Vicky Conlan
    <> wrote:

    > I'm currently writing a small system to automate a process of
    > "cut+paste into excel, output as a graph" someone is currently
    > having to do. Importing and munging the data I'm happy* with,
    > creating a graph I have absolutely no experience of.
    >
    > I've had a look around CPAN, but there appear to be a million
    > and one modules that may do what I'm looking for, does anyone
    > have any experience (good or bad) or advice on which direction
    > to go?
    >
    > (One option is always to output excel-importable data and then
    > carry on using excel to create the graphs, but that's not really
    > very nice)
    >
    > Given I don't think gnuplot is available, I'm currently looking
    > at SVG::Graph, but if there was something available that came
    > bundled with the standard distribution, that would probably win
    > the convenience vote.


    What platform are you on? Why do you think gnuplot is not available?
    Gnuplot would be my recommended approach. It is available as source and
    supports many platforms. I have used on Windows, Linux, and Mac OSX.

    --
    Jim Gibson
     
    Jim Gibson, Sep 30, 2008
    #4
  5. Vicky Conlan

    Vicky Conlan Guest

    According to <>:
    >What platform are you on?


    Solaris.

    >Why do you think gnuplot is not available?


    Because it's not installed on the machine I am developing on (definitely), I'm
    about 99% sure it's not available on the machine it would eventually run on,
    and getting things installed introduces an extra level of hassle.

    >Gnuplot would be my recommended approach. It is available as source and
    >supports many platforms. I have used on Windows, Linux, and Mac OSX.


    It does have one extra advantage, in that I've used it before (although not via
    Perl, but that shouldn't matter too much). Hmm. I'll see about getting it
    installed (I can do it myself for development, but if I do that and then get
    the knock back for having it installed on production, that's going to be a bit
    of a spanner in the works!), but would still welcome suggestions for alternatives


    --
     
    Vicky Conlan, Oct 1, 2008
    #5
  6. On Tue, 30 Sep 2008 14:38:43 +0000 (UTC),
    Vicky Conlan <> wrote:
    > I'm currently writing a small system to automate a process of
    > "cut+paste into excel, output as a graph" someone is currently
    > having to do. Importing and munging the data I'm happy* with,
    > creating a graph I have absolutely no experience of.


    It depends a bit on what sorts of charts you want to create (what's on
    the X and Y axes?). I use GD::Graph a lot, but that's probably because I
    wrote it. It only really does business-style charts.

    The Chart distribution is quite complete and works well.

    I also use gnuplot a lot for those areas where GD::Graph doesn't work,
    like 3D plots, function plotting, etc. Interfacing with gnuplot is not
    hard.


    Martien
    --
    |
    Martien Verbruggen | There are only 10 types of people in the
    | world; those who understand binary and those
    | who don't.
     
    Martien Verbruggen, Oct 1, 2008
    #6
  7. Vicky Conlan

    Vicky Conlan Guest

    According to <>:
    >It depends a bit on what sorts of charts you want to create (what's on
    >the X and Y axes?). I use GD::Graph a lot, but that's probably because I
    >wrote it. It only really does business-style charts.


    I'll take a look. Could be handy having the author at hand. ;-)
    At the moment, "simple" graphs would probably do, but I get the
    feeling that the requirements may be subject to ... expansion some
    time in the future.

    >The Chart distribution is quite complete and works well.
    >
    >I also use gnuplot a lot for those areas where GD::Graph doesn't work,
    >like 3D plots, function plotting, etc. Interfacing with gnuplot is not
    >hard.


    Ah, but interfacing with gnuplot /is/ hard if I can't get gnuplot
    installed on the machine it needs to run on.

    Having used both, how tricky would you expect it to be if I wrote with
    GD::Graph in mind, then had to switch to a gnuplot option at a later
    date? (ie, are the interfaces similar enough to make it a simple switch,
    or a significant re-write?)

    --
     
    Vicky Conlan, Oct 1, 2008
    #7
  8. Vicky Conlan

    Guest

    (Vicky Conlan) wrote:
    > According to <>:


    > >I also use gnuplot a lot for those areas where GD::Graph doesn't work,
    > >like 3D plots, function plotting, etc. Interfacing with gnuplot is not
    > >hard.

    >
    > Ah, but interfacing with gnuplot /is/ hard if I can't get gnuplot
    > installed on the machine it needs to run on.


    If you can't get gnuplot installed, you very likely won't be able to get
    GD installed either. Incompetent IT is hard to circumvent.

    Xho

    --
    -------------------- http://NewsReader.Com/ --------------------
    The costs of publication of this article were defrayed in part by the
    payment of page charges. This article must therefore be hereby marked
    advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
    this fact.
     
    , Oct 1, 2008
    #8
  9. On Wed, 1 Oct 2008 11:01:04 +0000 (UTC),
    Vicky Conlan <> wrote:
    > According to <>:
    >
    >>I also use gnuplot a lot for those areas where GD::Graph doesn't work,
    >>like 3D plots, function plotting, etc. Interfacing with gnuplot is not
    >>hard.

    >
    > Ah, but interfacing with gnuplot /is/ hard if I can't get gnuplot
    > installed on the machine it needs to run on.
    >
    > Having used both, how tricky would you expect it to be if I wrote with
    > GD::Graph in mind, then had to switch to a gnuplot option at a later
    > date? (ie, are the interfaces similar enough to make it a simple switch,
    > or a significant re-write?)


    Switching from GD::Graph to gnuplot is a big change, and would probably
    require a rewrite of almost everything. The Chart modules, I believe,
    have an interface that is compatible with GD::Graph's, but i mist say, i
    haven't used them for a while, so i am not too sure how much work there
    is, or how many more features they have than GD::Graph, nowadays.

    Martien
    --
    |
    Martien Verbruggen | In the fight between you and the world, back
    | the world - Franz Kafka
    |
     
    Martien Verbruggen, Oct 1, 2008
    #9
  10. Vicky Conlan

    Vicky Conlan Guest

    According to <>:
    >Switching from GD::Graph to gnuplot is a big change, and would probably
    >require a rewrite of almost everything. The Chart modules, I believe,


    Hmm, that's what I was afraid of. Bugger.

    Ok, thank you to everyone for the advice. I have already put in an
    enquiry about the chance of getting gnuplot installed, it's probably
    the best option ... I can see a lot of the rest of the week spent
    chasing it up. I hate this bit of my job.

    --
     
    Vicky Conlan, Oct 1, 2008
    #10
  11. (Vicky Conlan) wrote in news:gc0qul$1jmm$3
    @magenta.plig.net:

    > According to <>:
    >>Switching from GD::Graph to gnuplot is a big change, and would probably
    >>require a rewrite of almost everything. The Chart modules, I believe,

    >
    > Hmm, that's what I was afraid of. Bugger.
    >
    > Ok, thank you to everyone for the advice. I have already put in an
    > enquiry about the chance of getting gnuplot installed, it's probably
    > the best option ... I can see a lot of the rest of the week spent
    > chasing it up. I hate this bit of my job.


    Have you looked into Google's chart API?

    My guess is, you could drive it using LWP.

    Sinan

    --
    A. Sinan Unur <>
    (remove .invalid and reverse each component for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://www.rehabitation.com/clpmisc/
     
    A. Sinan Unur, Oct 2, 2008
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. morc
    Replies:
    2
    Views:
    706
    IchBin
    Feb 23, 2006
  2. Vivek

    plotting Graphs how to in C ?

    Vivek, Oct 16, 2006, in forum: C Programming
    Replies:
    2
    Views:
    945
  3. Replies:
    3
    Views:
    372
    Helmut Jarausch
    Jun 13, 2008
  4. Replies:
    8
    Views:
    1,004
  5. nk1

    Plotting graphs in python

    nk1, Oct 12, 2010, in forum: Python
    Replies:
    0
    Views:
    314
Loading...

Share This Page