Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: SVG::TT::graph::Line X label step size

by user2829 (Acolyte)
on Jan 27, 2012 at 07:51 UTC ( #950275=note: print w/ replies, xml ) Need Help??


in reply to Re: SVG::TT::graph::Line X label step size
in thread SVG::TT::graph::Line X label step size

here is the code... Thank you for the reply

use SVG::TT::Graph::Line; my @fields = qw(Jan Feb Mar Jan Feb Mar Jan Feb Mar Jan Feb Mar Jan F +eb Mar Jan Feb Mar ); my @data_sales_02 = qw(12 45 21 12 45 21 12 45 21 12 45 21 12 45 21 12 + 45 21); my @data_sales_03 = qw(-15 -30 -40); open(IMG, ">>Wf.html") or print "Error:- $!"; my $graph = SVG::TT::Graph::Line->new({ 'height' => '500', 'width' => '300', 'fields' => \@fields, 'min_scale_value' => '0', 'max_scale_value' => '100', 'step_x_labels' => '2', }); $graph->add_data({ 'data' => \@data_sales_02, 'title' => 'Sales 2002', }); #print "Content-type: image/svg+xml\n\n"; print IMG $graph->burn();


Comment on Re^2: SVG::TT::graph::Line X label step size
Download Code
Re^3: SVG::TT::graph::Line X label step size
by GrandFather (Sage) on Jan 27, 2012 at 08:56 UTC

    Adding stagger_x_labels => 1, to the new parameter list generates a graph with non-overlapping x labels for me. Another possibility is to use rotate_x_labels => 1,, although that rotates the labels the wrong way for my taste.

    True laziness is hard work

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2015-07-04 09:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (59 votes), past polls