Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Font and Alignment in Chart

by nop (Hermit)
on Mar 02, 2001 at 02:25 UTC ( #61672=perlquestion: print w/replies, xml ) Need Help??
nop has asked for the wisdom of the Perl Monks concerning the following question:

Hi. How do I set font and alignment for my x-labels in chart? I'm using Activestate on WinNT. Thanks!
use Chart::Lines; my $c = Chart::Lines->new; my @x = blah blah blah my @y = blah blah blah my @data = ([@x],[@y]); $c->png("$b.gif", \@data);

Replies are listed 'Best First'.
Re: Font and Alignment in Chart
by OeufMayo (Curate) on Mar 02, 2001 at 03:28 UTC

    I don't know how works Chart::Lines, but it seems to be based on GD. There's another module I use, also based on GD, called GD::Graph which can produce graphs with lines and text.

    When I have to use this module and produce well formated text, I just have to use GD::Text, which allows me to choose the font, the size, etc... (note that there's also two sub-modules GD::Text::Align and GD::Text::Wrap to handle the alignment and the wraping (obviously)

    You may want to play with these modules to see how the fit with Chart::Lines.

    Hope this helps!

    my $OeufMayo = new PerlMonger::Paris({http => ''});</kbd>

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://61672]
Approved by root
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2018-06-22 06:27 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (121 votes). Check out past polls.