Skip to content

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

Merged
jamesramsden-bh merged 3 commits intodevelopfrom
Python_Toolkit-#204-PlotStyleContext
Mar 19, 2026
Merged

Updated plot methods to use new plt.style.context()#338
jamesramsden-bh merged 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

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 16, 2026

@Tom-Kingstone just to let you know, I have provided a check-installer result to this Pull Request as it was detected to be linked to other Pull Requests in a series. The comment which triggered this check came from @Tom-Kingstone on Python_Toolkit

@Tom-Kingstone Tom-Kingstone force-pushed the Python_Toolkit-#204-PlotStyleContext branch from 81ac372 to 40b6198 Compare March 17, 2026 09:56
@Tom-Kingstone
Copy link
Contributor Author

@BHoMBot check installer

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 17, 2026

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

  • check installer

@Tom-Kingstone
Copy link
Contributor Author

@BHoMBot check required

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 18, 2026

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

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check core
  • check null-handling
  • check serialisation
  • check versioning
  • check installer

There are 3 requests in the queue ahead of you.

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 18, 2026

The check installer has already been run previously and recorded as a successful check. This check has not been run again at this time.

@Tom-Kingstone
Copy link
Contributor Author

@BHoMBot check compliance
@BHoMBot check unit-tests

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 18, 2026

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

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance
  • check unit-tests

Copy link
Contributor

@jamesramsden-bh jamesramsden-bh left a comment

Choose a reason for hiding this comment

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

Have tested with run_tests.bat and a manual spot check, happy to merge

@jamesramsden-bh
Copy link
Contributor

@BHoMBot check ready-to-merge

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 19, 2026

@jamesramsden-bh to confirm, the following actions are now queued:

  • check ready-to-merge

@bhombot-ci
Copy link

bhombot-ci bot commented Mar 19, 2026

@Tom-Kingstone just to let you know, I have provided a check-ready-to-merge result to this Pull Request as it was detected to be linked to other Pull Requests in a series. The comment which triggered this check came from @Tom-Kingstone on Python_Toolkit

@jamesramsden-bh jamesramsden-bh merged commit ac3e631 into develop Mar 19, 2026
13 checks passed
@jamesramsden-bh jamesramsden-bh deleted the Python_Toolkit-#204-PlotStyleContext branch March 19, 2026 11:09
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.

2 participants