Question about plotyy with one semilog axis?
3 ビュー (過去 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!