Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GD::Graph: How to invert Y axis

Status
Not open for further replies.

cadbilbao

Programmer
Apr 9, 2001
233
ES
Hi.

Working with GD::Graph::lines, I want to make a graph of historical
ranking data. I've got:
@dataArray = ('4', '3', '5', '1');

But when making the graph, '1' appears at the bottom of the the image,
and I want it to appear at the top, because it's the first position
of the ranking.

I want to invert Y axis, and make the biggest numbers appear at the
bottom, not at the top.

I've been browsing GD::Graph docs:
but I didn't find any tip to do it.

Any suggestion? Thx.
 
Can you post a bit more code? GD::Graph takes arrays of references to arrays as it's data but you're only showing a single array. Also, what subtype (lines, area &c) are you using?

Yours,

fish

["]As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.["]
--Maur
 
cadbilbao is a selfish individual ... do the math

Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Thanks for the pointer, Paul. cadbilbao - it seems that people have asked you nicely not to cross-post before and you have ignored them. Why do you now expect them to help you?

["]As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.["]
--Maur
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top