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

New rcParams to set pyplot.suptitle() defaults #3083

Merged
merged 2 commits into from Nov 13, 2014

Conversation

wavexx
Copy link
Contributor

@wavexx wavexx commented May 21, 2014

Two new rcParams are introduced:

  • figure.titlesize (xx-large)
  • figure.titleweight (normal)

Allow to set the pyplot.suptitle() default font size and weight.

Fixes #3011

@tacaswell tacaswell added this to the v1.5.x milestone Jul 12, 2014
@tacaswell
Copy link
Member

Can you also investigate why these failures are happening?


======================================================================
FAIL: matplotlib.tests.test_axes.test_errorbar.test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.2.5/lib/python3.2/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/travis/virtualenv/python3.2.5/lib/python3.2/site-packages/matplotlib-1.5.x-py3.2-linux-x86_64.egg/matplotlib/testing/decorators.py", line 51, in failer
    result = f(*args, **kwargs)
  File "/home/travis/virtualenv/python3.2.5/lib/python3.2/site-packages/matplotlib-1.5.x-py3.2-linux-x86_64.egg/matplotlib/testing/decorators.py", line 196, in do_test
    '(RMS %(rms).3f)'%err)
matplotlib.testing.noseclasses.ImageComparisonFailure: images not close: /home/travis/build/matplotlib/tmp_test_dir/result_images/test_axes/errorbar_mixed.png vs. /home/travis/build/matplotlib/tmp_test_dir/result_images/test_axes/errorbar_mixed-expected.png (RMS 18.448)

======================================================================
FAIL: matplotlib.tests.test_axes.test_errorbar.test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.2.5/lib/python3.2/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/travis/virtualenv/python3.2.5/lib/python3.2/site-packages/matplotlib-1.5.x-py3.2-linux-x86_64.egg/matplotlib/testing/decorators.py", line 51, in failer
    result = f(*args, **kwargs)
  File "/home/travis/virtualenv/python3.2.5/lib/python3.2/site-packages/matplotlib-1.5.x-py3.2-linux-x86_64.egg/matplotlib/testing/decorators.py", line 196, in do_test
    '(RMS %(rms).3f)'%err)
matplotlib.testing.noseclasses.ImageComparisonFailure: images not close: /home/travis/build/matplotlib/tmp_test_dir/result_images/test_axes/errorbar_mixed_pdf.png vs. /home/travis/build/matplotlib/tmp_test_dir/result_images/test_axes/errorbar_mixed-expected_pdf.png (RMS 20.390)

======================================================================
FAIL: matplotlib.tests.test_axes.test_errorbar.test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.2.5/lib/python3.2/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/travis/virtualenv/python3.2.5/lib/python3.2/site-packages/matplotlib-1.5.x-py3.2-linux-x86_64.egg/matplotlib/testing/decorators.py", line 51, in failer
    result = f(*args, **kwargs)
  File "/home/travis/virtualenv/python3.2.5/lib/python3.2/site-packages/matplotlib-1.5.x-py3.2-linux-x86_64.egg/matplotlib/testing/decorators.py", line 196, in do_test
    '(RMS %(rms).3f)'%err)
matplotlib.testing.noseclasses.ImageComparisonFailure: images not close: /home/travis/build/matplotlib/tmp_test_dir/result_images/test_axes/errorbar_mixed_svg.png vs. /home/travis/build/matplotlib/tmp_test_dir/result_images/test_axes/errorbar_mixed-expected_svg.png (RMS 14.480)

@wavexx
Copy link
Contributor Author

wavexx commented Oct 30, 2014

On 10/30/2014 05:14 PM, Thomas A Caswell wrote:

Can you also investigate why these failures are happening?

Indeed, just the title being bigger by default.

@tacaswell
Copy link
Member

Can you please change it so that the defaults do not change.

Changing output images is considered a back wards incompatible api change

Two new rcParams are introduced:

- figure.titlesize (xx-large)
- figure.titleweight (normal)

Allow to set the pyplot.suptitle() default font size and weight.
@wavexx
Copy link
Contributor Author

wavexx commented Oct 30, 2014

Done. It now defaults to "medium".

@tacaswell
Copy link
Member

Sorry, one more thing. Can you add an entry to https://github.com/matplotlib/matplotlib/blob/master/doc/users/whats_new/rcparams.rst ?This will make sure that this addition gets advertised.

@wavexx
Copy link
Contributor Author

wavexx commented Oct 31, 2014

Done. Let me know if the writing style is ok for the entry.

@wavexx
Copy link
Contributor Author

wavexx commented Nov 5, 2014

Ping.

tacaswell added a commit that referenced this pull request Nov 13, 2014
ENH : New rcParams to set pyplot.suptitle() defaults
@tacaswell tacaswell merged commit dd2a31d into matplotlib:master Nov 13, 2014
@tacaswell
Copy link
Member

Thanks, sorry for the delay in getting this merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to customize default font size for suptitle() in matplotlibrc
3 participants