You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a helper function in the yellowbrick.draw module that can create a stacked bar chart from a 2D array on the specified axes. This function should have the following basic signature:
defbar_stack(data, ax=None, labels=None, ticks=None, colors=None, **kwargs):
""" An advanced bar chart plotting utility that can draw bar and stacked bar charts from data, wrapping calls to the specified matplotlib.Axes object. Parameters ---------- data : 2D array-like The data associated with the bar chart where the columns represent each bar and the rows represent each stack in the bar chart. A single bar chart would be a 2D array with only one row, a bar chart with three stacks per bar would have a shape of (3, b). ax : matplotlib.Axes, default: None The axes object to draw the barplot on, uses plt.gca() if not specified. labels : list of str, default: None The labels for each row in the bar stack, used to create a legend. ticks : list of str, default: None The labels for each bar, added to the x-axis for a vertical plot, or the y-axis for a horizontal plot. colors : array-like, default: None Specify the colors of each bar, each row in the stack, or every segment. kwargs : dict Additional keyword arguments to pass to ``ax.bar``. """
This is just a base signature and should be further refined as we dig into the work. Once this helper function is created, the following visualizers should be updated to use it:
PosTagVisualizer
FeatureImportances
ClassPredictionError
(@DistrictDataLabs/team-oz-maintainers please feel free to add other visualizers above as needed)
Describe the solution you'd like
A helper function to create stacked bar plot. (See #510 and #847, #771 )
Is your feature request related to a problem? Please describe.
This can be useful for ClassPredictionError, FeatureImportances, and future stacked bar plot.
The text was updated successfully, but these errors were encountered:
Reworded the description of the data parameter to help clarify the shape
of data needed for a single bar chart and a bar chart with three stacks
per bar.
See also: Issue DistrictDataLabs#525
Create a helper function in the
yellowbrick.draw
module that can create a stacked bar chart from a 2D array on the specified axes. This function should have the following basic signature:This is just a base signature and should be further refined as we dig into the work. Once this helper function is created, the following visualizers should be updated to use it:
PosTagVisualizer
FeatureImportances
ClassPredictionError
(@DistrictDataLabs/team-oz-maintainers please feel free to add other visualizers above as needed)
Describe the solution you'd like
A helper function to create stacked bar plot. (See #510 and #847, #771 )
Is your feature request related to a problem? Please describe.
This can be useful for
ClassPredictionError
,FeatureImportances
, and future stacked bar plot.The text was updated successfully, but these errors were encountered: