Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

PGPlot with PDL

by SparkeyG (Curate)
on Sep 26, 2002 at 20:34 UTC ( #201042=perlquestion: print w/replies, xml ) Need Help??
SparkeyG has asked for the wisdom of the Perl Monks concerning the following question:

While working with PGPlot, I've run into a problem with graphing my data. I have not been able to figure out how to change the labels of the X-Axis. I want to be able to graph data over a period of time, ie. Time of Day, Day of month.
Help, Obi-PM-Kenobi your my only hope.

--SparkeyG

Replies are listed 'Best First'.
Re: PGPlot with PDL
by Zaxo (Archbishop) on Sep 26, 2002 at 20:58 UTC

    To affect the numeric labels, you just need to scale that axis' numbers to suit your new units. To set the title, use the env method. From the PDL::Graphics::PGPLOT::Window pod:

    $rate_win = PDL::Graphics::PGPLOT::Window->new(Device => '/xw', Aspect => 1, WindowWidth => 5, NXPanel => 2); $area_win = PDL::Graphics::PGPLOT::Window->new(Device => '/xw', Aspect => 1, WindowWidth => 5); $rate_win->env(0, 10, 0, 1000, {XTitle => 'Days', YTitle => '#Rabbits' +}); $rate_win->env(0, 10, 0, 100, {Xtitle=>'Days', Ytitle => 'Rabbits/day' +}); $area_win->env(0, 1, 0, 1, {XTitle => 'Km', Ytitle => 'Km'}); # And theoretical prediction. $rate_win->line(sequence(10), fibonacci(10), {Panel => [1, 1]});

    After Compline,
    Zaxo

      That isn't exactly what I was looking for. What I want is the ability to label my x-axis for each day, ie 08/23/2002 to 08/29/2002 or from 08:00 to 16:30.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://201042]
Approved by ybiC
help
Chatterbox?
[GrandFather]: It's a good day end here Corion. The start was somewhat less than average!
[Corion]: GrandFather: All's well that ends well? ;)
[GrandFather]: I'm fighting with a third party device our software is to support. The documentation for the device's SDK is quite a lot less than average and most of today was spent ...
[GrandFather]: discovering that one of the sensors for the device lies about the gain range it is using!
[GrandFather]: However, by the end of the day I had discovered its deceptions and now have it working correctly, so yes, all's well that ends well. :-D
[Corion]: GrandFather: Ah, (hardware) APIs - I have a similar situation with Chrome and its API... It is fairly underdocumented and I guess I have to hunt...
[Corion]: ... down supposedly working code to find out what I'm supposed to do
[GrandFather]: I haven't any "working code" to inspect! I have to find ways to generate reference signals then check the numbers I get at the far end match.

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2017-08-24 07:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (365 votes). Check out past polls.

    Notices?