Printing Plots Does Not Work in MATLAB R2016a
Show older comments
This simple example works in MATLAB R2015b where I am able to click the print plot icon and successfully print the plot.
y=1:.2:10
z=2*y
figure,plot(y,z)
In R2016a the plot appears as usual - however when I click on the print plot icon I get the following error:
ERROR: Warning: HGUsingMATLABClasses will be removed in a future release. For more information about writing code that works in multiple releases, click here.
> In gobjects
In newplot (line 47)
In error (line 3)
Warning: HGUsingMATLABClasses will be removed in a future release. For more information about writing code that works in multiple releases, click here.
> In gobjects
In newplot (line 48)
In error (line 3)
Also modifying the simple example to include a print command:
y=1:.2:10
z=2*y
figure,plot(y,z)
print('test.pdf','-dpdf');
MATLAB produce this error:
ERROR: Warning: HGUsingMATLABClasses will be removed in a future release. For more information about writing code that works in multiple releases, click here.
> In gobjects
In newplot (line 47)
In generror (line 3)
Warning: HGUsingMATLABClasses will be removed in a future release. For more information about writing code that works in multiple releases, click here.
> In gobjects
In newplot (line 48)
In generror (line 3)
No appropriate method, property, or field 'FillPage' for class
'matlab.graphics.internal.mlprintjob'.
Error in validate (line 174)
if pj.FillPage || pj.BestFit
Error in print (line 81)
pj = validate( pj );
Error in generror (line 4)
print('test.pdf','-dpdf')
I have tried "restoredefaultpath" and I get this error:
ERROR: Error using restoredefaultpath (line 47)
MATLAB could not construct the default path due to missing files. For help, contact your system administrator or MathWorks Technical Support.
Is there a way to fix this?
Accepted Answer
More Answers (0)
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!