Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

3d scientific graphing

by bret.foreman (Acolyte)
on Aug 05, 2004 at 21:10 UTC ( #380385=perlquestion: print w/replies, xml ) Need Help??

bret.foreman has asked for the wisdom of the Perl Monks concerning the following question:

I would like to find a module that will allow me to graph 3-axis data. I imagine passing it something like an array of 3-element arrays where the 3 elements are the x, y, and z components of each data point. This module would then, depending on parameters, draw either a surface, solid, or mesh based on the data points. Another set of parameters would be used to specify the viewing angle of the 3d representation. Other options might be shading along an axis, colors, etc.

Anyone know of something good?


Replies are listed 'Best First'.
Re: 3d scientific graphing
by Aristotle (Chancellor) on Aug 05, 2004 at 21:17 UTC

    Looking on CPAN for 3D brings up a dozen relevant looking hits. Looking for OpenGL also produces a couple.

    Some of the hits for 3D are modules from the PDL (Perl Data Language, a fast maths package) distribution; that sounds like it might be up your alley. I have no idea whether they're any good for your needs, but that's where I'd start investigating.

    Makeshifts last the longest.

Re: 3d scientific graphing
by duff (Parson) on Aug 05, 2004 at 21:35 UTC

    Not perl specific, but gnuplot works well for some plots.

      gnuplot looks to have just the functionality I need. It's going to be awkward to use from PERL, but not impossible. You feed it a bunch of parameters and data in the stdin and it can spit out a gif file to stdout. It's not pretty, though, so I'm still open to suggestions about an all-PERL solution.


        I would second Aristotle's suggestion of using PDL, It has a submodule, TriD, I think it is called, that will do 3D scatterplots. This is an all perl solution.


Re: 3d scientific graphing
by LassiLantar (Monk) on Aug 05, 2004 at 21:22 UTC
    From a search on GD::Graph3D

    I recommend searching cpan for modules before asking on PM. Asking a question like this one falls under the general catagory which is generally impolitely stated as "RTFM" (Read the f***ing manual). I try not to rail on new users though =)

    Check out How do I post a question effectively? for some general posting tips.

    I don't know a thing about 3dGraphing on Perl, though, so I don't know if this module is any good or if it's exactly what you're looking for. Try it and find out if it's what you're looking for, and if not, come back with a more informed question.

    Welcome to the monastary!

      With all due respect, I spent quite a lot of time looking through CPAN for something appropriate so your advice is a bit wide of the mark.

      Also, GD::Graph3D is not a 3-axis graphing module, it's a 2-axis module where you can specify the "depth" of the lines, bars, pie, etc.

      CPAN is a very good source of technical data when you know the module you want, but I'd like to avoid wading through the hundreds of pages generated by the scores of matches to "3D". I've already waded through quite a lot of it without seeing anything that looks definitively good.


        I'm glad you did, and I apologize for assuming you didn't. It's just that a lot of people don't take the time to do such a search to any degree. In general, I suggest that your original post explain some of the things you've already tried, some things you rejected, etc. so folks will know you've done your homework and they'll be willing to get into a discussion on a higher level than "look on CPAN!" =)

        Wish I had a recommendation of a good module for you.


        Uh, there are 24 matches for 3D. It's not that much to look through.

        I'll grant that little of it is relevant, though.

        Makeshifts last the longest.

Re: 3d scientific graphing
by Plankton (Vicar) on Aug 05, 2004 at 23:02 UTC
Re: 3d scientific graphing
by rbi (Monk) on Aug 06, 2004 at 19:16 UTC
    You can consider the DISLIN library that is also available for Perl and free for non-commercial use.
    If you can have a license of IDL you can run it with system calls from Perl. IDL is much more powerful and I use this approach. The 'bad' thing is that it is a commercial software.
Re: 3d scientific graphing
by Sandy (Curate) on Aug 06, 2004 at 18:06 UTC
    While looking at other things, I came across the 'PDL' (Perl Data Language) . The screenshots/examples link shows 3-D graphs. This may be what you need. (the module is available on cpan)

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://380385]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2022-09-28 00:52 GMT
Find Nodes?
    Voting Booth?
    I prefer my indexes to start at:

    Results (124 votes). Check out past polls.