| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -100,6 +100,30 @@ def execute(self, fig): | |
| raise NotImplementedError | ||
|
|
||
|
|
||
| class PlaceHolderLayoutEngine(LayoutEngine): | ||
| """ | ||
| This layout engine does not adjust the figure layout at all. | ||
|
|
||
| The purpose of this `.LayoutEngine` is to act as a place holder when the | ||
| user removes a layout engine to ensure an incompatible `.LayoutEngine` can | ||
| not be set later. | ||
|
|
||
| Parameters | ||
| ---------- | ||
| adjust_compatible, colorbar_gridspec : bool | ||
| Allow the PlaceHolderLayoutEngine to mirror the behavior of whatever | ||
| layout engine it is replacing. | ||
|
|
||
| """ | ||
| def __init__(self, adjust_compatible, colorbar_gridspec, **kwargs): | ||
| self._adjust_compatible = adjust_compatible | ||
| self._colorbar_gridspec = colorbar_gridspec | ||
| super().__init__(**kwargs) | ||
|
|
||
| def execute(self, fig): | ||
|
Comment thread
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityI guess I'm not sure about adding a Null engine here. It makes set_layout_engine('none') go through a (slightly) different codepath than never setting the layout engine at all. If we do this, we should probably initialize the figure with this NullLayoutEngine? But I'm not sure why we want to have this at all.
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityWe can not stick a formatter on at init time without making the bools tri-states ({unset, True, False}). This acts as a no-op place holder that remember the colorbar related settings without inventing another side-band way to store that. Unfortunately I think that "never been set" vs "was set and then removed" are in fact different.
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityAh I see - we don't want to switch colorbar behaviour after it has started to be used... So we are turning off the algorithm, but keeping its side effect. At some point we need to figure out how to ditch the two ways of placing colorbars without breaking everybody.
Sorry, something went wrong.
tacaswell reacted with thumbs up emoji
All reactions
|
||
| return | ||
|
|
||
|
|
||
| class TightLayoutEngine(LayoutEngine): | ||
| """ | ||
| Implements the ``tight_layout`` geometry management. See | ||
| Expand Down | ||
| Back | FazBrowse Home | New Git URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityWere we doing *None*?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityWe seem to have about the same number of both
$ ack '\*None\*' -l | wc 56 56 1865 $ ack '`None`' -l | wc 61 61 2223[edit updated to exclude docs build product]
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.