필터 지우기
필터 지우기

How to export XaxisTick Labels which are cell arrays to figure or powerpoint in app designer?

조회 수: 1 (최근 30일)
Please refer to the attached figure. If i keep the XaxisTicklabels as 1,2,3 and so on, it can be exported to PPT or figure with the help of h = copyUIAxes(app.UIAxes,axh).
But if the XaxisTickLabels are as in attached image, it displays the following error:
"Value must be a vector of type single or double whose values increase"
How to proceed with this?
  댓글 수: 7
Rohit Deshmukh
Rohit Deshmukh 2020년 3월 12일
I have updated the copyUIAxesVersion still the error continues:
I cannot attach the app here..
ERROR:
Error using matlab.graphics.axis.Axes/set
Value must be a vector of type single or double whose values increase
Error in copyUIAxes (line 153)
set(h.axes, uiaxGoodParams)
Error in SavePPTinFolder (line 59)
h = copyUIAxes(app.UIAxes,fNew);
Error in plotcreator/SaveasPPTButtonPushed (line 135)
SavePPTinFolder(app)
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 335)
Error while evaluating Button PrivateButtonPushedFcn.
Adam Danz
Adam Danz 2020년 3월 12일
Update, with some guessing work (that was necessary since I wasn't provided an example), I've been able to recreate the problem and am working on a solution.
The problem is that your historgram data are categorical the categorical properties aren't copied to the new axes.
I'll update you when a solution is ready.

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

답변 (1개)

Adam Danz
Adam Danz 2020년 3월 19일
편집: Adam Danz 2020년 3월 23일
@Rohit Deshmukh, please download and start using the new version of copyUIAxes() (verson 1.2.0, as of 19-Mar, 2020).
I've updated it to work with categorical histograms. Please let me know if you have any further problems.
  댓글 수: 6
Adam Danz
Adam Danz 2020년 4월 4일
Thanks, Emil. I would be interested in hearing of any shortcoming you may find with that function.

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

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by