minor ticks are getting erased
조회 수: 4 (최근 30일)
이전 댓글 표시
I've written code to create a figure with four subplots. I was originally specifying the subplots as follows (for the upper right plot):
axh1=subplot(2,2,1)
But I found that Matlab was resizing the four plots so that the length and widths were not all the same. I want them to be the same. So I replaced the line above with
axh1=subplot('position',[.175 .6 .25 .25]);
Since I'm specifying position and size with that, I thought I would just be able to do that for all four subplots. What I find is that the minor tick marks on the y-axis disappear. Strangely, if I drag the corner of the figure window and enlarge it, the tick marks reappear, suggesting that it's just a cosmetic issue. But if I click Copy Figure and then paste into a document, the minor tick marks are gone! What's going on? Do I need to write the figure to a file somehow?
Here's the rest of the code (for the first subplot) if you want to try to run it. You'll have to make up some data for the variable PM
axh1=subplot('position',[.175 .6 .25 .25]);
boxplot(axh1,PM,{std});
hold(axh1,'on');
set(gca,'YScale','log');
set(axh1,'YLim',[1 1000]);
set(get(gca,'YLabel'),'String','primary PM (mg/kg-fuel)');
Thanks!
set(gca, 'YMinorTick', 'on');
댓글 수: 1
Walter Roberson
2012년 6월 14일
I suspect that get(gcf, 'Renderer') is going to show you OpenGL. Try using one of the other renderers.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Title에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!