title: Configure the backend of Ipython to use retina display mode with code
body: <p>I am using code to configure Jupyter notebooks because I have a repo with plenty of notebooks and want to keep style consistency across all without having to write lengthy setting at the start of each. This way, what I do is having a method to configure the CSS, one to set up Matplotlib and one to configure Ipython. </p>
  
  <p>The reasons I configure my notebooks this way rather than relying on a configuration file as per <a href="http://ipython.readthedocs.io/en/stable/config/intro.html" rel="noreferrer">docs</a> are two:</p>
  
  <ol>
  <li>I am sharing this repo of notebooks publicly and I want all my configs to be visible </li>
  <li>I want to keep these configs specific to just this repo I'm creating</li>
  </ol>
  
  <p>As an example, the method to set the CSS looks like</p>
  
  <pre><code>def set_css_style(css_file_path='../styles_files/custom.css'):
  
      styles = open(css_file_path, "r").read()
      return HTML(styles)
  </code></pre>
  
  <p>and I call it at the start of each notebook with <code>set_css_style()</code>. Similarly, I have this method to configure the specifics of Ipython:</p>
  
  <pre><code>def config_ipython():
  
      InteractiveShell.ast_node_interactivity = "all"
  </code></pre>
  
  <p>Both the above use imports </p>
  
  <pre><code>from IPython.core.display import HTML
  from IPython.core.interactiveshell import InteractiveShell
  </code></pre>
  
  <p>At the moment, as can be seen, the method to configure Ipython only contains the instruction to make it so that when I type the name of variables in multiple lines in a cell I don't need to add a <code>print</code> to make them all be printed. </p>
  
  <p>My question is how to transform the Jupyter magic command to obtain retina-display quality for figures into code. Such command is</p>
  
  <pre><code>%config InlineBackend.figure_format = 'retina'
  </code></pre>
  
  <p>From the docs of Ipython I can't find how to call this instruction in a method, namely can't find where <code>InlineBackend</code> lives.</p>
  
  <p>I'd just like to add this configuration line to my <code>config_ipython</code> method above, is it possible? </p>