Remove Scientific Notations in Plotyy
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello,
I was using plotyy function to plot two variables on a single plot. [haxes(1:2),hline1,hline2] = plotyy(RefTime,y1,RefTime,y2); grid; I tried using this % set(gca, 'ytickLabel', get(gca, 'ytick')); % to get the actual values, but seems like it doesn't works for plot yy. is there any other way that I can remove 'x 10^4'.
Thanks
댓글 수: 0
채택된 답변
Brendan Hamm
2016년 6월 8일
If it is prior, then you do need to use plotyy as you have done. The issue is, there are actually 2 axes being created and the Current Axes is the one on the left. So, you need to get both axes back which means navigating the graphics hierarchy.
f = gcf; % Get Current Figure;
ax = f.Children; % Get the axes array
rightLabel = ax(1).YTickLabel % Here is the Label you were looking for
Replace any of the above with get and set methods if you wish:
f = gcf;
ax = get(f,'Children');
rightLabel = get(ax(1),'YTickLabel');
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Two y-axis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!