Why is my scatter plot blank?

12 vues (au cours des 30 derniers jours)
Ioanna Saxoni
Ioanna Saxoni le 22 Mai 2018
Réponse apportée : OCDER le 22 Mai 2018
Hello,
I am running a script in my computer where any scatter plot turns up empty. I have run the same script in another computer where it had no problem so there is no error in the cod to cause this.
Does anyone have any idea what might be wrong? I am using Matlab 2017a.
Thank you!
  5 commentaires
OCDER
OCDER le 22 Mai 2018
Modifié(e) : OCDER le 22 Mai 2018
Does this work by any chance?
scatter([1 2 3], [1 2 3]);
set(gcf, 'renderer', 'painters')
Ioanna Saxoni
Ioanna Saxoni le 22 Mai 2018
Yes it does! Thank you very much!
Would you mind explaining what renderer does?Why did it work now?

Connectez-vous pour commenter.

Réponse acceptée

OCDER
OCDER le 22 Mai 2018
scatter([1 2 3], [1 2 3]);
set(gcf, 'renderer', 'painters')
Sometimes there's a bug that prevents the graphics card from properly drawing the figures generate by Matlab via the OpenGL renderer (default). It's been an on and off bug for a while:
You could use this to set the default renderer for all figures generated:
set(0, 'DefaultFigureRenderer', 'painters')

Plus de réponses (0)

Catégories

En savoir plus sur Scatter Plots 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!

Translated by