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

22 次查看(过去 30 天)
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.

回答(1 个)

Astarag Chattopadhyay
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:

类别

Help CenterFile Exchange 中查找有关 Histograms 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by