How do I troubleshoot if a plot line doesn't show up on a figure

3 次查看(过去 30 天)
Due to the nature of the problem requiring a large sum of data, I can't provide an example code beyond this.
plot([0 7],[meet4060 meet4060],':k')
Where meet4060=55.
It worked in the original code I was working on and it worked in a separate figure on its own, but it is not showing up in the recent code. When this happens, what should I be looking for to begin solving the trouble?

采纳的回答

Star Strider
Star Strider 2020-9-18
It plots a horizontal dotted line at 55 from 0 to 7.
If it works independently, then there are several possibilities, some of which are that the plot limits are such that it is there, however is either too short to be seen clearly, or outside of the plot limits (xlim, ylim) entirely, or is being overplotted by something else.
One option would be to plot it temporarily as:
plot([0 7],[meet4060 meet4060],':k', 'LineWidth'10)
to see if it becomes visible.
We would need to see relevant parts of the current code to be certain.

更多回答(0 个)

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by