Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9498 from jklymak/fixtitle
Move title up if x-axis is on the top of the figure. Merging as it received 2 approvals, and the small patch that I pushed was also reviewed by @efiring (and actually modified on one of his remarks). Thanks @jklymak :).
- Loading branch information
Showing
5 changed files
with
111 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Axes title will no longer overlap xaxis | ||
--------------------------------------- | ||
|
||
Previously an axes title had to be moved manually if an xaxis overlapped | ||
(usually when the xaxis was put on the top of the axes). Now, the title | ||
will be automatically moved above the xaxis and its decorators (including | ||
the xlabel) if they are at the top. | ||
|
||
If desired, the title can still be placed manually. There is a slight kludge; | ||
the algorithm checks if the y-position of the title is 1.0 (the default), | ||
and moves if it is. If the user places the title in the default location | ||
(i.e. ``ax.title.set_position(0.5, 1.0)``), the title will still be moved | ||
above the xaxis. If the user wants to avoid this, they can | ||
specify a number that is close (i.e. ``ax.title.set_position(0.5, 1.01)``) | ||
and the title will not be moved via this algorithm. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters