print function with contour too slow

6 views (last 30 days)
Yu Li
Yu Li on 31 Jul 2018
Commented: OCDER on 1 Aug 2018
Hi:
I met a problem using 'print' function to print contour to 'jpeg' file. I found some suggestions in web: https://www.mathworks.com/matlabcentral/answers/96864-why-does-the-print-command-take-so-long-with-a-scatter-plot-in-matlab-7-5-r2007b, which suggests to print to 'EPS' format would be faster, however, I tested print both 'jpeg' and 'EPS' format, the result looks quite similar.
is there anyway to optimize this process? I attached a sample for test, the data is the 1st graph in a 3*3 contour, it cost about 90 seconds in my side to print the full graph, in both '.jpeg' and '.eps' format.
the test data 'f.mat' is too large, I compress it to .7z and the .zip, therefore, it requires to extract two times.
Thanks!
Yu

Answers (1)

OCDER
OCDER on 1 Aug 2018
Here are the times in my computer. Do you need the '-tiff', '-r600' option for eps file?
tic
print('EPS_test.eps','-depsc2','-opengl');
toc %0.45s
tic
print('EPS_test.eps','-depsc2','-painters');
toc %3.63s
tic
print('EPS_test.eps','-depsc2','-tiff', '-r600');
toc %2.52s
tic
print('EPS_test.jpg','-djpeg', '-r600');
toc %1.12s
  13 Comments
Yu Li
Yu Li on 1 Aug 2018
The newest version of driver does not work.
Elapsed time is 11.648357 seconds.
Elapsed time is 10.213246 seconds.
Elapsed time is 9.919810 seconds.
however thank you the same for your help.
Bests Yu
OCDER
OCDER on 1 Aug 2018
You're welcome. Hope you find a solution soon! If you do figure it out, post in the Answer section to help others with similar issues.

Sign in to comment.

Categories

Find more on Graphics Performance 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!