How to change printing options

7 vues (au cours des 30 derniers jours)
Andrea Caldiroli
Andrea Caldiroli le 6 Déc 2018
Commenté : madhan ravi le 6 Déc 2018
Hello, I'm running Matlab R2018b on Ubuntu 18.04. I'm trying to print a figure to file with pdf extension by using the print command (see code below).
x=linspace(0,2*pi,1e2);
y=sin(x);
figure
plot(x,y)
print('figure.pdf','-fillpage')
Anyway, the file is sent to the default printer and not saved to file. I've looked around for the right option to set to change default printing options but I had no success; can anyone help finding the correct way to do that? I know I can use the saveas command instead, but I need to use the -fillpage option that is only available with print.

Réponses (1)

madhan ravi
madhan ravi le 6 Déc 2018
print(gcf,'figure.pdf','-fillpage')
  2 commentaires
Andrea Caldiroli
Andrea Caldiroli le 6 Déc 2018
That did not work. I actually solved by using
print('figure','-dpdf','-fillpage')
Thank you anyway!
madhan ravi
madhan ravi le 6 Déc 2018
Anytime :) , glad that you found!

Connectez-vous pour commenter.

Catégories

En savoir plus sur Printing and Saving dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by