GD::Graph - get_feature_coordinates problem

Y

Yoann Wyffels

Hi,

I'm trying to use the "get_feature_coordinates" function in GD::Graph which
is intended to return an array of value.

Documentation says:
"
$graph->get_feature_coordinates($feature_name)
Experimental: Return a coordinate specification for a certain feature in the
chart. Currently, features that are defined are axes, the coordinates of the
rectangle within the axes; x_label, y1_label and y2_label, the labels
printed along the axes, with y_label provided as an alias for y1_label; and
title which is the title text box
"

So I write this after having graph my chart:
splice @test;
my @test=$graph->get_feature_coordinates("axes");
print "@test";

And the print command return me this: ARRAY(0x1c9d070)

How to have the real value and not a memory adress or an array pointer...?

Thx a lot,
Regards,
Yoann.
 
A

Anno Siegel

Yoann Wyffels said:
Hi,

I'm trying to use the "get_feature_coordinates" function in GD::Graph which
is intended to return an array of value.

Documentation says:
"
$graph->get_feature_coordinates($feature_name)
Experimental: Return a coordinate specification for a certain feature in the
chart. Currently, features that are defined are axes, the coordinates of the
rectangle within the axes; x_label, y1_label and y2_label, the labels
printed along the axes, with y_label provided as an alias for y1_label; and
title which is the title text box
"

So I write this after having graph my chart:
splice @test;
my @test=$graph->get_feature_coordinates("axes");
print "@test";

And the print command return me this: ARRAY(0x1c9d070)

How to have the real value and not a memory adress or an array pointer...?

my @test = @{ $graph->get_feature_coordinates("axes")}; # untested

Anno
 
Y

Yoann Wyffels

my @test = @{ $graph->get_feature_coordinates("axes")}; # untested

It's working ! Really good idea to do directly a @ :)
Thx
Regards,
Yoann.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top