Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
2x plots for Retina displays with matplotlib and the IPython Notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fordhurley
Copy link

fordhurley commented Jan 1, 2014

For anyone stumbling across this, as of PR #3381, you can now enable 2x images by just adding the line:

%config InlineBackend.figure_format = 'retina'

to your notebook.

Thanks!

@mmontag
Copy link

mmontag commented Aug 29, 2016

@fordhurley Wow, thanks :)

@ijoseph
Copy link

ijoseph commented Oct 13, 2017

Is there a way to add this to a global config file somewhere?

@skaldo
Copy link

skaldo commented Nov 19, 2017

@fordhurley awesome, thank you!

@MitchAllain
Copy link

MitchAllain commented Mar 25, 2018

@ijoseph, add the following line to your ipython_kernel_config.py, which for me is in ~/.ipython/profile_default/

c.InlineBackend.figure_format = 'retina'

If the file does not already exist, you can generate it with all settings commented out by entering ipython profile create at the command line.

@geyang
Copy link

geyang commented Jun 10, 2018

6 years later, this thread is still going strong 😄

@rxa254
Copy link

rxa254 commented Sep 10, 2019

+1

@BKJackson
Copy link

BKJackson commented Sep 27, 2019

Great gist.

@bhattg
Copy link

bhattg commented Apr 17, 2020

+1

@gr8den
Copy link

gr8den commented Sep 18, 2020

@micaleel
Copy link

micaleel commented Nov 16, 2020

Still useful in 2020! 🎉

@pifparfait
Copy link

pifparfait commented Jun 23, 2021

Hi,
Would anyone know how to disable this after activating it? I don't want to delete it. I want to use it for one case and stop using it for another. I'm on jupyter notebook. c.InlineBackend.figure_format = 'retina'

Many thanks
Parfait

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment