comparison scripts/plot/gnuplot_drawnow.m @ 11587:c792872f8942

all script files: untabify and strip trailing whitespace
author John W. Eaton <jwe@octave.org>
date Thu, 20 Jan 2011 17:35:29 -0500
parents 8ac9687dbe9f
children d5bd2766c640
comparison
equal deleted inserted replaced
11586:12df7854fa7c 11587:c792872f8942
121 term = gnuplot_default_term (); 121 term = gnuplot_default_term ();
122 opts_str = ""; 122 opts_str = "";
123 else 123 else
124 ## Get the one word terminal id and save the remaining as options to 124 ## Get the one word terminal id and save the remaining as options to
125 ## be passed on to gnuplot. The terminal may respect the graphics 125 ## be passed on to gnuplot. The terminal may respect the graphics
126 ## toolkit. 126 ## toolkit.
127 [term, opts_str] = gnuplot_trim_term (term); 127 [term, opts_str] = gnuplot_trim_term (term);
128 term = lower (term); 128 term = lower (term);
129 if (strcmpi (term, "lua")) 129 if (strcmpi (term, "lua"))
130 ## Replace "lau tikz" with 130 ## Replace "lau tikz" with
131 term = "tikz"; 131 term = "tikz";
132 opts_str = strrep (opts_str, "tikz", ""); 132 opts_str = strrep (opts_str, "tikz", "");
133 endif 133 endif
134 endif 134 endif
135 135
167 if (! isempty (title_str)) 167 if (! isempty (title_str))
168 title_str = sprintf ("title \"%s\"", title_str); 168 title_str = sprintf ("title \"%s\"", title_str);
169 endif 169 endif
170 if (strcmp (term, "aqua")) 170 if (strcmp (term, "aqua"))
171 ## Adjust axes-label and tick-label spacing. 171 ## Adjust axes-label and tick-label spacing.
172 opts_str = sprintf ("%s font \"%s,%d\"", opts_str, 172 opts_str = sprintf ("%s font \"%s,%d\"", opts_str,
173 get (0, "defaultaxesfontname"), 173 get (0, "defaultaxesfontname"),
174 get (0, "defaultaxesfontsize") / 1.5); 174 get (0, "defaultaxesfontsize") / 1.5);
175 endif 175 endif
176 else 176 else
177 title_str = ""; 177 title_str = "";
178 endif 178 endif
179 179
180 if (! (any (strfind (opts_str, " size ") > 0) 180 if (! (any (strfind (opts_str, " size ") > 0)
181 || any (strfind (opts_str, "size ") == 1))) 181 || any (strfind (opts_str, "size ") == 1)))
182 ## Get figure size in pixels. Rely on listener to handle coversion. 182 ## Get figure size in pixels. Rely on listener to handle coversion.
183 units = get (h, "units"); 183 units = get (h, "units");
184 unwind_protect 184 unwind_protect
185 set (h, "units", "pixels"); 185 set (h, "units", "pixels");
243 if (all (screen_size > 0)) 243 if (all (screen_size > 0))
244 ## For X11, set the figure positon as well as the size 244 ## For X11, set the figure positon as well as the size
245 ## gnuplot position is UL, Octave's is LL (same for screen/window) 245 ## gnuplot position is UL, Octave's is LL (same for screen/window)
246 gnuplot_pos(2) = screen_size(2) - gnuplot_pos(2) - gnuplot_size(2); 246 gnuplot_pos(2) = screen_size(2) - gnuplot_pos(2) - gnuplot_size(2);
247 gnuplot_pos = max (gnuplot_pos, 1); 247 gnuplot_pos = max (gnuplot_pos, 1);
248 size_str = sprintf ("%s position %d,%d", size_str, 248 size_str = sprintf ("%s position %d,%d", size_str,
249 gnuplot_pos(1), gnuplot_pos(2)); 249 gnuplot_pos(1), gnuplot_pos(2));
250 endif 250 endif
251 endif 251 endif
252 else 252 else
253 size_str = ""; 253 size_str = "";