フィルターのクリア

plot grid in background

8 ビュー (過去 30 日間)
Matthias Pospiech
Matthias Pospiech 2012 年 2 月 21 日
I use the gridxy (<http://www.mathworks.com/matlabcentral/fileexchange/9973-gridxy-v2-2-feb-2008>) function (because the original grid can not be modified properly), which works very well.
But in this example the grid is painted in the foreground in the exported png:
figure(1); clf;
x = [0:0.1:10];
y = sin(xaxis*pi/2).*xaxis;
xtemp = [x(1) ; x(:) ; x(end)] ;
ytemp = [0 ; y(:) ; 0 ] ;
% plot
hplot = fill(xtemp,ytemp, 'b');
set(hplot, 'FaceColor' , [0.5, 0.5, 0.75])
set(hplot, 'EdgeColor' , [0, 0, 0.25])
hgrid = gridxy(get(gca,'XTick'),get(gca,'YTick'),'Color',[0.6 0.6 0.6],'Linestyle','--', 'LineWidth', 0.6);
print(gcf, '-r400', ['test' '.png'], '-dpng');
If I could attach the resulting png you would see the problem directly...

採用された回答

Matthias Pospiech
Matthias Pospiech 2012 年 3 月 4 日

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by