Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bar Chart x axis labels not formatted #1282

Open
1 task
daxsoule opened this issue Feb 15, 2024 · 3 comments
Open
1 task

Bar Chart x axis labels not formatted #1282

daxsoule opened this issue Feb 15, 2024 · 3 comments

Comments

@daxsoule
Copy link

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
@ahuang11
Copy link
Collaborator

ahuang11 commented Mar 6, 2024

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

@jbednar
Copy link
Member

jbednar commented Mar 6, 2024

xrotation=90?

@philippjfr
Copy link
Member

Okay, finally sat down and made a start on continuous bar charts: holoviz/holoviews#6145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants