axes & subplot etc. return double instead of matlab.gra​phics.axis​.Axes

1 vue (au cours des 30 derniers jours)
Mohit Sharma
Mohit Sharma le 4 Oct 2018
Commenté : Mohit Sharma le 5 Oct 2018
I need to use the Axes object to change my figure's appearance. But all the functions that should return 'matlab.graphics.axis.Axes' are actually returning 'double'. For example typing
class (axes())
returns 'double' even though a figure is created. My MATLAB is installed on Arch Linux, and otherwise works fine. There's another installation on a separate machine on centos, and that returns 'matlab.graphics.axis.Axes'. Can I fix this problem?

Réponse acceptée

jonas
jonas le 4 Oct 2018
  3 commentaires
jonas
jonas le 4 Oct 2018
Modifié(e) : jonas le 4 Oct 2018
Not sure when the dot-notation was introduced, but perhaps at the same time? Unfortunately the parent of the 'exponent' property is the 'yruler', which I believe has been renamed to 'yaxis' (but both still work in 2018a). The problem is that the xruler was always a hidden property , and I'm not sure how to access it prior to 2014b. You can try the following:
h=get(gca,'yaxis');
set(h,'exponent',2)
Or perhaps
h=get(gca,'yruler');
set(h,'exponent',2)
I don't have an older release installed, so I cannot verify myself
Mohit Sharma
Mohit Sharma le 5 Oct 2018
OK, thanks. I have not been able to change the exponent, and still searching the local help files for a solution.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Creating, Deleting, and Querying Graphics Objects dans Help Center et File Exchange

Produits


Version

R2014a

Community Treasure Hunt

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

Start Hunting!

Translated by