From octave-graphics-request at bevo dot che dot wisc dot edu Tue Apr 22 10:25:30 2003 Subject: imagesc with gnuplot 3.8 From: Eric Chassande-Mottin To: octave-graphics at bevo dot che dot wisc dot edu Date: Tue, 22 Apr 2003 06:37:38 -0500 hi octavers, i thought that others could be interested in this customized version of imagesc using the pm3d package of gnuplot 3.8. this allows to have a colored plot WITH axis. please use/modify it if you find it useful. cheers, é. ============================================================== function my_imagesc(d,cb); % make an image plot % cb=0 : no color box, cb=1 : put color box if nargin<2 cb=1; end; [r c]=size(d); #graw('set pm3d at t\n'); graw('set pm3d at b\n'); graw('unset surface\n'); graw('set isosamples 100\n'); graw('set samples 100\n'); #graw('set view 180,0,1.2\n') graw('set view 0,0,1.2\n') graw('set palette rgbformulae 30,31,32\n'); if (cb==1) graw('set colorbox vert user origin .05,.235 size 0.04,0.57\n'); else graw('unset colorbox\n'); end; eval(sprintf('gset xrange [0:%d];',r-1)); eval(sprintf('gset yrange [0:%d];',c-1)); gsplot d gset autoscale x gset autoscale y =============================================================