How to plot like this????????
显示 更早的评论
I want to draw my plot like the one shown in the attachment. I tried but in vain.
采纳的回答
7 个评论
Thank you very much dear the cyclist. But how will we put triangles and circles instead of above i.e., staric etc.?
The LineSpec property specifies what the line and markers will look like. You can see in the example I posted that the first line is solid green (with no marker), for example.
Please read through the documentation link I put in my prior post (and the link I just posted, which is a section of that page). You will learn how to do this, rather than needing someone else to do it for you.
Thank you very much dear the cyclist. Yes you are right. But if you see the symbols on are on the graph lines in the attached figure. But when I plot yours, some symbols come on plot lines and some of them come above and below the graph lines. Why it is so?
the cyclist
2022-7-4
编辑:the cyclist
2022-7-4
I'm not sure I understand what you mean. In the example I posted, from the documentation, three different y values are plotted (y1, y2, y3), with three different styles:
- y1: green, solid line, no marker -- 'g'
- y2: blue, dashed line, circle marker -- 'b--o'
- y3: cyan, no line, asterisk marker -- 'c*'
Nothing is plotted above or below its own line.
You seem to have a very similar situation, which is why I chose that example to post. For example, your "Proposed method" line has no marker, which makes it similar to y1 in my example.
Thank you very much for your prompt response. If you see the attached figure, all the plot lines are solid in it, but when I run your code, it gives me only one solid line of green colour and having no markers. The 2nd line is a dashed line with circles on it and is of blue colour. But the 3rd line is neither solid nor dashed i.e., its not visible but only cyan colour stars are there. But in given attached figure, all lines are visible.
My example is not intended to create your exact figure.
My example is intended to teach you how the MATLAB syntax works. It should be very easy for you to read the documentation I posted, and edit my example to do what you need. For example, to create a triangle marker instead of a circle marker, you can use '-^' instead of '-o'.
Ok dear the cycllist thank you very much for your help.
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Spline Postprocessing 的更多信息
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)

