Hello everybody,
Trying to figure out this .......
Is it possible to hide all the tick marks in between BUT keep the ones on the ends - I just want to show the lower bound tick mark and tick label and similarly the upper bound tick mark and the tick label. I want to hide the in between tick marks and labels e.g. like this
0 100
|_____________________________________|
and not like
0 10 20 30 40 50 60 70 80 90 100
|___|___|____|__|___|____|___|____|___|___|
If I setTickMarksVisible(false) then all the tick marks are hidden, similarly setTickLabelsVisible(false) sets off all the tick labels, including the end ones.
Don't think if I can do this, but still no harm in askign from experts.
Thanks a lot.
hsp
Show/Hide Tick Marks
Hallo hsp,
have you tried
Bye
have you tried
Code: Select all
axis.setTickUnit(new NumberTickUnit(100));
thanks gummibear,
Yes, I had thought about it but never tried it -
I just assumed that if I do that it will make my graph wrong - hehe, Now you can tell how amateur I am for the JFreechart. But as you mentioned, I thought - why don't I just try it and it did without doing my graph wrong.
Thanks a bunch.
Yes, I had thought about it but never tried it -

I just assumed that if I do that it will make my graph wrong - hehe, Now you can tell how amateur I am for the JFreechart. But as you mentioned, I thought - why don't I just try it and it did without doing my graph wrong.
Thanks a bunch.
Re: Show/Hide Tick Marks
Hi guys, i have something like this on my x axis
1,2...1,3..1,4...1,5..1,6
|___|____|___ |___|
so how can i remove labels that i do not need(example bellow)
1,2 ........1,4........1,6
|___|____|___ |___|
next code works for y axis not for x
sorry if this is kinda stupid question, but i already spent ours in google
Thanx)
1,2...1,3..1,4...1,5..1,6
|___|____|___ |___|
so how can i remove labels that i do not need(example bellow)
1,2 ........1,4........1,6
|___|____|___ |___|
next code works for y axis not for x
Code: Select all
NumberAxis axis = (NumberAxis) plot.getRangeAxis();
axis.setTickUnit(new NumberTickUnit(0.2));
Thanx)
Re: Show/Hide Tick Marks
change getRangeAxis() to getDomainAxis()
Re: Show/Hide Tick Marks
thanks, but it doesn't work, cuz method getDomainAxis() returns CategoryAxis, so its gonna be
when i wrote this
it said "inconvertible types"
Code: Select all
CategoryAxis domainAxis = plot.getDomainAxis ();
Code: Select all
NumberAxis axis = (NumberAxis) plot.getDomainAxis();
Re: Show/Hide Tick Marks
Search this list for "skip categoryaxis"
One of the returned links should reference this thread
http://www.jfree.org/phpBB2/viewtopic.p ... 67&start=0
One of the returned links should reference this thread
http://www.jfree.org/phpBB2/viewtopic.p ... 67&start=0