0

Im having a problem. When i write the code to get a plot in seaborn the axis y should launch values in Millions, instead of that seaborn gimme values from 1 to 8 and in the left top corner appears 1e7.

Any suggestion?

this is the code i wrote: GraficaHV = pd.concat([CountIN,CountOutGraph]) GraficaHV

Mes   HVT         Tipo
1   10124099    Entradas
2   25851997    Entradas
3   81851058    Entradas
4   9896478     Entradas
5   35512629    Entradas
6   31870357    Entradas
7   12330781    Entradas
8   11157468    Entradas
9   7350286     Entradas
10  12037817    Entradas
1   42494811    Salidas
2   34958487    Salidas
3   24388915    Salidas
4   32205219    Salidas
5   30660543    Salidas
6   45861226    Salidas
7   42722843    Salidas
8   39675923    Salidas
9   21450407    Salidas
10  4082323     Salidas

fig = plt.figure(figsize = (10,5), dpi = 100)
sns.set_style({'axes.grid':False})
sns.barplot(data=GraficaHV, x='Mes', y='HVT', hue='Tipo', ci=None)
plt.xlabel('Mes')
plt.ylabel("Hipoges Value")[enter image description here][1]
plt.title("Hipoges Value Entradas VS Salidas (Registros)")
Jorge -
  • 37
  • 4

1 Answers1

0

You can surpress scientific notation by using parameter ticklabel_format(style='plain', axis='y').
Here some other parameter that may be of use: Documentation

white
  • 601
  • 3
  • 8
  • For somebody in the future this, at least would be the code: fig = plt.figure(figsize = (10,5), dpi = 100) sns.set_style({'axes.grid':False}) sns.barplot(data=GraficaHV, x='Mes', y='HVT',hue='Tipo', ci=None,) plt.ticklabel_format(style='plain', axis='y') plt.xlabel('Mes') plt.ylabel("Hipoges Value") plt.title("Hipoges Value Entradas VS Salidas (Registros)") – Jorge - Oct 27 '22 at 15:03
  • and now if i want that the values in millions from y axis instead of beeing showed as 1.000.000 i want it as 1M there any option i can do it? – Jorge - Oct 27 '22 at 15:06