print function with contour too slow

6 次查看(过去 30 天)
Yu Li
Yu Li 2018-7-31
评论: OCDER 2018-8-1
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

回答(1 个)

OCDER
OCDER 2018-8-1
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 个评论
Yu Li
Yu Li 2018-8-1
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 2018-8-1
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.

请先登录,再进行评论。

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by