Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 44 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,48 @@ library), **rsdm** (a PyDM-style EPICS display layer built on rsplot), and

## [Unreleased]

## [0.6.0] - 2026-10-16

### Changed

- **egui / egui-wgpu 0.36 (wgpu 30)**, MSRV **1.95**. `rsplot` re-exports
`egui`, so downstreams move to 0.36 with it — hence the minor bump. Adapted:
wgpu 30's `Option` vertex buffers and fallible `get_mapped_range`, egui's
`Panel::show_inside` → `show`, `egui_kittest::create_render_state` taking
`RendererOptions`; the headless widget tests run through
`test_util::HeadlessRun`, since epaint 0.36 panics when an unapplied
`TexturesDelta` is dropped.
- **rsplot**: `WgpuBackend` defers `sync_gpu_items` to one `flush_scene` per
frame, so N item mutations (add / remove / update, z, visibility, clear)
rebuild the GPU scene once instead of N times; unchanged z / visibility
writes no longer dirty the scene.
- **rsplot**: the title and the x, y, y2 and extra-axis labels lay out
single-line and elide with `…` to their gutter run instead of being clipped
mid-glyph on a narrow plot; overlapping tick labels are culled on every
gutter (tick marks never).
- **rsplot**: the compact-toolbar overflow button uses U+2026, which egui's
bundled font covers (U+22EF rendered as the tofu box).
- **rsdm**: the `pva` feature's blosc ZSTD sub-codec uses `rust-zstd` 0.4;
0.1.0, the only 0.1 release, was yanked, so a fresh resolve of rsdm failed.

### Added

- **rsplot**: `widget::form` — label / fill / group helpers for Qt-style
(`QFormLayout`) dialog rows in one egui pass; the colormap, print and
limits dialogs use them.
- **rsplot**: a whole-widget plot background: `set_background_colors`' first
argument was dropped, so a light canvas over a dark host panel got dark
tick labels on still-dark gutters. When set, `PlotView` paints the widget
rect with it under the data layer.
- Documented that hosts must append a broad-coverage fallback font for the
arrow and box-drawing glyphs the ROI descriptions, the style selector and
the image-compare toolbar use.

### Fixed

- **rsplot**: a range ROI's name label stays inside the data area instead of
landing in the title gutter over the plot title.

## [0.5.6] - 2026-07-19

### Changed
Expand Down Expand Up @@ -542,7 +584,8 @@ instead of Qt `.ui` XML.
- rsplot is now the root of a three-crate workspace; `rsdm` reaches egui/wgpu
through `rsplot::egui` to keep a single egui/wgpu in the tree.

[Unreleased]: https://github.com/physwkim/rsplot/compare/v0.5.6...HEAD
[Unreleased]: https://github.com/physwkim/rsplot/compare/v0.6.0...HEAD
[0.6.0]: https://github.com/physwkim/rsplot/compare/v0.5.6...v0.6.0
[0.5.6]: https://github.com/physwkim/rsplot/compare/v0.5.5...v0.5.6
[0.5.5]: https://github.com/physwkim/rsplot/compare/v0.5.4...v0.5.5
[0.5.4]: https://github.com/physwkim/rsplot/compare/v0.5.3...v0.5.4
Expand Down
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "rsplot"
version = "0.5.6"
version = "0.6.0"
edition = "2024"
rust-version = "1.92"
rust-version = "1.95"
license = "MIT OR Apache-2.0"
description = "silx-style scientific plotting for egui, rendered with wgpu"
repository = "https://github.com/physwkim/rsplot"
Expand All @@ -21,8 +21,8 @@ resolver = "3"
# an egui widget + egui-wgpu paint callback. wgpu types are reached through the
# egui-wgpu re-export to avoid version skew (a duplicate wgpu).
[dependencies]
egui = "0.34"
egui-wgpu = "0.34"
egui = "0.36"
egui-wgpu = "0.36"
bytemuck = { version = "1", features = ["derive"] }
# f16 encoding for the volume ray-caster's premultiplied 3D texture. Already in
# the tree transitively (via wgpu), so this pins no new major version.
Expand Down Expand Up @@ -72,8 +72,8 @@ tzdb = "0.7.3"

