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!