I am trying to change the scale of the x_axis for a plot.
The default is generating divisions of 20 units (0-20-40-60-80-100-120).
I tried changing to log, but then I get 0-10-100, which helps understand the data, but I would like to try to see divisions with 10 units because my data is not logarithmic (its linear, but there are many values in the 0-10 range, which results in a plot that is very hard to read).
How can I achieve that effect, or another one that will help me visually the data?
The code is below:
import seaborn as sns import matplotlib.pyplot as plt import numpy as np %matplotlib inline sns.set() plot = data3.plot(kind="scatter", x="A", y="B") # data3 is the name of my data frame plt.xscale('log') # this was my change (plt is correct) plot
I also tried the following (instead of the 'log' line above), but it gives the default (0-20-40-etc):
plt.xticks = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]