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

I want to plot time on x-axis with each unit equal to 60 divisions instead 100.I am using GD::Graph So if the value is 2:30 ..then it should point 30th division after 2nd unit... The solutions i have is i can divide 30/60=0.5 and mark 2.5 but i am also displaying the values of each bar and dont want to display 2.5

Replies are listed 'Best First'.
Re: Change the x-axis unit length
by moritz (Cardinal) on Feb 18, 2010 at 11:10 UTC
    Scale the data yourself, and supply labels with the unscaled values (which can be done with the first element of the array ref you pass to $graph->plot, iirc).
    Perl 6 - links to (nearly) everything that is Perl 6.
      yup i have my scaled data and the first element of the array passing to $graph->plot contains the y-axis labels.Its actually an array of arrays sumthing like this: @data= 'jan','feb','mar' , '2','2','5' ; $graph->plot(\@data); My question is i am setting show_values=1(true) in set graph and want to show 2:30 for 2.5