Skip to content

Plot functions throw under GLMakie when is_save and is_show are both true #398

Description

@1-Bort-1

Under GLMakie, every plot function that saves and then shows fails. With is_save=true, is_show=true, save_plot attaches the figure's scene to a screen, and show_plot → display_named then opens a titled screen of its own, which throws:

GLMakie can not display a scene in multiple Screens.
  display_named(fig::Figure, name::String) @ ext/VortexStepMethodMakieExt.jl:29
  show_plot @ ext/VortexStepMethodMakieExt.jl:524
  plot_distribution(...) @ ext/VortexStepMethodMakieExt.jl:876

Reproduced on 675f0e7 (before #392) and on #392's branch, in a fresh session, with the same call: plot_distribution([y], [results], ["x"]; is_save=true, is_show=true, save_path=...) fails, and the same call with is_save=false works. examples/billowing.jl is the only example that sets SAVE_ALL = true, so it is the example menu.jl --run-all reports as failing.

The same save-then-show order is in plot_geometry, plot_polars, plot_combined_analysis and the polar-data plot. What I would do is show first and then save, or save from a figure that is not yet displayed, in one place (save_plot or show_plot) rather than in each plot function, plus a test that calls one plot function with both flags set under GLMakie. #391 edits the same functions, so this should land after it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions