Skip to content

Histfunc does not work as expected #72

Description

@KeithWM

I might be misunderstanding some things, but I was surprised that something I thought would be easy did not work as expected.

I had already created a histogram (code below) that shows the average power usage for the time of day. (The color=:bracket separates different times of the year.) I was quite happy with this, but wanted to change the "avg" to a percentile. I had hoped that this would be easy by defining a function that computed the percentile of a SubDataFrame myself and provide that as an argument. Unfortunately, the results are not at all as expected.

plot(
	df[df.day_local .>= Date(2024, 3, 1), :], 
	x=:time_of_day_local, 
	y=:current_power, 
	kind=:histogram,
	histfunc="avg",
	xbins=attr(start=Date(1, 1, 1), nbins=24),
	color=:bracket,
	opacity=0.5,
	marker_line_width=1.5, 
	Layout(barmode="overlay"),
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions