Skip to content

feat(plot_lines): use ordinal x-axis for integer tick labels#12

Merged
ships merged 1 commit intomainfrom
feat/plot-lines-integer-axis-and-visual-cells
Dec 17, 2025
Merged

feat(plot_lines): use ordinal x-axis for integer tick labels#12
ships merged 1 commit intomainfrom
feat/plot-lines-integer-axis-and-visual-cells

Conversation

@ships
Copy link
Contributor

@ships ships commented Dec 17, 2025

Summary

  • Switch plot_lines x-axis from quantitative to ordinal encoding, ensuring integer-only tick labels for step/epoch indices
  • Add IPython cell markers (# %%) to test files for interactive visual verification

Details

The x-axis in plot_lines represents discrete step indices. Quantitative encoding with tickMinStep=1 was stripped during vegafusion compilation, causing fractional tick labels. Ordinal encoding is semantically correct for this use case and guarantees integer labels.

The IPython cells allow each plot function to be visually verified by running cells directly in IDEs with ipykernel support.

Build

Adds ipykernel dev dependency for cell execution.

Switch x-axis encoding from quantitative (Q) to ordinal (O) to guarantee
integer-only tick labels. The x-axis represents a step/epoch index, making
ordinal encoding semantically correct. Quantitative encoding with
tickMinStep was stripped by vegafusion during Vega compilation.

Also adds IPython cell markers (# %%) to test files for interactive visual
verification in IDEs with ipykernel support. Each plot function can be
visually inspected by running the corresponding cell.

Build: adds ipykernel dev dependency for cell execution.
@ships ships force-pushed the feat/plot-lines-integer-axis-and-visual-cells branch from 413eee5 to d433dfe Compare December 17, 2025 05:46
Copy link
Contributor

@Schaechtle Schaechtle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks!

@ships ships merged commit da00b1e into main Dec 17, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants