Error with EPS Colormaps

조회 수: 8 (최근 30일)
Daniel
Daniel 2012년 1월 17일
I'm trying to create true eps files with a scaled color image of intensity in the background and black contours on top. I use imagesc(...) with a 'jet' colormap followed by contour(...,'Color','black'). This allows me to create a true (infinite zoom) eps file but for some reason despite the fact that I have written 'Color','black', when I open the saved file, the contours are the darkest blue of the jet colormap rather than black. In the matlab preview of the image, the lines look black. This only occurs after I save as eps. It does not occur when I save to pdf.
Anybody have any idea how to get around this?

답변 (1개)

Sean de Wolski
Sean de Wolski 2012년 1월 17일
hmm
What happens if you add a layer of zeros to the top of the jet colormap?
imagesc
colormap([0 0 0;jet])
colorbar
  댓글 수: 1
Daniel
Daniel 2012년 1월 17일
Yes, that works. Now the contours are black in the saved eps file. Of course, the trade off is I have a line of black in my colorbar which is not represented in the image. I think this is what I will do though as it seems a small price to pay. It seems that the problem is related to the details of my implementation because if I do simply:
imagesc(peaks)
hold on
contour(peaks,'Color','black')
and save, the lines are black.
and save as eps, the lines do appear black.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Color and Styling에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by