title: Python function equivalent to R's `pretty()`?
body: <p>I'm replicating some R code in Python.</p>
  
  <p>I've tripped up on R's <code>pretty()</code>.</p>
  
  <p>All I need is <code>pretty(x)</code>, where <code>x</code> is some numeric.</p>
  
  <p>Roughly, the function "computes pretty breakpoints" as a sequence of several "round" values. I'm not sure there is a Python equivalent and I'm not having much luck with Google.</p>
  
  <p>Edit: More specifically, this is the Description entry in he help page for <code>pretty</code>:</p>
  
  <blockquote>
    <p>Description: Compute a sequence of about n+1 equally spaced ‘round’ values which cover the range of the values in x. The values are chosen so that they are 1, 2 or 5 times a power of 10.</p>
  </blockquote>
  
  <p>I looked into R's <code>pretty.default()</code> to see what exactly R is doing with the function but it eventually uses <code>.Internal()</code> -- which usually leads to dark R magic. I thought I'd ask around before diving in.</p>
  
  <p>Does anyone know if Python has something equivalent to R's <code>pretty()</code>?</p>