[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 3.0.1 release?
From: |
David Bateman |
Subject: |
Re: 3.0.1 release? |
Date: |
Tue, 12 Feb 2008 17:14:34 +0100 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20070914) |
Fredrik Lingvall wrote:
> John W. Eaton wrote:
>> Are there any critical patches that should be included or bugs that
>> should be fixed before we make 3.0.1?
>>
>> jwe
>>
> Is this fixed?
>
> http://www.cae.wisc.edu/pipermail/octave-maintainers/2008-January/005649.html
>
>
> /Fredrik
>
Well what about something like the attached? There are versions for both
Octave 3.0.x and the Mercurial HEAD.
Regards
David
--
David Bateman address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
*** ./scripts/image/__img__.m.orig1 2008-02-12 15:07:06.487808567 +0100
--- ./scripts/image/__img__.m 2008-02-12 15:41:13.070623166 +0100
***************
*** 54,60 ****
ca = gca ();
tmp = __go_image__ (ca, "cdata", img, "xdata", xlim, "ydata", ylim,
! varargin {:});
set (ca, "view", [0, 90]);
--- 54,60 ----
ca = gca ();
tmp = __go_image__ (ca, "cdata", img, "xdata", xlim, "ydata", ylim,
! "cdatamapping", "direct", varargin {:});
set (ca, "view", [0, 90]);
*** ./scripts/image/imagesc.m.orig1 2008-02-12 15:07:14.675860488 +0100
--- ./scripts/image/imagesc.m 2008-02-12 15:40:22.253340657 +0100
***************
*** 109,114 ****
--- 109,115 ----
endif
ret = image (ax, x, y, A);
+ set (ret, "cdatamapping", "scaled")
## use given limits or guess them from the matrix
if (length (limits) == 2 && limits(2) >= limits(1))
*** ./scripts/plot/__go_draw_axes__.m.orig1 2008-02-12 15:07:33.940982136
+0100
--- ./scripts/plot/__go_draw_axes__.m 2008-02-12 15:37:19.884303063 +0100
***************
*** 285,290 ****
--- 285,291 ----
yautoscale = strcmpi (axis_obj.ylimmode, "auto");
zautoscale = strcmpi (axis_obj.zlimmode, "auto");
cautoscale = strcmpi (axis_obj.climmode, "auto");
+ cdatadirect = false;
kids = axis_obj.children;
***************
*** 331,336 ****
--- 332,340 ----
if (use_gnuplot_for_images)
+ if (strcmp (obj.cdatamapping, "direct"))
+ cdatadirect = true;
+ endif
fputs (plot_stream, "set border front;\n");
data_idx++;
is_image_data(data_idx) = true;
***************
*** 495,500 ****
--- 499,507 ----
if (! isempty (obj.cdata))
cdat = obj.cdata;
+ if (strcmp (obj.cdatamapping, "direct"))
+ cdatadirect = true;
+ endif
else
cdat = [];
endif
***************
*** 836,841 ****
--- 843,851 ----
ydat = obj.ydata;
zdat = obj.zdata;
cdat = obj.cdata;
+ if (strcmp (obj.cdatamapping, "direct"))
+ cdatadirect = true;
+ endif
err = false;
if (! size_equal(zdat, cdat))
***************
*** 1043,1050 ****
fprintf (plot_stream, "set zrange [%.15e:%.15e] %s;\n", zlim, zdir);
endif
if (! any (isinf (clim)))
! fprintf (plot_stream, "set cbrange [%g:%g];\n", clim);
endif
if (strcmpi (axis_obj.box, "on"))
--- 1053,1066 ----
fprintf (plot_stream, "set zrange [%.15e:%.15e] %s;\n", zlim, zdir);
endif
+ cmap = parent_figure_obj.colormap;
+ cmap_sz = rows(cmap);
if (! any (isinf (clim)))
! if (cdatadirect)
! fprintf (plot_stream, "set cbrange [1:%d];\n", cmap_sz);
! else
! fprintf (plot_stream, "set cbrange [%g:%g];\n", clim);
! endif
endif
if (strcmpi (axis_obj.box, "on"))
***************
*** 1151,1158 ****
endfor
endif
- cmap = parent_figure_obj.colormap;
- cmap_sz = rows(cmap);
if (length(cmap) > 0)
if (have_newer_gnuplot)
fprintf (plot_stream,
--- 1167,1172 ----
*** ./src/graphics.cc.orig1 2008-02-12 14:53:02.802398705 +0100
--- ./src/graphics.cc 2008-02-12 15:32:26.022599847 +0100
***************
*** 2464,2470 ****
: base_properties (go_name, mh, p),
xdata (Matrix ()),
ydata (Matrix ()),
! cdata (Matrix ())
{ }
void
--- 2464,2471 ----
: base_properties (go_name, mh, p),
xdata (Matrix ()),
ydata (Matrix ()),
! cdata (Matrix ()),
! cdatamapping (radio_values ("{scaled}|direct"))
{ }
void
***************
*** 2490,2495 ****
--- 2491,2498 ----
set_ydata (val);
else if (name.compare ("cdata"))
set_cdata (val);
+ else if (name.compare ("cdatamapping"))
+ set_cdatamapping (val);
else
{
modified = false;
***************
*** 2513,2518 ****
--- 2516,2522 ----
m.assign ("xdata", xdata);
m.assign ("ydata", ydata);
m.assign ("cdata", cdata);
+ m.assign ("cdatamapping", cdatamapping);
return m;
}
***************
*** 2538,2543 ****
--- 2542,2549 ----
retval = ydata;
else if (name.compare ("cdata"))
retval = cdata;
+ else if (name.compare ("cdatamapping"))
+ retval = cdatamapping;
else
warning ("get: invalid property `%s'", name.c_str ());
***************
*** 2552,2557 ****
--- 2558,2564 ----
m["xdata"] = Matrix ();
m["ydata"] = Matrix ();
m["cdata"] = Matrix ();
+ m["cdatamapping"] = radio_property (radio_values ("{scaled}|direct"));
return m;
}
***************
*** 2567,2572 ****
--- 2574,2580 ----
ydata (Matrix ()),
zdata (Matrix ()),
cdata (Matrix ()),
+ cdatamapping (radio_values ("{scaled}|direct")),
faces (Matrix ()),
vertices (Matrix ()),
facecolor (radio_values ("{flat}|none|interp")),
***************
*** 2607,2612 ****
--- 2615,2622 ----
set_zdata (val);
else if (name.compare ("cdata"))
set_cdata (val);
+ else if (name.compare ("cdatamapping"))
+ set_cdatamapping (val);
else if (name.compare ("faces"))
set_faces (val);
else if (name.compare ("vertices"))
***************
*** 2657,2662 ****
--- 2667,2673 ----
m.assign ("ydata", ydata);
m.assign ("zdata", zdata);
m.assign ("cdata", cdata);
+ m.assign ("cdatamapping", cdatamapping);
m.assign ("faces", faces);
m.assign ("vertices", vertices);
m.assign ("facecolor", facecolor);
***************
*** 2697,2702 ****
--- 2708,2715 ----
retval = zdata;
else if (name.compare ("cdata"))
retval = cdata;
+ else if (name.compare ("cdatamapping"))
+ retval = cdatamapping;
else if (name.compare ("faces"))
retval = faces;
else if (name.compare ("vertices"))
***************
*** 2738,2743 ****
--- 2751,2757 ----
m["ydata"] = Matrix ();
m["zdata"] = Matrix ();
m["cdata"] = Matrix ();
+ m["cdatamapping"] = radio_property (radio_values ("{scaled}|direct"));
m["faces"] = Matrix ();
m["vertices"] = Matrix ();
m["facecolor"] = color_property ();
***************
*** 2766,2771 ****
--- 2780,2786 ----
ydata (Matrix ()),
zdata (Matrix ()),
cdata (Matrix ()),
+ cdatamapping (radio_values ("{scaled}|direct")),
facecolor (radio_values ("{flat}|none|interp")),
facealpha (1.0),
edgecolor (color_values (0, 0, 0), radio_values ("flat|none|interp")),
***************
*** 2804,2809 ****
--- 2819,2826 ----
set_zdata (val);
else if (name.compare ("cdata"))
set_cdata (val);
+ else if (name.compare ("cdatamapping"))
+ set_cdatamapping (val);
else if (name.compare ("facecolor"))
set_facecolor (val);
else if (name.compare ("facealpha"))
***************
*** 2850,2855 ****
--- 2867,2873 ----
m.assign ("ydata", ydata);
m.assign ("zdata", zdata);
m.assign ("cdata", cdata);
+ m.assign ("cdatamapping", cdatamapping);
m.assign ("facecolor", facecolor);
m.assign ("facealpha", facealpha);
m.assign ("edgecolor", edgecolor);
***************
*** 2888,2893 ****
--- 2906,2913 ----
retval = zdata;
else if (name.compare ("cdata"))
retval = cdata;
+ else if (name.compare ("cdatamapping"))
+ retval = cdatamapping;
else if (name.compare ("facecolor"))
retval = facecolor;
else if (name.compare ("facealpha"))
***************
*** 2925,2930 ****
--- 2945,2951 ----
m["ydata"] = Matrix ();
m["zdata"] = Matrix ();
m["cdata"] = Matrix ();
+ m["cdatamapping"] = radio_property (radio_values ("{scaled}|direct"));
m["facecolor"] = color_property ();
m["facealpha"] = 1.0;
m["edgecolor"] = color_property ("black");
*** ./src/graphics.h.in.orig1 2008-02-12 14:53:10.645453431 +0100
--- ./src/graphics.h.in 2008-02-12 15:22:45.531279955 +0100
***************
*** 738,743 ****
--- 738,749 ----
return data_property ();
}
+ virtual radio_property get_cdatamapping (void) const
+ {
+ error ("get: invalid property \"cdatamapping\"");
+ return radio_property ();
+ }
+
protected:
std::string tag;
std::string type;
***************
*** 1029,1034 ****
--- 1035,1046 ----
return props.get_cdata ();
}
+ radio_property get_cdatamapping (void) const
+ {
+ const base_properties& props = get_properties ();
+ return props.get_cdatamapping ();
+ }
+
private:
base_graphics_object *rep;
};
***************
*** 1749,1754 ****
--- 1761,1767 ----
data_property xdata l
data_property ydata l
data_property cdata l
+ radio_property cdatamapping a
END_PROPERTIES
static std::string go_name;
***************
*** 1844,1849 ****
--- 1857,1863 ----
data_property ydata l
data_property zdata l
data_property cdata l
+ radio_property cdatamapping a
octave_value faces
octave_value vertices
color_property facecolor a
***************
*** 1952,1957 ****
--- 1966,1972 ----
data_property ydata l
data_property zdata l
data_property cdata l
+ radio_property cdatamapping a
color_property facecolor a
octave_value facealpha
color_property edgecolor a
2008-02-12 David Bateman <address@hidden
* plot/__go_draw_axes__.m: Use the cdatamapping property to set
the cbrange.
* plot/__img__.m: Set cdatamapping to "direct".
* plot/imagesc.m: Set cdatamapping to "scaled".
2008-02-12 David Bateman <address@hidden
* graphics.h.in: Implement the cdatamapping property in patch,
surface and image objects.
* graphics.cc: ditto.
# HG changeset patch
# User David Bateman <address@hidden>
# Date 1202832588 -3600
# Node ID 1ca0b17a1bb6cfeaab3fb552eab106a0ba980706
# Parent 42cc16f26125f937f731dae785576821ee6eb5eb
Implement cdatamapping and respect to to allow correct image/imagesc rendering
diff -r 42cc16f26125 -r 1ca0b17a1bb6 scripts/ChangeLog
--- a/scripts/ChangeLog Tue Feb 12 13:36:07 2008 +0100
+++ b/scripts/ChangeLog Tue Feb 12 17:09:48 2008 +0100
@@ -1,8 +1,10 @@ 2008-02-12 David Bateman <address@hidden
2008-02-12 David Bateman <address@hidden
* plot/__go_draw_axes__.m: Set pm3d implict to fix colorbars on
- contour plots.
-
+ contour plots. Use the cdatamapping property to set the cbrange.
+ * plot/__img__.m: Set cdatamapping to "direct".
+ * plot/imagesc.m: Set cdatamapping to "scaled".
+
2008-02-08 Kostas Poulios <address@hidden>
* plot/__quiver__.m: make arrow head be in z-plane of the arrow
diff -r 42cc16f26125 -r 1ca0b17a1bb6 scripts/image/__img__.m
--- a/scripts/image/__img__.m Tue Feb 12 13:36:07 2008 +0100
+++ b/scripts/image/__img__.m Tue Feb 12 17:09:48 2008 +0100
@@ -54,7 +54,7 @@ function h = __img__ (x, y, img, varargi
ca = gca ();
tmp = __go_image__ (ca, "cdata", img, "xdata", xlim, "ydata", ylim,
- varargin {:});
+ "cdatamapping", "direct", varargin {:});
set (ca, "view", [0, 90]);
diff -r 42cc16f26125 -r 1ca0b17a1bb6 scripts/image/imagesc.m
--- a/scripts/image/imagesc.m Tue Feb 12 13:36:07 2008 +0100
+++ b/scripts/image/imagesc.m Tue Feb 12 17:09:48 2008 +0100
@@ -109,6 +109,7 @@ function ret = __imagesc__ (ax, x, y, A,
endif
ret = image (ax, x, y, A);
+ set (ret, "cdatamapping", "scaled")
## use given limits or guess them from the matrix
if (length (limits) == 2 && limits(2) >= limits(1))
diff -r 42cc16f26125 -r 1ca0b17a1bb6 scripts/plot/__go_draw_axes__.m
--- a/scripts/plot/__go_draw_axes__.m Tue Feb 12 13:36:07 2008 +0100
+++ b/scripts/plot/__go_draw_axes__.m Tue Feb 12 17:09:48 2008 +0100
@@ -291,6 +291,7 @@ function __go_draw_axes__ (h, plot_strea
yautoscale = strcmpi (axis_obj.ylimmode, "auto");
zautoscale = strcmpi (axis_obj.zlimmode, "auto");
cautoscale = strcmpi (axis_obj.climmode, "auto");
+ cdatadirect = false;
kids = axis_obj.children;
@@ -337,6 +338,9 @@ function __go_draw_axes__ (h, plot_strea
if (use_gnuplot_for_images)
+ if (strcmp (obj.cdatamapping, "direct"))
+ cdatadirect = true;
+ endif
fputs (plot_stream, "set border front;\n");
data_idx++;
is_image_data(data_idx) = true;
@@ -501,6 +505,9 @@ function __go_draw_axes__ (h, plot_strea
if (! isempty (obj.cdata))
cdat = obj.cdata;
+ if (strcmp (obj.cdatamapping, "direct"))
+ cdatadirect = true;
+ endif
else
cdat = [];
endif
@@ -1062,8 +1069,14 @@ function __go_draw_axes__ (h, plot_strea
fprintf (plot_stream, "set zrange [%.15e:%.15e] %s;\n", zlim, zdir);
endif
+ cmap = parent_figure_obj.colormap;
+ cmap_sz = rows(cmap);
if (! any (isinf (clim)))
- fprintf (plot_stream, "set cbrange [%g:%g];\n", clim);
+ if (cdatadirect)
+ fprintf (plot_stream, "set cbrange [1:%d];\n", cmap_sz);
+ else
+ fprintf (plot_stream, "set cbrange [%g:%g];\n", clim);
+ endif
endif
if (strcmpi (axis_obj.box, "on"))
@@ -1170,8 +1183,6 @@ function __go_draw_axes__ (h, plot_strea
endfor
endif
- cmap = parent_figure_obj.colormap;
- cmap_sz = rows(cmap);
if (length(cmap) > 0)
if (have_newer_gnuplot)
fprintf (plot_stream,
diff -r 42cc16f26125 -r 1ca0b17a1bb6 src/ChangeLog
--- a/src/ChangeLog Tue Feb 12 13:36:07 2008 +0100
+++ b/src/ChangeLog Tue Feb 12 17:09:48 2008 +0100
@@ -1,3 +1,8 @@ 2008-02-12 John W. Eaton <address@hidden
+2008-02-12 David Bateman <address@hidden
+
+ * graphics.h.in: Implement the cdatamapping property in patch and
+ image objects.
+
2008-02-12 John W. Eaton <address@hidden>
* pt-loop.cc (tree_simple_for_command::eval): Compute range
diff -r 42cc16f26125 -r 1ca0b17a1bb6 src/graphics.h.in
--- a/src/graphics.h.in Tue Feb 12 13:36:07 2008 +0100
+++ b/src/graphics.h.in Tue Feb 12 17:09:48 2008 +0100
@@ -2698,6 +2698,7 @@ public:
data_property xdata l , Matrix ()
data_property ydata l , Matrix ()
data_property cdata l , Matrix ()
+ radio_property cdatamapping a , "{scaled}|direct"
END_PROPERTIES
protected:
@@ -2814,6 +2815,7 @@ public:
data_property ydata l , Matrix ()
data_property zdata l , Matrix ()
data_property cdata l , Matrix ()
+ radio_property cdatamapping a , "{scaled}|direct"
color_property facecolor , "{flat}|none|interp"
double_property facealpha , 1.0
color_property edgecolor , color_property (color_values (0, 0, 0),
radio_values ("flat|none|interp"))
Re: 3.0.1 release?, Ben Abbott, 2008/02/12
Re: 3.0.1 release?, Fredrik Lingvall, 2008/02/13