Applying log, symmetric log, and logistic scales to your axes

To apply log, symmetric log and logistic scales we will go through the steps as follows:

  1. Plot the numbers from 0 to 10 against the power of 10, as shown:
# Log axesplt.plot(nums, np.power(10,10*nums))plt.gca().grid(True)

Following is the output of the preceding code:

In the preceding output, we can see that the plot is not very good for actually viewing these numbers, since the end of the data range is much bigger than the beginning of the data range.

  1. We can transform this into something that will fill the space, so that we are not left with an empty space, by using an algorithm. ...

Get Mastering Matplotlib 2.x now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.