Figure(s) won't show when publishing to PDF

20 vues (au cours des 30 derniers jours)
Diego Espinosa
Diego Espinosa le 6 Fév 2018
Good Evening
I'm trying to publish a MATLAB script into a pdf that contains certain figures such as images and histograms but whenever I do so, the final PDF document leaves out all of them.
My code from the script is shown below: A = imread('Washed Aerial Image.tif');
figure('Name','Washed Aerial Image Histogram') imhist(A) title('Original Histogram of Aerial Image')
A2 = im2double(A); whos I2
B = imadjust(A2,[],[],5);
figure('Name','Aerial Image Contrast') imshowpair(A,B,'montage') title('Aerial Image Contrast')
figure('Name','Aerial Image New Historgram') imhist(B) title('New Histogram of Aerial Image')
I've been playing around with them such as putting the imhist function after the title or put the imhist function before figure, but nothing has worked out.
I'd appreciate any help or advice in solving my problem.

Réponses (1)

Astarag Chattopadhyay
Astarag Chattopadhyay le 9 Fév 2018
Hi,
You can try to use the renderer 'painters' to print the pdf and see if it resolves the issue you are facing. You can use the following MATLAB command to accomplish the same:
set(gcf,'Renderer','painters')
You can find more details about renderers in the following link:

Community Treasure Hunt

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

Start Hunting!

Translated by