Question: I am trying to visualize some data as a scatter plot with matplotlib, and I got the following:
[![enter image description here](https://i.stack.imgur.com/kgOUn.png)](https://i.stack.imgur.com/kgOUn.png)

Is there a way to force the y axis to show the following steps [0,10,100,1000,10000,...]
Similar to the following:
[![enter image description here](https://i.stack.imgur.com/rpglg.png)](https://i.stack.imgur.com/rpglg.png)

Answer: 
The answer is to set the `yscale()` to 'log' and I got really nice result:[![enter image description here](https://i.stack.imgur.com/2wYrv.png)](https://i.stack.imgur.com/2wYrv.png)
If you are directly working with `matplotlib` and if you are more familiar with the new-style format string, you can try this:

```py
from matplotlib.ticker import StrMethodFormatter

plt.figure()
plt.ylim(10e1,10e6)
plt.yscale('log')
plt.gca().yaxis.set_major_formatter(StrMethodFormatter('{x:,.2f}')) # 2 decimal places
plt.grid()

```

From the [documentation](https://matplotlib.org/stable/api/ticker_api.html):

> 
> **class matplotlib.ticker.StrMethodFormatter(fmt)**
> 
> 
> Use a new-style format string (as used by str.format()) to format the
> tick.
> 
> 
> The field used for the value must be labeled x and the field used for
> the position must be labeled pos.
> 
> 
> 

**Output Image:**

[![OutputImage](https://i.stack.imgur.com/bCAH8.png)](https://i.stack.imgur.com/bCAH8.png)