Effacer les filtres
Effacer les filtres

I was so proud of my crummy workaround for the legend bug not displaying properly on my plot, I had to share it.

2 vues (au cours des 30 derniers jours)
text(n(2), 25,'Temp','Color','red','FontSize',9) %place text, choose good spot
text(n(2), 20,'Humidity --','Color','blue','FontSize',9) %place text
%the text below places a rectangle around the text above, this is a very
%specific location and neither the text nor rectangle will update location
%if different data is entered, legend for some reason is not functioning
%properly and this is a workaround, manually placing a rectangle in the
%figure window -> right click -> show code will allow you to fix this
%location with different data if legend is still not functioning properly
annotation('rectangle',...
[0.177785714285714 0.262698412698413 0.13352380952381 0.0968253968253969]);
I was up last night for days trying to figure why my legend wasn't displaying properly when I finally took matters into my own hands!
Glad I found the opengl('save,'software') command fix because this was a bit of work as you can see by the massive novel I wrote explaining how to get your graph to display with a legend properly.
Any idea why the opengl command was necessary at all? I'm guessing it is a known bug.
  2 commentaires
Star Strider
Star Strider le 9 Jan 2020
It seems to be a problem with recent AMD graphics drivers.
Waiting for AMD to fix it.
Tony Dimichele
Tony Dimichele le 9 Jan 2020
Ah that makes sense why my old laptop never had this problem.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Graphics Performance dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by