# Only the example (an eframe app) needs a window + RenderState.
[dev-dependencies]
eframe = "0.34"
egui_kittest = { version = "0.34.3", features = ["wgpu", "snapshot"] }
eframe = "0.36"
egui_kittest = { version = "0.36", features = ["wgpu", "snapshot"] }

[[example]]
name = "bootstrap"
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,17 @@ There are two API layers:

## Requirements

- A recent Rust toolchain (edition 2024; `rust-version = 1.92`).
- A recent Rust toolchain (edition 2024; `rust-version = 1.95`).
- An egui application running on the **wgpu** renderer — `rsplot` renders
through an `egui_wgpu` paint callback and needs the wgpu `RenderState`.
- egui / egui-wgpu **0.34**. `rsplot` re-exports `egui` and `egui_wgpu`
- egui / egui-wgpu **0.36**. `rsplot` re-exports `egui` and `egui_wgpu`
(`rsplot::egui`, `rsplot::egui_wgpu`) so downstreams can stay on the same
versions without skew.
- Some widget labels use glyphs beyond egui's default fonts — `→` in the ROI
manager descriptions, `─ ╌ ┈` in the ROI line-style selector, `═` in the
image-compare toolbar — which render as the missing-glyph box (□) without a
fallback. Append a broad-coverage font (e.g. DejaVu Sans) to each egui font
family (`FontDefinitions`), as a *last* entry so it only fills the gaps.

## Quick start

Expand Down
8 changes: 4 additions & 4 deletions adl2rsdm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "adl2rsdm"
version = "0.5.6"
version = "0.6.0"
edition = "2024"
rust-version = "1.92"
rust-version = "1.95"
license = "MIT OR Apache-2.0"
description = "Convert MEDM .adl screen files to RsDM (Rust) display modules"
repository = "https://github.com/physwkim/rsplot"
Expand Down Expand Up @@ -54,8 +54,8 @@ clap = { version = "4", features = ["derive"] }
# `CreationContext::wgpu_render_state` the generated `new(cc)` reads.
rsplot = { path = ".." }
rsdm = { path = "../rsdm", default-features = false }
eframe = { version = "0.34", features = ["wgpu"] }
eframe = { version = "0.36", features = ["wgpu"] }
# The behaviour gate (tests/opens.rs) drives a generated screen headlessly:
# clicking a related-display button must OPEN the converted child screen (the
# egui embedded-viewport fallback renders it in the same pass, no GPU needed).
egui_kittest = "0.34.3"
egui_kittest = "0.36"
2 changes: 1 addition & 1 deletion adl2rsdm/examples/local_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl App {

impl eframe::App for App {
fn ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) {
egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
self.screen.ui(ui);
});
}
Expand Down
2 changes: 1 addition & 1 deletion examples/aspect_ratio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl AspectApp {

impl eframe::App for AspectApp {
fn ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) {
egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
ui.checkbox(
&mut self.plot.keep_aspect,
"Keep data aspect ratio (square pixels)",
Expand Down
2 changes: 1 addition & 1 deletion examples/bootstrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl BootstrapApp {
impl eframe::App for BootstrapApp {
fn ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) {
// The root `ui` has no margin/background; wrap it in a CentralPanel.
egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
PlotView::new().show(ui, &mut self.plot);
});
}
Expand Down
2 changes: 1 addition & 1 deletion examples/colormap_norm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl eframe::App for NormApp {
self.set_norm(render_state, norm);
}

egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
PlotView::new().show(ui, &mut self.plot);
});
}
Expand Down
4 changes: 2 additions & 2 deletions examples/complex_field3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl ComplexApp {

impl eframe::App for ComplexApp {
fn ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) {
egui::Panel::top(ui.id().with("complex_toolbar")).show_inside(ui, |ui| {
egui::Panel::top(ui.id().with("complex_toolbar")).show(ui, |ui| {
let current = MODES
.iter()
.find(|(m, _)| *m == self.mode)
Expand All @@ -97,7 +97,7 @@ impl eframe::App for ComplexApp {
self.apply_mode(chosen);
}
});
egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
self.scene.show(ui);
});
}
Expand Down
2 changes: 1 addition & 1 deletion examples/decimation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl DecimationApp {

impl eframe::App for DecimationApp {
fn ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) {
egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
ui.label(format!(
"{N} source points — left-drag to box-zoom, double-click to reset"
));
Expand Down
2 changes: 1 addition & 1 deletion examples/error_bars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl ErrorBarsApp {

impl eframe::App for ErrorBarsApp {
fn ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) {
egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
PlotView::new().show(ui, &mut self.plot);
});
}
Expand Down
2 changes: 1 addition & 1 deletion examples/fill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl FillApp {

impl eframe::App for FillApp {
fn ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) {
egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
PlotView::new().show(ui, &mut self.plot);
});
}
Expand Down
27 changes: 14 additions & 13 deletions examples/gallery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use egui_kittest::Harness;
use egui_kittest::wgpu::{WgpuTestRenderer, create_render_state, default_wgpu_setup};
use rsplot::egui_wgpu::RenderState;
use rsplot::egui_wgpu::RendererOptions;
use rsplot::{
Box3D, Colormap, ColormapMesh3D, ColormapName, CompareImages, Cylinder3D, FitModelChoice,
FitWidget, GraphGrid, Hexagon3D, ImageGeometry, ImageView, MeshDrawMode, Plot2D,
Expand All @@ -36,7 +37,7 @@ fn capture(
) {
// A fresh device + installed WgpuResources per scene keeps plot ids and GPU
// state independent across captures.
let render_state = create_render_state(default_wgpu_setup());
let render_state = create_render_state(default_wgpu_setup(), RendererOptions::default());
rsplot::install(&render_state);

let mut scene = build(&render_state);
Expand Down Expand Up @@ -103,14 +104,14 @@ fn main() {
Box::new(move |ui: &mut egui::Ui| {
egui::Panel::right("gallery_plot_widget_panel")
.default_size(220.0)
.show_inside(ui, |ui| {
.show(ui, |ui| {
ui.heading("Legends");
plot.show_legend(ui);
ui.separator();
ui.heading("Active stats");
plot.show_active_stats(ui);
});
egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
plot.show_toolbar(ui);
plot.show(ui);
});
Expand Down Expand Up @@ -147,14 +148,14 @@ fn main() {
Box::new(move |ui: &mut egui::Ui| {
egui::Panel::right("gallery_plot2d_panel")
.default_size(220.0)
.show_inside(ui, |ui| {
.show(ui, |ui| {
ui.heading("Legends");
plot.show_legend(ui);
ui.separator();
ui.heading("Active stats");
plot.show_active_stats(ui);
});
egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
plot.show_toolbar(ui);
plot.show(ui);
});
Expand All @@ -170,7 +171,7 @@ fn main() {
.expect("image dimensions match");
view.image_plot_mut().set_graph_title("ImageView");
Box::new(move |ui: &mut egui::Ui| {
egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
// ImageView lays its three columns (image | profile+radar |
// colorbar) out from `available_size`; reserve the two
// horizontal item-spacing gaps so the right profile is not
Expand All @@ -189,7 +190,7 @@ fn main() {
sv.set_data(&x, &y, &values, Colormap::viridis(0.0, 1.0))
.expect("x / y / values are the same length");
Box::new(move |ui: &mut egui::Ui| {
egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
sv.show_toolbar(ui);
sv.show(ui);
});
Expand All @@ -208,7 +209,7 @@ fn main() {
// The central depth slice is the brightest part of the sinc volume.
sv.set_frame(sv.frame_count() / 2);
Box::new(move |ui: &mut egui::Ui| {
egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
sv.perspective_ui(ui);
sv.show_frame_controls(ui);
sv.show(ui);
Expand All @@ -225,7 +226,7 @@ fn main() {
.expect("data matches dimensions");
cmp.set_graph_title("CompareImages — A vs B");
Box::new(move |ui: &mut egui::Ui| {
egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
cmp.show_toolbar(ui);
cmp.show(ui);
});
Expand Down Expand Up @@ -277,7 +278,7 @@ fn main() {
plot.drain_events();

Box::new(move |ui: &mut egui::Ui| {
egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
plot.show_with_toolbar(ui);
});
})
Expand All @@ -292,7 +293,7 @@ fn main() {
assert!(view.set_data(rs, &data, n, n, n), "cubic volume is valid");
view.add_auto_isosurface(rs, mean_plus_std, egui::Color32::from_rgb(255, 70, 90));
Box::new(move |ui: &mut egui::Ui| {
egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
view.show(ui);
});
})
Expand All @@ -308,7 +309,7 @@ fn main() {
scene.set_bounds(rs, (Vec3::new(-4.0, -4.0, -1.5), Vec3::new(4.0, 4.0, 3.0)));
scene.set_geometry(rs, geometry);
Box::new(move |ui: &mut egui::Ui| {
egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
scene.show(ui);
});
})
Expand All @@ -323,7 +324,7 @@ fn main() {
scene.set_bounds(rs, (Vec3::ZERO, Vec3::new(1.0, 1.0, 1.0)));
scene.set_geometry(rs, geometry);
Box::new(move |ui: &mut egui::Ui| {
egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
scene.show(ui);
});
})
Expand Down
4 changes: 2 additions & 2 deletions examples/high_level_active_curve_labels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ impl eframe::App for ActiveLabelApp {
egui::Panel::right("active_label_panel")
.resizable(true)
.default_size(260.0)
.show_inside(ui, |ui| {
.show(ui, |ui| {
ui.heading("Curve legend");
// The graph legend shows each curve's icon (color, line style,
// marker) and makes the clicked curve active (silx
Expand Down Expand Up @@ -210,7 +210,7 @@ impl eframe::App for ActiveLabelApp {
ui.label("Right-click the plot for Zoom Back / Reset Zoom.");
});

egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
self.plot.show_toolbar(ui);
self.plot.show(ui);
});
Expand Down
4 changes: 2 additions & 2 deletions examples/high_level_clear_action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ impl eframe::App for ClearActionApp {
egui::Panel::right("clear_action_legend")
.resizable(true)
.default_size(220.0)
.show_inside(ui, |ui| {
.show(ui, |ui| {
ui.heading("Legends");
self.plot.show_legend(ui);
ui.separator();
self.plot.show_active_stats(ui);
});

egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
self.plot.show_toolbar_with(ui, |ui, plot| {
if ui.button("Clear").clicked() {
plot.clear();
Expand Down
4 changes: 2 additions & 2 deletions examples/high_level_colormap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl eframe::App for ColormapApp {
egui::Panel::left("colormap_controls")
.resizable(false)
.default_size(160.0)
.show_inside(ui, |ui| {
.show(ui, |ui| {
ui.label("Colormap");
for (i, &(_, name)) in COLORMAPS.iter().enumerate() {
if ui.radio_value(&mut self.selected_cm, i, name).changed() {
Expand Down Expand Up @@ -135,7 +135,7 @@ impl eframe::App for ColormapApp {
});

// Right: image fills the remaining central area.
egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
self.plot.show(ui);
});
}
Expand Down
2 changes: 1 addition & 1 deletion examples/high_level_context_menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl ContextMenuApp {

impl eframe::App for ContextMenuApp {
fn ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) {
egui::CentralPanel::default().show_inside(ui, |ui| {
egui::CentralPanel::default().show(ui, |ui| {
let status = self.status.clone();
self.plot.show_toolbar_with(ui, |ui, _plot| {
ui.label(status);
Expand Down
Loading
Loading