Description
In the server-side Python API, deephaven.plot.figure.Figure.chart_title() does not title a chart. Rather, it titles a figure. It does what I'd expect figure_title() to do.
Steps to reproduce
from deephaven.plot.figure import Figure
from deephaven import read_csv
insurance = read_csv("https://media.githubusercontent.com/media/deephaven/examples/main/Insurance/csv/insurance.csv")
insurance_by_region = insurance.view(formulas=["region", "expenses"]).avg_by(["region"])
insurance_by_sex = insurance.view(formulas=["sex", "expenses"]).avg_by(["sex"])
insurance_by_children = insurance.view(formulas=["children", "expenses"]).avg_by(["children"]).sort(order_by=["children"])
insurance_by_smoker = insurance.view(["smoker", "expenses"]).avg_by(["smoker"])
insurance_cat_plots = Figure(rows=2, cols=2).\
new_chart(row=0, col=0).\
plot_cat(series_name="Region", t=insurance_by_region, category="region", y="expenses").\
chart_title(title="Average charge ($) by region").\
new_chart(row=0, col=1).\
plot_cat(series_name="Sex", t=insurance_by_sex, category="sex", y="expenses").\
chart_title(title="Average charge ($) by sex").\
new_chart(row=1, col=0).\
plot_cat(series_name="Children", t=insurance_by_children, category="children", y="expenses").\
chart_title(title="Average charge ($) per number of children").\
new_chart(row=1, col=1).\
plot_cat(series_name="Smoker", t=insurance_by_smoker, category="smoker", y="expenses").\
chart_title(title="Average charge ($) smokers vs nonsmokers").\
chart_legend(visible=False).\
show()
Expected results
A figure with four subplots, one with each title that's given in the code.
Actual results
A figure with four subplots, but only one title atop the figure itself. The first title is the one displayed, while the other three are not visible.
Additional details and attachments
Versions
- Deephaven: 0.30.3
- OS: OS X
- Browser: Chrome
- Docker: 20.10.13
Description
In the server-side Python API,
deephaven.plot.figure.Figure.chart_title()does not title a chart. Rather, it titles a figure. It does what I'd expectfigure_title()to do.Steps to reproduce
Expected results
A figure with four subplots, one with each title that's given in the code.
Actual results
A figure with four subplots, but only one title atop the figure itself. The first title is the one displayed, while the other three are not visible.
Additional details and attachments
Versions