Printing to -dmeta in 2014b

7 ビュー (過去 30 日間)
Matt
Matt 2014 年 11 月 13 日
コメント済み: Jingwan 2015 年 3 月 24 日
Hi All,
I'm experiencing frustration while printing to the clipboard in 2014b. In prior versions, I created a plot, maximized it to get the best visibility/resolution, set the paper position mode to auto, and then printed the figure to -dmeta. Doing this, the image that was printed to the clipboard has always matched what I've created in the figure.
Now however, when I print the figure to the clipboard, the legend entries get moved over so that they are partially outside the legend box, and the Y-Axis labels get moved down so that they aren't in the center of the Y-Axis. I've verified that in earlier versions the code works as expected.
To complicate this further, if I try this on a different machine, I don't have the problem. The only significant difference between the configurations of the two machines is that the dysfunctional one has two monitors and the working one has only one. Any ideas on why Matlab 2014b and my computer could be doing this? I really like the HG2 graphical engine, but if I can't print the better looking graphics, then Matlab 2014b sadly won't be usable for me.
figure;
subplot(2,1,1)
bar([1,2,3],[3,2,1])
xlabel('Plot 1 X')
ylabel('Plot 1 Y')
legend('Example Legend')
subplot(2,1,2);
bar([1,2,3],[1,2,3])
ylabel('Plot 2 Y')
xlabel('Plot 2 X')
legend('Example Legend')
%Then maximize the plot either manually or programmatically so that everything has space
%MaxPlot(gcf)
set(gcf,'PaperPositionMode','auto')
print(gcf,'-dmeta','-r0')
%On one machine, the legends are now very messed up

採用された回答

Matt
Matt 2014 年 11 月 19 日
It turned out that the 'painters' renderer is used by default for the 'meta' print driver. To fix this, I'm using the 'zbuffer' renderer instead. I added the following to print.m right before the alternatePrintPath(pj) is called, and text is no longer moving around the screen.
if strcmp(pj.Driver,'meta')
pj.Renderer = 'zbuffer';
end
  2 件のコメント
Doug Hull
Doug Hull 2014 年 11 月 25 日
Actually, there is no longer a zbuffer renderer. It is going to OpenGL.
Jingwan
Jingwan 2015 年 3 月 24 日
I am experiencing the same problem. By using 'zbuffer' renderer does not solve it.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by