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

Re^2: perl bar graph

by poss (Initiate)
on Feb 27, 2015 at 18:33 UTC ( [id://1118107]=note: print w/replies, xml ) Need Help??


in reply to Re: perl bar graph
in thread perl bar graph

Thanks robitcus for your prompt reply. I appreciate. I will use your example, since you already have the example working. Your comment says.
my @data = ( [ 'Windows', 'Linux', 'Solaris' ], # Swap the next two lines to switch versions of the graph [ 150, 250, 350 ], [ 100, 200, 300 ], );
This show exactly what I am trying to resolve. By switching
[ 150, 250, 350 ], [ 100, 200, 300 ],
to
[ 100, 200, 300 ], [ 150, 250, 350 ],

Does indeed swap the stacked bars, however the values do not follow the bars. So, stacked bar 1 has values
100 for bottom bar 150 for top bar. If I swap them, the vales 100,150 remain and do not follow the bars it should be referencing.
I may not be understand perl and/or Graphs as I am very new to this. Thanks for any pointers you can provide.
Poss

Replies are listed 'Best First'.
Re^3: perl bar graph
by roboticus (Chancellor) on Mar 02, 2015 at 20:25 UTC

    poss:

    Sorry for the delay in replying, but I had to wait until I got back to my work computer to review the code & figures.

    Anyway, when you say "the values do not follow the bars", do you mean that the numbers aren't shown immediately above each bar? When I run it, the values seem to follow nicely. If your numbers are appearing elsewhere, or aren't changing positions with the tops of the bars, then I'd have to guess that there are some module/library version differences going on.

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.

      Hi roboticus
      Yes that is indeed what I am saying
      For my data points
      my @data = (
      'Windows', 'Linux', 'Solaris' ,
      # Swap the next two lines to switch versions of the graph
      150, 250, 350 ,
      100, 200, 300 ,
      # 100, 200, 300 ,
      # 150, 250, 350 , );
      By uncommenting one or the other <above>, the bar color sizes do update properly, but the numbers are ALWAYS
      150, 250, 350
      on the top bar and
      100, 200, 300
      on the bottom bars.
      Weird
      I am using perl, v5.8.2 built for sun4-solaris if that is any help.
      Other than that I am using your exact example.
      Thanks
      Paul

        poss:

        Very strange: I'm definitely having the numbers follow the boxes. Are you having the boxes change size when you flip the lines?

        Just for reference, I'm using perl 5.18.1, GD::Graph v1.48 on MacOS X.

        ...roboticus

        When your only tool is a hammer, all problems look like your thumb.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1118107]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2024-03-28 11:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found