Skip to content

Refactoring of the plots#64

Open
ufechner7 wants to merge 6 commits into
mainfrom
refactor
Open

Refactoring of the plots#64
ufechner7 wants to merge 6 commits into
mainfrom
refactor

Conversation

@ufechner7

@ufechner7 ufechner7 commented Jun 21, 2026

Copy link
Copy Markdown
Member

The plot functions were defined twice, once in plots.jl and once in batch_plots.jl.

@ufechner7 ufechner7 changed the title Initial refactoring Refactoring of the plots Jun 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the example plotting scripts by de-duplicating shared plotting logic between the interactive GUI (examples/plots.jl) and the CLI batch plot tool (examples/batch_plot.jl) into shared includes.

Changes:

  • Extract shared plotting implementations into examples/plot_functions.jl and shared accessors into examples/plot_helpers.jl.
  • Convert examples/plots.jl and examples/batch_plot.jl to lightweight wrappers that load logs and delegate to the shared plot functions.
  • Optimize log accessor extraction in examples/plot_loading.jl by replacing hcat(...)[1,:] with broadcasted getindex.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
examples/plots.jl Replaced duplicated plot implementations with wrappers delegating to shared plot functions; keeps GUI-specific log loading and timing plots.
examples/plot_loading.jl Uses getindex.(..., 1) to extract scalar series without allocating via hcat.
examples/plot_helpers.jl New shared accessors (l_tether, force, v_reelout) for syslog series extraction.
examples/plot_functions.jl New shared plotting implementations (_plot_*) used by both GUI and CLI wrappers.
examples/batch_plot.jl Replaced duplicated plotting logic with wrappers delegating to plot_functions.jl.

Comment thread examples/plot_functions.jl Outdated
ufechner7 and others added 3 commits June 21, 2026 17:34
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

2 participants