How do I troubleshoot if a plot line doesn't show up on a figure
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Oscar Ramos
le 18 Sep 2020
Commenté : Star Strider
le 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 commentaires
Réponse acceptée
Star Strider
le 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!