Skip to content
New issue

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

title_format plot option now includes dimensions #436

Merged
merged 9 commits into from Feb 3, 2016
Merged

title_format plot option now includes dimensions #436

merged 9 commits into from Feb 3, 2016

Conversation

@philippjfr
Copy link
Member

@philippjfr philippjfr commented Feb 2, 2016

As the title says this allows more customizing the plot title_format as suggested in #425.

@philippjfr philippjfr added this to the v1.4.2 milestone Feb 2, 2016
@philippjfr philippjfr self-assigned this Feb 2, 2016
@philippjfr
Copy link
Member Author

@philippjfr philippjfr commented Feb 3, 2016

The title_format plot option now allows enabling or disabling dimensions in the title. The only way I was able to do so without losing flexibility was to let the title accept a separator variable: "{label} {group}{separator}{dimensions}". Since bokeh doesn't support newline characters I'm tempted to remove this again and simply set different default title_format, for matplotlib I'd have "{label} {group}\n{dimensions}" and for bokeh I'd have "{label} {group} - {dimensions}".

@@ -916,7 +916,7 @@ def _compute_gridspec(self, layout):

# Create title handle
if self.show_title and len(self.coords) > 1:
title = self.handles['fig'].suptitle('', **self._fontsize('title'))
title = self.handles['fig'].suptitle('', y=1.05, **self._fontsize('title'))
Copy link
Contributor

@jlstevens jlstevens Feb 3, 2016

Is this a magic number? I assume this makes it look better.

Copy link
Member Author

@philippjfr philippjfr Feb 3, 2016

Yea, generally avoids overlap between the plot title and the overall layout title. Not sure how best to provide control over it.

@philippjfr
Copy link
Member Author

@philippjfr philippjfr commented Feb 3, 2016

Looks good for merging, the display changes are the deletion of trailing whitespace in the titles when no label is supplied.

@jlstevens
Copy link
Contributor

@jlstevens jlstevens commented Feb 3, 2016

Ok. Tests are passing. Merging.

jlstevens added a commit that referenced this issue Feb 3, 2016
The title_format plot option now includes dimensions
@jlstevens jlstevens merged commit 4e3e0bf into master Feb 3, 2016
4 checks passed
@jlstevens jlstevens deleted the dim_title branch Feb 4, 2016
@jlstevens jlstevens restored the dim_title branch Feb 4, 2016
@jlstevens jlstevens deleted the dim_title branch Feb 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants