tags:

views:

35

answers:

1

I actually have 3 questions:

I have a plot with data that is in the thousands and my plot's axis is diplaying the tick marks as .4 .8 1.0 1.2 and a *10^4 in the lower right. This is a little annoying.

Besides dividing my data by 1000 or hardcodig the tick marks is there a way to change to tick marks from .4*10^4 TO 4000?

Seems like this should be trivial but aftter browsing through all of the figure's properties I can't seem to get an where.

And...once I get 4000 to apear instead of .4*10^4 is there a way to rotate the tick mark label so it is not overlapping the other labels.

And..how do you set how many "major" tick marks there are?

Thanks so much!

ME

+1  A: 

Try the following:

x=[4000, 8000, 10000, 12000]; % define the x values where you want to have a tick
set(gca,'XTick',x);  % Apply the ticks to the current axes
set(gca,'XTickLabel', arrayfun(@(v) sprintf('%d',v), x, 'UniformOutput', false) ); % Define the tick labels based on the user-defined format

Reference: Mathworks

In regards to the label rotation, it seems that Matlab does not support such feature by its own, but someone wrote a script for the label rotation, and you might want to give it a try.

YYC

related questions