[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
contourf without contour lines
From: |
Kai Habel |
Subject: |
contourf without contour lines |
Date: |
Mon, 19 Nov 2007 22:54:21 +0100 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20070801) |
Hello,
with the current cvs I see no contour lines when I try:
contourf(peaks)
After applying the following patch this should work again.
ChangeLog:
2007-11-19 Kai Habel <address@hidden>
* plot/__go_draw_axes__.m: bug fix, to plot patch outline for rgb-
edgecolors.
--- __go_draw_axes__.m 2007-11-19 22:46:56.000000000 +0100
+++ __go_draw_axes__.m.new 2007-11-19 22:46:38.000000000 +0100
@@ -209,7 +209,8 @@
xminp = yminp = zminp = cminp = Inf;
xmax = ymax = zmax = cmax = -Inf;
xmin = ymin = zmin = cmin = Inf;
-
+ cmin = axis_obj.clim(1);
+ cmax = axis_obj.clim(2);
[view_cmd, view_fcn, view_zoom] = image_viewer ();
use_gnuplot_for_images = (ischar (view_fcn)
&& strcmp (view_fcn, "gnuplot_internal"));
@@ -564,34 +565,32 @@
have_cdata(data_idx) = false;
titlespec{data_idx} = "title \"\"";
usingclause{data_idx} = "";
- if (isfield (obj, "edgecolor") && isfield (obj, "cdata"))
- if (strncmp (obj.edgecolor, "flat", 4)
- || strncmp (obj.edgecolor, "interp", 6))
- if (ndims (obj.cdata) == 2
- && ((nr > 3 && size (obj.cdata, 2) == nc)
- || (size (obj.cdata, 1) > 1
- && size (obj.cdata, 2) == nc)))
+ if (strncmp (obj.edgecolor, "flat", 4)
+ || strncmp (obj.edgecolor, "interp", 6))
+ if (ndims (obj.cdata) == 2
+ && ((nr > 3 && size (obj.cdata, 2) == nc)
+ ||(size (obj.cdata, 1) > 1
+ && size (obj.cdata, 2) == nc)))
ccol = obj.cdata (:, i);
- elseif (ndims (obj.cdata) == 3)
- ccol = permute (obj.cdata (:, i, :), [1, 3, 2]);
+ elseif (ndims (obj.cdata) == 3)
+ ccol = permute (obj.cdata (:, i, :), [1, 3, 2]);
+ else
+ ccol = obj.cdata;
+ endif
+ if (strncmp (obj.edgecolor, "flat", 4))
+ if (numel (ccol) == 3)
+ color = ccol;
else
- ccol = obj.cdata;
- endif
- if (strncmp (obj.edgecolor, "flat", 4))
- if (numel (ccol) == 3)
- color = ccol;
- else
- r = 1 + round ((size (cmap, 1) - 1)
- * (ccol - clim(1))/(clim(2) - clim(1)));
- r = max (1, min (r, size (cmap, 1)));
- color = cmap(r, :);
- endif
- elseif (strncmp (obj.edgecolor, "interp", 6))
- warning ("\"interp\" not supported, using 1st entry of
cdata")
- r = 1 + round ((size (cmap, 1) - 1) * ccol(1));
+ r = 1 + round ((size (cmap, 1) - 1)
+ * (ccol - clim(1))/(clim(2) - clim(1)));
r = max (1, min (r, size (cmap, 1)));
- color = cmap(r,:);
+ color = cmap(r, :);
endif
+ elseif (strncmp (obj.edgecolor, "interp", 6))
+ warning ("\"interp\" not supported, using 1st entry of cdata")
+ r = 1 + round ((size (cmap, 1) - 1) * ccol(1));
+ r = max (1, min (r, size (cmap, 1)));
+ color = cmap(r,:);
endif
elseif (isfield (obj, "edgecolor") && isnumeric (obj.edgecolor))
color = obj.edgecolor;
- contourf without contour lines,
Kai Habel <=