shingoushori's dialy

音信号処理を専ら研究していた元博士後期課程の学生によるメモ

MATLAB / Octaveで,二次元ヒストグラムを作図するとき,グリッド線を消す

タイプグリッドありグリッドなし
surf f:id:shingoushori:20130730103131j:plain f:id:shingoushori:20130730103127j:plain
pcolor f:id:shingoushori:20130730103139j:plain f:id:shingoushori:20130730103136j:plain

 

<ソースコード>

% set sample table
table=((1:16)-8)'*((1:16)-8);

% surf version
figure;surf(table);
saveas(gcf,'surf_edge_on.jpg');
figure;surf(table,'EdgeColor','none');
saveas(gcf,'surf_edge_off.jpg');

% pcolor version
figure;pcolor(table);
saveas(gcf,'pcolor_edge_on.jpg');
figure;hoge=pcolor(table);
set(hoge,'EdgeColor','none');
saveas(gcf,'pcolor_edge_off.jpg');

 

<コメント>

研究室内で話題になったので,調べてみた.
変数名EdgeColorは,MATLABのplot編集モードの右端のアイコン(Show Plot Tools and Dock Figure)で.こねくり回してEdgeで見当を付け,さらにgoogle検索で発見.
参考にしたサイトがこちら ↓
http://stackoverflow.com/questions/433312/how-to-draw-a-surf-graph-without-black-edges-in-matlab
http://www.mathworks.com/matlabcentral/newsreader/view_thread/170496
pcolorでは,引数として変数を変更できないのが残念.
surf,pcolorともに,octaveでも使用できました.