How do I troubleshoot if a plot line doesn't show up on a figure
3 views (last 30 days)
Show older comments
Oscar Ramos
on 18 Sep 2020
Commented: Star Strider
on 18 Sep 2020
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?
0 Comments
Accepted Answer
Star Strider
on 18 Sep 2020
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.
2 Comments
More Answers (0)
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!