Not dynamic X- and Y axis

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
droop
Posts: 7
Joined: Fri Feb 01, 2008 11:01 am

Not dynamic X- and Y axis

Post by droop » Mon Mar 03, 2008 9:27 pm

Hi!

I´m new on JFreeChart. I´ve try to find out how to make that the value on the axis not will change as a result of the value of the plot. If you do not understand my problem, please tell me.

For example: I like to draw x-axis 0 to 100 and y-axis 0 to 100, but have just one point at value (5,5) At he moment the chart will show x-axis 5 and y-axis 5. It changes automatic. How can I avoid this automatic “zoom”?

/Mike

skunk
Posts: 1087
Joined: Thu Jun 02, 2005 10:14 pm
Location: Brisbane, Australia

Post by skunk » Mon Mar 03, 2008 11:42 pm

Code: Select all

plot.getDomainAxis().setRange(0, 100);
plot.getRangeAxis().setRange(0, 100);

droop
Posts: 7
Joined: Fri Feb 01, 2008 11:01 am

Post by droop » Tue Mar 04, 2008 8:22 am

Thanks!

Locked