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