Question about plotyy with one semilog axis?
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I would like to use plotyy to plot two y vectors agaist an x axis for which I use plotyy(x,y1,x,y2). My problem is that I want my y1 and y2 to plot as scatter plots also my y2 axis have log scale. So to go with the correct scales I know that I have to go plotyy(x,y1,x,y2,'plot','semilogy') but now how can I tell Matlab to plot them in scatter format. I would apprecite any comment on this, thanks.
0 个评论
回答(1 个)
Steven Lord
2016-6-22
If you're using a release that contains it (release R2016a or later) use the yyaxis function to set up the axes onto which you want to plot rather than calling plotyy.
Otherwise write a function that accepts two input arguments and returns a graphics handle and pass a function handle to that function into plotyy. Inside that function create your scatter plot and set the YScale property of the axes containing the scatter plot to 'log'.
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!