hvplot icon indicating copy to clipboard operation
hvplot copied to clipboard

Bar Chart x axis labels not formatted

Open daxsoule opened this issue 1 year ago • 3 comments

I am trying to make a bar plot of Earthquakes per day Earthquake Plot

How do I control the dates listed on the x axis?

df.hvplot.bar(y = count, title = 'Earthquakes per Day', ylabel = 'Count', xlabel = 'Date')

Stack traceback and/or browser JavaScript console output

Screenshots or screencasts of the bug in action

  • [ ] I may be interested in making a pull request to address this

daxsoule avatar Feb 15 '24 18:02 daxsoule

Maybe error bars as a workaround?

import pandas as pd
import hvplot.pandas

# Create a DataFrame with datetime index
data = {"Values": range(100)}
index = pd.date_range("2022-01-01", periods=100, freq="D")
df = pd.DataFrame(data, index=index)
df["Zero"] = 0

# Create a bar chart
errorbars = df.hvplot.errorbars(y="Values", yerr1="Values", yerr2="Zero")

errorbars
image

ahuang11 avatar Mar 06 '24 17:03 ahuang11

xrotation=90?

jbednar avatar Mar 06 '24 22:03 jbednar

Okay, finally sat down and made a start on continuous bar charts: https://github.com/holoviz/holoviews/pull/6145

philippjfr avatar Mar 06 '24 23:03 philippjfr