Grace Huang wrote:

Hi,

I try to use Tk::Graph to draw a graph. The x-axies has values of 10,20, 30, 100, 
y-axies has values of 2, 40, 20, 76. But the x-axies shows the values in order of 10, 
100, 20, 30. I want to show x-axies in order of 10, 20, 30, 100 numerically. The 
following is my code:
#!/usr/bin/perl
use Tk;
use Tk::Graph;

$mw = MainWindow->new;
my $data = {
             10 => 2,
             20  => 40,
             30   => 20,
             100 => 76
        };

my $ca = $mw->Graph(
                             -type  => 'BARS',
                             -xlabel => 'window',
                             -ylabel => 'percentage',
                             -xtick => 10,
                             -ytick => 10,
-sortnames => 'num',
-sortreverse => 0

                     )->pack(  -expand => 1,  -fill => 'both');

$ca->configure(-variable => $data);

MainLoop;

The above code shows a graph which has values 10, 100, 20, 30 on x-axies, but I want 
to show the values in order of 10, 20, 30, 100 numerically. Does anyone have any 
suggestion how to get around of this problem?
Thanks.

Grace

HTH

-- mike higgins
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to