User Tools

Site Tools


isis:slxfig:plotimage2

xfig plot image 'xfig_plot_image'

   % Example 1: logscale
   variable x = [PI:10*PI:#100];
   variable y = [PI:5*PI:#80];
   variable IMG = sin(x) # transpose(cos(y));
   variable xf = xfig_plot_image( IMG, x*180/PI, y*180/PI;
                                         padx=0.025, pady=0.025,
                                          dx=-.5,
                                         xlog, ylog,
                                          fill=20
                                        );
   xf.render("/tmp/test.pdf");

   % Example 2: image of Example 1 but with gaps
   variable tmp = [[1:30],[35:65],[75:115]];
   variable x = function/struct.html">struct{ lo = tmp/11.5*PI, hi = (tmp+1)/11.5*PI };
   tmp = [[1:40],[50:90]];
   variable y = function/struct.html">struct{ lo = tmp/18.*PI, hi = (tmp+1)/18.*PI };
   variable IMG = sin(x.lo) # transpose(cos(y.lo));
   variable xf = xfig_plot_image( IMG, x, y ; cmap="drywet");
   xf.render("/tmp/test.pdf");
isis/slxfig/plotimage2.txt · Last modified: 2016-08-17 10:24 by Sebastian Falkner