openmc-dev / plotter

Native plotting GUI for model design and verification
MIT License
43 stars 17 forks source link

Get colorbar data ranges from entire model instead of just the view #118

Open kkiesling opened 1 year ago

kkiesling commented 1 year ago

Right now when you plot something that requires a colorbar (ie color by temperature or density), the default behavior is to take the min and max data values for the colorbar from the current view. It would be beneficial to also have the option to color by the entire model data range instead of just the view. Currently, a user can manually set a custom data range, but that requires knowledge of the entire model already / can be tedious to change this.

A proposed solution is to add a check box to select a color bar based on the current view or the entire model.

The only obstacle to implementing this is that we currently only load data for the current view, so this full model data is not readily available with the current setup. While it may be possible to load the full model and determine this info, it may be slow/complex for large models. For this reason, I'd suggest the default behavior to still be to color based on view and only load this info if asked. Then we'd store the info to only have do this once per property.

pshriwise commented 1 year ago

Agreed on the default behavior. 👍🏻 And while gathering the global temperature info might take some time, it's something we'll only need to do once when the plotter is initialized or when we import properties. I'm hoping it won't be too bad, but we'll have to see how it works out in practice.