Plot command, horizontal line as a marker

4 vues (au cours des 30 derniers jours)
Ashesh Shah
Ashesh Shah le 13 Oct 2020
Modifié(e) : Adam Danz le 13 Oct 2020
Hi,
I am combining a bar plot with a line plot and want to use the '_' as the marker for the line plot. However when I run the command, I get the following error
plot(1:1:4,1:1:4,'k','LineStyle','none','Marker','_')
Error using plot
'_' is not a valid value. Use one of these values: '+' | 'o' | '*' | '.' | 'x' | 'square' | 'diamond' | 'v' | '^' | '>' | '<' | 'pentagram' | 'hexagram' | 'none'.
The Matlab help for the line specfication says that '_' is an option but it somehow does not work.
  1 commentaire
Adam Danz
Adam Danz le 13 Oct 2020
Modifié(e) : Adam Danz le 13 Oct 2020
There's a demo of the '_' marker combined with a bar plot in this community highlight (r2020b or later required).

Connectez-vous pour commenter.

Réponses (1)

Star Strider
Star Strider le 13 Oct 2020
The '_' (and '|') markers were introduced in R2020b. So to use it, you will need to upgrade to the latest release. (The online documentatiion is for R2020b.)

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by