Mercurial > hg > octave-nkf
diff scripts/plot/__plt__.m @ 5741:07421c4e0312
[project @ 2006-04-05 19:28:35 by jwe]
author | jwe |
---|---|
date | Wed, 05 Apr 2006 19:28:35 +0000 |
parents | b2e882e8b68b |
children | 85c7dc4afe6b |
line wrap: on
line diff
--- a/scripts/plot/__plt__.m +++ b/scripts/plot/__plt__.m @@ -56,11 +56,15 @@ if (x_set) fmt = __pltopt__ (caller, next_arg); if (y_set) - [__plot_data__{__current_figure__}{__multiplot_xi__,__multiplot_yi__}{j}, fmtstr] = __plt2__ (x, y, fmt); + [tdata, tfmtstr] = __plt2__ (x, y, fmt); else - [__plot_data__{__current_figure__}{__multiplot_xi__,__multiplot_yi__}{j}, fmtstr] = __plt1__ (x, fmt); + [tdata, tfmtstr] = __plt1__ (x, fmt); endif - have_data = true; + if (! isempty (tdata)) + __plot_data__{__current_figure__}{__multiplot_xi__,__multiplot_yi__}{j} = tdata; + fmtstr = tfmtstr; + have_data = true; + endif x_set = false; y_set = false; else @@ -69,8 +73,12 @@ elseif (x_set) if (y_set) fmt = __pltopt__ (caller, ""); - [__plot_data__{__current_figure__}{__multiplot_xi__,__multiplot_yi__}{j}, fmtstr] = __plt2__ (x, y, fmt); - have_data = true; + [tdata, tfmtstr] = __plt2__ (x, y, fmt); + if (! isempty (tdata)) + __plot_data__{__current_figure__}{__multiplot_xi__,__multiplot_yi__}{j} = tdata; + fmtstr = tfmtstr; + have_data = true; + endif x = next_arg; y_set = false; else @@ -105,10 +113,10 @@ __plot_data_offset__{__current_figure__}(__multiplot_xi__,__multiplot_yi__) = j; - if (! isempty (__plot_command__{__current_figure__}{__multiplot_xi__,__multiplot_yi__})) - if (__multiplot_mode__) - __gnuplot_raw__ ("clear\n"); - endif + if (__multiplot_mode__) + __gnuplot_raw__ ("clear\n"); + endif + if (! strcmp (__plot_command__{__current_figure__}{__multiplot_xi__,__multiplot_yi__}, "__gnuplot_plot__")) eval (__plot_command__{__current_figure__}{__multiplot_xi__,__multiplot_yi__}); endif