Visible Tick labels

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Gopi

Visible Tick labels

Post by Gopi » Mon Oct 01, 2001 5:45 pm

Hi,

I need the vertical axis tick labels to show only integers(1, n). Right now, if the range is 1-5, the labels show up in increments of 0.1. I want it to be in increments of 1. Could comeone let me know how to do this,

Thanks,
Gopi

Gopi

RE: Visible Tick labels

Post by Gopi » Mon Oct 01, 2001 8:04 pm

I figured out the solution.

Thanks,
Gopi

Dogbert

RE: Visible Tick labels

Post by Dogbert » Thu Oct 04, 2001 9:09 pm

Can you share it with us? I've got the same problem.

Tks,
Dogbert

Gopi

RE: Visible Tick labels

Post by Gopi » Thu Oct 04, 2001 9:16 pm

VerticalNumberAxis verticalAxis = (VerticalNumberAxis) plot.getAxis(Plot.VERTICAL_AXIS);
verticalAxis.setAutoTickValue(false);

Dogbert

RE: Visible Tick labels

Post by Dogbert » Thu Oct 04, 2001 11:02 pm

Ah...doesn't quite work for my situation.

I need whole numbers only, but need it to select appropriate ticks. Counting by ones doesn't hack it. I've tried modifying the patterns associated with getTickLabelFormatter(), but have yet to see it make a difference.

Thanks anyway,
Dogbert

Locked