feat: Support custom and default titles in both graphics and plot objects.#637
feat: Support custom and default titles in both graphics and plot objects.#637
Conversation
|
@prmukherj For no title (i.e. overriding the default), does the caller just pass |
|
Note that |
title=None, can also be passed. So we should update the type-hints, right? |
|
Not related to the window title, but is the truncated colormap title in the attached images a known issue? Maybe add a github tracker for it |
Created an issue: #638 Should be a simple investigative fix from PyVista. |
@prmukherj, Please could you answer the question, which was 'For no title (i.e. overriding the default), does the caller just pass |
ok, I got your point now. Passing title="", is same as passing title=None, i.e. it will fall back to the default title. Do we want the feature to behave like passing title="" should overload default? |
Just to summarize the behavior now:
We can handle this by updating the checks so that if user pass "", then also the default title will be over-written with no title if that is required. |
Yes, please. That's what I had in mind. |
graphics_window = GraphicsWindow()
graphics_window.add_graphics(mesh, position=(0, 0), title="")
graphics_window.add_graphics(mesh, position=(0, 1))
graphics_window.show() |
seanpearsonuk
left a comment
There was a problem hiding this comment.
I don’t think I had a clear picture of the state of the code in this repo. I’m approving these changes, but I’ve found them hard to validate through code review alone. I also noticed a considerable amount of duplication in the recent changes.

All plots now come with a default title. These titles can be over-written by a user-defined title passed as argument during adding a graphics or plot as shown.
AND,