Unexpected elements appear when using yyaxis plot

1 次查看(过去 30 天)
When I am using yyaxis to plot different lines on both axis, something went wrong. After activating the right axis, I firstly add a line and everything went on just fine. But as I was trying to add more lines, there appeared some unexpected 'scatter's at the two endpoints. I have no idea what happened. Is there a limit of the number of lines that can be plotted on one axis?
yyaxis left
x_draw=(-3+1.5/14):3/14:(0-1.5/14);
% pl=plot(x_draw,count,'linewidth',5,'color',[65,105,225]./255);
a=area(x_draw,count,'linewidth',5,'facecolor',[65,105,225]./255,'edgecolor',[65,105,225]./255);
a.FaceAlpha=0.2;
hold on
x_star4=log10(0.02);
x_star5=log10(0.04);
x_star6=log10(0.08);
plot([x_star4 x_star4],[0 pro_4*15000],'Color',[178 34 34]./255,'linewidth',3,'linestyle','-')
plot([x_star5 x_star5],[0 pro_5*15000],'Color',[178 34 34]./255,'linewidth',3,'linestyle','-')
plot([x_star6 x_star6],[0 pro_6*15000],'Color',[178 34 34]./255,'linewidth',3,'linestyle','-')
plot([-x_star4 0],[pro_4*15000 pro_4*15000],'Color',[178 34 34]./255,'linewidth',3,'linestyle','-')
plot([-x_star5 0],[pro_5*15000 pro_5*15000],'Color',[178 34 34]./255,'linewidth',3,'linestyle','-')
plot([-x_star6 0],[pro_6*15000 pro_6*15000],'Color',[178 34 34]./255,'linewidth',3,'linestyle','-')
  3 个评论
Adam Danz
Adam Danz 2023-1-11
What part of the image shows this: " some unexpected 'scatter's at the two endpoints" ? What end points? What scatter?
Divyanshu
Divyanshu 2023-2-23
Can you provide more information about the variables used in the code and also indicate which part of plot indicate that "scatter's at the two endpoints"?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Graphics Performance 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by