Skip to content

Updated plot methods to use new plt.style.context()#338

Open
Tom-Kingstone wants to merge 3 commits intodevelopfrom
Python_Toolkit-#204-PlotStyleContext
Open

Updated plot methods to use new plt.style.context()#338
Tom-Kingstone wants to merge 3 commits intodevelopfrom
Python_Toolkit-#204-PlotStyleContext

Conversation

@Tom-Kingstone
Copy link
Contributor

@Tom-Kingstone Tom-Kingstone commented Mar 13, 2026

NOTE: Depends on BHoM/Python_Toolkit#208

Issues addressed by this PR

new kwarg (and sometimes arg where applicable) to set the plot style on a per-plot basis rather than setting globally for the entire toolkit.

Test files

Check that unit tests pass, otherwise you can see this in action by passing style_context as a kwarg in any plot method with any valid stylesheet (for instance, "python_toolkit.bhom_dark" will give you a dark-mode compatible plot instead of the default)

Changelog

  • added style_context as a kwarg for all plot methods which can be used to set the plot style to any valid matplotlib style sheet (e.g. ggplot, python_toolkit.bhom_dark etc.)

Additional comments

must have Python_Toolkit-#204 branch built before building this toolkit.

@Tom-Kingstone Tom-Kingstone self-assigned this Mar 13, 2026
@Tom-Kingstone Tom-Kingstone added the type:feature New capability or enhancement label Mar 13, 2026
@Tom-Kingstone
Copy link
Contributor Author

@BHoMBot check core
@BHoMBot check compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 13, 2026

@Tom-Kingstone to confirm, the following actions are now queued:

  • check core
  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance

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

Labels

type:feature New capability or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant