title: Python Plotly: Percentage Axis Formatter
body: <p>I want to create a diagram from a pandas dataframe where the axes ticks should be percentages.</p>
  <p>With matplotlib there is a nice axes formatter which automatically calculates the percentage ticks based on the given maximum value:</p>
  <p><strong>Example:</strong></p>
  <pre><code>import matplotlib.pyplot as plt
  import pandas as pd
  
  df = pd.DataFrame( { 'images': np.arange(0, 355, 5) } )      # 70 items in total, max is 350
  
  ax = df.plot()
  ax.yaxis.set_major_formatter(pltticker.PercentFormatter(xmax=350))
  loc = pltticker.MultipleLocator(base=50)     # locator puts ticks at regular intervals
  ax.yaxis.set_major_locator(loc)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/5eHSE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5eHSE.png" alt="enter image description here" /></a></p>
  <hr />
  <p><strong>Since the usage of matplotlib is rather tedious, I want to do the same with Plotly.</strong> I only found the option to format the tick labels as percentages - but no 'auto formatter' who calculates the ticks and percentages for me. <strong>Is there a way to use automatic percentage ticks or do I have to calculate them everytime by hand (urgh)?</strong></p>
  <pre><code>import plotly.express as px
  import pandas as pd
  
  fig = px.line(df, x=df.index, y=df.images, labels={'index':'num of users', '0':'num of img'})
  fig.layout.yaxis.tickformat = ',.0%'         # does not help
  fig.show()
  </code></pre>
  <p><a href="https://i.stack.imgur.com/N0beB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/N0beB.png" alt="enter image description here" /></a></p>
  <p>Thank you for any hints.</p>