When plotting, how do I change properties associated with the X-axis?
Afficher commentaires plus anciens
Just learning to script figures and having a difficult time of it. I have a few, probably simple, questions. I wouldn't ask if I hadn't spent an entire day already with help files and internet forums - I am missing something very basic.....
For example, I have this basic script:
boxplot(ABC,[0],'k.',[],[2])
set(gca,'YLim',[0,10],'YTick',[0:2:10],'YGrid','on')
ylabel('Tmx')
set(gca,'findobj(gcf,'Tag','Box'),'Color','k')
(1) How do I work with the x-axis???
(1a) What if I would like the x-axis gone (as for a subplot)?
(2) How do I get the ylabel to appear in bold?
(3) The median lines in the boxes are still in red - how do I make them black?
Thanks in advance for any help. I thought that one post would be better than four.
Réponses (1)
Daniel Shub
le 20 Nov 2012
I am not sure what all the parameters are that you are passing to boxplot. Does this do what you want?
h = boxplot(ABC, 'labels', {'';'';'';'';''})
set(h, 'Color', 'k');
set(gca,'YLim',[0,10],'YTick',[0:2:10],'YGrid','on')
ylabel('\bf Tmx')
Catégories
En savoir plus sur Annotations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!