0

I was trying to use pandas-bokeh library to make an interactive bar chart. Below is my dataframe that I want to plot.

My dataframe

After that,I plot it using this code

> df4.plot_bokeh(
>     kind='bar',
>     x='year', 
>     y=['Furniture','Office Supplies','Technology'],
>     yticks=np.arange(0,200000,10000)
>     )

interactive bar chart

As you can see, they yticks is using e+x. I want the yticks to be integers so the chart would be easier to be understood. Is there any way to do that in pandas-bokeh plot?

Zephyr
  • 11,891
  • 53
  • 45
  • 80
Aldwin
  • 3
  • 1

1 Answers1

0

You should read the documentation of the library there. In docs, your problem has been explained clearly. Also, you can use here. Both sources used like this

p.xaxis[0].formatter = NumeralTickFormatter(format="0.0%")
p.yaxis[0].formatter = NumeralTickFormatter(format="$0.00")
Musulmon
  • 102
  • 1
  • 6
  • In that case, the format value might be different. For this, you should use [there](https://docs.bokeh.org/en/latest/docs/reference/models/formatters.html) – Musulmon Jul 12 '20 at 09:11
  • i tried it on a plot drawn using .plot_bokeh() method (from pandas_bokeh library) and it didn't work. But it did work when the plot is drawn using figure() from bokeh.plotting. i guess i'll use bokeh_plotting instead. Thank you for the answer. – Aldwin Jul 12 '20 at 09:38