GD::Graph - get_feature_coordinates problem

Discussion in 'Perl Misc' started by Yoann Wyffels, Oct 19, 2004.

  1. 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.
    Yoann Wyffels, Oct 19, 2004
    #1
    1. Advertising

  2. Yoann Wyffels

    Anno Siegel Guest

    Yoann Wyffels <> wrote in comp.lang.perl.misc:
    > 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
    Anno Siegel, Oct 19, 2004
    #2
    1. Advertising

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

    It's working ! Really good idea to do directly a @ :)
    Thx
    Regards,
    Yoann.
    Yoann Wyffels, Oct 19, 2004
    #3
  4. Yoann Wyffels

    Anno Siegel Guest

    Yoann Wyffels <> wrote in comp.lang.perl.misc:
    > > my @test = @{ $graph->get_feature_coordinates("axes")}; # untested

    >
    > It's working ! Really good idea to do directly a @ :)


    It's called de-referencing. You should probably take a look at perldsc.

    Anno
    Anno Siegel, Oct 19, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George Sakkis
    Replies:
    1
    Views:
    434
    Szabolcs Nagy
    Jan 29, 2007
  2. Dr Ann Huxtable

    Missing Graph.h and (Graph.lib) woes - any help

    Dr Ann Huxtable, Dec 21, 2004, in forum: C Programming
    Replies:
    6
    Views:
    626
    Dr Ann Huxtable
    Dec 21, 2004
  3. Jef Driesen
    Replies:
    3
    Views:
    2,527
    mlimber
    Jan 24, 2006
  4. Almoni
    Replies:
    0
    Views:
    3,084
    Almoni
    Jan 17, 2010
  5. Emilio Mayorga
    Replies:
    6
    Views:
    314
    Martien Verbruggen
    Oct 8, 2003
Loading...

Share This Page