create a figure with box on and x-ytick off

Hello i would like to create a graph with box on but i 'd like to remove the x-ticks from upper x-axis and y-ticks from right y-axis. Unfortunatelly i haven't found how i could "get" the properties of each individual axis (right y-axis, left y-axis, bottom x-axis, upper x-axis) and set x-yticks off. I would appreciate any suggestion/help on how i could implement it.

 Accepted Answer

There are no independent left/right or top/bottom properties. Instead, the axis XAxisLocation property can be 'top' or 'bottom' and YAxisLocation can be 'left' or 'right'

5 Comments

So there isn't any way to make a graph with "box on" and "top" XAxis - "right" YAxis to be without the ticks? To be more specific i would like to do something like in the pic below
http://imageshack.us/photo/my-images/864/1rst.png/
but in matlab i can create just something like the following
http://imageshack.us/photo/my-images/72/2ndx.png/
Relevant threads:
http://www.mathworks.com/matlabcentral/newsreader/view_thread/237347
and... oh, dang, I cannot find the newsgroup posting where I showed how to use narrow patches and careful layering in order to hide tick marks (at the time, the person wanted the tick marks only on the outside of the plot.)
the thread you provided is about plotyy, i don't think it suites in my case. About the other post you talk about i guess it is (?) the following https://groups.google.com/group/comp.soft-sys.matlab/browse_thread/thread/824cb990c0c51e1?hl=en&pli=1 (i found it googling). I have to read it more carefully, and in my case you can be sure that i don't need it for a class assignment :).
The first thread leads to Paul's plt which is more flexible -- and can be edited.
Yes, that second one is the very one I was thinking of but could not find.
I think in your case you would find it much easier to turn ticks off on the axis, and then draw them in place where you want them. You would have to text() the labels in to place. Check plt first in case it can already handle no ticks on some side. (If it does not already, and Paul is still around, it sound to me like the sort of improvement he might be interested in.)
Thx, i 'll ckeck plt too. Reading your earlier post i thought to turn box off and manually draw 2 lines like x top axis and y right, i think someone could follow a way like getting minimum and maximum values of x and y, and plot 1 vertical and 1 horizontal line with same colour and line width of axes. Anyway, thanks again.

Sign in to comment.

More Answers (0)

Categories

Find more on Graphics Performance in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!