Invalid first data argument

2 vues (au cours des 30 derniers jours)
Kiran Sagar
Kiran Sagar le 7 Avr 2016
Commenté : Image Analyst le 8 Avr 2016
The following code:
plot(x,y,'Marker','*','Color','r',x2,y2,'Marker','--','Color','b')
generates this error: "Invalid first data argument".
here x, y and x2, y2 are arrays of same size.
  2 commentaires
Kiran Sagar
Kiran Sagar le 7 Avr 2016
x = [1 2 3] ;
y = 2*x ;
x2 = x ;
y2 = x ;
Image Analyst
Image Analyst le 8 Avr 2016
Doesn't matter now. I told you how to fix it below.

Connectez-vous pour commenter.

Réponse acceptée

Image Analyst
Image Analyst le 7 Avr 2016
Modifié(e) : Image Analyst le 7 Avr 2016
'--' is not a valid choice for 'Marker'. Use a valid marker. See the help for a list of them.
Try this:
plot(x,y,'r*-', x2,y2,'bd-');

Plus de réponses (0)

Catégories

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

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by