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

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?

 채택된 답변

jonas
jonas 2018년 10월 4일

2 개 추천

댓글 수: 3

OK thanks! I thought there is something wrong in the support libraries. However, how do I perform the equivalent of this code?
ax = gca;
ax.YAxis.Exponent = 2;
I am guessing to use the function set, but not sure how it would work with 'YAxis.Exponent'.
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
OK, thanks. I have not been able to change the exponent, and still searching the local help files for a solution.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품

릴리스

R2014a

질문:

2018년 10월 4일

댓글:

2018년 10월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by