[Dart-dev] [4612] DART/trunk/diagnostics/matlab/plot_profile.m: Removed the transparency of the 'stripe' boxes that denote

nancy at ucar.edu nancy at ucar.edu
Fri Dec 17 16:04:01 MST 2010


Revision: 4612
Author:   thoar
Date:     2010-12-17 16:04:01 -0700 (Fri, 17 Dec 2010)
Log Message:
-----------
Removed the transparency of the 'stripe' boxes that denote
the definition of the vertical levels. After calling the 
'stripes' routine, the background axis and grid can be brought
to the foreground by setting the axis 'Layer' property to 'top'.
(this is what I tried to achieve by using transparency)

This had several positive effects:

1) using transparency required the use of the OpenGL renderer,
which is buggy and caused the output to be rasterized. Even the .ps files.
Fonts were not rendered as real fonts, it was just ugly.
Because the 'painters' renderer can be used again, the file sizes are 
quite compact. Files went from 11395232 bytes to 27223 bytes! AND they resize
better. Win-Win.

2) the OpenGL renderer had a bug in it that cause spurious label elements
to appear. For the dual-axis labels, I grab the ticks from the ones that are
'nice' and determine the corresponding values for the other value and create
and plot a character string to that effect. The OpenGL version had a bug
in it that left the 'multiplier' floating about. For example, the number of
observations is 10,000 for example. Matlab might plot it as 1.0 x 10^4.
I grab it and actually plot it as 10000 - but the OpenGL renderer left the
stupid x 10^4 string on the plot! Not good.

I have yet to hunt down all the other places this strategy is used.

Modified Paths:
--------------
    DART/trunk/diagnostics/matlab/plot_profile.m

-------------- next part --------------
Modified: DART/trunk/diagnostics/matlab/plot_profile.m
===================================================================
--- DART/trunk/diagnostics/matlab/plot_profile.m	2010-12-17 21:00:19 UTC (rev 4611)
+++ DART/trunk/diagnostics/matlab/plot_profile.m	2010-12-17 23:04:01 UTC (rev 4612)
@@ -265,7 +265,7 @@
    end
 
    Stripes(plotdat.Xrange, plotdat.level_edges);
-   set(ax1,'YDir', plotdat.YDir,'YTick',plotdat.level)
+   set(ax1,'YDir', plotdat.YDir,'YTick',plotdat.level,'Layer','top')
    ylabel(plotdat.level_units)
 
    %% draw the result of the experiment
@@ -506,8 +506,6 @@
 for i = 1:2:(length(edges)-1)
   yc = [ edges(i) edges(i) edges(i+1) edges(i+1) edges(i) ];
   hf = fill(xc,yc,[0.8 0.8 0.8],'EdgeColor','none');
-  set(hf,'FaceAlpha',0.3,'EdgeAlpha',0.3)
-  set(hf,'AlphaDataMapping','none','FaceVertexAlphaData',0.3)
 end
 set(gca,'XGrid','on')
 hold off;


More information about the Dart-dev mailing list