Why does my figure print with a white background and white axes, even though I have set the axes and figure "Color" property to something other than white?
조회 수: 54 (최근 30일)
이전 댓글 표시
Why does my figure print with a white background and white axes, even though I have set the axes and figure "Color" property to something other than white?
I use the following code to create my figure:
figure
plot(1:10)
set(gca, 'color', 'g')
set(gcf, 'color', 'r')
Then, when I print to a file, the background color of the axes and the figure is white:
print -djpeg myfig.jpg
채택된 답변
MathWorks Support Team
2009년 6월 27일
You can correct this by using the InvertHardCopy property for figure windows. The following information is found in the documentation for InvertHardCopy:
This property changes hardcopy to black objects on white background and affects only printed output. Printing a figure or axes having a background color (Color property) that is not white results in poor contrast between graphics objects and the figure background and also consumes a lot of printer toner.
This property is set to "on" by default. If you want to print figures so that the figure or axes objects have the same background color as set in the Color property, please set the InvertHardcopy property to "off". For example:
figure
plot(1:10)
set(gca, 'color', 'g')
set(gcf, 'color', 'r')
set(gcf, 'InvertHardcopy', 'off')
print -djpeg myfig.jpg
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!