fplot add an undesired line
    조회 수: 3 (최근 30일)
  
       이전 댓글 표시
    
When I use fplot with LineWidth a dashed thick gray line appears on the right edge o the box. Example
h=fplot(@(u) u.*exp(u),[-6,1],'r-','LineWidth',3)

Without Linewidth the picture is OK
댓글 수: 0
채택된 답변
  Star Strider
      
      
 2020년 2월 5일
        The gray line (that is always present (although it changes with the LineWidth parameter) indicates that the function increases or decreases without bound at that point.  
There is no direct way to remove it, however you can get the XData and YData values from the fplot function and plot them separately: 
figure
h=fplot(@(u) u.*exp(u),[-6,1],'r-','LineWidth',3);
figure
plot(h.XData, h.YData, '-r', 'LineWidth',2)
The gray dashed line is now gone from the second plot.  
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!