[Dart-dev] [3224] DART/trunk/diagnostics/matlab: These files have
been moved from DART /matlab to DART/diagnostics/matlab
thoar at subversion.ucar.edu
thoar at subversion.ucar.edu
Mon Feb 11 23:35:28 MST 2008
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/dart-dev/attachments/20080211/2cc3cc05/attachment-0001.html
-------------- next part --------------
Copied: DART/trunk/diagnostics/matlab/PlotObsLocs.m (from rev 3223, DART/trunk/matlab/PlotObsLocs.m)
===================================================================
--- DART/trunk/diagnostics/matlab/PlotObsLocs.m (rev 0)
+++ DART/trunk/diagnostics/matlab/PlotObsLocs.m 2008-02-12 06:35:28 UTC (rev 3224)
@@ -0,0 +1,568 @@
+function phandle = PlotObsLocs(in_dartqc, in_box, in_typelist, in_epochlist, ...
+ in_subset, in_plotd, in_world, in_invertz, in_writeplot, ...
+ in_legend2dloc, in_legend3dloc, in_viewlist)
+% PLOTOBSLOCS - Plot an observation_locations.NNN.dat file as output from the latest obs_diag program in DART.
+% (You must enable an obs_diag_nml namelist entry to get the output files;
+% they are not created by default.)
+%
+% warning: this has a very long argument list, because it is intended that
+% it be called from another program or function. all the arguments can be
+% replaced by the character string 'default' to use the internal defaults.
+%
+% usage:
+% PlotObsLocs(in_dartqc, in_box, in_typelist, in_epochlist, in_subset,
+% in_plotd, in_world, in_invertz, in_writeplot,
+% in_legend2dloc, in_legend3dloc, in_viewlist)
+%
+% where:
+%
+% in_dartqc = 0 all OK (default)
+% 1 Evaluated only
+% 2 OK but posterior forward operator failed
+% 3 Evaluated only, BUT posterior forward operator failed.
+% 4 prior forward operator failed
+% 5 not used because of namelist control
+% 6 prior qc rejected
+% 7 outlier rejected
+% a negative value means everything "up to" that value, i.e.
+% -3 == 0, 1, 2, and 3
+%
+% in_box = optional bounding box [xmin xmax ymin ymax] for 2d or
+% [xmin xmax ymin ymax zmin zmax] for 3d. default is max extent of
+% the data, or 0:360/-90:90 if in_world is true
+%
+% in_typelist = list of integer observation types to plot. all types
+% are plotted by default. (hint: examine the end of
+% the ObsDiagAtts.m file which is created by the obs_diag
+% program to see what number is used for each observation type.)
+%
+% in_epochlist = list of integer time epochs to plot. output from obs_diag
+% program creates multiple files starting at 1 for each time
+% period. default is all.
+%
+% in_subset = number of points to plot for each observation type. a subset
+% of the observations is randomly selected to thin down very
+% large observation files. the default is to plot all.
+%
+% in_plotd = 2 or 3 for 2d or 3d plot, respectively. default is 2d.
+%
+% in_world = 0 for no, 1 for yes. if true, plot the outlines of the continents
+% of the world on a lon/lat grid. default is yes.
+%
+% in_invertz = 0 for no, 1 for yes. if true, invert the Z axis. pressure
+% levels, for example, are largest at the earth's surface and
+% decrease as you go up. default is no.
+%
+% in_writeplot = 0 for no, 1 for yes. if true, write out each plot in a
+% color postscript file. default is no. warning -- this can
+% be slow and the files can be large for very large numbers of
+% observations.
+%
+% in_legend2dloc = where to put the legend box which shows the plot markers
+% for each observation type. the default values are often
+% directly over a region of interest and so far it has seemed
+% impossible to find a completely satisfactory default.
+% type 'help legend' to get a list of possible strings.
+% this is used for a 2d plot.
+%
+% in_legend3dloc = where to put the legend box which shows the plot markers
+% for each observation type. the default values are often
+% directly over a region of interest and so far it has seemed
+% impossible to find a completely satisfactory default.
+% type 'help legend' to get a list of possible strings.
+% this is used for a 3d plot.
+%
+% in_viewlist = [az el; az el; az el; ...] list of viewpoints for 3d plotting.
+% the default is 2 views of each plot at [10 10; 10 80 ].
+% [0 90] [90 0] and [0 0] may be interesting options.
+% the 3d plots can be rotated interactively and the [az el] is
+% printed in the lower left corner during the rotation; these
+% views can be used to create .ps files if you are saving the
+% plots to a file or if you want the same viewpoints reused.
+
+% Data Assimilation Research Testbed -- DART
+% Copyright 2004-2007, Data Assimilation Research Section
+% University Corporation for Atmospheric Research
+% Licensed under the GPL -- www.gpl.org/licenses/gpl.html
+%
+% <next few lines under version control, do not edit>
+% $URL$
+% $Id$
+% $Revision$
+% $Date$
+
+% data subset selections:
+% used vs unused (or both) obs
+% subregions - lon, lat, height min/max
+% obs type list
+% random subset to thin data
+% epoch list
+%
+% plot type and output format:
+% 2d or 3d plot
+% not lat/lon (no world map)
+% create .ps files for output or not
+
+
+% defaults for everything that has code to handle alternatives below.
+% suggestion - leave the defaults alone and in the next section overwrite
+% the values with alternative values.
+
+% TODO:
+% box should change to box_type, and options are:
+% world
+% CONUS (continental US)
+% tight (take min/max of data)
+% user_specified (prompt user for 4 or 6 corners)
+%
+
+arg_used = 0; % dart QC values to use ... see in_dartqc table above
+arg_box = []; % [[lon_min, lon_max, lat_min, lat_max], v_min, v_max]
+arg_typelist = []; % numeric observation type list; if ~[], integer list
+arg_epochlist = []; % list of epochs to process; if ~[], integer list
+arg_subset = 0; % random subset to thin data; if > 0, how many to keep
+arg_plotd = 2; % 2 = 2d, 3 = 3d
+arg_world = 1; % worldwide (lon/lat) locations, plot over map (0=no)
+arg_invertz = 0; % for 3d plot, 1=z axis plots N to 0, 0 = 0 to N
+arg_writeplot = 0; % write out postscript plot files (1=yes)
+arg_legend2dloc = 'SouthWest'; % where on the plot to plop the 2d legend box
+arg_legend3dloc = 'NorthWest'; % where on the plot to plop the 3d legend box
+ % see matlab doc for alternatives
+arg_viewlist = [10 10; 10 80; ];
+ % default viewpoints for 3D plots.
+ % [90 0], [0 90] and [0 0] are also good.
+
+ ncfname = 'obs_diag_output.nc';
+
+% get the values from the arguments and fill them in:
+if (~isa(in_dartqc,'char'))
+ arg_used = in_dartqc;
+end
+if (~isa(in_box,'char'))
+ arg_box = in_box;
+end
+if (~isa(in_typelist,'char'))
+ arg_typelist = in_typelist;
+end
+if (~isa(in_epochlist,'char'))
+ arg_epochlist = in_epochlist;
+end
+if (~isa(in_subset,'char'))
+ arg_subset = in_subset;
+end
+if (~isa(in_plotd,'char'))
+ arg_plotd = in_plotd;
+end
+if (~isa(in_world,'char'))
+ arg_world = in_world;
+end
+if (~isa(in_invertz,'char'))
+ arg_invertz = in_invertz;
+end
+if (~isa(in_writeplot,'char'))
+ arg_writeplot = in_writeplot;
+end
+if (~strcmp(in_legend2dloc,'default'))
+ arg_legend2dloc = in_legend2dloc;
+end
+if (~strcmp(in_legend3dloc,'default'))
+ arg_legend3dloc = in_legend3dloc;
+end
+if (~isa(in_viewlist,'char'))
+ arg_viewlist = in_viewlist;
+end
+
+
+%-----------
+
+
+% if user specified an epoch list, use only those.
+% else, get the number from the netcdf file
+if (~isequal(arg_epochlist,[]))
+ epochlist = arg_epochlist;
+else
+ epochtime = getnc(ncfname,'time');
+ epochbnds = getnc(ncfname,'time_bounds');
+ epochlist = 1:length(epochtime);
+end
+
+% for each epoch file given or that we find:
+for epoch = epochlist
+
+ % get data in and ignore the 1 header line. using textread brings in
+ % the data as a single long 1-D array, so i use reshape and then transpose
+ % to get it into the original [N 6] matrix shape.
+
+ % this assumes the data is in a series of files named
+ % 'observation_locations.NNN.dat', where NNN is epoch 001, 002, etc
+ % the latest updates to the obs_diag program create these files
+ % if the 'print_obs_locations' namelist entry is set to .true.
+ %
+
+ datafile = sprintf('observation_locations.%03d.dat', epoch);
+
+ try
+ r = textread(datafile, '%f', 'headerlines', 1);
+ catch
+ % last file found
+ break
+ end
+
+ % format of the data in these files must be:
+ % lon lat ivert flavor key used
+ t = reshape(r, 6, []);
+ s = transpose(t);
+
+ % start each plot clean
+ clf;
+
+ % load the strings generated at the same time as the locations
+ % this includes the text description of what the observation was
+ % in the 'Observation_Kind()' array. (this file is produced by
+ % running obs_diag -- full name is ObsDiagAtts.m)
+
+ Observation_Kind = getnc(ncfname,'ObservationTypes');
+
+ % Use a different marker and color for each observation type
+ % (12*6) = 72 combinations at the moment. Could extend these
+ % by cycling through the 'fillable' symbols and filling ...
+ symbols = [double('o'),double('s'),double('d'),double('v'), ...
+ double('^'),double('<'),double('>'),double('p'), ...
+ double('h'),double('x'),double('+'),double('*')];
+ colors = [double('b'),double('r'),double('c'), ...
+ double('m'),double('g'),double('k')];
+ [smat,cmat] = meshgrid(symbols,colors);
+ markers = strcat([cmat(:) smat(:)]);
+
+ % setup before looping over observations:
+ mobs = max(s(:,4)); % max obs type number found in file
+ nobstypes = 0; % running count of obs types found
+ lmax = 0; % largest level found
+ obs_labels = {}; % legend labels
+
+ % if we are only looking at specific observation types loop over those.
+ % otherwise generate a list from 1 to the largest kind number found in
+ % the input file and loop over those.
+ if (~isequal(arg_typelist,[]))
+ obslist = arg_typelist;
+ else
+ obslist = 1 : mobs;
+ end
+
+ if (length(obslist) > length(markers))
+ disp(sprintf('There are %d observation types',length(obslist)))
+ disp(sprintf('There are %d marker symbols',length(markers)))
+ error('Too many observation types to uniquely identify ... stopping.')
+ end
+
+ % loop over observation types, plotting each in 2d or 3d with
+ % a different marker.
+ for obs = obslist
+
+ % select only this obs type, and cycle if there are none
+ thisobs = s(s(:, 4) == obs, :);
+ if (isequal(thisobs,[]))
+ continue;
+ end
+
+ % select the rows we want to plot, optionally with a variety
+ % of subsetting. function form is:
+ % out = select_subset(rawdata_in, used/unused, boundingbox, subset_count)
+ l = select_subset(thisobs, arg_used, arg_box, arg_subset);
+
+ % if there are any of this obs type left, plot them
+ if (size(l, 1) ~= 0)
+ if (arg_plotd == 2)
+ % 2d plot of (lon,lat):
+ phandle = plot(l(:,1),l(:,2),markers(obs,:));
+ else
+ % 3D plot of (lon,lat,level):
+ phandle = plot3(l(:,1),l(:,2),l(:,3),markers(obs,:));
+ thismax = max(l(:,3));
+ lmax = max(lmax, thismax); % save overall max height for axis
+ end
+
+ hold on; % accumulate on same plot
+
+ % add this observation type to the legend string array
+ nobstypes = nobstypes + 1;
+
+ obs_labels{nobstypes} = deblank(Observation_Kind(obs,:));
+
+ end % if data of this observation type exists
+
+ end % for obslist
+
+
+ % if this is a world map plot, add in an outline map of
+ % the continents and set default size to 0/360,-90/90 (which can
+ % be overridden with the box argument). if not world, default to
+ % the data min/max or the box argument.
+
+ % use the first 4 items for a 2d plot, all (6) for 3d;
+ % arg_box is the user override; use_box is either the
+ % users choice or our default.
+ use_box = [];
+ if (~isequal(arg_box, []))
+ if (arg_plotd == 2)
+ use_box = arg_box(1:4);
+ else
+ if (size(arg_box,2) > 4)
+ use_box = arg_box;
+ else
+ if (lmax == 0)
+ lmax = 1;
+ end
+ use_box = [arg_box 0 lmax];
+ end
+ if (arg_invertz == 1)
+ set(gca,'ZDir','reverse');
+ end
+ end
+ else
+ if (arg_world)
+ if (arg_plotd == 2)
+ use_box = [0 360 -90 90];
+ else
+ if (lmax == 0)
+ lmax = 1;
+ end
+ use_box = [0 360 -90 90 0 lmax];
+ if (arg_invertz == 1)
+ set(gca,'ZDir','reverse');
+ %set(gca,'ZScale','log');
+ end
+ end
+ end
+ end
+
+ % if we actually set something, use it to constrain the axis limits.
+ if (~isequal(use_box, []))
+ axis(use_box);
+ end
+ axis image; % set aspect ratio dx ~= dy ... cylindrical equidistant
+
+ % set legend, and try to shrink the original size of the legend bounding box
+ % because it is pretty large by default. a 'good' location depends on the
+ % kind of plot, and even so this may be something you want to override
+ % depending on where in the plot the interesting data falls.
+ if (arg_plotd == 2)
+ legendloc = arg_legend2dloc;
+ else
+ legendloc = arg_legend3dloc;
+ end
+
+ % If you have Matlab v6.5 or before, this must be split into 2 lines
+ % Matlab v7.0+ requires it all in one go. Anyone know a way which works for both?
+ myversion = ver('matlab');
+ if (str2num(myversion.Version) <= 6.5)
+ h = legend( obs_labels );
+ legend( h, 'Location', legendloc, 'Interpreter', 'none', 'FontSize', 8);
+ else
+ legend( obs_labels , 'Location', legendloc, 'Interpreter', 'none', 'FontSize', 8);
+ end
+
+ % example of how to escape only underscores if we still want to use tex
+ % in the strings. (instead of turning the interpreter off completely).
+ %h=title(strrep(Observation_Kind(obs),'_','\_'));
+
+ % whole world in (lon, lat) degree coords
+ if (arg_world)
+
+ % add a 2D plot of the world continent outlines
+ worldmap(lmax);
+
+ % these plots are generally longer than high, and add 3d-box.
+ % orient landscape;
+ set(gca, 'Box', 'on');
+
+ % various attempts to make the x/y axis have the same spacing per degree
+ % but shrink the vertical because it can be much larger. but all these
+ % did strange things to the viewpoint so i am giving up on them for now.
+ %axis equal;
+
+ %vert = lmax / 100;
+ %set(gca, 'DataAspectRatio', [1 1 vert], 'PlotBoxAspectRatio', [1 1 vert], 'Box', 'on');
+ %set(gca, 'DataAspectRatio', [1 1 10], 'Box', 'on');
+
+ xlabel('Longitude (degrees)', 'FontSize', 14);
+ ylabel('Latitude (degrees)', 'FontSize', 14);
+ if (arg_plotd == 3)
+ zlabel('Height (units = ?)', 'FontSize', 14);
+ end
+ else
+ xlabel('First coordinate', 'FontSize', 14);
+ ylabel('Second coordinate', 'FontSize', 14);
+ if (arg_plotd == 3)
+ zlabel('Third coordinate', 'FontSize', 14);
+ end
+ end
+
+ % add input filename somewhere?
+ % text()
+
+ % make it look roughly like it will when printed.
+ wysiwyg;
+
+
+ if (arg_used < 0)
+ tstring = sprintf('Obs Locs for Epoch %d with DART QC values <= %d', ...
+ epoch, abs(arg_used));
+ elseif (arg_used >= 0)
+ tstring = sprintf('Obs Locs for Epoch %d with DART QC value == %d', ...
+ epoch, arg_used);
+ end
+
+ if (arg_subset > 0)
+ nstring = sprintf(', %d random obs per type', arg_subset);
+ tstring = strcat(tstring, nstring);
+ end
+
+ title(tstring, 'FontSize', 16);
+
+
+ % if 3d plot, turn on grid and view for interactive look
+ if (arg_plotd == 3)
+ grid on;
+ % set up viewlist as: arg_viewlist = [ az el; az el; ... ];
+ for v = 1 : size(arg_viewlist, 1)
+ view(arg_viewlist(v, :));
+
+ disp('Pausing. Hit any key to continue');
+ pause;
+ end
+ else
+ disp(sprintf('Pausing on epoch %d of %d. Hit any key to continue ...', ...
+ epoch,length(epochlist)));
+ pause;
+ end
+
+ % save plots into files. 2d has only 1 plot; 3d has many possible
+ % view angles -- you can set a list and get multiple plots out.
+ if (arg_writeplot)
+ if (arg_plotd == 2)
+ fname = sprintf('2d_locations_epoch%.03d.ps', epoch);
+ print('-dpsc', fname);
+ else
+
+ % set up viewlist as: arg_viewlist = [ az el; az el; ... ];
+ for v = 1 : size(arg_viewlist, 1)
+ view(arg_viewlist(v, :));
+ fname = sprintf('3d_locations%d_epoch%.03d.ps', v, epoch);
+ print('-dpsc', fname);
+ end
+
+ end % 2d vs 3d
+ end % create .ps files?
+
+end % for epoch (main loop)
+
+disp('Plots done.');
+
+end % function PlotObsLoc3D
+
+
+%------------------------------------------------------
+% given a raw data array and possible selectors, return
+% the subset of rows which match.
+
+function out = select_subset(raw, used, box, number)
+
+% default is to assume we found no data. set it at the
+% end if we get there.
+out = [];
+
+% make sure some data is passed in before trying to subset it
+if (isequal(raw, []))
+ fprintf('no observations passed into select_subset\n');
+ return
+end
+
+% select based on dart QC flag
+% -99 implies everything, -3 implies 0,1,2,3
+if (used < 0)
+ data = raw(raw(:,6) <= abs(used),:);
+elseif (used >= 0)
+ data = raw(raw(:,6) == used ,:);
+end
+
+if (isequal(data, []))
+ fprintf('all observations removed after used/unused selection\n');
+ return
+end
+
+% select subset by area if one is given
+if (~isequal(box, []))
+ data = data(data(:, 1) > box(1), :); % lon min/max
+ data = data(data(:, 1) < box(2), :);
+ data = data(data(:, 2) > box(3), :); % lat min/max
+ data = data(data(:, 2) < box(4), :);
+ if (size(box,2) > 4)
+ data = data(data(:, 3) > box(5), :); % vertical if given
+ data = data(data(:, 3) < box(6), :);
+ end
+end
+
+if (isequal(data, []))
+ fprintf('all observations removed after bounding box selection\n');
+ return
+end
+
+
+% select a random subset of the remaining values
+numleft = size(data, 1);
+if ((number > 0) && (numleft > number))
+ % but cannot have repeats in list
+ sel = sort(pickme(number, numleft));
+ if (~isequal(sel, []))
+ data = data(sel, :);
+ end
+end
+
+if (isequal(data, []))
+ fprintf('all observations removed after random subset selection\n');
+ return
+end
+
+out = data;
+
+end % function out = select_subset(raw, used, box, number)
+
+%------------------------------------------------------
+% generate a list of R random numbers between 1 and N
+% (inclusive) with *no* repeats. Return them in sorted order.
+function list = pickme(R, N)
+
+% assume failure until assured otherwise.
+list = [];
+
+% test for infinite loop
+if (R > N)
+ fprintf('cannot select %d unique values between 1 and %d\n', R, N);
+ return
+end
+
+% ok, get started.
+selections = zeros(R, 1);
+picked = zeros(N, 1);
+next = 0;
+
+while (next < R)
+ % generate a random candidate, but if it has already been
+ % selected, cycle.
+ candidate = ceil(N .* rand);
+ if (picked(candidate) == 1)
+ continue;
+ end
+
+ % running count of how many we have
+ next = next + 1;
+ selections(next) = candidate;
+ picked(candidate) = 1;
+
+end
+
+list = selections;
+
+end % function list = pickme(R, N)
+
Copied: DART/trunk/diagnostics/matlab/plot_observation_locations.m (from rev 3223, DART/trunk/matlab/plot_observation_locations.m)
===================================================================
--- DART/trunk/diagnostics/matlab/plot_observation_locations.m (rev 0)
+++ DART/trunk/diagnostics/matlab/plot_observation_locations.m 2008-02-12 06:35:28 UTC (rev 3224)
@@ -0,0 +1,157 @@
+% PLOT_OBSERVATION_LOCATIONS : Plots the locations of the input observations
+%
+% By default this command creates 2d plots of observation locations,
+% one per time epoch, from data output from the obs_diag program if
+% the 'print_obs_locations' namelist item in the &obs_diag list is .true.
+%
+% There are lots of user settable options. This script prompts you
+% interactively for the most common ones. Then it calls PlotObsLocs()
+% with the proper argument list to pass in your selections.
+%
+% See the documentation for PlotObsLocs() -- it has a lot of arguments in the
+% calling sequence.
+
+% Data Assimilation Research Testbed -- DART
+% Copyright 2004-2007, Data Assimilation Research Section
+% University Corporation for Atmospheric Research
+% Licensed under the GPL -- www.gpl.org/licenses/gpl.html
+%
+% <next few lines under version control, do not edit>
+% $URL$
+% $Id$
+% $Revision$
+% $Date$
+
+% setup all args to be the string 'default', which will be interpreted by
+% the PlotObsLocs routine to use the default values.
+
+plotd = 'default';
+ncfname = 'default';
+used = 'default';
+typelist = 'default';
+box = 'default';
+epochs = 'default';
+subset = 'default';
+world = 'default';
+writeplot = 'default';
+loc2dstring = 'default';
+loc3dstring = 'default';
+viewlist = 'default';
+invertz = 'default';
+
+% what the arg list looks like:
+%PlotObsLocs(in_used, in_box, in_typelist, in_epochlist, in_subset, in_plotd, in_world, in_invertz, in_writeplot, in_legend2dloc, in_legend_3dloc, in_viewlist)
+
+done = 0;
+disp('Plot observations at their proper locations. Many subsetting options exist.');
+disp('Hitting <cr> to answer the questions will use the default value,');
+disp('or - once you have made a selection - reuse the previous value.');
+disp(' ');
+disp('The default plotting options are:');
+disp(' 2D plot, full world map, all obs types, all times, ');
+disp(' no file output, Z axis increases up.');
+disp(' ');
+
+ % What file has the metadata
+ reply = input('Enter the netCDF file name with the metadata: ');
+ if (~isempty(reply))
+ ncfname = reply;
+ end
+
+% loop and keep the previous default until the user says to quit
+while done == 0
+
+ % 2D or 3D plot?
+ reply = input('Input 2 for 2D plot, 3 for 3D plot: ');
+ if (~isempty(reply))
+ plotd = reply;
+ end
+
+
+ % plot used, unused, or both
+ disp('')
+ disp('DART QC Values ... 0 == all OK')
+ disp('DART QC Values ... 1 == Evaluated only')
+ disp('DART QC Values ... 2 == OK but posterior forward operator failed')
+ disp('DART QC Values ... 3 == Evaluated only, BUT posterior forward operator failed')
+ disp('DART QC Values ... 4 == prior forward operator failed')
+ disp('DART QC Values ... 5 == not used because of namelist control')
+ disp('DART QC Values ... 6 == prior qc rejected')
+ disp('DART QC Values ... 7 == outlier rejected')
+ disp(' a negative value means everything ''up to'' that value, i.e.')
+ disp(' -3 == 0, 1, 2, and 3 -99 == everything');
+ reply = input('Input DART QC val: ');
+ if (~isempty(reply))
+ used = reply;
+ end
+
+ % restrict observations to a particular observation type?
+ disp('')
+ reply = input('Input [obs type list] to plot only some obs types, ''default'' to reset: ');
+ if (~isempty(reply))
+ typelist = reply;
+ end
+
+ % restrict observations to a particular subregion?
+ reply = input('Input [xmin xmax ymin ymax] for bounding box, ''default'' to reset: ');
+ if (~isempty(reply))
+ box = reply;
+ end
+
+ % restrict input to particular time epochs?
+ reply = input('Input [epoch list] for particular times, ''default'' to reset: ');
+ if (~isempty(reply))
+ epochs = reply;
+ end
+
+ % sample data to reduce counts?
+ reply = input('Input count for random subset of each obs type, ''default'' to reset: ');
+ if (~isempty(reply))
+ subset = reply;
+ end
+
+ % plot world map beneath?
+ reply = input('Input 0 to remove world map, 1 to restore it: ');
+ if (~isempty(reply))
+ world = reply;
+ end
+
+ % write out .ps files?
+ reply = input('Input 1 to write .ps files for each plot, 0 to reset: ');
+ if (~isempty(reply))
+ writeplot = reply;
+ end
+
+ % legendloc
+ reply = input('Input Matlab string for legend location, ''default'' to reset: ');
+ if (~isempty(reply))
+ if (plotd == 3)
+ loc3dstring = reply;
+ else
+ loc2dstring = reply;
+ end
+ end
+
+ % viewlist and invert z axis
+ invertz = 1;
+ if (plotd == 3)
+ reply = input('Input [az el; az el] list for 3d views, ''default'' to reset: ');
+ if (~isempty(reply))
+ viewlist = reply;
+ end
+
+ reply = input('Input 1 to invert Z axis (e.g. for pressure); 0 otherwise: ');
+ if (~isempty(reply))
+ invertz = reply;
+ end
+ end
+
+ PlotObsLocs(used, box, typelist, epochs, subset, plotd, world, invertz, writeplot, loc2dstring, loc3dstring, viewlist)
+
+ reply = input('Quit now or plot again? 1 = quit, <cr> plots again: ');
+ if (~isempty(reply))
+ done = reply;
+ end
+
+end
+
More information about the Dart-dev
mailing list