简体   繁体   English

在MATLAB绘图中将数据点显示在曲线的顶部?

[英]Show the data points on top of the curve in MATLAB plotting?

I plotted a series of points into a curve using MATLAB as follows. 我如下使用MATLAB将一系列点绘制到曲线中。

x = [1 4 6 8 0 2 4 7 8]
plot(x, 'blue')

I now wish to show those points on top of the curve. 我现在想在曲线顶部显示这些点。 I have tried 我努力了

x = [1 4 6 8 0 2 4 7 8]
plot(x, '.blue')

but that is not what I want, as I want the curve to be still solid and the dots show the data on the curve. 但这不是我想要的,因为我希望曲线仍然是实心的,并且点显示曲线上的数据。

How may I do that? 我该怎么办?

还要在linespec字符串中添加'-'行的规范

 plot( x, '.-b' );

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM