# Bug 35511
%!test
%! figure ("visible", "off")
%! peaks ()
%! original_colormap = get (gcf (), "colormap");
%! colormap (copper)
%! reset (gcf ())
%! reset_colormap = get (gcf (), "colormap");
%! assert (reset_colormap, original_colormap)
%!test
%! clf ()
%! axes ()
%! original_linewidth = get (gca (), "linewidth");
%! set (gca (), "linewidth", 2)
%! reset (gca ())
%! reset_linewidth = get (gca (), "linewidth");
%! assert (reset_linewidth, original_linewidth);
%!test
%! clf ()
%! new_position = ceil (get (gcf (), "position") * 0.5);
%! set (gcf (), "position", new_position)
%! reset (gcf ())
%! assert (get (gcf (), "position"), new_position)
%!test
%! clf ()
%! original_color = get (gcf (), "color");
%! set (gcf (), "color", rand (1, 3))
%! reset (gcf ())
%! assert (original_color, get (gcf (), "color"))
%!test
%! clf ()
%! default_color = rand (1, 3);
%! set (0, "defaultfigurecolor", default_color)
%! set (gcf (), "color", rand (1, 3))
%! reset (gcf ())
%! assert (default_color, get (gcf (), "color"))

# Bug 42159
%!demo
%! clf ()
%! t1 = (1/16:1/8:1)' * 2*pi;
%! t2 = ((1/16:1/8:1)' + 1/32) * 2*pi;
%! x1 = sin (t1) - 0.8;
%! y1 = cos (t1);
%! x2 = sin (t2) + 0.8;
%! y2 = cos (t2);
%! pa = patch ([x1,x2], [y1,y2], 'r');
%! set (pa, 'vertices', get (0, 'defaultpatchvertices'))
%! Warning: Values in patch Faces must be in [1 : rows(Vertices)] - not rendering

# Bug 42121
%!test
%! clf ()
%! im = image (uint8 (get (0, "defaultimagecdata")));
%! imdata = get (im, "cdata");
%! assert (get (im, "xdata"), [1 64])
%! set (im, "cdata", imdata (1:2:end, 1:2:end))
%! assert (get (im, "xdata"), [1 32])

%!test
%! clf ()
%! im = image (uint8 (get (0, "defaultimagecdata")));
%! imdata = get (im, 'cdata');
%! set (im, 'xdata', [1 100])
%! assert (get (im, 'xdata'), [1 100])
%! set (im, 'cdata', imdata (1:2:end, 1:2:end))
%! assert (get (im, 'xdata'), [1 100])
%! set (im, 'xdata', [])
%! assert (get (im, 'xdata'), [1 32])


