Skip to content

Commit

Permalink
maint: Merge default to bytecode-interpreter.
Browse files Browse the repository at this point in the history
  • Loading branch information
NRJank committed Oct 16, 2024
2 parents f133a23 + ccbb17d commit 69562d9
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 5 deletions.
1 change: 1 addition & 0 deletions doc/interpreter/contributors.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ David Billinghurst
Don Bindner
Jakub Bogusz
Gaël Bonithon
Leonardo S. Borges
Moritz Borgmann
Paul Boven
Richard Bovey
Expand Down
19 changes: 15 additions & 4 deletions etc/NEWS.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,39 @@ Summary of bugs fixed for version 9.3.0 (tbd):
- `jupyter-notebook`: Avoid error if evaluated code closes an existing figure
window. Use `unwind_protect` block to ensure figure and tempfile cleanup
actions occur (bug #65644).
- `uitable`: Fix updating value with combo box selection (bug #65873).
- `movfun`: Correct output shape of n-D arrays when operating on dimensions
higher than 2. This will affect all moving window functions (`movmad`,
`movmax`, `movmean`, `movmedian`, `movmin`, `movprod`, `movstd`, `movsum`,
and `movvar`) (bug #65927).
- `movvar` and `movstd`: Use correct default value of 0 if an empty array is
specified for `opt` to maintain consistent behavior with `var` and `std`.
Improve input validation to ensure `opt` is one of 0, 1, or []. (bug #66021).
- `fopen`: Convert identifier for locale charset to lower-case characters
(bug #65963).
- `regexp`: Avoid integer underflow with unsigned integers.
- `interp2`: Provide a meaningful error message if the input reference array
is a vector (bug #66086).
- `struct2hdl.m`: Do not delete previously added axes children (bug #66221).
- `print`: Fix regression in pdf fonts (bug #66306).
- `legend` icons now inherit the "facelalpha" property to match appearance of
patch and surface graphics objects.
patch and surface graphics objects (bug #66314).
- `barh` properties now better match equivalent `bar` plot. Changing
`horizontal` property for a bar or barh plot now consistently updates
properties to match redrawn plot.
properties to match redrawn plot (bug #65671).
- Tick mark labels are now correctly updated after changing x or y data for
`bar` and `barh` plots (bug #65734).

### GUI

- Update Brazilian Portugese translation file (bug #66337).

### Build system / Tests

- `jupyter-notebook` test no longer fails if a figure window is open
(bug #65644).
- `movmad`, `movmax`, `movmean`, `movmedian`, `movmin`, `movprod`, `movstd`,
`movsum`, `movvar`: Add BISTs for general function operation.
- `movmad`, `movmax`, `movmean`, `movmedian`, `movmin`, `movprod`, `movslice`,
`movstd`, `movsum`, `movvar`: Add BISTs for general function operation.
- `interp2`, `interp3`, `interpn`: Add more tests for non-numeric inputs
(bug #66086).

Expand All @@ -39,6 +49,7 @@ Summary of bugs fixed for version 9.3.0 (tbd):
- `load`: Correct documentation of `-v7.3` and `-hdf5` options (bug #42530).
- `interp2`, `interp3`, `interpn`: Specify that inputs need to be numeric
(bug #66086).
- `error`: Document the `ID` argument (bug #66015).


Summary of bugs fixed for version 9.2.0 (2024-06-01):
Expand Down
3 changes: 2 additions & 1 deletion libgui/languages/translators
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ it_IT Marco Caliari <[email protected]>
ja_JP Tatsuro Matsuoka <[email protected]>
lt_LT Danius V. <[email protected]>
nl_NL Philip Nienhuis <[email protected]>
pt_BR Felipe G. Nievinski <[email protected]>
pt_BR Leonardo S. Borges <[email protected]>
Felipe G. Nievinski <[email protected]>
pt_PT Carnë Draug <[email protected]>
ru_RU Andriy Shinkarchuck <[email protected]>
Dmitry Astankov <[email protected]>
Expand Down
61 changes: 61 additions & 0 deletions scripts/plot/draw/bar.m
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,67 @@
%! close (hf);
%! end_unwind_protect

## Ensure x tick labels are updated with xdata changes.
%!test <*65734>
%! hf = figure ("visible", "off");
%! unwind_protect
%! hax = axes ("parent", hf);
%! hb = bar (hax, 2:4);
%! hp = get (hb, "children");
%!
%! assert (get (hb, "xdata"), [1:3]');
%! assert (get (hax, {"xlim", "xtick","xticklabel"}), ...
%! {[0.5, 3.5], 1:3, {"1"; "2"; "3"}});
%! assert (get (hax, {"ylim", "ytick", "yticklabel"}), ...
%! {[0, 4], [0:4], {"0"; "1"; "2"; "3"; "4"}});
%!
%! set (hb, "xdata", [3:5]'); # column vector input.
%! assert (get (hax, {"xlim", "xtick","xticklabel"}), ...
%! {[2.5, 5.5], 3:5, {"3"; "4"; "5"}});
%! assert (get (hax, {"ylim", "ytick", "yticklabel"}), ...
%! {[0, 4], [0:4], {"0"; "1"; "2"; "3"; "4"}});
%!
%! set (hb, "xdata", [9:11]); # row vector input.
%! assert (get (hax, {"xlim", "xtick","xticklabel"}), ...
%! {[8.5, 11.5], 9:11, {"9"; "10"; "11"}});
%! assert (get (hax, {"ylim", "ytick", "yticklabel"}), ...
%! {[0, 4], [0:4], {"0"; "1"; "2"; "3"; "4"}});
%!
%! unwind_protect_cleanup
%! close (hf);
%! end_unwind_protect

#### Ensure y tick labels are updated with ydata changes.
%!test <*65734>
%! hf = figure ("visible", "off");
%! unwind_protect
%! hax = axes ("parent", hf);
%! hb = bar (hax, 2:4);
%! hp = get (hb, "children");
%!
%! assert (get (hb, "xdata"), [1:3]');
%! assert (get (hax, {"xlim", "xtick","xticklabel"}), ...
%! {[0.5, 3.5], 1:3, {"1"; "2"; "3"}});
%! assert (get (hax, {"ylim", "ytick", "yticklabel"}), ...
%! {[0, 4], [0:4], {"0"; "1"; "2"; "3"; "4"}});
%!
%! set (hb, "ydata", [5:7]'); # column vector input.
%! assert (get (hax, {"xlim", "xtick","xticklabel"}), ...
%! {[0.5, 3.5], 1:3, {"1"; "2"; "3"}});
%! assert (get (hax, {"ylim", "ytick", "yticklabel"}), ...
%! {[0, 7], [0:7], {"0"; "1"; "2"; "3"; "4"; "5"; "6"; "7"}});
%!
%! set (hb, "ydata", [-4:-2]); # row vector input.
%! assert (get (hax, {"xlim", "xtick","xticklabel"}), ...
%! {[0.5, 3.5], 1:3, {"1"; "2"; "3"}});
%! assert (get (hax, {"ylim", "ytick", "yticklabel"}), ...
%! {[-4, 0], [-4:0], {"-4"; "-3"; "-2"; "-1"; "0"}});
%!
%! unwind_protect_cleanup
%! close (hf);
%! end_unwind_protect


%% Test input validation
%!error <Invalid call> bar ()
%!error <Y must be numeric> bar ("foo")
Expand Down
60 changes: 60 additions & 0 deletions scripts/plot/draw/barh.m
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,66 @@
%! close (hf);
%! end_unwind_protect

## Ensure x tick labels are updated with xdata changes.
%!test <*65734>
%! hf = figure ("visible", "off");
%! unwind_protect
%! hax = axes ("parent", hf);
%! hb = barh (hax, 2:4);
%! hp = get (hb, "children");
%!
%! assert (get (hb, "xdata"), [1:3]');
%! assert (get (hax, {"xlim", "xtick","xticklabel"}), ...
%! {[0, 4], [0:4], {"0"; "1"; "2"; "3"; "4"}});
%! assert (get (hax, {"ylim", "ytick", "yticklabel"}), ...
%! {[0.5, 3.5], 1:3, {"1"; "2"; "3"}});
%!
%! set (hb, "xdata", [3:5]'); # column vector input.
%! assert (get (hax, {"xlim", "xtick","xticklabel"}), ...
%! {[0, 4], [0:4], {"0"; "1"; "2"; "3"; "4"}});
%! assert (get (hax, {"ylim", "ytick", "yticklabel"}), ...
%! {[2.5, 5.5], 3:5, {"3"; "4"; "5"}});
%!
%! set (hb, "xdata", [9:11]); # row vector input.
%! assert (get (hax, {"xlim", "xtick","xticklabel"}), ...
%! {[0, 4], [0:4], {"0"; "1"; "2"; "3"; "4"}});
%! assert (get (hax, {"ylim", "ytick", "yticklabel"}), ...
%! {[8.5, 11.5], 9:11, {"9"; "10"; "11"}});
%!
%! unwind_protect_cleanup
%! close (hf);
%! end_unwind_protect

#### Ensure y tick labels are updated with ydata changes.
%!test <*65734>
%! hf = figure ("visible", "off");
%! unwind_protect
%! hax = axes ("parent", hf);
%! hb = barh (hax, 2:4);
%! hp = get (hb, "children");
%!
%! assert (get (hb, "xdata"), [1:3]');
%! assert (get (hax, {"xlim", "xtick","xticklabel"}), ...
%! {[0, 4], [0:4], {"0"; "1"; "2"; "3"; "4"}});
%! assert (get (hax, {"ylim", "ytick", "yticklabel"}), ...
%! {[0.5, 3.5], 1:3, {"1"; "2"; "3"}});
%!
%! set (hb, "ydata", [5:7]'); # column vector input.
%! assert (get (hax, {"xlim", "xtick","xticklabel"}), ...
%! {[0, 7], [0:7], {"0"; "1"; "2"; "3"; "4"; "5"; "6"; "7"}});
%! assert (get (hax, {"ylim", "ytick", "yticklabel"}), ...
%! {[0.5, 3.5], 1:3, {"1"; "2"; "3"}});%!
%!
%! set (hb, "ydata", [-4:-2]); # row vector input.
%! assert (get (hax, {"xlim", "xtick","xticklabel"}), ...
%! {[-4, 0], [-4:0], {"-4"; "-3"; "-2"; "-1"; "0"}});
%! assert (get (hax, {"ylim", "ytick", "yticklabel"}), ...
%! {[0.5, 3.5], 1:3, {"1"; "2"; "3"}});
%!
%! unwind_protect_cleanup
%! close (hf);
%! end_unwind_protect


%% Test input validation
%!error <Invalid call> bar ()
Expand Down
8 changes: 8 additions & 0 deletions scripts/plot/draw/private/__bar__.m
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,14 @@ function update_axes_limits (hax, x, vertical, ishistc)
## a small number of integers.
## Then temporarily set to auto to reset limits around patch elements and
## baseline component parallel to bars.

## Vector x inputs to bar are forced to be column vectors. x inputs from
## set command may be forced to row vectors. Ensure column vector for
## bar tick processing. See bug #65734.
if (isrow (x))
x = x(:);
endif

if (vertical)
set (hax, "xtick", x(:,1));
set (hax, "xlimmode", "auto");
Expand Down

0 comments on commit 69562d9

Please sign in to comment.