Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Really slick Charts and Graphs

by jdrago_999 (Hermit)
on Apr 07, 2006 at 17:31 UTC ( [id://541937]=perlquestion: print w/replies, xml ) Need Help??

jdrago_999 has asked for the wisdom of the Perl Monks concerning the following question:

I've been looking at graphing modules and tools (both Free and commercial) and have not found anything that really looks nice.

I mean nice. Like Dundas Charts for .NET ($700 - $4,000 USD).

In my opinion the best Perl graphing software I have come across is Perl Chart Director ($59 - $99) from Advanced Software Engineering.

While the Perl Chart Director looks a lot nicer (IMHO) than GD, it doesn't come anywhere close to Dundas.

We're not only talking about the visual appeal of the graphs generated by the software - I'm impressed by the simple API the Perl Chart Director has - very much along the lines of GD. Not exactly the same, but you basically pass it a list of data and a list of labels to generate graphs.

I'm shocked that something written on a platform that is consistently blasted and booed by the open-source community could have all these Features -- way more than anything else I have seen. Why don't we have something like this? I would do what I could to contribute, but this is certainly more than a one-person-project. This would have to be the the result of concerted effort of several expert programmers.

I figure some kind of OpenGL-to-raster conversion could help take things from 3D objects to the 2D world of images. Image::Magick, GD or Imager could handle stitching the resulting images together. New functionality could be borne from what already exists.

So, before I go and start up a new project on Sourceforge or whatever, I have to ask: Did I miss something, or are we lacking Really Nice Graphs?

Replies are listed 'Best First'.
Re: Really slick Charts and Graphs
by kvale (Monsignor) on Apr 07, 2006 at 18:01 UTC
    I do a lot of grahps in the context of my scientific work. When I look at a product like Dundas Charts, I see a lot of extraneous eye candy that distracts from objective assesment of the data. 3D bar charts may excite your eyes, but contain no more information than 2D bar charts. Worse, rotating axes will affect the perception of the data and adding perspective even more so. Call me elitist, but I think of these sorts of 3D pictures as eye candy for an audience that is easily bored with quantitative information, or is innumerate all together. If the PHBs want flashy 3D charts, ask the PHBs to buy the flashy 3D chart package :)

    If you really need 3D graphics, however, the PDL module has an openGL extension caled TriD that allows 3D graphics to be used. For a wide variety of 2D plot types, check out Grace There is a perl binding to Grace in the form of Chart::GRACE. I haven't tried the module, however, because it is certainly easy enough to interface with it through the shell. GnuPlot also has a wide variety of plots and has the perl binding Chart::GnuPlot. In terms of visual beauty, I find Grace the better choice.

    -Mark

Re: Really slick Charts and Graphs
by moklevat (Priest) on Apr 07, 2006 at 18:10 UTC
    It is possible to do very nice graphs in perl, though I tend to use R. Both R and the Perl Data Language have OpenGL links.

    I think part of your frustration may stem from your quest for "really slick graphs". You might compare the Dundas graphs to those that someone like Edward Tufte might create, and see how they compare for readability, accuracy, and information/ink ratio.

Re: Really slick Charts and Graphs
by renodino (Curate) on Apr 07, 2006 at 18:24 UTC
    Before you expend a lot of time and energy, I'd strongly recommend you pick a copy of Information Dashboard Design and give it a good read and (esp.) viewing. Its got many great examples of flashy, but poorly designed charting interfaces, and then proceeds to illustrate that "less is more" is usually best practice for charting.

    If you're still convinced you need a lot of flashy chrome, I'd suggest you look into JFreeChart as a possible starting point to "cheat" from. Actually, I'm a bit surprised someone hasn't already built an Inline::Java bit of glue for it ?

Re: Really slick Charts and Graphs
by spiritway (Vicar) on Apr 08, 2006 at 04:05 UTC

    I think it might be good to take time to decide exactly what makes a graph "nice". Since this is largely a matter of taste, different people are likely to have different opinions about it.

    What do you feel is missing? Is it the user interface, the selection of graph types, choice of colors, etc? What improvements do you think are needed to make a graphics package nice?

    Are you thinking of something along the lines of Microsoft's Excel, where you simply let the program handle the colors, etc. (with the option of overriding them if desired)?

    I think that the visual display of data is highly useful, not just a pleasant gimmick. With properly done graphs, you can see at a glance how the data is arranged, notice trends, etc., all of which would be obscured by plain lists of numbers. But - what do you want, what needs to be done?

      Well, having used GD::Graph quite a bit for CVS Monitor, here's a few of my favourites.

      1. Axis - I don't want to have to manually tell what axis to use, although I'd like the option. Lacking any information, I'd like the graph module to pick a relatively sensible set of both X and Y axis, and a set of seperators (both quantity and values) that are asthetically pleasing and functionally useful.

      I ended up having to write Chart::Math::Axis to try and deal with this situation in my graphs.

      2. Time - I want my automagic horozontal axis to display time sensibly. I want something that understands that my data isn't necesarily uniform over time, and picks sensible values, days vs weeks vs months. Otherwise, I want the same as for 1.

      3. Decoration. I don't care about particularly shiny graphics so much. But I DO want relatively nice labels, in a nice font, anti-alised, and so on. I want the graph to work out how to position the labels properly, shrinking the actual data are down to the most appropriate size.

      4. As with font's, it might be nice to have my lines anti-aliased. Not everything needs to be incredibly scientific accuracy, sometimes it's the asthetics that count a little more, and some light anti-aliasing would be greatly useful.

      The graphs don't have be massively eye-candied, but it would be nice to have them at least clean-looking.
      adarnk hit most of my points.

      1 ->> Anti-aliased lines and labels.
      1994 called - it wants its fonts back.

      2 ->> Better-looking charts
      Given the choice between displaying a composite line chart using DBD::Chart or Dundas I can see how it really would just depend on what you are trying to do.

      3 ->> Object-oriented API/DOM
      I think a DOM-style API to the chart would be great.

      4 ->> Smooth vector-style colors, gradients, alpha and shading
      This is pretty standard across even low-end commercial packages. There's got to be some way to generate smooth graphics.

      5 ->> Professional Appearance
      When I am making a chart for myself to see how many emails a server is bouncing, I'll use whatever tool will get the job done. This might just be HTML.
      However, when I am putting together some charts for a commercial tool (i.e. - CRM suite), I would like to have something that looks as good as the rest of the design (and still presents the information in a concise way).
Re: Really slick Charts and Graphs
by astaines (Curate) on Apr 09, 2006 at 13:48 UTC

    I really endorse moklevat's suggestion - look at R. Some screenshots are on-line and it has phenomenal graphics capabilites. Install it, turn it on and type :-

    demo(graphics)

    to see more.

    It also has a working Perl interface Rperl.

    -- Anthony Staines
Re: Really slick Charts and Graphs
by jdtoronto (Prior) on Apr 11, 2006 at 06:12 UTC
    For my own personal interest work I use PDL and its graphing capability. Chart Director works, we have used it for one client. I have also been a long time user of 'S', and then 'R' so I would endorse those suggestions as well. But like some of the others I wonder what you are after. While the Dundas Charts product has lots of nice tricky eye-candy, does it deliver the underlying data in a usable fashion?

    jdtoronto

Re: Really slick Charts and Graphs
by toma (Vicar) on Apr 12, 2006 at 08:20 UTC
    For scientific plotting with lots of features, PGPLOT is still the best that I have seen. I use R, also. PDL has some interesting graphs. Gnuplot covers most of the simple cases, and solves a few hard problems, also. Take a look at Nutmeg if you have complex numbers.

    Automatic generation of Really Nice Graphs in the General Case is still an Open Problem. It doesn't really matter how much money you spend. You want to paint a portrait of your data. It's art. There is taste involved. The charts at the Dundas link are extraordinarily ugly to my eye, for example. To me they look like 'how to lie with statistics' examples for the marketing department. I prefer the graphs with a more scientific look, such as these PGPlot examples. If you want good looking output, use the Postscript driver and convert to whatever you need.

    On the other hand, there are some very nice algorithms for autoscaling, etc, that are missing or poorly implemented in the 'widely used' graphing program.

    It should work perfectly the first time! - toma
Re: Really slick Charts and Graphs
by mattr (Curate) on Apr 11, 2006 at 02:26 UTC
    I wanted to build a wxperl based gantt chart creator (turns an excel sheet into a simple bar chart to track workflow of jobs across 10 business days). Though I saw for example the php package JPGraph which can do gantt charts, pie charts, and many others, and some Java stuff my decision was finally to do it myself. I used GD and it came out quite well after banging my thumbs a bunch of times. JPGraph seems to be forcing people to buy a professional license for commercial use, though I'm not sure that is actually valid legally.. If you are allowed to fork then a port to perl would be useful. Otherwise to do something equivalent from scratch perhaps.

    Probably lots of people do the same things. So it seems to me an object oriented way to link all these things together, allowing new charts to be created based on frameworks that draw nice graphs, would be good. Personally I would rather 3D be an option, I didn't need 3D but did need a way to make good bars. I also had to discover how to deal with fonts, make my own color module out of X11's rgb.txt, etc. Of course if I ever clean it up I could release it but.. (this is where lots of people stop). So more power to you!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://541937]
Approved by Ovid
Front-paged by kwaping
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-18 07:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found