instance_id
stringlengths 14
33
| version
stringclasses 1
value | gold_patches
dict | test_patch
null | pre_patches
dict | pre_scripts
null | repo
stringclasses 11
values | base_commit
stringclasses 11
values | base_commit_timestamp
stringdate 2024-07-22 07:32:48-0400
2024-10-09 00:56:33-0400
| hints_text
null | created_at
null | problem_statement
dict | environment_setup_commit
stringclasses 11
values | evaluation
dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mwaskom__seaborn-0
|
1.0
|
{
"code": "diff --git b/seaborn/_core/scales.py a/seaborn/_core/scales.py\nindex 67bb3635..1e7bef8a 100644\n--- b/seaborn/_core/scales.py\n+++ a/seaborn/_core/scales.py\n@@ -629,6 +629,24 @@ class Continuous(ContinuousBase):\n Copy of self with new label configuration.\n \n \"\"\"\n+ # Input checks\n+ if formatter is not None and not isinstance(formatter, Formatter):\n+ raise TypeError(\n+ f\"Label formatter must be an instance of {Formatter!r}, \"\n+ f\"not {type(formatter)!r}\"\n+ )\n+ if like is not None and not (isinstance(like, str) or callable(like)):\n+ msg = f\"`like` must be a string or callable, not {type(like).__name__}.\"\n+ raise TypeError(msg)\n+\n+ new = copy(self)\n+ new._label_params = {\n+ \"formatter\": formatter,\n+ \"like\": like,\n+ \"base\": base,\n+ \"unit\": unit,\n+ }\n+ return new\n \n def _parse_for_log_params(\n self, trans: str | TransFuncs | None\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_core/scales.py b/seaborn/_core/scales.py\nindex 1e7bef8a..67bb3635 100644\n--- a/seaborn/_core/scales.py\n+++ b/seaborn/_core/scales.py\n@@ -629,24 +629,6 @@ class Continuous(ContinuousBase):\n Copy of self with new label configuration.\n \n \"\"\"\n- # Input checks\n- if formatter is not None and not isinstance(formatter, Formatter):\n- raise TypeError(\n- f\"Label formatter must be an instance of {Formatter!r}, \"\n- f\"not {type(formatter)!r}\"\n- )\n- if like is not None and not (isinstance(like, str) or callable(like)):\n- msg = f\"`like` must be a string or callable, not {type(like).__name__}.\"\n- raise TypeError(msg)\n-\n- new = copy(self)\n- new._label_params = {\n- \"formatter\": formatter,\n- \"like\": like,\n- \"base\": base,\n- \"unit\": unit,\n- }\n- return new\n \n def _parse_for_log_params(\n self, trans: str | TransFuncs | None\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_core/scales.py.\nHere is the description for the function:\n def label(\n self,\n formatter: Formatter | None = None, *,\n like: str | Callable | None = None,\n base: int | None | Default = default,\n unit: str | None = None,\n ) -> Continuous:\n \"\"\"\n Configure the appearance of tick labels for the scale's axis or legend.\n\n Parameters\n ----------\n formatter : :class:`matplotlib.ticker.Formatter` subclass\n Pre-configured formatter to use; other parameters will be ignored.\n like : str or callable\n Either a format pattern (e.g., `\".2f\"`), a format string with fields named\n `x` and/or `pos` (e.g., `\"${x:.2f}\"`), or a callable with a signature like\n `f(x: float, pos: int) -> str`. In the latter variants, `x` is passed as the\n tick value and `pos` is passed as the tick index.\n base : number\n Use log formatter (with scientific notation) having this value as the base.\n Set to `None` to override the default formatter with a log transform.\n unit : str or (str, str) tuple\n Use SI prefixes with these units (e.g., with `unit=\"g\"`, a tick value\n of 5000 will appear as `5 kg`). When a tuple, the first element gives the\n separator between the number and unit.\n\n Returns\n -------\n scale\n Copy of self with new label configuration.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_core/test_data.py::TestPlotData::test_data_interchange_support_test",
"tests/_core/test_plot.py::TestLayerAddition::test_without_data",
"tests/_core/test_plot.py::TestLayerAddition::test_with_new_variable_by_name",
"tests/_core/test_plot.py::TestLayerAddition::test_with_new_variable_by_vector",
"tests/_core/test_plot.py::TestLayerAddition::test_with_late_data_definition",
"tests/_core/test_plot.py::TestLayerAddition::test_with_new_data_definition",
"tests/_core/test_plot.py::TestLayerAddition::test_drop_variable",
"tests/_core/test_plot.py::TestLayerAddition::test_stat_default",
"tests/_core/test_plot.py::TestLayerAddition::test_orient[x-x]",
"tests/_core/test_plot.py::TestLayerAddition::test_orient[y-y]",
"tests/_core/test_plot.py::TestLayerAddition::test_orient[v-x]",
"tests/_core/test_plot.py::TestLayerAddition::test_orient[h-y]",
"tests/_core/test_plot.py::TestScaling::test_inference",
"tests/_core/test_plot.py::TestScaling::test_inference_joins",
"tests/_core/test_plot.py::TestScaling::test_categorical_as_datetime",
"tests/_core/test_plot.py::TestScaling::test_faceted_log_scale",
"tests/_core/test_plot.py::TestScaling::test_paired_single_log_scale",
"tests/_core/test_plot.py::TestScaling::test_paired_with_common_fallback",
"tests/_core/test_plot.py::TestScaling::test_log_scale_name",
"tests/_core/test_plot.py::TestScaling::test_mark_data_log_transform_is_inverted",
"tests/_core/test_plot.py::TestScaling::test_mark_data_log_transfrom_with_stat",
"tests/_core/test_plot.py::TestScaling::test_computed_var_ticks",
"tests/_core/test_plot.py::TestScaling::test_computed_var_transform",
"tests/_core/test_plot.py::TestScaling::test_explicit_range_with_axis_scaling",
"tests/_core/test_plot.py::TestScaling::test_derived_range_with_axis_scaling",
"tests/_core/test_plot.py::TestScaling::test_pair_categories",
"tests/_core/test_plot.py::TestScaling::test_pair_categories_shared",
"tests/_core/test_plot.py::TestScaling::test_identity_mapping_linewidth",
"tests/_core/test_plot.py::TestScaling::test_pair_single_coordinate_stat_orient",
"tests/_core/test_plot.py::TestScaling::test_identity_mapping_color_strings",
"tests/_core/test_plot.py::TestScaling::test_identity_mapping_color_tuples",
"tests/_core/test_plot.py::TestScaling::test_undefined_variable_raises",
"tests/_core/test_plot.py::TestScaling::test_nominal_x_axis_tweaks",
"tests/_core/test_plot.py::TestScaling::test_nominal_y_axis_tweaks",
"tests/_core/test_plot.py::TestPlotting::test_no_orient_variance",
"tests/_core/test_plot.py::TestPlotting::test_single_split_single_layer",
"tests/_core/test_plot.py::TestPlotting::test_single_split_multi_layer",
"tests/_core/test_plot.py::TestPlotting::test_one_grouping_variable[color]",
"tests/_core/test_plot.py::TestPlotting::test_one_grouping_variable[group]",
"tests/_core/test_plot.py::TestPlotting::test_two_grouping_variables",
"tests/_core/test_plot.py::TestPlotting::test_specified_width",
"tests/_core/test_plot.py::TestPlotting::test_facets_no_subgroups",
"tests/_core/test_plot.py::TestPlotting::test_facets_one_subgroup",
"tests/_core/test_plot.py::TestPlotting::test_layer_specific_facet_disabling",
"tests/_core/test_plot.py::TestPlotting::test_paired_variables",
"tests/_core/test_plot.py::TestPlotting::test_paired_one_dimension",
"tests/_core/test_plot.py::TestPlotting::test_paired_variables_one_subset",
"tests/_core/test_plot.py::TestPlotting::test_paired_and_faceted",
"tests/_core/test_plot.py::TestPlotting::test_stat",
"tests/_core/test_plot.py::TestPlotting::test_move",
"tests/_core/test_plot.py::TestPlotting::test_stat_and_move",
"tests/_core/test_plot.py::TestPlotting::test_stat_log_scale",
"tests/_core/test_plot.py::TestPlotting::test_move_log_scale",
"tests/_core/test_plot.py::TestPlotting::test_multi_move",
"tests/_core/test_plot.py::TestPlotting::test_multi_move_with_pairing",
"tests/_core/test_plot.py::TestPlotting::test_move_with_range",
"tests/_core/test_plot.py::TestPlotting::test_on_axes",
"tests/_core/test_plot.py::TestPlotting::test_on_figure[True]",
"tests/_core/test_plot.py::TestPlotting::test_on_figure[False]",
"tests/_core/test_plot.py::TestPlotting::test_on_subfigure[True]",
"tests/_core/test_plot.py::TestPlotting::test_on_subfigure[False]",
"tests/_core/test_plot.py::TestPlotting::test_limits",
"tests/_core/test_plot.py::TestPlotting::test_labels_axis",
"tests/_core/test_plot.py::TestPlotting::test_labels_legend",
"tests/_core/test_plot.py::TestExceptions::test_semantic_scaling",
"tests/_core/test_plot.py::TestFacetInterface::test_unshared_spacing",
"tests/_core/test_plot.py::TestPairInterface::test_all_numeric[list]",
"tests/_core/test_plot.py::TestPairInterface::test_all_numeric[Index]",
"tests/_core/test_plot.py::TestPairInterface::test_single_dimension[x]",
"tests/_core/test_plot.py::TestPairInterface::test_single_dimension[y]",
"tests/_core/test_plot.py::TestPairInterface::test_non_cross",
"tests/_core/test_plot.py::TestPairInterface::test_list_of_vectors",
"tests/_core/test_plot.py::TestPairInterface::test_with_facets",
"tests/_core/test_plot.py::TestPairInterface::test_axis_sharing",
"tests/_core/test_plot.py::TestPairInterface::test_axis_sharing_with_facets",
"tests/_core/test_plot.py::TestPairInterface::test_x_wrapping",
"tests/_core/test_plot.py::TestPairInterface::test_y_wrapping",
"tests/_core/test_plot.py::TestPairInterface::test_non_cross_wrapping",
"tests/_core/test_plot.py::TestPairInterface::test_orient_inference",
"tests/_core/test_plot.py::TestPairInterface::test_computed_coordinate_orient_inference",
"tests/_core/test_plot.py::TestPairInterface::test_limits",
"tests/_core/test_plot.py::TestPairInterface::test_labels",
"tests/_core/test_plot.py::TestLabelVisibility::test_single_subplot",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_column[facet_kws0-pair_kws0]",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_column[facet_kws1-pair_kws1]",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_row[facet_kws0-pair_kws0]",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_row[facet_kws1-pair_kws1]",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_column_wrapped_non_cross",
"tests/_core/test_plot.py::TestLegend::test_single_layer_single_variable",
"tests/_core/test_plot.py::TestLegend::test_single_layer_common_variable",
"tests/_core/test_plot.py::TestLegend::test_single_layer_common_unnamed_variable",
"tests/_core/test_plot.py::TestLegend::test_single_layer_multi_variable",
"tests/_core/test_plot.py::TestLegend::test_multi_layer_single_variable",
"tests/_core/test_plot.py::TestLegend::test_multi_layer_multi_variable",
"tests/_core/test_plot.py::TestLegend::test_multi_layer_different_artists",
"tests/_core/test_plot.py::TestLegend::test_three_layers",
"tests/_core/test_plot.py::TestLegend::test_identity_scale_ignored",
"tests/_core/test_plot.py::TestLegend::test_suppression_in_add_method",
"tests/_core/test_plot.py::TestLegend::test_anonymous_title",
"tests/_core/test_plot.py::TestLegend::test_legendless_mark",
"tests/_core/test_plot.py::TestLegend::test_legend_has_no_offset",
"tests/_core/test_plot.py::TestLegend::test_layer_legend",
"tests/_core/test_plot.py::TestLegend::test_layer_legend_with_scale_legend",
"tests/_core/test_plot.py::TestLegend::test_layer_legend_title",
"tests/_core/test_scales.py::TestContinuous::test_coordinate_defaults",
"tests/_core/test_scales.py::TestContinuous::test_coordinate_transform",
"tests/_core/test_scales.py::TestContinuous::test_coordinate_transform_with_parameter",
"tests/_core/test_scales.py::TestContinuous::test_coordinate_transform_error",
"tests/_core/test_scales.py::TestContinuous::test_interval_defaults",
"tests/_core/test_scales.py::TestContinuous::test_interval_with_range",
"tests/_core/test_scales.py::TestContinuous::test_interval_with_norm",
"tests/_core/test_scales.py::TestContinuous::test_interval_with_range_norm_and_transform",
"tests/_core/test_scales.py::TestContinuous::test_interval_with_bools",
"tests/_core/test_scales.py::TestContinuous::test_color_defaults",
"tests/_core/test_scales.py::TestContinuous::test_color_named_values",
"tests/_core/test_scales.py::TestContinuous::test_color_tuple_values",
"tests/_core/test_scales.py::TestContinuous::test_color_callable_values",
"tests/_core/test_scales.py::TestContinuous::test_color_with_norm",
"tests/_core/test_scales.py::TestContinuous::test_color_with_transform",
"tests/_core/test_scales.py::TestContinuous::test_tick_locator",
"tests/_core/test_scales.py::TestContinuous::test_tick_upto",
"tests/_core/test_scales.py::TestContinuous::test_tick_every",
"tests/_core/test_scales.py::TestContinuous::test_tick_every_between",
"tests/_core/test_scales.py::TestContinuous::test_tick_at",
"tests/_core/test_scales.py::TestContinuous::test_tick_count",
"tests/_core/test_scales.py::TestContinuous::test_tick_count_between",
"tests/_core/test_scales.py::TestContinuous::test_tick_minor",
"tests/_core/test_scales.py::TestContinuous::test_log_tick_default",
"tests/_core/test_scales.py::TestContinuous::test_log_tick_upto",
"tests/_core/test_scales.py::TestContinuous::test_log_tick_count",
"tests/_core/test_scales.py::TestContinuous::test_log_tick_format_disabled",
"tests/_core/test_scales.py::TestContinuous::test_symlog_tick_default",
"tests/_core/test_scales.py::TestContinuous::test_label_formatter",
"tests/_core/test_scales.py::TestContinuous::test_label_like_pattern",
"tests/_core/test_scales.py::TestContinuous::test_label_like_string",
"tests/_core/test_scales.py::TestContinuous::test_label_like_function",
"tests/_core/test_scales.py::TestContinuous::test_label_base",
"tests/_core/test_scales.py::TestContinuous::test_label_unit",
"tests/_core/test_scales.py::TestContinuous::test_label_unit_with_sep",
"tests/_core/test_scales.py::TestContinuous::test_label_empty_unit",
"tests/_core/test_scales.py::TestContinuous::test_label_base_from_transform",
"tests/_core/test_scales.py::TestContinuous::test_label_type_checks",
"tests/_core/test_scales.py::TestNominal::test_color_numeric_int_float_mix",
"tests/_marks/test_area.py::TestArea::test_single_defaults",
"tests/_marks/test_area.py::TestArea::test_set_properties",
"tests/_marks/test_area.py::TestArea::test_mapped_properties",
"tests/_marks/test_area.py::TestArea::test_unfilled",
"tests/_marks/test_area.py::TestBand::test_range",
"tests/_marks/test_area.py::TestBand::test_auto_range",
"tests/_marks/test_bar.py::TestBar::test_categorical_positions_vertical",
"tests/_marks/test_bar.py::TestBar::test_categorical_positions_horizontal",
"tests/_marks/test_bar.py::TestBar::test_numeric_positions_vertical",
"tests/_marks/test_bar.py::TestBar::test_numeric_positions_horizontal",
"tests/_marks/test_bar.py::TestBar::test_set_properties",
"tests/_marks/test_bar.py::TestBar::test_mapped_properties",
"tests/_marks/test_bar.py::TestBar::test_zero_height_skipped",
"tests/_marks/test_bar.py::TestBar::test_artist_kws_clip",
"tests/_marks/test_bar.py::TestBars::test_positions",
"tests/_marks/test_bar.py::TestBars::test_positions_horizontal",
"tests/_marks/test_bar.py::TestBars::test_width",
"tests/_marks/test_bar.py::TestBars::test_mapped_color_direct_alpha",
"tests/_marks/test_bar.py::TestBars::test_mapped_edgewidth",
"tests/_marks/test_bar.py::TestBars::test_auto_edgewidth",
"tests/_marks/test_bar.py::TestBars::test_unfilled",
"tests/_marks/test_bar.py::TestBars::test_log_scale",
"tests/_marks/test_dot.py::TestDot::test_simple",
"tests/_marks/test_dot.py::TestDot::test_filled_unfilled_mix",
"tests/_marks/test_dot.py::TestDot::test_missing_coordinate_data",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[color]",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[fill]",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[marker]",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[pointsize]",
"tests/_marks/test_dot.py::TestDots::test_simple",
"tests/_marks/test_dot.py::TestDots::test_set_color",
"tests/_marks/test_dot.py::TestDots::test_map_color",
"tests/_marks/test_dot.py::TestDots::test_fill",
"tests/_marks/test_dot.py::TestDots::test_pointsize",
"tests/_marks/test_dot.py::TestDots::test_stroke",
"tests/_marks/test_dot.py::TestDots::test_filled_unfilled_mix",
"tests/_marks/test_line.py::TestPath::test_xy_data",
"tests/_marks/test_line.py::TestPath::test_shared_colors_direct",
"tests/_marks/test_line.py::TestPath::test_separate_colors_direct",
"tests/_marks/test_line.py::TestPath::test_shared_colors_mapped",
"tests/_marks/test_line.py::TestPath::test_separate_colors_mapped",
"tests/_marks/test_line.py::TestPath::test_color_with_alpha",
"tests/_marks/test_line.py::TestPath::test_color_and_alpha",
"tests/_marks/test_line.py::TestPath::test_other_props_direct",
"tests/_marks/test_line.py::TestPath::test_other_props_mapped",
"tests/_marks/test_line.py::TestPath::test_capstyle",
"tests/_marks/test_line.py::TestLine::test_xy_data",
"tests/_marks/test_line.py::TestPaths::test_xy_data",
"tests/_marks/test_line.py::TestPaths::test_set_properties",
"tests/_marks/test_line.py::TestPaths::test_mapped_properties",
"tests/_marks/test_line.py::TestPaths::test_color_with_alpha",
"tests/_marks/test_line.py::TestPaths::test_color_and_alpha",
"tests/_marks/test_line.py::TestPaths::test_capstyle",
"tests/_marks/test_line.py::TestLines::test_xy_data",
"tests/_marks/test_line.py::TestLines::test_single_orient_value",
"tests/_marks/test_line.py::TestRange::test_xy_data",
"tests/_marks/test_line.py::TestRange::test_auto_range",
"tests/_marks/test_line.py::TestRange::test_mapped_color",
"tests/_marks/test_line.py::TestRange::test_direct_properties",
"tests/_marks/test_line.py::TestDash::test_xy_data",
"tests/_marks/test_line.py::TestDash::test_xy_data_grouped",
"tests/_marks/test_line.py::TestDash::test_set_properties",
"tests/_marks/test_line.py::TestDash::test_mapped_properties",
"tests/_marks/test_line.py::TestDash::test_width",
"tests/_marks/test_line.py::TestDash::test_dodge",
"tests/_marks/test_text.py::TestText::test_simple",
"tests/_marks/test_text.py::TestText::test_set_properties",
"tests/_marks/test_text.py::TestText::test_mapped_properties",
"tests/_marks/test_text.py::TestText::test_mapped_alignment",
"tests/_marks/test_text.py::TestText::test_identity_fontsize",
"tests/_marks/test_text.py::TestText::test_offset_centered",
"tests/_marks/test_text.py::TestText::test_offset_valign",
"tests/_marks/test_text.py::TestText::test_offset_halign",
"tests/_stats/test_density.py::TestKDE::test_cumulative[True]",
"tests/_stats/test_density.py::TestKDE::test_cumulative[False]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_cumulative",
"tests/test_matrix.py::TestDendrogram::test_ndarray_input",
"tests/test_matrix.py::TestDendrogram::test_df_input",
"tests/test_matrix.py::TestDendrogram::test_df_multindex_input",
"tests/test_matrix.py::TestDendrogram::test_axis0_input",
"tests/test_matrix.py::TestDendrogram::test_rotate_input",
"tests/test_matrix.py::TestDendrogram::test_rotate_axis0_input",
"tests/test_matrix.py::TestDendrogram::test_custom_linkage",
"tests/test_matrix.py::TestDendrogram::test_label_false",
"tests/test_matrix.py::TestDendrogram::test_linkage_scipy",
"tests/test_matrix.py::TestDendrogram::test_fastcluster_other_method",
"tests/test_matrix.py::TestDendrogram::test_fastcluster_non_euclidean",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_plot",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_rotate",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_ticklabel_rotation",
"tests/test_matrix.py::TestClustermap::test_ndarray_input",
"tests/test_matrix.py::TestClustermap::test_df_input",
"tests/test_matrix.py::TestClustermap::test_corr_df_input",
"tests/test_matrix.py::TestClustermap::test_pivot_input",
"tests/test_matrix.py::TestClustermap::test_colors_input",
"tests/test_matrix.py::TestClustermap::test_categorical_colors_input",
"tests/test_matrix.py::TestClustermap::test_nested_colors_input",
"tests/test_matrix.py::TestClustermap::test_colors_input_custom_cmap",
"tests/test_matrix.py::TestClustermap::test_z_score",
"tests/test_matrix.py::TestClustermap::test_z_score_axis0",
"tests/test_matrix.py::TestClustermap::test_standard_scale",
"tests/test_matrix.py::TestClustermap::test_standard_scale_axis0",
"tests/test_matrix.py::TestClustermap::test_z_score_standard_scale",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap",
"tests/test_matrix.py::TestClustermap::test_nested_color_list_to_matrix_and_cmap",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap_axis1",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap_different_sizes",
"tests/test_matrix.py::TestClustermap::test_savefig",
"tests/test_matrix.py::TestClustermap::test_plot_dendrograms",
"tests/test_matrix.py::TestClustermap::test_cluster_false",
"tests/test_matrix.py::TestClustermap::test_row_col_colors",
"tests/test_matrix.py::TestClustermap::test_cluster_false_row_col_colors",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_shuffled",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_missing",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_one_axis",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series_shuffled",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series_missing",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_ignore_heatmap_kwargs",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_raise_on_mixed_index_types",
"tests/test_matrix.py::TestClustermap::test_mask_reorganization",
"tests/test_matrix.py::TestClustermap::test_ticklabel_reorganization",
"tests/test_matrix.py::TestClustermap::test_noticklabels",
"tests/test_matrix.py::TestClustermap::test_size_ratios",
"tests/test_matrix.py::TestClustermap::test_cbar_pos",
"tests/test_matrix.py::TestClustermap::test_square_warning",
"tests/test_matrix.py::TestClustermap::test_clustermap_annotation",
"tests/test_matrix.py::TestClustermap::test_tree_kws",
"tests/test_rcmod.py::TestFonts::test_set_font",
"tests/test_rcmod.py::TestFonts::test_different_sans_serif",
"tests/test_regression.py::TestRegressionPlotter::test_fast_regression",
"tests/test_regression.py::TestRegressionPlotter::test_regress_poly",
"tests/test_regression.py::TestRegressionPlotter::test_regress_n_boot",
"tests/test_regression.py::TestRegressionPlotter::test_regress_without_bootstrap",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_regression",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_perfect_separation",
"tests/test_regression.py::TestRegressionPlotter::test_robust_regression",
"tests/test_regression.py::TestRegressionPlotter::test_lowess_regression",
"tests/test_regression.py::TestRegressionPlots::test_residplot_lowess",
"tests/test_statistics.py::TestKDE::test_cumulative",
"tests/test_statistics.py::TestKDE::test_bivariate_cumulative",
"tests/test_statistics.py::TestECDF::test_against_statsmodels"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-1
|
1.0
|
{
"code": "diff --git b/seaborn/_core/plot.py a/seaborn/_core/plot.py\nindex 0d0e710f..c9dc61c8 100644\n--- b/seaborn/_core/plot.py\n+++ a/seaborn/_core/plot.py\n@@ -527,6 +527,52 @@ class Plot:\n .. include:: ../docstrings/objects.Plot.add.rst\n \n \"\"\"\n+ if not isinstance(mark, Mark):\n+ msg = f\"mark must be a Mark instance, not {type(mark)!r}.\"\n+ raise TypeError(msg)\n+\n+ # TODO This API for transforms was a late decision, and previously Plot.add\n+ # accepted 0 or 1 Stat instances and 0, 1, or a list of Move instances.\n+ # It will take some work to refactor the internals so that Stat and Move are\n+ # treated identically, and until then well need to \"unpack\" the transforms\n+ # here and enforce limitations on the order / types.\n+\n+ stat: Optional[Stat]\n+ move: Optional[List[Move]]\n+ error = False\n+ if not transforms:\n+ stat, move = None, None\n+ elif isinstance(transforms[0], Stat):\n+ stat = transforms[0]\n+ move = [m for m in transforms[1:] if isinstance(m, Move)]\n+ error = len(move) != len(transforms) - 1\n+ else:\n+ stat = None\n+ move = [m for m in transforms if isinstance(m, Move)]\n+ error = len(move) != len(transforms)\n+\n+ if error:\n+ msg = \" \".join([\n+ \"Transforms must have at most one Stat type (in the first position),\",\n+ \"and all others must be a Move type. Given transform type(s):\",\n+ \", \".join(str(type(t).__name__) for t in transforms) + \".\"\n+ ])\n+ raise TypeError(msg)\n+\n+ new = self._clone()\n+ new._layers.append({\n+ \"mark\": mark,\n+ \"stat\": stat,\n+ \"move\": move,\n+ # TODO it doesn't work to supply scalars to variables, but it should\n+ \"vars\": variables,\n+ \"source\": data,\n+ \"legend\": legend,\n+ \"label\": label,\n+ \"orient\": {\"v\": \"x\", \"h\": \"y\"}.get(orient, orient), # type: ignore\n+ })\n+\n+ return new\n \n def pair(\n self,\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_core/plot.py b/seaborn/_core/plot.py\nindex c9dc61c8..0d0e710f 100644\n--- a/seaborn/_core/plot.py\n+++ b/seaborn/_core/plot.py\n@@ -527,52 +527,6 @@ class Plot:\n .. include:: ../docstrings/objects.Plot.add.rst\n \n \"\"\"\n- if not isinstance(mark, Mark):\n- msg = f\"mark must be a Mark instance, not {type(mark)!r}.\"\n- raise TypeError(msg)\n-\n- # TODO This API for transforms was a late decision, and previously Plot.add\n- # accepted 0 or 1 Stat instances and 0, 1, or a list of Move instances.\n- # It will take some work to refactor the internals so that Stat and Move are\n- # treated identically, and until then well need to \"unpack\" the transforms\n- # here and enforce limitations on the order / types.\n-\n- stat: Optional[Stat]\n- move: Optional[List[Move]]\n- error = False\n- if not transforms:\n- stat, move = None, None\n- elif isinstance(transforms[0], Stat):\n- stat = transforms[0]\n- move = [m for m in transforms[1:] if isinstance(m, Move)]\n- error = len(move) != len(transforms) - 1\n- else:\n- stat = None\n- move = [m for m in transforms if isinstance(m, Move)]\n- error = len(move) != len(transforms)\n-\n- if error:\n- msg = \" \".join([\n- \"Transforms must have at most one Stat type (in the first position),\",\n- \"and all others must be a Move type. Given transform type(s):\",\n- \", \".join(str(type(t).__name__) for t in transforms) + \".\"\n- ])\n- raise TypeError(msg)\n-\n- new = self._clone()\n- new._layers.append({\n- \"mark\": mark,\n- \"stat\": stat,\n- \"move\": move,\n- # TODO it doesn't work to supply scalars to variables, but it should\n- \"vars\": variables,\n- \"source\": data,\n- \"legend\": legend,\n- \"label\": label,\n- \"orient\": {\"v\": \"x\", \"h\": \"y\"}.get(orient, orient), # type: ignore\n- })\n-\n- return new\n \n def pair(\n self,\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_core/plot.py.\nHere is the description for the function:\n def add(\n self,\n mark: Mark,\n *transforms: Stat | Move,\n orient: str | None = None,\n legend: bool = True,\n label: str | None = None,\n data: DataSource = None,\n **variables: VariableSpec,\n ) -> Plot:\n \"\"\"\n Specify a layer of the visualization in terms of mark and data transform(s).\n\n This is the main method for specifying how the data should be visualized.\n It can be called multiple times with different arguments to define\n a plot with multiple layers.\n\n Parameters\n ----------\n mark : :class:`Mark`\n The visual representation of the data to use in this layer.\n transforms : :class:`Stat` or :class:`Move`\n Objects representing transforms to be applied before plotting the data.\n Currently, at most one :class:`Stat` can be used, and it\n must be passed first. This constraint will be relaxed in the future.\n orient : \"x\", \"y\", \"v\", or \"h\"\n The orientation of the mark, which also affects how transforms are computed.\n Typically corresponds to the axis that defines groups for aggregation.\n The \"v\" (vertical) and \"h\" (horizontal) options are synonyms for \"x\" / \"y\",\n but may be more intuitive with some marks. When not provided, an\n orientation will be inferred from characteristics of the data and scales.\n legend : bool\n Option to suppress the mark/mappings for this layer from the legend.\n label : str\n A label to use for the layer in the legend, independent of any mappings.\n data : DataFrame or dict\n Data source to override the global source provided in the constructor.\n variables : data vectors or identifiers\n Additional layer-specific variables, including variables that will be\n passed directly to the transforms without scaling.\n\n Examples\n --------\n .. include:: ../docstrings/objects.Plot.add.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_core/test_data.py::TestPlotData::test_data_interchange_support_test",
"tests/_core/test_plot.py::TestLayerAddition::test_without_data",
"tests/_core/test_plot.py::TestLayerAddition::test_with_new_variable_by_name",
"tests/_core/test_plot.py::TestLayerAddition::test_with_new_variable_by_vector",
"tests/_core/test_plot.py::TestLayerAddition::test_with_late_data_definition",
"tests/_core/test_plot.py::TestLayerAddition::test_with_new_data_definition",
"tests/_core/test_plot.py::TestLayerAddition::test_drop_variable",
"tests/_core/test_plot.py::TestLayerAddition::test_stat_default",
"tests/_core/test_plot.py::TestLayerAddition::test_stat_nondefault",
"tests/_core/test_plot.py::TestLayerAddition::test_orient[x-x]",
"tests/_core/test_plot.py::TestLayerAddition::test_orient[y-y]",
"tests/_core/test_plot.py::TestLayerAddition::test_orient[v-x]",
"tests/_core/test_plot.py::TestLayerAddition::test_orient[h-y]",
"tests/_core/test_plot.py::TestLayerAddition::test_variable_list",
"tests/_core/test_plot.py::TestLayerAddition::test_type_checks",
"tests/_core/test_plot.py::TestScaling::test_inference",
"tests/_core/test_plot.py::TestScaling::test_inference_from_layer_data",
"tests/_core/test_plot.py::TestScaling::test_inference_joins",
"tests/_core/test_plot.py::TestScaling::test_inferred_categorical_converter",
"tests/_core/test_plot.py::TestScaling::test_explicit_categorical_converter",
"tests/_core/test_plot.py::TestScaling::test_categorical_as_datetime",
"tests/_core/test_plot.py::TestScaling::test_log_scale_name",
"tests/_core/test_plot.py::TestScaling::test_mark_data_log_transform_is_inverted",
"tests/_core/test_plot.py::TestScaling::test_mark_data_log_transfrom_with_stat",
"tests/_core/test_plot.py::TestScaling::test_mark_data_from_categorical",
"tests/_core/test_plot.py::TestScaling::test_mark_data_from_datetime",
"tests/_core/test_plot.py::TestScaling::test_computed_var_ticks",
"tests/_core/test_plot.py::TestScaling::test_computed_var_transform",
"tests/_core/test_plot.py::TestScaling::test_explicit_range_with_axis_scaling",
"tests/_core/test_plot.py::TestScaling::test_derived_range_with_axis_scaling",
"tests/_core/test_plot.py::TestScaling::test_facet_categories",
"tests/_core/test_plot.py::TestScaling::test_facet_categories_unshared",
"tests/_core/test_plot.py::TestScaling::test_facet_categories_single_dim_shared",
"tests/_core/test_plot.py::TestScaling::test_pair_categories",
"tests/_core/test_plot.py::TestScaling::test_pair_categories_shared",
"tests/_core/test_plot.py::TestScaling::test_identity_mapping_linewidth",
"tests/_core/test_plot.py::TestScaling::test_pair_single_coordinate_stat_orient",
"tests/_core/test_plot.py::TestScaling::test_inferred_nominal_passed_to_stat",
"tests/_core/test_plot.py::TestScaling::test_identity_mapping_color_strings",
"tests/_core/test_plot.py::TestScaling::test_identity_mapping_color_tuples",
"tests/_core/test_plot.py::TestScaling::test_undefined_variable_raises",
"tests/_core/test_plot.py::TestPlotting::test_empty",
"tests/_core/test_plot.py::TestPlotting::test_no_orient_variance",
"tests/_core/test_plot.py::TestPlotting::test_single_split_single_layer",
"tests/_core/test_plot.py::TestPlotting::test_single_split_multi_layer",
"tests/_core/test_plot.py::TestPlotting::test_one_grouping_variable[color]",
"tests/_core/test_plot.py::TestPlotting::test_one_grouping_variable[group]",
"tests/_core/test_plot.py::TestPlotting::test_two_grouping_variables",
"tests/_core/test_plot.py::TestPlotting::test_specified_width",
"tests/_core/test_plot.py::TestPlotting::test_facets_no_subgroups",
"tests/_core/test_plot.py::TestPlotting::test_facets_one_subgroup",
"tests/_core/test_plot.py::TestPlotting::test_layer_specific_facet_disabling",
"tests/_core/test_plot.py::TestPlotting::test_paired_variables",
"tests/_core/test_plot.py::TestPlotting::test_paired_one_dimension",
"tests/_core/test_plot.py::TestPlotting::test_paired_variables_one_subset",
"tests/_core/test_plot.py::TestPlotting::test_paired_and_faceted",
"tests/_core/test_plot.py::TestPlotting::test_stat",
"tests/_core/test_plot.py::TestPlotting::test_move",
"tests/_core/test_plot.py::TestPlotting::test_stat_and_move",
"tests/_core/test_plot.py::TestPlotting::test_stat_log_scale",
"tests/_core/test_plot.py::TestPlotting::test_move_log_scale",
"tests/_core/test_plot.py::TestPlotting::test_multi_move",
"tests/_core/test_plot.py::TestPlotting::test_multi_move_with_pairing",
"tests/_core/test_plot.py::TestPlotting::test_move_with_range",
"tests/_core/test_plot.py::TestPlotting::test_methods_clone",
"tests/_core/test_plot.py::TestPlotting::test_on_axes",
"tests/_core/test_plot.py::TestPlotting::test_on_figure[True]",
"tests/_core/test_plot.py::TestPlotting::test_on_figure[False]",
"tests/_core/test_plot.py::TestPlotting::test_on_subfigure[True]",
"tests/_core/test_plot.py::TestPlotting::test_on_subfigure[False]",
"tests/_core/test_plot.py::TestPlotting::test_axis_labels_from_layer",
"tests/_core/test_plot.py::TestPlotting::test_axis_labels_are_first_name",
"tests/_core/test_plot.py::TestPlotting::test_labels_legend",
"tests/_core/test_plot.py::TestExceptions::test_scale_setup",
"tests/_core/test_plot.py::TestExceptions::test_coordinate_scaling",
"tests/_core/test_plot.py::TestExceptions::test_semantic_scaling",
"tests/_core/test_plot.py::TestFacetInterface::test_unshared_spacing",
"tests/_core/test_plot.py::TestPairInterface::test_orient_inference",
"tests/_core/test_plot.py::TestPairInterface::test_computed_coordinate_orient_inference",
"tests/_core/test_plot.py::TestLegend::test_single_layer_single_variable",
"tests/_core/test_plot.py::TestLegend::test_single_layer_common_variable",
"tests/_core/test_plot.py::TestLegend::test_single_layer_common_unnamed_variable",
"tests/_core/test_plot.py::TestLegend::test_single_layer_multi_variable",
"tests/_core/test_plot.py::TestLegend::test_multi_layer_single_variable",
"tests/_core/test_plot.py::TestLegend::test_multi_layer_multi_variable",
"tests/_core/test_plot.py::TestLegend::test_multi_layer_different_artists",
"tests/_core/test_plot.py::TestLegend::test_three_layers",
"tests/_core/test_plot.py::TestLegend::test_identity_scale_ignored",
"tests/_core/test_plot.py::TestLegend::test_suppression_in_add_method",
"tests/_core/test_plot.py::TestLegend::test_anonymous_title",
"tests/_core/test_plot.py::TestLegend::test_legendless_mark",
"tests/_core/test_plot.py::TestLegend::test_legend_has_no_offset",
"tests/_core/test_plot.py::TestLegend::test_layer_legend",
"tests/_core/test_plot.py::TestLegend::test_layer_legend_with_scale_legend",
"tests/_core/test_plot.py::TestLegend::test_layer_legend_title",
"tests/_core/test_scales.py::TestNominal::test_color_numeric_int_float_mix",
"tests/_marks/test_area.py::TestArea::test_single_defaults",
"tests/_marks/test_area.py::TestArea::test_set_properties",
"tests/_marks/test_area.py::TestArea::test_mapped_properties",
"tests/_marks/test_area.py::TestArea::test_unfilled",
"tests/_marks/test_area.py::TestBand::test_range",
"tests/_marks/test_area.py::TestBand::test_auto_range",
"tests/_marks/test_bar.py::TestBar::test_categorical_positions_vertical",
"tests/_marks/test_bar.py::TestBar::test_categorical_positions_horizontal",
"tests/_marks/test_bar.py::TestBar::test_numeric_positions_vertical",
"tests/_marks/test_bar.py::TestBar::test_numeric_positions_horizontal",
"tests/_marks/test_bar.py::TestBar::test_set_properties",
"tests/_marks/test_bar.py::TestBar::test_mapped_properties",
"tests/_marks/test_bar.py::TestBar::test_zero_height_skipped",
"tests/_marks/test_bar.py::TestBar::test_artist_kws_clip",
"tests/_marks/test_bar.py::TestBars::test_positions",
"tests/_marks/test_bar.py::TestBars::test_positions_horizontal",
"tests/_marks/test_bar.py::TestBars::test_width",
"tests/_marks/test_bar.py::TestBars::test_mapped_color_direct_alpha",
"tests/_marks/test_bar.py::TestBars::test_mapped_edgewidth",
"tests/_marks/test_bar.py::TestBars::test_auto_edgewidth",
"tests/_marks/test_bar.py::TestBars::test_unfilled",
"tests/_marks/test_bar.py::TestBars::test_log_scale",
"tests/_marks/test_dot.py::TestDot::test_simple",
"tests/_marks/test_dot.py::TestDot::test_filled_unfilled_mix",
"tests/_marks/test_dot.py::TestDot::test_missing_coordinate_data",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[color]",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[fill]",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[marker]",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[pointsize]",
"tests/_marks/test_dot.py::TestDots::test_simple",
"tests/_marks/test_dot.py::TestDots::test_set_color",
"tests/_marks/test_dot.py::TestDots::test_map_color",
"tests/_marks/test_dot.py::TestDots::test_fill",
"tests/_marks/test_dot.py::TestDots::test_pointsize",
"tests/_marks/test_dot.py::TestDots::test_stroke",
"tests/_marks/test_dot.py::TestDots::test_filled_unfilled_mix",
"tests/_marks/test_line.py::TestPath::test_xy_data",
"tests/_marks/test_line.py::TestPath::test_shared_colors_direct",
"tests/_marks/test_line.py::TestPath::test_separate_colors_direct",
"tests/_marks/test_line.py::TestPath::test_shared_colors_mapped",
"tests/_marks/test_line.py::TestPath::test_separate_colors_mapped",
"tests/_marks/test_line.py::TestPath::test_color_with_alpha",
"tests/_marks/test_line.py::TestPath::test_color_and_alpha",
"tests/_marks/test_line.py::TestPath::test_other_props_direct",
"tests/_marks/test_line.py::TestPath::test_other_props_mapped",
"tests/_marks/test_line.py::TestPath::test_capstyle",
"tests/_marks/test_line.py::TestLine::test_xy_data",
"tests/_marks/test_line.py::TestPaths::test_xy_data",
"tests/_marks/test_line.py::TestPaths::test_set_properties",
"tests/_marks/test_line.py::TestPaths::test_mapped_properties",
"tests/_marks/test_line.py::TestPaths::test_color_with_alpha",
"tests/_marks/test_line.py::TestPaths::test_color_and_alpha",
"tests/_marks/test_line.py::TestPaths::test_capstyle",
"tests/_marks/test_line.py::TestLines::test_xy_data",
"tests/_marks/test_line.py::TestLines::test_single_orient_value",
"tests/_marks/test_line.py::TestRange::test_xy_data",
"tests/_marks/test_line.py::TestRange::test_auto_range",
"tests/_marks/test_line.py::TestRange::test_mapped_color",
"tests/_marks/test_line.py::TestRange::test_direct_properties",
"tests/_marks/test_line.py::TestDash::test_xy_data",
"tests/_marks/test_line.py::TestDash::test_xy_data_grouped",
"tests/_marks/test_line.py::TestDash::test_set_properties",
"tests/_marks/test_line.py::TestDash::test_mapped_properties",
"tests/_marks/test_line.py::TestDash::test_width",
"tests/_marks/test_line.py::TestDash::test_dodge",
"tests/_marks/test_text.py::TestText::test_simple",
"tests/_marks/test_text.py::TestText::test_set_properties",
"tests/_marks/test_text.py::TestText::test_mapped_properties",
"tests/_marks/test_text.py::TestText::test_mapped_alignment",
"tests/_marks/test_text.py::TestText::test_identity_fontsize",
"tests/_marks/test_text.py::TestText::test_offset_centered",
"tests/_marks/test_text.py::TestText::test_offset_valign",
"tests/_marks/test_text.py::TestText::test_offset_halign",
"tests/_stats/test_density.py::TestKDE::test_cumulative[True]",
"tests/_stats/test_density.py::TestKDE::test_cumulative[False]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_cumulative",
"tests/test_matrix.py::TestDendrogram::test_ndarray_input",
"tests/test_matrix.py::TestDendrogram::test_df_input",
"tests/test_matrix.py::TestDendrogram::test_df_multindex_input",
"tests/test_matrix.py::TestDendrogram::test_axis0_input",
"tests/test_matrix.py::TestDendrogram::test_rotate_input",
"tests/test_matrix.py::TestDendrogram::test_rotate_axis0_input",
"tests/test_matrix.py::TestDendrogram::test_custom_linkage",
"tests/test_matrix.py::TestDendrogram::test_label_false",
"tests/test_matrix.py::TestDendrogram::test_linkage_scipy",
"tests/test_matrix.py::TestDendrogram::test_fastcluster_other_method",
"tests/test_matrix.py::TestDendrogram::test_fastcluster_non_euclidean",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_plot",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_rotate",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_ticklabel_rotation",
"tests/test_matrix.py::TestClustermap::test_ndarray_input",
"tests/test_matrix.py::TestClustermap::test_df_input",
"tests/test_matrix.py::TestClustermap::test_corr_df_input",
"tests/test_matrix.py::TestClustermap::test_pivot_input",
"tests/test_matrix.py::TestClustermap::test_colors_input",
"tests/test_matrix.py::TestClustermap::test_categorical_colors_input",
"tests/test_matrix.py::TestClustermap::test_nested_colors_input",
"tests/test_matrix.py::TestClustermap::test_colors_input_custom_cmap",
"tests/test_matrix.py::TestClustermap::test_z_score",
"tests/test_matrix.py::TestClustermap::test_z_score_axis0",
"tests/test_matrix.py::TestClustermap::test_standard_scale",
"tests/test_matrix.py::TestClustermap::test_standard_scale_axis0",
"tests/test_matrix.py::TestClustermap::test_z_score_standard_scale",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap",
"tests/test_matrix.py::TestClustermap::test_nested_color_list_to_matrix_and_cmap",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap_axis1",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap_different_sizes",
"tests/test_matrix.py::TestClustermap::test_savefig",
"tests/test_matrix.py::TestClustermap::test_plot_dendrograms",
"tests/test_matrix.py::TestClustermap::test_cluster_false",
"tests/test_matrix.py::TestClustermap::test_row_col_colors",
"tests/test_matrix.py::TestClustermap::test_cluster_false_row_col_colors",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_shuffled",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_missing",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_one_axis",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series_shuffled",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series_missing",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_ignore_heatmap_kwargs",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_raise_on_mixed_index_types",
"tests/test_matrix.py::TestClustermap::test_mask_reorganization",
"tests/test_matrix.py::TestClustermap::test_ticklabel_reorganization",
"tests/test_matrix.py::TestClustermap::test_noticklabels",
"tests/test_matrix.py::TestClustermap::test_size_ratios",
"tests/test_matrix.py::TestClustermap::test_cbar_pos",
"tests/test_matrix.py::TestClustermap::test_square_warning",
"tests/test_matrix.py::TestClustermap::test_clustermap_annotation",
"tests/test_matrix.py::TestClustermap::test_tree_kws",
"tests/test_rcmod.py::TestFonts::test_set_font",
"tests/test_rcmod.py::TestFonts::test_different_sans_serif",
"tests/test_regression.py::TestRegressionPlotter::test_fast_regression",
"tests/test_regression.py::TestRegressionPlotter::test_regress_poly",
"tests/test_regression.py::TestRegressionPlotter::test_regress_n_boot",
"tests/test_regression.py::TestRegressionPlotter::test_regress_without_bootstrap",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_regression",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_perfect_separation",
"tests/test_regression.py::TestRegressionPlotter::test_robust_regression",
"tests/test_regression.py::TestRegressionPlotter::test_lowess_regression",
"tests/test_regression.py::TestRegressionPlots::test_residplot_lowess",
"tests/test_statistics.py::TestKDE::test_cumulative",
"tests/test_statistics.py::TestKDE::test_bivariate_cumulative",
"tests/test_statistics.py::TestECDF::test_against_statsmodels"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-2
|
1.0
|
{
"code": "diff --git b/seaborn/_core/plot.py a/seaborn/_core/plot.py\nindex 653dd79c..c9dc61c8 100644\n--- b/seaborn/_core/plot.py\n+++ a/seaborn/_core/plot.py\n@@ -663,6 +663,40 @@ class Plot:\n .. include:: ../docstrings/objects.Plot.facet.rst\n \n \"\"\"\n+ variables: dict[str, VariableSpec] = {}\n+ if col is not None:\n+ variables[\"col\"] = col\n+ if row is not None:\n+ variables[\"row\"] = row\n+\n+ structure = {}\n+ if isinstance(order, dict):\n+ for dim in [\"col\", \"row\"]:\n+ dim_order = order.get(dim)\n+ if dim_order is not None:\n+ structure[dim] = list(dim_order)\n+ elif order is not None:\n+ if col is not None and row is not None:\n+ err = \" \".join([\n+ \"When faceting on both col= and row=, passing `order` as a list\"\n+ \"is ambiguous. Use a dict with 'col' and/or 'row' keys instead.\"\n+ ])\n+ raise RuntimeError(err)\n+ elif col is not None:\n+ structure[\"col\"] = list(order)\n+ elif row is not None:\n+ structure[\"row\"] = list(order)\n+\n+ spec: FacetSpec = {\n+ \"variables\": variables,\n+ \"structure\": structure,\n+ \"wrap\": wrap,\n+ }\n+\n+ new = self._clone()\n+ new._facet_spec.update(spec)\n+\n+ return new\n \n # TODO def twin()?\n \n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_core/plot.py b/seaborn/_core/plot.py\nindex c9dc61c8..653dd79c 100644\n--- a/seaborn/_core/plot.py\n+++ b/seaborn/_core/plot.py\n@@ -663,40 +663,6 @@ class Plot:\n .. include:: ../docstrings/objects.Plot.facet.rst\n \n \"\"\"\n- variables: dict[str, VariableSpec] = {}\n- if col is not None:\n- variables[\"col\"] = col\n- if row is not None:\n- variables[\"row\"] = row\n-\n- structure = {}\n- if isinstance(order, dict):\n- for dim in [\"col\", \"row\"]:\n- dim_order = order.get(dim)\n- if dim_order is not None:\n- structure[dim] = list(dim_order)\n- elif order is not None:\n- if col is not None and row is not None:\n- err = \" \".join([\n- \"When faceting on both col= and row=, passing `order` as a list\"\n- \"is ambiguous. Use a dict with 'col' and/or 'row' keys instead.\"\n- ])\n- raise RuntimeError(err)\n- elif col is not None:\n- structure[\"col\"] = list(order)\n- elif row is not None:\n- structure[\"row\"] = list(order)\n-\n- spec: FacetSpec = {\n- \"variables\": variables,\n- \"structure\": structure,\n- \"wrap\": wrap,\n- }\n-\n- new = self._clone()\n- new._facet_spec.update(spec)\n-\n- return new\n \n # TODO def twin()?\n \n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_core/plot.py.\nHere is the description for the function:\n def facet(\n self,\n col: VariableSpec = None,\n row: VariableSpec = None,\n order: OrderSpec | dict[str, OrderSpec] = None,\n wrap: int | None = None,\n ) -> Plot:\n \"\"\"\n Produce subplots with conditional subsets of the data.\n\n Parameters\n ----------\n col, row : data vectors or identifiers\n Variables used to define subsets along the columns and/or rows of the grid.\n Can be references to the global data source passed in the constructor.\n order : list of strings, or dict with dimensional keys\n Define the order of the faceting variables.\n wrap : int\n When using only `col` or `row`, wrap subplots across a two-dimensional\n grid with this many subplots on the faceting dimension.\n\n Examples\n --------\n .. include:: ../docstrings/objects.Plot.facet.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_core/test_data.py::TestPlotData::test_data_interchange_support_test",
"tests/_core/test_plot.py::TestLayerAddition::test_stat_default",
"tests/_core/test_plot.py::TestScaling::test_categorical_as_datetime",
"tests/_core/test_plot.py::TestScaling::test_faceted_log_scale",
"tests/_core/test_plot.py::TestScaling::test_log_scale_name",
"tests/_core/test_plot.py::TestScaling::test_facet_categories",
"tests/_core/test_plot.py::TestScaling::test_facet_categories_unshared",
"tests/_core/test_plot.py::TestScaling::test_facet_categories_single_dim_shared",
"tests/_core/test_plot.py::TestScaling::test_identity_mapping_color_strings",
"tests/_core/test_plot.py::TestScaling::test_undefined_variable_raises",
"tests/_core/test_plot.py::TestPlotting::test_facets_no_subgroups",
"tests/_core/test_plot.py::TestPlotting::test_facets_one_subgroup",
"tests/_core/test_plot.py::TestPlotting::test_layer_specific_facet_disabling",
"tests/_core/test_plot.py::TestPlotting::test_paired_and_faceted",
"tests/_core/test_plot.py::TestPlotting::test_methods_clone",
"tests/_core/test_plot.py::TestPlotting::test_on_figure[True]",
"tests/_core/test_plot.py::TestPlotting::test_on_subfigure[True]",
"tests/_core/test_plot.py::TestPlotting::test_on_axes_with_subplots_error",
"tests/_core/test_plot.py::TestPlotting::test_labels_facets",
"tests/_core/test_plot.py::TestPlotting::test_title_facet_function",
"tests/_core/test_plot.py::TestFacetInterface::test_1d[row]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_as_vector[row]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_with_order[row-reverse]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_with_order[col-reverse]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d[col]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_as_vector[col]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_with_order[col-subset]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_with_order[row-subset]",
"tests/_core/test_plot.py::TestFacetInterface::test_2d_with_order[subset]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_with_order[col-expand]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_with_order[row-expand]",
"tests/_core/test_plot.py::TestFacetInterface::test_2d_with_order[expand]",
"tests/_core/test_plot.py::TestFacetInterface::test_2d_with_order[reverse]",
"tests/_core/test_plot.py::TestFacetInterface::test_2d",
"tests/_core/test_plot.py::TestFacetInterface::test_layout_algo[tight]",
"tests/_core/test_plot.py::TestFacetInterface::test_layout_algo[constrained]",
"tests/_core/test_plot.py::TestFacetInterface::test_axis_sharing",
"tests/_core/test_plot.py::TestFacetInterface::test_unshared_spacing",
"tests/_core/test_plot.py::TestFacetInterface::test_col_wrapping",
"tests/_core/test_plot.py::TestFacetInterface::test_row_wrapping",
"tests/_core/test_plot.py::TestPairInterface::test_with_facets",
"tests/_core/test_plot.py::TestPairInterface::test_error_on_facet_overlap[variables0]",
"tests/_core/test_plot.py::TestPairInterface::test_error_on_facet_overlap[variables1]",
"tests/_core/test_plot.py::TestPairInterface::test_error_on_wrap_overlap[variables0]",
"tests/_core/test_plot.py::TestPairInterface::test_error_on_wrap_overlap[variables1]",
"tests/_core/test_plot.py::TestPairInterface::test_axis_sharing_with_facets",
"tests/_core/test_plot.py::TestPairInterface::test_two_variables_single_order_error",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_column_wrapped",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_row_wrapped",
"tests/_core/test_plot.py::TestLabelVisibility::test_2d",
"tests/_core/test_plot.py::TestLabelVisibility::test_2d_unshared",
"tests/_core/test_scales.py::TestNominal::test_color_numeric_int_float_mix",
"tests/_stats/test_density.py::TestKDE::test_cumulative[True]",
"tests/_stats/test_density.py::TestKDE::test_cumulative[False]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_cumulative",
"tests/test_matrix.py::TestDendrogram::test_ndarray_input",
"tests/test_matrix.py::TestDendrogram::test_df_input",
"tests/test_matrix.py::TestDendrogram::test_df_multindex_input",
"tests/test_matrix.py::TestDendrogram::test_axis0_input",
"tests/test_matrix.py::TestDendrogram::test_rotate_input",
"tests/test_matrix.py::TestDendrogram::test_rotate_axis0_input",
"tests/test_matrix.py::TestDendrogram::test_custom_linkage",
"tests/test_matrix.py::TestDendrogram::test_label_false",
"tests/test_matrix.py::TestDendrogram::test_linkage_scipy",
"tests/test_matrix.py::TestDendrogram::test_fastcluster_other_method",
"tests/test_matrix.py::TestDendrogram::test_fastcluster_non_euclidean",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_plot",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_rotate",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_ticklabel_rotation",
"tests/test_matrix.py::TestClustermap::test_ndarray_input",
"tests/test_matrix.py::TestClustermap::test_df_input",
"tests/test_matrix.py::TestClustermap::test_corr_df_input",
"tests/test_matrix.py::TestClustermap::test_pivot_input",
"tests/test_matrix.py::TestClustermap::test_colors_input",
"tests/test_matrix.py::TestClustermap::test_categorical_colors_input",
"tests/test_matrix.py::TestClustermap::test_nested_colors_input",
"tests/test_matrix.py::TestClustermap::test_colors_input_custom_cmap",
"tests/test_matrix.py::TestClustermap::test_z_score",
"tests/test_matrix.py::TestClustermap::test_z_score_axis0",
"tests/test_matrix.py::TestClustermap::test_standard_scale",
"tests/test_matrix.py::TestClustermap::test_standard_scale_axis0",
"tests/test_matrix.py::TestClustermap::test_z_score_standard_scale",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap",
"tests/test_matrix.py::TestClustermap::test_nested_color_list_to_matrix_and_cmap",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap_axis1",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap_different_sizes",
"tests/test_matrix.py::TestClustermap::test_savefig",
"tests/test_matrix.py::TestClustermap::test_plot_dendrograms",
"tests/test_matrix.py::TestClustermap::test_cluster_false",
"tests/test_matrix.py::TestClustermap::test_row_col_colors",
"tests/test_matrix.py::TestClustermap::test_cluster_false_row_col_colors",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_shuffled",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_missing",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_one_axis",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series_shuffled",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series_missing",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_ignore_heatmap_kwargs",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_raise_on_mixed_index_types",
"tests/test_matrix.py::TestClustermap::test_mask_reorganization",
"tests/test_matrix.py::TestClustermap::test_ticklabel_reorganization",
"tests/test_matrix.py::TestClustermap::test_noticklabels",
"tests/test_matrix.py::TestClustermap::test_size_ratios",
"tests/test_matrix.py::TestClustermap::test_cbar_pos",
"tests/test_matrix.py::TestClustermap::test_square_warning",
"tests/test_matrix.py::TestClustermap::test_clustermap_annotation",
"tests/test_matrix.py::TestClustermap::test_tree_kws",
"tests/test_rcmod.py::TestFonts::test_set_font",
"tests/test_rcmod.py::TestFonts::test_different_sans_serif",
"tests/test_regression.py::TestRegressionPlotter::test_fast_regression",
"tests/test_regression.py::TestRegressionPlotter::test_regress_poly",
"tests/test_regression.py::TestRegressionPlotter::test_regress_n_boot",
"tests/test_regression.py::TestRegressionPlotter::test_regress_without_bootstrap",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_regression",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_perfect_separation",
"tests/test_regression.py::TestRegressionPlotter::test_robust_regression",
"tests/test_regression.py::TestRegressionPlotter::test_lowess_regression",
"tests/test_regression.py::TestRegressionPlots::test_residplot_lowess",
"tests/test_statistics.py::TestKDE::test_cumulative",
"tests/test_statistics.py::TestKDE::test_bivariate_cumulative",
"tests/test_statistics.py::TestECDF::test_against_statsmodels"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-3
|
1.0
|
{
"code": "diff --git b/seaborn/_core/plot.py a/seaborn/_core/plot.py\nindex 72f8eca6..c9dc61c8 100644\n--- b/seaborn/_core/plot.py\n+++ a/seaborn/_core/plot.py\n@@ -461,6 +461,25 @@ class Plot:\n .. include:: ../docstrings/objects.Plot.on.rst\n \n \"\"\"\n+ accepted_types: tuple # Allow tuple of various length\n+ accepted_types = (\n+ mpl.axes.Axes, mpl.figure.SubFigure, mpl.figure.Figure\n+ )\n+ accepted_types_str = (\n+ f\"{mpl.axes.Axes}, {mpl.figure.SubFigure}, or {mpl.figure.Figure}\"\n+ )\n+\n+ if not isinstance(target, accepted_types):\n+ err = (\n+ f\"The `Plot.on` target must be an instance of {accepted_types_str}. \"\n+ f\"You passed an instance of {target.__class__} instead.\"\n+ )\n+ raise TypeError(err)\n+\n+ new = self._clone()\n+ new._target = target\n+\n+ return new\n \n def add(\n self,\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_core/plot.py b/seaborn/_core/plot.py\nindex c9dc61c8..72f8eca6 100644\n--- a/seaborn/_core/plot.py\n+++ b/seaborn/_core/plot.py\n@@ -461,25 +461,6 @@ class Plot:\n .. include:: ../docstrings/objects.Plot.on.rst\n \n \"\"\"\n- accepted_types: tuple # Allow tuple of various length\n- accepted_types = (\n- mpl.axes.Axes, mpl.figure.SubFigure, mpl.figure.Figure\n- )\n- accepted_types_str = (\n- f\"{mpl.axes.Axes}, {mpl.figure.SubFigure}, or {mpl.figure.Figure}\"\n- )\n-\n- if not isinstance(target, accepted_types):\n- err = (\n- f\"The `Plot.on` target must be an instance of {accepted_types_str}. \"\n- f\"You passed an instance of {target.__class__} instead.\"\n- )\n- raise TypeError(err)\n-\n- new = self._clone()\n- new._target = target\n-\n- return new\n \n def add(\n self,\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_core/plot.py.\nHere is the description for the function:\n def on(self, target: Axes | SubFigure | Figure) -> Plot:\n \"\"\"\n Provide existing Matplotlib figure or axes for drawing the plot.\n\n When using this method, you will also need to explicitly call a method that\n triggers compilation, such as :meth:`Plot.show` or :meth:`Plot.save`. If you\n want to postprocess using matplotlib, you'd need to call :meth:`Plot.plot`\n first to compile the plot without rendering it.\n\n Parameters\n ----------\n target : Axes, SubFigure, or Figure\n Matplotlib object to use. Passing :class:`matplotlib.axes.Axes` will add\n artists without otherwise modifying the figure. Otherwise, subplots will be\n created within the space of the given :class:`matplotlib.figure.Figure` or\n :class:`matplotlib.figure.SubFigure`.\n\n Examples\n --------\n .. include:: ../docstrings/objects.Plot.on.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_core/test_data.py::TestPlotData::test_data_interchange_support_test",
"tests/_core/test_plot.py::TestLayerAddition::test_stat_default",
"tests/_core/test_plot.py::TestScaling::test_categorical_as_datetime",
"tests/_core/test_plot.py::TestScaling::test_log_scale_name",
"tests/_core/test_plot.py::TestScaling::test_identity_mapping_color_strings",
"tests/_core/test_plot.py::TestScaling::test_undefined_variable_raises",
"tests/_core/test_plot.py::TestPlotting::test_on_axes",
"tests/_core/test_plot.py::TestPlotting::test_on_figure[True]",
"tests/_core/test_plot.py::TestPlotting::test_on_figure[False]",
"tests/_core/test_plot.py::TestPlotting::test_on_subfigure[True]",
"tests/_core/test_plot.py::TestPlotting::test_on_subfigure[False]",
"tests/_core/test_plot.py::TestPlotting::test_on_type_check",
"tests/_core/test_plot.py::TestPlotting::test_on_axes_with_subplots_error",
"tests/_core/test_plot.py::TestPlotting::test_on_layout_algo_default",
"tests/_core/test_plot.py::TestPlotting::test_on_layout_algo_spec",
"tests/_core/test_scales.py::TestNominal::test_color_numeric_int_float_mix",
"tests/_stats/test_density.py::TestKDE::test_cumulative[True]",
"tests/_stats/test_density.py::TestKDE::test_cumulative[False]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_cumulative",
"tests/test_matrix.py::TestDendrogram::test_ndarray_input",
"tests/test_matrix.py::TestDendrogram::test_df_input",
"tests/test_matrix.py::TestDendrogram::test_df_multindex_input",
"tests/test_matrix.py::TestDendrogram::test_axis0_input",
"tests/test_matrix.py::TestDendrogram::test_rotate_input",
"tests/test_matrix.py::TestDendrogram::test_rotate_axis0_input",
"tests/test_matrix.py::TestDendrogram::test_custom_linkage",
"tests/test_matrix.py::TestDendrogram::test_label_false",
"tests/test_matrix.py::TestDendrogram::test_linkage_scipy",
"tests/test_matrix.py::TestDendrogram::test_fastcluster_other_method",
"tests/test_matrix.py::TestDendrogram::test_fastcluster_non_euclidean",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_plot",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_rotate",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_ticklabel_rotation",
"tests/test_matrix.py::TestClustermap::test_ndarray_input",
"tests/test_matrix.py::TestClustermap::test_df_input",
"tests/test_matrix.py::TestClustermap::test_corr_df_input",
"tests/test_matrix.py::TestClustermap::test_pivot_input",
"tests/test_matrix.py::TestClustermap::test_colors_input",
"tests/test_matrix.py::TestClustermap::test_categorical_colors_input",
"tests/test_matrix.py::TestClustermap::test_nested_colors_input",
"tests/test_matrix.py::TestClustermap::test_colors_input_custom_cmap",
"tests/test_matrix.py::TestClustermap::test_z_score",
"tests/test_matrix.py::TestClustermap::test_z_score_axis0",
"tests/test_matrix.py::TestClustermap::test_standard_scale",
"tests/test_matrix.py::TestClustermap::test_standard_scale_axis0",
"tests/test_matrix.py::TestClustermap::test_z_score_standard_scale",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap",
"tests/test_matrix.py::TestClustermap::test_nested_color_list_to_matrix_and_cmap",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap_axis1",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap_different_sizes",
"tests/test_matrix.py::TestClustermap::test_savefig",
"tests/test_matrix.py::TestClustermap::test_plot_dendrograms",
"tests/test_matrix.py::TestClustermap::test_cluster_false",
"tests/test_matrix.py::TestClustermap::test_row_col_colors",
"tests/test_matrix.py::TestClustermap::test_cluster_false_row_col_colors",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_shuffled",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_missing",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_one_axis",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series_shuffled",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series_missing",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_ignore_heatmap_kwargs",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_raise_on_mixed_index_types",
"tests/test_matrix.py::TestClustermap::test_mask_reorganization",
"tests/test_matrix.py::TestClustermap::test_ticklabel_reorganization",
"tests/test_matrix.py::TestClustermap::test_noticklabels",
"tests/test_matrix.py::TestClustermap::test_size_ratios",
"tests/test_matrix.py::TestClustermap::test_cbar_pos",
"tests/test_matrix.py::TestClustermap::test_square_warning",
"tests/test_matrix.py::TestClustermap::test_clustermap_annotation",
"tests/test_matrix.py::TestClustermap::test_tree_kws",
"tests/test_rcmod.py::TestFonts::test_set_font",
"tests/test_rcmod.py::TestFonts::test_different_sans_serif",
"tests/test_regression.py::TestRegressionPlotter::test_fast_regression",
"tests/test_regression.py::TestRegressionPlotter::test_regress_poly",
"tests/test_regression.py::TestRegressionPlotter::test_regress_n_boot",
"tests/test_regression.py::TestRegressionPlotter::test_regress_without_bootstrap",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_regression",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_perfect_separation",
"tests/test_regression.py::TestRegressionPlotter::test_robust_regression",
"tests/test_regression.py::TestRegressionPlotter::test_lowess_regression",
"tests/test_regression.py::TestRegressionPlots::test_residplot_lowess",
"tests/test_statistics.py::TestKDE::test_cumulative",
"tests/test_statistics.py::TestKDE::test_bivariate_cumulative",
"tests/test_statistics.py::TestECDF::test_against_statsmodels"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-4
|
1.0
|
{
"code": "diff --git b/seaborn/_core/plot.py a/seaborn/_core/plot.py\nindex c41c5ea7..c9dc61c8 100644\n--- b/seaborn/_core/plot.py\n+++ a/seaborn/_core/plot.py\n@@ -601,6 +601,41 @@ class Plot:\n .. include:: ../docstrings/objects.Plot.pair.rst\n \n \"\"\"\n+ # TODO Add transpose= arg, which would then draw pair(y=[...]) across rows\n+ # This may also be possible by setting `wrap=1`, but is that too unobvious?\n+ # TODO PairGrid features not currently implemented: diagonals, corner\n+\n+ pair_spec: PairSpec = {}\n+\n+ axes = {\"x\": [] if x is None else x, \"y\": [] if y is None else y}\n+ for axis, arg in axes.items():\n+ if isinstance(arg, (str, int)):\n+ err = f\"You must pass a sequence of variable keys to `{axis}`\"\n+ raise TypeError(err)\n+\n+ pair_spec[\"variables\"] = {}\n+ pair_spec[\"structure\"] = {}\n+\n+ for axis in \"xy\":\n+ keys = []\n+ for i, col in enumerate(axes[axis]):\n+ key = f\"{axis}{i}\"\n+ keys.append(key)\n+ pair_spec[\"variables\"][key] = col\n+\n+ if keys:\n+ pair_spec[\"structure\"][axis] = keys\n+\n+ if not cross and len(axes[\"x\"]) != len(axes[\"y\"]):\n+ err = \"Lengths of the `x` and `y` lists must match with cross=False\"\n+ raise ValueError(err)\n+\n+ pair_spec[\"cross\"] = cross\n+ pair_spec[\"wrap\"] = wrap\n+\n+ new = self._clone()\n+ new._pair_spec.update(pair_spec)\n+ return new\n \n def facet(\n self,\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_core/plot.py b/seaborn/_core/plot.py\nindex c9dc61c8..c41c5ea7 100644\n--- a/seaborn/_core/plot.py\n+++ b/seaborn/_core/plot.py\n@@ -601,41 +601,6 @@ class Plot:\n .. include:: ../docstrings/objects.Plot.pair.rst\n \n \"\"\"\n- # TODO Add transpose= arg, which would then draw pair(y=[...]) across rows\n- # This may also be possible by setting `wrap=1`, but is that too unobvious?\n- # TODO PairGrid features not currently implemented: diagonals, corner\n-\n- pair_spec: PairSpec = {}\n-\n- axes = {\"x\": [] if x is None else x, \"y\": [] if y is None else y}\n- for axis, arg in axes.items():\n- if isinstance(arg, (str, int)):\n- err = f\"You must pass a sequence of variable keys to `{axis}`\"\n- raise TypeError(err)\n-\n- pair_spec[\"variables\"] = {}\n- pair_spec[\"structure\"] = {}\n-\n- for axis in \"xy\":\n- keys = []\n- for i, col in enumerate(axes[axis]):\n- key = f\"{axis}{i}\"\n- keys.append(key)\n- pair_spec[\"variables\"][key] = col\n-\n- if keys:\n- pair_spec[\"structure\"][axis] = keys\n-\n- if not cross and len(axes[\"x\"]) != len(axes[\"y\"]):\n- err = \"Lengths of the `x` and `y` lists must match with cross=False\"\n- raise ValueError(err)\n-\n- pair_spec[\"cross\"] = cross\n- pair_spec[\"wrap\"] = wrap\n-\n- new = self._clone()\n- new._pair_spec.update(pair_spec)\n- return new\n \n def facet(\n self,\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_core/plot.py.\nHere is the description for the function:\n def pair(\n self,\n x: VariableSpecList = None,\n y: VariableSpecList = None,\n wrap: int | None = None,\n cross: bool = True,\n ) -> Plot:\n \"\"\"\n Produce subplots by pairing multiple `x` and/or `y` variables.\n\n Parameters\n ----------\n x, y : sequence(s) of data vectors or identifiers\n Variables that will define the grid of subplots.\n wrap : int\n When using only `x` or `y`, \"wrap\" subplots across a two-dimensional grid\n with this many columns (when using `x`) or rows (when using `y`).\n cross : bool\n When False, zip the `x` and `y` lists such that the first subplot gets the\n first pair, the second gets the second pair, etc. Otherwise, create a\n two-dimensional grid from the cartesian product of the lists.\n\n Examples\n --------\n .. include:: ../docstrings/objects.Plot.pair.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_core/test_data.py::TestPlotData::test_data_interchange_support_test",
"tests/_core/test_plot.py::TestLayerAddition::test_stat_default",
"tests/_core/test_plot.py::TestLayerAddition::test_variable_list",
"tests/_core/test_plot.py::TestScaling::test_categorical_as_datetime",
"tests/_core/test_plot.py::TestScaling::test_paired_single_log_scale",
"tests/_core/test_plot.py::TestScaling::test_paired_with_common_fallback",
"tests/_core/test_plot.py::TestScaling::test_log_scale_name",
"tests/_core/test_plot.py::TestScaling::test_pair_categories",
"tests/_core/test_plot.py::TestScaling::test_pair_categories_shared",
"tests/_core/test_plot.py::TestScaling::test_pair_single_coordinate_stat_orient",
"tests/_core/test_plot.py::TestScaling::test_identity_mapping_color_strings",
"tests/_core/test_plot.py::TestScaling::test_undefined_variable_raises",
"tests/_core/test_plot.py::TestPlotting::test_paired_variables",
"tests/_core/test_plot.py::TestPlotting::test_paired_one_dimension",
"tests/_core/test_plot.py::TestPlotting::test_paired_variables_one_subset",
"tests/_core/test_plot.py::TestPlotting::test_paired_and_faceted",
"tests/_core/test_plot.py::TestPlotting::test_multi_move_with_pairing",
"tests/_core/test_plot.py::TestPlotting::test_on_axes_with_subplots_error",
"tests/_core/test_plot.py::TestPairInterface::test_all_numeric[list]",
"tests/_core/test_plot.py::TestPairInterface::test_all_numeric[Index]",
"tests/_core/test_plot.py::TestPairInterface::test_single_variable_key_raises",
"tests/_core/test_plot.py::TestPairInterface::test_single_dimension[x]",
"tests/_core/test_plot.py::TestPairInterface::test_single_dimension[y]",
"tests/_core/test_plot.py::TestPairInterface::test_non_cross",
"tests/_core/test_plot.py::TestPairInterface::test_list_of_vectors",
"tests/_core/test_plot.py::TestPairInterface::test_with_no_variables",
"tests/_core/test_plot.py::TestPairInterface::test_with_facets",
"tests/_core/test_plot.py::TestPairInterface::test_error_on_facet_overlap[variables0]",
"tests/_core/test_plot.py::TestPairInterface::test_error_on_facet_overlap[variables1]",
"tests/_core/test_plot.py::TestPairInterface::test_error_on_wrap_overlap[variables0]",
"tests/_core/test_plot.py::TestPairInterface::test_error_on_wrap_overlap[variables1]",
"tests/_core/test_plot.py::TestPairInterface::test_axis_sharing",
"tests/_core/test_plot.py::TestPairInterface::test_axis_sharing_with_facets",
"tests/_core/test_plot.py::TestPairInterface::test_x_wrapping",
"tests/_core/test_plot.py::TestPairInterface::test_y_wrapping",
"tests/_core/test_plot.py::TestPairInterface::test_non_cross_wrapping",
"tests/_core/test_plot.py::TestPairInterface::test_cross_mismatched_lengths",
"tests/_core/test_plot.py::TestPairInterface::test_orient_inference",
"tests/_core/test_plot.py::TestPairInterface::test_limits",
"tests/_core/test_plot.py::TestPairInterface::test_labels",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_column_wrapped_non_cross",
"tests/_core/test_scales.py::TestNominal::test_color_numeric_int_float_mix",
"tests/_stats/test_density.py::TestKDE::test_cumulative[True]",
"tests/_stats/test_density.py::TestKDE::test_cumulative[False]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_cumulative",
"tests/test_matrix.py::TestDendrogram::test_ndarray_input",
"tests/test_matrix.py::TestDendrogram::test_df_input",
"tests/test_matrix.py::TestDendrogram::test_df_multindex_input",
"tests/test_matrix.py::TestDendrogram::test_axis0_input",
"tests/test_matrix.py::TestDendrogram::test_rotate_input",
"tests/test_matrix.py::TestDendrogram::test_rotate_axis0_input",
"tests/test_matrix.py::TestDendrogram::test_custom_linkage",
"tests/test_matrix.py::TestDendrogram::test_label_false",
"tests/test_matrix.py::TestDendrogram::test_linkage_scipy",
"tests/test_matrix.py::TestDendrogram::test_fastcluster_other_method",
"tests/test_matrix.py::TestDendrogram::test_fastcluster_non_euclidean",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_plot",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_rotate",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_ticklabel_rotation",
"tests/test_matrix.py::TestClustermap::test_ndarray_input",
"tests/test_matrix.py::TestClustermap::test_df_input",
"tests/test_matrix.py::TestClustermap::test_corr_df_input",
"tests/test_matrix.py::TestClustermap::test_pivot_input",
"tests/test_matrix.py::TestClustermap::test_colors_input",
"tests/test_matrix.py::TestClustermap::test_categorical_colors_input",
"tests/test_matrix.py::TestClustermap::test_nested_colors_input",
"tests/test_matrix.py::TestClustermap::test_colors_input_custom_cmap",
"tests/test_matrix.py::TestClustermap::test_z_score",
"tests/test_matrix.py::TestClustermap::test_z_score_axis0",
"tests/test_matrix.py::TestClustermap::test_standard_scale",
"tests/test_matrix.py::TestClustermap::test_standard_scale_axis0",
"tests/test_matrix.py::TestClustermap::test_z_score_standard_scale",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap",
"tests/test_matrix.py::TestClustermap::test_nested_color_list_to_matrix_and_cmap",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap_axis1",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap_different_sizes",
"tests/test_matrix.py::TestClustermap::test_savefig",
"tests/test_matrix.py::TestClustermap::test_plot_dendrograms",
"tests/test_matrix.py::TestClustermap::test_cluster_false",
"tests/test_matrix.py::TestClustermap::test_row_col_colors",
"tests/test_matrix.py::TestClustermap::test_cluster_false_row_col_colors",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_shuffled",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_missing",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_one_axis",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series_shuffled",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series_missing",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_ignore_heatmap_kwargs",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_raise_on_mixed_index_types",
"tests/test_matrix.py::TestClustermap::test_mask_reorganization",
"tests/test_matrix.py::TestClustermap::test_ticklabel_reorganization",
"tests/test_matrix.py::TestClustermap::test_noticklabels",
"tests/test_matrix.py::TestClustermap::test_size_ratios",
"tests/test_matrix.py::TestClustermap::test_cbar_pos",
"tests/test_matrix.py::TestClustermap::test_square_warning",
"tests/test_matrix.py::TestClustermap::test_clustermap_annotation",
"tests/test_matrix.py::TestClustermap::test_tree_kws",
"tests/test_rcmod.py::TestFonts::test_set_font",
"tests/test_rcmod.py::TestFonts::test_different_sans_serif",
"tests/test_regression.py::TestRegressionPlotter::test_fast_regression",
"tests/test_regression.py::TestRegressionPlotter::test_regress_poly",
"tests/test_regression.py::TestRegressionPlotter::test_regress_n_boot",
"tests/test_regression.py::TestRegressionPlotter::test_regress_without_bootstrap",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_regression",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_perfect_separation",
"tests/test_regression.py::TestRegressionPlotter::test_robust_regression",
"tests/test_regression.py::TestRegressionPlotter::test_lowess_regression",
"tests/test_regression.py::TestRegressionPlots::test_residplot_lowess",
"tests/test_statistics.py::TestKDE::test_cumulative",
"tests/test_statistics.py::TestKDE::test_bivariate_cumulative",
"tests/test_statistics.py::TestECDF::test_against_statsmodels"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-5
|
1.0
|
{
"code": "diff --git b/seaborn/_base.py a/seaborn/_base.py\nindex 1678bd1b..0b435231 100644\n--- b/seaborn/_base.py\n+++ a/seaborn/_base.py\n@@ -1046,6 +1046,123 @@ class VectorPlotter:\n arguments for the x and y axes.\n \n \"\"\"\n+ from .axisgrid import FacetGrid\n+ if isinstance(obj, FacetGrid):\n+ self.ax = None\n+ self.facets = obj\n+ ax_list = obj.axes.flatten()\n+ if obj.col_names is not None:\n+ self.var_levels[\"col\"] = obj.col_names\n+ if obj.row_names is not None:\n+ self.var_levels[\"row\"] = obj.row_names\n+ else:\n+ self.ax = obj\n+ self.facets = None\n+ ax_list = [obj]\n+\n+ # Identify which \"axis\" variables we have defined\n+ axis_variables = set(\"xy\").intersection(self.variables)\n+\n+ # -- Verify the types of our x and y variables here.\n+ # This doesn't really make complete sense being here here, but it's a fine\n+ # place for it, given the current system.\n+ # (Note that for some plots, there might be more complicated restrictions)\n+ # e.g. the categorical plots have their own check that as specific to the\n+ # non-categorical axis.\n+ if allowed_types is None:\n+ allowed_types = [\"numeric\", \"datetime\", \"categorical\"]\n+ elif isinstance(allowed_types, str):\n+ allowed_types = [allowed_types]\n+\n+ for var in axis_variables:\n+ var_type = self.var_types[var]\n+ if var_type not in allowed_types:\n+ err = (\n+ f\"The {var} variable is {var_type}, but one of \"\n+ f\"{allowed_types} is required\"\n+ )\n+ raise TypeError(err)\n+\n+ # -- Get axis objects for each row in plot_data for type conversions and scaling\n+\n+ facet_dim = {\"x\": \"col\", \"y\": \"row\"}\n+\n+ self.converters = {}\n+ for var in axis_variables:\n+ other_var = {\"x\": \"y\", \"y\": \"x\"}[var]\n+\n+ converter = pd.Series(index=self.plot_data.index, name=var, dtype=object)\n+ share_state = getattr(self.facets, f\"_share{var}\", True)\n+\n+ # Simplest cases are that we have a single axes, all axes are shared,\n+ # or sharing is only on the orthogonal facet dimension. In these cases,\n+ # all datapoints get converted the same way, so use the first axis\n+ if share_state is True or share_state == facet_dim[other_var]:\n+ converter.loc[:] = getattr(ax_list[0], f\"{var}axis\")\n+\n+ else:\n+\n+ # Next simplest case is when no axes are shared, and we can\n+ # use the axis objects within each facet\n+ if share_state is False:\n+ for axes_vars, axes_data in self.iter_data():\n+ ax = self._get_axes(axes_vars)\n+ converter.loc[axes_data.index] = getattr(ax, f\"{var}axis\")\n+\n+ # In the more complicated case, the axes are shared within each\n+ # \"file\" of the facetgrid. In that case, we need to subset the data\n+ # for that file and assign it the first axis in the slice of the grid\n+ else:\n+\n+ names = getattr(self.facets, f\"{share_state}_names\")\n+ for i, level in enumerate(names):\n+ idx = (i, 0) if share_state == \"row\" else (0, i)\n+ axis = getattr(self.facets.axes[idx], f\"{var}axis\")\n+ converter.loc[self.plot_data[share_state] == level] = axis\n+\n+ # Store the converter vector, which we use elsewhere (e.g comp_data)\n+ self.converters[var] = converter\n+\n+ # Now actually update the matplotlib objects to do the conversion we want\n+ grouped = self.plot_data[var].groupby(self.converters[var], sort=False)\n+ for converter, seed_data in grouped:\n+ if self.var_types[var] == \"categorical\":\n+ if self._var_ordered[var]:\n+ order = self.var_levels[var]\n+ else:\n+ order = None\n+ seed_data = categorical_order(seed_data, order)\n+ converter.update_units(seed_data)\n+\n+ # -- Set numerical axis scales\n+\n+ # First unpack the log_scale argument\n+ if log_scale is None:\n+ scalex = scaley = False\n+ else:\n+ # Allow single value or x, y tuple\n+ try:\n+ scalex, scaley = log_scale\n+ except TypeError:\n+ scalex = log_scale if self.var_types.get(\"x\") == \"numeric\" else False\n+ scaley = log_scale if self.var_types.get(\"y\") == \"numeric\" else False\n+\n+ # Now use it\n+ for axis, scale in zip(\"xy\", (scalex, scaley)):\n+ if scale:\n+ for ax in ax_list:\n+ set_scale = getattr(ax, f\"set_{axis}scale\")\n+ if scale is True:\n+ set_scale(\"log\", nonpositive=\"mask\")\n+ else:\n+ set_scale(\"log\", base=scale, nonpositive=\"mask\")\n+\n+ # For categorical y, we want the \"first\" level to be at the top of the axis\n+ if self.var_types.get(\"y\", None) == \"categorical\":\n+ for ax in ax_list:\n+ ax.yaxis.set_inverted(True)\n+\n+ # TODO -- Add axes labels\n \n def _get_scale_transforms(self, axis):\n \"\"\"Return a function implementing the scale transform (or its inverse).\"\"\"\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_base.py b/seaborn/_base.py\nindex 0b435231..1678bd1b 100644\n--- a/seaborn/_base.py\n+++ b/seaborn/_base.py\n@@ -1046,123 +1046,6 @@ class VectorPlotter:\n arguments for the x and y axes.\n \n \"\"\"\n- from .axisgrid import FacetGrid\n- if isinstance(obj, FacetGrid):\n- self.ax = None\n- self.facets = obj\n- ax_list = obj.axes.flatten()\n- if obj.col_names is not None:\n- self.var_levels[\"col\"] = obj.col_names\n- if obj.row_names is not None:\n- self.var_levels[\"row\"] = obj.row_names\n- else:\n- self.ax = obj\n- self.facets = None\n- ax_list = [obj]\n-\n- # Identify which \"axis\" variables we have defined\n- axis_variables = set(\"xy\").intersection(self.variables)\n-\n- # -- Verify the types of our x and y variables here.\n- # This doesn't really make complete sense being here here, but it's a fine\n- # place for it, given the current system.\n- # (Note that for some plots, there might be more complicated restrictions)\n- # e.g. the categorical plots have their own check that as specific to the\n- # non-categorical axis.\n- if allowed_types is None:\n- allowed_types = [\"numeric\", \"datetime\", \"categorical\"]\n- elif isinstance(allowed_types, str):\n- allowed_types = [allowed_types]\n-\n- for var in axis_variables:\n- var_type = self.var_types[var]\n- if var_type not in allowed_types:\n- err = (\n- f\"The {var} variable is {var_type}, but one of \"\n- f\"{allowed_types} is required\"\n- )\n- raise TypeError(err)\n-\n- # -- Get axis objects for each row in plot_data for type conversions and scaling\n-\n- facet_dim = {\"x\": \"col\", \"y\": \"row\"}\n-\n- self.converters = {}\n- for var in axis_variables:\n- other_var = {\"x\": \"y\", \"y\": \"x\"}[var]\n-\n- converter = pd.Series(index=self.plot_data.index, name=var, dtype=object)\n- share_state = getattr(self.facets, f\"_share{var}\", True)\n-\n- # Simplest cases are that we have a single axes, all axes are shared,\n- # or sharing is only on the orthogonal facet dimension. In these cases,\n- # all datapoints get converted the same way, so use the first axis\n- if share_state is True or share_state == facet_dim[other_var]:\n- converter.loc[:] = getattr(ax_list[0], f\"{var}axis\")\n-\n- else:\n-\n- # Next simplest case is when no axes are shared, and we can\n- # use the axis objects within each facet\n- if share_state is False:\n- for axes_vars, axes_data in self.iter_data():\n- ax = self._get_axes(axes_vars)\n- converter.loc[axes_data.index] = getattr(ax, f\"{var}axis\")\n-\n- # In the more complicated case, the axes are shared within each\n- # \"file\" of the facetgrid. In that case, we need to subset the data\n- # for that file and assign it the first axis in the slice of the grid\n- else:\n-\n- names = getattr(self.facets, f\"{share_state}_names\")\n- for i, level in enumerate(names):\n- idx = (i, 0) if share_state == \"row\" else (0, i)\n- axis = getattr(self.facets.axes[idx], f\"{var}axis\")\n- converter.loc[self.plot_data[share_state] == level] = axis\n-\n- # Store the converter vector, which we use elsewhere (e.g comp_data)\n- self.converters[var] = converter\n-\n- # Now actually update the matplotlib objects to do the conversion we want\n- grouped = self.plot_data[var].groupby(self.converters[var], sort=False)\n- for converter, seed_data in grouped:\n- if self.var_types[var] == \"categorical\":\n- if self._var_ordered[var]:\n- order = self.var_levels[var]\n- else:\n- order = None\n- seed_data = categorical_order(seed_data, order)\n- converter.update_units(seed_data)\n-\n- # -- Set numerical axis scales\n-\n- # First unpack the log_scale argument\n- if log_scale is None:\n- scalex = scaley = False\n- else:\n- # Allow single value or x, y tuple\n- try:\n- scalex, scaley = log_scale\n- except TypeError:\n- scalex = log_scale if self.var_types.get(\"x\") == \"numeric\" else False\n- scaley = log_scale if self.var_types.get(\"y\") == \"numeric\" else False\n-\n- # Now use it\n- for axis, scale in zip(\"xy\", (scalex, scaley)):\n- if scale:\n- for ax in ax_list:\n- set_scale = getattr(ax, f\"set_{axis}scale\")\n- if scale is True:\n- set_scale(\"log\", nonpositive=\"mask\")\n- else:\n- set_scale(\"log\", base=scale, nonpositive=\"mask\")\n-\n- # For categorical y, we want the \"first\" level to be at the top of the axis\n- if self.var_types.get(\"y\", None) == \"categorical\":\n- for ax in ax_list:\n- ax.yaxis.set_inverted(True)\n-\n- # TODO -- Add axes labels\n \n def _get_scale_transforms(self, axis):\n \"\"\"Return a function implementing the scale transform (or its inverse).\"\"\"\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_base.py.\nHere is the description for the function:\n def _attach(\n self,\n obj,\n allowed_types=None,\n log_scale=None,\n ):\n \"\"\"Associate the plotter with an Axes manager and initialize its units.\n\n Parameters\n ----------\n obj : :class:`matplotlib.axes.Axes` or :class:'FacetGrid`\n Structural object that we will eventually plot onto.\n allowed_types : str or list of str\n If provided, raise when either the x or y variable does not have\n one of the declared seaborn types.\n log_scale : bool, number, or pair of bools or numbers\n If not False, set the axes to use log scaling, with the given\n base or defaulting to 10. If a tuple, interpreted as separate\n arguments for the x and y axes.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_core/test_data.py::TestPlotData::test_data_interchange_support_test",
"tests/_core/test_plot.py::TestLayerAddition::test_stat_default",
"tests/_core/test_plot.py::TestScaling::test_categorical_as_datetime",
"tests/_core/test_plot.py::TestScaling::test_log_scale_name",
"tests/_core/test_plot.py::TestScaling::test_identity_mapping_color_strings",
"tests/_core/test_plot.py::TestScaling::test_undefined_variable_raises",
"tests/_core/test_scales.py::TestNominal::test_color_numeric_int_float_mix",
"tests/_stats/test_density.py::TestKDE::test_cumulative[True]",
"tests/_stats/test_density.py::TestKDE::test_cumulative[False]",
"tests/test_axisgrid.py::TestFacetGrid::test_set_ticklabels",
"tests/test_axisgrid.py::TestFacetGrid::test_categorical_warning",
"tests/test_axisgrid.py::TestFacetGrid::test_data_interchange",
"tests/test_axisgrid.py::TestPairGrid::test_corner",
"tests/test_axisgrid.py::TestPairGrid::test_map_mixed_funcsig",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_color",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_palette",
"tests/test_axisgrid.py::TestPairGrid::test_diag_sharey",
"tests/test_axisgrid.py::TestPairGrid::test_hue_in_map",
"tests/test_axisgrid.py::TestPairGrid::test_dropna[scatterplot]",
"tests/test_axisgrid.py::TestPairGrid::test_dropna[scatter]",
"tests/test_axisgrid.py::TestPairGrid::test_histplot_legend",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg_hue",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_diag_kde",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_kde",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_hist",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_markers",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_column_multiindex",
"tests/test_axisgrid.py::TestPairGrid::test_corner_despine",
"tests/test_axisgrid.py::TestPairGrid::test_legend",
"tests/test_axisgrid.py::TestPairGrid::test_data_interchange",
"tests/test_axisgrid.py::TestJointGrid::test_univariate_plot",
"tests/test_axisgrid.py::TestJointGrid::test_univariate_plot_distplot",
"tests/test_axisgrid.py::TestJointGrid::test_plot",
"tests/test_axisgrid.py::TestJointGrid::test_hue[True]",
"tests/test_axisgrid.py::TestJointGrid::test_hue[False]",
"tests/test_axisgrid.py::TestJointGrid::test_refline",
"tests/test_axisgrid.py::TestJointPlot::test_scatter",
"tests/test_axisgrid.py::TestJointPlot::test_scatter_hue",
"tests/test_axisgrid.py::TestJointPlot::test_reg",
"tests/test_axisgrid.py::TestJointPlot::test_resid",
"tests/test_axisgrid.py::TestJointPlot::test_hist",
"tests/test_axisgrid.py::TestJointPlot::test_hex",
"tests/test_axisgrid.py::TestJointPlot::test_kde",
"tests/test_axisgrid.py::TestJointPlot::test_kde_hue",
"tests/test_axisgrid.py::TestJointPlot::test_color",
"tests/test_axisgrid.py::TestJointPlot::test_palette",
"tests/test_axisgrid.py::TestJointPlot::test_hex_customise",
"tests/test_axisgrid.py::TestJointPlot::test_leaky_dict",
"tests/test_axisgrid.py::TestJointPlot::test_distplot_kwarg_warning",
"tests/test_axisgrid.py::TestJointPlot::test_ax_warning",
"tests/test_base.py::TestVectorPlotter::test_attach_basics[variables0]",
"tests/test_base.py::TestVectorPlotter::test_attach_basics[variables1]",
"tests/test_base.py::TestVectorPlotter::test_attach_basics[variables2]",
"tests/test_base.py::TestVectorPlotter::test_attach_basics[variables3]",
"tests/test_base.py::TestVectorPlotter::test_attach_basics[variables4]",
"tests/test_base.py::TestVectorPlotter::test_attach_disallowed",
"tests/test_base.py::TestVectorPlotter::test_attach_log_scale",
"tests/test_base.py::TestVectorPlotter::test_attach_converters",
"tests/test_base.py::TestVectorPlotter::test_attach_facets",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_identity",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_identity_facets",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_log",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_facets",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_mixed_facets",
"tests/test_base.py::TestVectorPlotter::test_attach_shared_axes",
"tests/test_base.py::TestVectorPlotter::test_get_axes_single",
"tests/test_base.py::TestVectorPlotter::test_get_axes_facets",
"tests/test_base.py::TestVectorPlotter::test_comp_data",
"tests/test_base.py::TestVectorPlotter::test_comp_data_log",
"tests/test_base.py::TestVectorPlotter::test_comp_data_category_order",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture0]",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture1]",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture2]",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture3]",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture4]",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture5]",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture6]",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture7]",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture8]",
"tests/test_base.py::TestVectorPlotter::test_comp_data_duplicate_index",
"tests/test_base.py::TestVectorPlotter::test_comp_data_nullable_dtype",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs0]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs1]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs2]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs3]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs4]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs5]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs6]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs7]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs8]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs9]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs10]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs11]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs12]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs13]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs14]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs15]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs16]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs17]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs18]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs19]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs20]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs21]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs22]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs23]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs24]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs25]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs26]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs27]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs28]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs29]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs30]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs31]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_empty[catplot]",
"tests/test_categorical.py::TestStripPlot::test_labels_long[x]",
"tests/test_categorical.py::TestStripPlot::test_labels_long[y]",
"tests/test_categorical.py::TestStripPlot::test_labels_wide",
"tests/test_categorical.py::TestStripPlot::test_labels_hue_order",
"tests/test_categorical.py::TestStripPlot::test_two_calls",
"tests/test_categorical.py::TestStripPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestStripPlot::test_color",
"tests/test_categorical.py::TestStripPlot::test_supplied_color_array",
"tests/test_categorical.py::TestStripPlot::test_unfilled_marker",
"tests/test_categorical.py::TestStripPlot::test_wide[h-dataframe]",
"tests/test_categorical.py::TestStripPlot::test_wide[h-dict]",
"tests/test_categorical.py::TestStripPlot::test_wide[v-dataframe]",
"tests/test_categorical.py::TestStripPlot::test_wide[v-dict]",
"tests/test_categorical.py::TestStripPlot::test_wide[y-dataframe]",
"tests/test_categorical.py::TestStripPlot::test_wide[y-dict]",
"tests/test_categorical.py::TestStripPlot::test_wide[x-dataframe]",
"tests/test_categorical.py::TestStripPlot::test_wide[x-dict]",
"tests/test_categorical.py::TestStripPlot::test_flat[h]",
"tests/test_categorical.py::TestStripPlot::test_flat[v]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables0-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables1-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables2-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables3-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables4-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables5-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables6-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables7-h]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables8-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables9-h]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables10-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables11-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables12-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables13-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables14-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables15-None]",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables0]",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables1]",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables2]",
"tests/test_categorical.py::TestStripPlot::test_positions_unfixed[a]",
"tests/test_categorical.py::TestStripPlot::test_positions_unfixed[s]",
"tests/test_categorical.py::TestStripPlot::test_positions_unfixed[d]",
"tests/test_categorical.py::TestStripPlot::test_order[str-None]",
"tests/test_categorical.py::TestStripPlot::test_order[str-order1]",
"tests/test_categorical.py::TestStripPlot::test_order[str-order2]",
"tests/test_categorical.py::TestStripPlot::test_order[str-order3]",
"tests/test_categorical.py::TestStripPlot::test_order[int-None]",
"tests/test_categorical.py::TestStripPlot::test_order[int-order5]",
"tests/test_categorical.py::TestStripPlot::test_order[int-order6]",
"tests/test_categorical.py::TestStripPlot::test_order[int-order7]",
"tests/test_categorical.py::TestStripPlot::test_order[int-order8]",
"tests/test_categorical.py::TestStripPlot::test_hue_categorical[a]",
"tests/test_categorical.py::TestStripPlot::test_hue_categorical[b]",
"tests/test_categorical.py::TestStripPlot::test_hue_dodged[a]",
"tests/test_categorical.py::TestStripPlot::test_hue_dodged[b]",
"tests/test_categorical.py::TestStripPlot::test_single[x-b-None]",
"tests/test_categorical.py::TestStripPlot::test_single[x-b-a]",
"tests/test_categorical.py::TestStripPlot::test_single[x-y-None]",
"tests/test_categorical.py::TestStripPlot::test_single[x-y-a]",
"tests/test_categorical.py::TestStripPlot::test_single[x-t-None]",
"tests/test_categorical.py::TestStripPlot::test_single[x-t-a]",
"tests/test_categorical.py::TestStripPlot::test_single[y-b-None]",
"tests/test_categorical.py::TestStripPlot::test_single[y-b-a]",
"tests/test_categorical.py::TestStripPlot::test_single[y-y-None]",
"tests/test_categorical.py::TestStripPlot::test_single[y-y-a]",
"tests/test_categorical.py::TestStripPlot::test_single[y-t-None]",
"tests/test_categorical.py::TestStripPlot::test_single[y-t-a]",
"tests/test_categorical.py::TestStripPlot::test_attributes",
"tests/test_categorical.py::TestStripPlot::test_three_points",
"tests/test_categorical.py::TestStripPlot::test_legend_categorical",
"tests/test_categorical.py::TestStripPlot::test_legend_numeric",
"tests/test_categorical.py::TestStripPlot::test_legend_attributes",
"tests/test_categorical.py::TestStripPlot::test_legend_disabled",
"tests/test_categorical.py::TestStripPlot::test_palette_from_color_deprecation",
"tests/test_categorical.py::TestStripPlot::test_palette_with_hue_deprecation",
"tests/test_categorical.py::TestStripPlot::test_log_scale",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestStripPlot::test_jitter_unfixed",
"tests/test_categorical.py::TestStripPlot::test_jitter[v-True]",
"tests/test_categorical.py::TestStripPlot::test_jitter[v-0.1]",
"tests/test_categorical.py::TestStripPlot::test_jitter[h-True]",
"tests/test_categorical.py::TestStripPlot::test_jitter[h-0.1]",
"tests/test_categorical.py::TestSwarmPlot::test_labels_long[x]",
"tests/test_categorical.py::TestSwarmPlot::test_labels_long[y]",
"tests/test_categorical.py::TestSwarmPlot::test_labels_wide",
"tests/test_categorical.py::TestSwarmPlot::test_labels_hue_order",
"tests/test_categorical.py::TestSwarmPlot::test_two_calls",
"tests/test_categorical.py::TestSwarmPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestSwarmPlot::test_color",
"tests/test_categorical.py::TestSwarmPlot::test_supplied_color_array",
"tests/test_categorical.py::TestSwarmPlot::test_unfilled_marker",
"tests/test_categorical.py::TestSwarmPlot::test_wide[h-dataframe]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[h-dict]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[v-dataframe]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[v-dict]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[y-dataframe]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[y-dict]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[x-dataframe]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[x-dict]",
"tests/test_categorical.py::TestSwarmPlot::test_flat[h]",
"tests/test_categorical.py::TestSwarmPlot::test_flat[v]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables0-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables1-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables2-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables3-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables4-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables5-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables6-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables7-h]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables8-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables9-h]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables10-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables11-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables12-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables13-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables14-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables15-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables0]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables1]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables2]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_unfixed[a]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_unfixed[s]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_unfixed[d]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-None]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-order1]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-order2]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-order3]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-None]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order5]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order6]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order7]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order8]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_categorical[a]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_categorical[b]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_dodged[a]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_dodged[b]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-b-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-b-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-y-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-y-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-t-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-t-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-b-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-b-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-y-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-y-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-t-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-t-a]",
"tests/test_categorical.py::TestSwarmPlot::test_attributes",
"tests/test_categorical.py::TestSwarmPlot::test_three_points",
"tests/test_categorical.py::TestSwarmPlot::test_legend_categorical",
"tests/test_categorical.py::TestSwarmPlot::test_legend_numeric",
"tests/test_categorical.py::TestSwarmPlot::test_legend_attributes",
"tests/test_categorical.py::TestSwarmPlot::test_legend_disabled",
"tests/test_categorical.py::TestSwarmPlot::test_palette_from_color_deprecation",
"tests/test_categorical.py::TestSwarmPlot::test_palette_with_hue_deprecation",
"tests/test_categorical.py::TestSwarmPlot::test_log_scale",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestBoxPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestBoxPlot::test_legend_attributes",
"tests/test_categorical.py::TestBoxPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBoxPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBoxPlot::test_labels_wide",
"tests/test_categorical.py::TestBoxPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBoxPlot::test_two_calls",
"tests/test_categorical.py::TestBoxPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBoxPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBoxPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBoxPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestBoxPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestBoxPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestBoxPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestBoxPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestBoxPlot::test_wide_data[h]",
"tests/test_categorical.py::TestBoxPlot::test_wide_data[v]",
"tests/test_categorical.py::TestBoxPlot::test_grouped[x]",
"tests/test_categorical.py::TestBoxPlot::test_grouped[y]",
"tests/test_categorical.py::TestBoxPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestBoxPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestBoxPlot::test_hue_not_dodged",
"tests/test_categorical.py::TestBoxPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestBoxPlot::test_dodge_native_scale_log",
"tests/test_categorical.py::TestBoxPlot::test_dodge_without_hue",
"tests/test_categorical.py::TestBoxPlot::test_log_data_scale[x]",
"tests/test_categorical.py::TestBoxPlot::test_log_data_scale[y]",
"tests/test_categorical.py::TestBoxPlot::test_color",
"tests/test_categorical.py::TestBoxPlot::test_wide_data_multicolored",
"tests/test_categorical.py::TestBoxPlot::test_wide_data_single_color",
"tests/test_categorical.py::TestBoxPlot::test_hue_colors",
"tests/test_categorical.py::TestBoxPlot::test_linecolor",
"tests/test_categorical.py::TestBoxPlot::test_linecolor_gray_warning",
"tests/test_categorical.py::TestBoxPlot::test_saturation",
"tests/test_categorical.py::TestBoxPlot::test_linewidth",
"tests/test_categorical.py::TestBoxPlot::test_fill",
"tests/test_categorical.py::TestBoxPlot::test_notch[notch]",
"tests/test_categorical.py::TestBoxPlot::test_notch[shownotches]",
"tests/test_categorical.py::TestBoxPlot::test_whis",
"tests/test_categorical.py::TestBoxPlot::test_gap",
"tests/test_categorical.py::TestBoxPlot::test_prop_dicts",
"tests/test_categorical.py::TestBoxPlot::test_showfliers",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_attributes",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_wide",
"tests/test_categorical.py::TestBoxenPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBoxenPlot::test_two_calls",
"tests/test_categorical.py::TestBoxenPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBoxenPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBoxenPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBoxenPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestBoxenPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[h]",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[v]",
"tests/test_categorical.py::TestBoxenPlot::test_grouped[x]",
"tests/test_categorical.py::TestBoxenPlot::test_grouped[y]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestBoxenPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestBoxenPlot::test_color",
"tests/test_categorical.py::TestBoxenPlot::test_hue_colors",
"tests/test_categorical.py::TestBoxenPlot::test_linecolor",
"tests/test_categorical.py::TestBoxenPlot::test_linewidth",
"tests/test_categorical.py::TestBoxenPlot::test_saturation",
"tests/test_categorical.py::TestBoxenPlot::test_gap",
"tests/test_categorical.py::TestBoxenPlot::test_fill",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_int",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_full",
"tests/test_categorical.py::TestBoxenPlot::test_trust_alpha",
"tests/test_categorical.py::TestBoxenPlot::test_outlier_prop",
"tests/test_categorical.py::TestBoxenPlot::test_exponential_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_linear_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_area_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_box_kws",
"tests/test_categorical.py::TestBoxenPlot::test_line_kws",
"tests/test_categorical.py::TestBoxenPlot::test_flier_kws",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_checks",
"tests/test_categorical.py::TestBoxenPlot::test_width_method_check",
"tests/test_categorical.py::TestBoxenPlot::test_scale_deprecation",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestViolinPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestViolinPlot::test_legend_attributes",
"tests/test_categorical.py::TestViolinPlot::test_labels_long[x]",
"tests/test_categorical.py::TestViolinPlot::test_labels_long[y]",
"tests/test_categorical.py::TestViolinPlot::test_labels_wide",
"tests/test_categorical.py::TestViolinPlot::test_labels_hue_order",
"tests/test_categorical.py::TestViolinPlot::test_two_calls",
"tests/test_categorical.py::TestViolinPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestViolinPlot::test_log_scale[x]",
"tests/test_categorical.py::TestViolinPlot::test_log_scale[y]",
"tests/test_categorical.py::TestViolinPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestViolinPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestViolinPlot::test_wide_data[h]",
"tests/test_categorical.py::TestViolinPlot::test_wide_data[v]",
"tests/test_categorical.py::TestViolinPlot::test_grouped[x]",
"tests/test_categorical.py::TestViolinPlot::test_grouped[y]",
"tests/test_categorical.py::TestViolinPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestViolinPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestViolinPlot::test_hue_not_dodged",
"tests/test_categorical.py::TestViolinPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestViolinPlot::test_dodge_native_scale_log",
"tests/test_categorical.py::TestViolinPlot::test_color",
"tests/test_categorical.py::TestViolinPlot::test_hue_colors",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[box]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[quart]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[stick]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[point]",
"tests/test_categorical.py::TestViolinPlot::test_linewidth",
"tests/test_categorical.py::TestViolinPlot::test_saturation",
"tests/test_categorical.py::TestViolinPlot::test_fill[box]",
"tests/test_categorical.py::TestViolinPlot::test_fill[quart]",
"tests/test_categorical.py::TestViolinPlot::test_fill[stick]",
"tests/test_categorical.py::TestViolinPlot::test_fill[point]",
"tests/test_categorical.py::TestViolinPlot::test_inner_box[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_box[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_quartiles[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_quartiles[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_stick[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_stick[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_points[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_points[y]",
"tests/test_categorical.py::TestViolinPlot::test_split_single",
"tests/test_categorical.py::TestViolinPlot::test_split_multi",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_area",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_count",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_width",
"tests/test_categorical.py::TestViolinPlot::test_common_norm",
"tests/test_categorical.py::TestViolinPlot::test_scale_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_scale_hue_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_bw_adjust",
"tests/test_categorical.py::TestViolinPlot::test_bw_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_gap",
"tests/test_categorical.py::TestViolinPlot::test_inner_kws",
"tests/test_categorical.py::TestViolinPlot::test_box_inner_kws",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestBarPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBarPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBarPlot::test_labels_wide",
"tests/test_categorical.py::TestBarPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBarPlot::test_color",
"tests/test_categorical.py::TestBarPlot::test_two_calls",
"tests/test_categorical.py::TestBarPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBarPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBarPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBarPlot::test_labels_flat",
"tests/test_categorical.py::TestBarPlot::test_single_var[x]",
"tests/test_categorical.py::TestBarPlot::test_single_var[y]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[x]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[y]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[h]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[v]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[x]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[y]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[h]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[v]",
"tests/test_categorical.py::TestBarPlot::test_xy_vertical",
"tests/test_categorical.py::TestBarPlot::test_xy_horizontal",
"tests/test_categorical.py::TestBarPlot::test_xy_with_na_grouper",
"tests/test_categorical.py::TestBarPlot::test_xy_with_na_value",
"tests/test_categorical.py::TestBarPlot::test_hue_redundant",
"tests/test_categorical.py::TestBarPlot::test_hue_matched",
"tests/test_categorical.py::TestBarPlot::test_hue_matched_by_name",
"tests/test_categorical.py::TestBarPlot::test_hue_dodged",
"tests/test_categorical.py::TestBarPlot::test_gap",
"tests/test_categorical.py::TestBarPlot::test_hue_undodged",
"tests/test_categorical.py::TestBarPlot::test_hue_order",
"tests/test_categorical.py::TestBarPlot::test_hue_norm",
"tests/test_categorical.py::TestBarPlot::test_fill",
"tests/test_categorical.py::TestBarPlot::test_xy_native_scale",
"tests/test_categorical.py::TestBarPlot::test_xy_native_scale_log_transform",
"tests/test_categorical.py::TestBarPlot::test_datetime_native_scale_axis",
"tests/test_categorical.py::TestBarPlot::test_native_scale_dodged",
"tests/test_categorical.py::TestBarPlot::test_native_scale_log_transform_dodged",
"tests/test_categorical.py::TestBarPlot::test_estimate_default",
"tests/test_categorical.py::TestBarPlot::test_estimate_string",
"tests/test_categorical.py::TestBarPlot::test_estimate_func",
"tests/test_categorical.py::TestBarPlot::test_weighted_estimate",
"tests/test_categorical.py::TestBarPlot::test_estimate_log_transform",
"tests/test_categorical.py::TestBarPlot::test_errorbars",
"tests/test_categorical.py::TestBarPlot::test_width",
"tests/test_categorical.py::TestBarPlot::test_width_native_scale",
"tests/test_categorical.py::TestBarPlot::test_width_spaced_categories",
"tests/test_categorical.py::TestBarPlot::test_saturation_color",
"tests/test_categorical.py::TestBarPlot::test_saturation_palette",
"tests/test_categorical.py::TestBarPlot::test_legend_numeric_auto",
"tests/test_categorical.py::TestBarPlot::test_legend_numeric_full",
"tests/test_categorical.py::TestBarPlot::test_legend_disabled",
"tests/test_categorical.py::TestBarPlot::test_error_caps",
"tests/test_categorical.py::TestBarPlot::test_error_caps_native_scale",
"tests/test_categorical.py::TestBarPlot::test_error_caps_native_scale_log_transform",
"tests/test_categorical.py::TestBarPlot::test_bar_kwargs",
"tests/test_categorical.py::TestBarPlot::test_legend_attributes",
"tests/test_categorical.py::TestBarPlot::test_legend_unfilled",
"tests/test_categorical.py::TestBarPlot::test_err_kws[True]",
"tests/test_categorical.py::TestBarPlot::test_err_kws[False]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBarPlot::test_errwidth_deprecation",
"tests/test_categorical.py::TestBarPlot::test_errcolor_deprecation",
"tests/test_categorical.py::TestBarPlot::test_capsize_as_none_deprecation",
"tests/test_categorical.py::TestBarPlot::test_hue_implied_by_palette_deprecation",
"tests/test_categorical.py::TestPointPlot::test_labels_long[x]",
"tests/test_categorical.py::TestPointPlot::test_labels_long[y]",
"tests/test_categorical.py::TestPointPlot::test_labels_wide",
"tests/test_categorical.py::TestPointPlot::test_labels_hue_order",
"tests/test_categorical.py::TestPointPlot::test_color",
"tests/test_categorical.py::TestPointPlot::test_two_calls",
"tests/test_categorical.py::TestPointPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestPointPlot::test_log_scale[x]",
"tests/test_categorical.py::TestPointPlot::test_log_scale[y]",
"tests/test_categorical.py::TestPointPlot::test_labels_flat",
"tests/test_categorical.py::TestPointPlot::test_single_var[x]",
"tests/test_categorical.py::TestPointPlot::test_single_var[y]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[x]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[y]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[h]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[v]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[x]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[y]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[h]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[v]",
"tests/test_categorical.py::TestPointPlot::test_xy_vertical",
"tests/test_categorical.py::TestPointPlot::test_xy_horizontal",
"tests/test_categorical.py::TestPointPlot::test_xy_with_na_grouper",
"tests/test_categorical.py::TestPointPlot::test_xy_with_na_value",
"tests/test_categorical.py::TestPointPlot::test_hue",
"tests/test_categorical.py::TestPointPlot::test_wide_data_is_joined",
"tests/test_categorical.py::TestPointPlot::test_xy_native_scale",
"tests/test_categorical.py::TestPointPlot::test_estimate[mean]",
"tests/test_categorical.py::TestPointPlot::test_estimate[<lambda>]",
"tests/test_categorical.py::TestPointPlot::test_weighted_estimate",
"tests/test_categorical.py::TestPointPlot::test_estimate_log_transform",
"tests/test_categorical.py::TestPointPlot::test_errorbars",
"tests/test_categorical.py::TestPointPlot::test_marker_linestyle",
"tests/test_categorical.py::TestPointPlot::test_markers_linestyles_single",
"tests/test_categorical.py::TestPointPlot::test_markers_linestyles_mapped",
"tests/test_categorical.py::TestPointPlot::test_dodge_boolean",
"tests/test_categorical.py::TestPointPlot::test_dodge_float",
"tests/test_categorical.py::TestPointPlot::test_dodge_log_scale",
"tests/test_categorical.py::TestPointPlot::test_err_kws",
"tests/test_categorical.py::TestPointPlot::test_err_kws_inherited",
"tests/test_categorical.py::TestPointPlot::test_legend_contents",
"tests/test_categorical.py::TestPointPlot::test_legend_set_props",
"tests/test_categorical.py::TestPointPlot::test_legend_synced_props",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs20]",
"tests/test_categorical.py::TestPointPlot::test_legend_disabled",
"tests/test_categorical.py::TestPointPlot::test_join_deprecation",
"tests/test_categorical.py::TestPointPlot::test_scale_deprecation",
"tests/test_categorical.py::TestPointPlot::test_layered_plot_clipping",
"tests/test_categorical.py::TestCountPlot::test_labels_long",
"tests/test_categorical.py::TestCountPlot::test_wide_data",
"tests/test_categorical.py::TestCountPlot::test_flat_series",
"tests/test_categorical.py::TestCountPlot::test_x_series",
"tests/test_categorical.py::TestCountPlot::test_y_series",
"tests/test_categorical.py::TestCountPlot::test_hue_redundant",
"tests/test_categorical.py::TestCountPlot::test_hue_dodged",
"tests/test_categorical.py::TestCountPlot::test_stat[percent]",
"tests/test_categorical.py::TestCountPlot::test_stat[probability]",
"tests/test_categorical.py::TestCountPlot::test_stat[proportion]",
"tests/test_categorical.py::TestCountPlot::test_legend_numeric_auto",
"tests/test_categorical.py::TestCountPlot::test_legend_disabled",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestCatPlot::test_facet_organization",
"tests/test_categorical.py::TestCatPlot::test_plot_elements",
"tests/test_categorical.py::TestCatPlot::test_bad_plot_kind_error",
"tests/test_categorical.py::TestCatPlot::test_plot_colors",
"tests/test_categorical.py::TestCatPlot::test_ax_kwarg_removal",
"tests/test_categorical.py::TestCatPlot::test_share_xy",
"tests/test_categorical.py::TestCatPlot::test_facetgrid_data",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[col]",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[row]",
"tests/test_categorical.py::TestCatPlot::test_invalid_kind",
"tests/test_categorical.py::TestCatPlot::test_legend_with_auto",
"tests/test_categorical.py::TestCatPlot::test_weights_warning",
"tests/test_distributions.py::TestDistPlot::test_hist_bins",
"tests/test_distributions.py::TestDistPlot::test_elements",
"tests/test_distributions.py::TestDistPlot::test_distplot_with_nans",
"tests/test_distributions.py::TestRugPlot::test_color",
"tests/test_distributions.py::TestRugPlot::test_long_data[x]",
"tests/test_distributions.py::TestRugPlot::test_long_data[y]",
"tests/test_distributions.py::TestRugPlot::test_bivariate_data",
"tests/test_distributions.py::TestRugPlot::test_wide_vs_long_data",
"tests/test_distributions.py::TestRugPlot::test_flat_vector",
"tests/test_distributions.py::TestRugPlot::test_datetime_data",
"tests/test_distributions.py::TestRugPlot::test_empty_data",
"tests/test_distributions.py::TestRugPlot::test_a_deprecation",
"tests/test_distributions.py::TestRugPlot::test_axis_deprecation[x]",
"tests/test_distributions.py::TestRugPlot::test_axis_deprecation[y]",
"tests/test_distributions.py::TestRugPlot::test_vertical_deprecation",
"tests/test_distributions.py::TestRugPlot::test_rug_data",
"tests/test_distributions.py::TestRugPlot::test_rug_colors",
"tests/test_distributions.py::TestRugPlot::test_expand_margins",
"tests/test_distributions.py::TestRugPlot::test_multiple_rugs",
"tests/test_distributions.py::TestRugPlot::test_matplotlib_kwargs",
"tests/test_distributions.py::TestRugPlot::test_axis_labels",
"tests/test_distributions.py::TestRugPlot::test_log_scale",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_color[True]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_color[False]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_long_vectors[x]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_long_vectors[y]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_wide_vs_long_data",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_flat_vector",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_empty_data",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_singular_data",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_variable_assignment",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_vertical_deprecation",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_bw_deprecation",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_kernel_deprecation",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_shade_deprecation",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[layer]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[stack]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[fill]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_stacking",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_filling",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_default[stack]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_default[fill]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[layer]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[stack]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[fill]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_color_cycle_interaction",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_artist_color[True]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_artist_color[False]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_datetime_scale",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_multiple_argument_check",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_cut",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_clip",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_line_is_density",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_cumulative",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_cumulative_requires_scipy",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_common_norm",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_common_grid",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_bw_method",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_bw_adjust",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_implicit",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_explicit",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_with_hue",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_normalization",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_weights",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_weight_norm",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_sticky_edges",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_line_kws",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_input_checking",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_axis_labels",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_legend",
"tests/test_distributions.py::TestKDEPlotBivariate::test_long_vectors",
"tests/test_distributions.py::TestKDEPlotBivariate::test_singular_data",
"tests/test_distributions.py::TestKDEPlotBivariate::test_fill_artists",
"tests/test_distributions.py::TestKDEPlotBivariate::test_common_norm",
"tests/test_distributions.py::TestKDEPlotBivariate::test_log_scale",
"tests/test_distributions.py::TestKDEPlotBivariate::test_bandwidth",
"tests/test_distributions.py::TestKDEPlotBivariate::test_weights",
"tests/test_distributions.py::TestKDEPlotBivariate::test_hue_ignores_cmap",
"tests/test_distributions.py::TestKDEPlotBivariate::test_contour_line_colors",
"tests/test_distributions.py::TestKDEPlotBivariate::test_contour_line_cmap",
"tests/test_distributions.py::TestKDEPlotBivariate::test_contour_fill_colors",
"tests/test_distributions.py::TestKDEPlotBivariate::test_colorbar",
"tests/test_distributions.py::TestKDEPlotBivariate::test_levels_and_thresh",
"tests/test_distributions.py::TestKDEPlotBivariate::test_input_checking",
"tests/test_distributions.py::TestHistPlotUnivariate::test_color[bars-True]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_color[bars-False]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_color[step-True]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_color[step-False]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_color[poly-True]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_color[poly-False]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_long_vectors[x]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_long_vectors[y]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_wide_vs_long_data",
"tests/test_distributions.py::TestHistPlotUnivariate::test_flat_vector",
"tests/test_distributions.py::TestHistPlotUnivariate::test_empty_data",
"tests/test_distributions.py::TestHistPlotUnivariate::test_variable_assignment",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[layer-bars]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[layer-step]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[layer-poly]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[dodge-bars]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[dodge-step]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[dodge-poly]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[stack-bars]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[stack-step]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[stack-poly]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[fill-bars]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[fill-step]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[fill-poly]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_stack",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_dodge",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_as_numpy_dodged",
"tests/test_distributions.py::TestHistPlotUnivariate::test_multiple_input_check",
"tests/test_distributions.py::TestHistPlotUnivariate::test_element_input_check",
"tests/test_distributions.py::TestHistPlotUnivariate::test_count_stat",
"tests/test_distributions.py::TestHistPlotUnivariate::test_density_stat",
"tests/test_distributions.py::TestHistPlotUnivariate::test_density_stat_common_norm",
"tests/test_distributions.py::TestHistPlotUnivariate::test_density_stat_unique_norm",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat[probability]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat[proportion]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_common_norm[probability]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_common_norm[proportion]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_unique_norm[probability]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_unique_norm[proportion]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_percent_stat",
"tests/test_distributions.py::TestHistPlotUnivariate::test_common_bins",
"tests/test_distributions.py::TestHistPlotUnivariate::test_unique_bins",
"tests/test_distributions.py::TestHistPlotUnivariate::test_range_with_inf",
"tests/test_distributions.py::TestHistPlotUnivariate::test_weights_with_missing",
"tests/test_distributions.py::TestHistPlotUnivariate::test_weight_norm",
"tests/test_distributions.py::TestHistPlotUnivariate::test_discrete",
"tests/test_distributions.py::TestHistPlotUnivariate::test_discrete_categorical_default",
"tests/test_distributions.py::TestHistPlotUnivariate::test_categorical_yaxis_inversion",
"tests/test_distributions.py::TestHistPlotUnivariate::test_datetime_scale",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde[count]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde[density]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde[probability]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[count-layer]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[count-dodge]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[density-layer]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[density-dodge]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[probability-layer]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[probability-dodge]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_default_cut",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_hue",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_yaxis",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_line_kws",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_singular_data",
"tests/test_distributions.py::TestHistPlotUnivariate::test_element_default",
"tests/test_distributions.py::TestHistPlotUnivariate::test_bars_no_fill",
"tests/test_distributions.py::TestHistPlotUnivariate::test_step_fill",
"tests/test_distributions.py::TestHistPlotUnivariate::test_poly_fill",
"tests/test_distributions.py::TestHistPlotUnivariate::test_poly_no_fill",
"tests/test_distributions.py::TestHistPlotUnivariate::test_step_no_fill",
"tests/test_distributions.py::TestHistPlotUnivariate::test_step_fill_xy",
"tests/test_distributions.py::TestHistPlotUnivariate::test_step_no_fill_xy",
"tests/test_distributions.py::TestHistPlotUnivariate::test_weighted_histogram",
"tests/test_distributions.py::TestHistPlotUnivariate::test_weights_with_auto_bins",
"tests/test_distributions.py::TestHistPlotUnivariate::test_shrink",
"tests/test_distributions.py::TestHistPlotUnivariate::test_log_scale_explicit",
"tests/test_distributions.py::TestHistPlotUnivariate::test_log_scale_implicit",
"tests/test_distributions.py::TestHistPlotUnivariate::test_log_scale_dodge",
"tests/test_distributions.py::TestHistPlotUnivariate::test_log_scale_kde",
"tests/test_distributions.py::TestHistPlotUnivariate::test_auto_linewidth[True]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_auto_linewidth[False]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_bar_kwargs",
"tests/test_distributions.py::TestHistPlotUnivariate::test_step_fill_kwargs",
"tests/test_distributions.py::TestHistPlotUnivariate::test_step_line_kwargs",
"tests/test_distributions.py::TestHistPlotUnivariate::test_label",
"tests/test_distributions.py::TestHistPlotUnivariate::test_default_color_scout_cleanup",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_with_hue",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_with_hue_unique_bins",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_with_col_unique_bins",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_log_scale",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_thresh",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_sticky_edges",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_common_norm",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_unique_norm",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_normalization[probability]",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_normalization[proportion]",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_normalization[percent]",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_colors",
"tests/test_distributions.py::TestHistPlotBivariate::test_color_limits",
"tests/test_distributions.py::TestHistPlotBivariate::test_hue_color_limits",
"tests/test_distributions.py::TestHistPlotBivariate::test_colorbar",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_color",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_long_vectors[x]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_long_vectors[y]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_hue",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_line_kwargs",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_drawstyle[x]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_drawstyle[y]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_proportion_limits[x-y]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_proportion_limits[y-x]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_proportion_limits_complementary[x-y]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_proportion_limits_complementary[y-x]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_proportion_count[x-y]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_proportion_count[y-x]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_weights",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_bivariate_error",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_log_scale",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs3]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs9]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs10]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs11]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs12]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs13]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs14]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs15]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs3]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs9]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs10]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs11]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs3]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs9]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_facets[col]",
"tests/test_distributions.py::TestDisPlot::test_facets[row]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[dodge]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[stack]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[fill]",
"tests/test_distributions.py::TestDisPlot::test_ax_warning",
"tests/test_distributions.py::TestDisPlot::test_array_faceting[col]",
"tests/test_distributions.py::TestDisPlot::test_array_faceting[row]",
"tests/test_distributions.py::TestDisPlot::test_legend",
"tests/test_distributions.py::TestDisPlot::test_empty",
"tests/test_distributions.py::TestDisPlot::test_bivariate_ecdf_error",
"tests/test_distributions.py::TestDisPlot::test_bivariate_kde_norm",
"tests/test_distributions.py::TestDisPlot::test_bivariate_hist_norm",
"tests/test_distributions.py::TestDisPlot::test_facetgrid_data",
"tests/test_matrix.py::TestDendrogram::test_ndarray_input",
"tests/test_matrix.py::TestDendrogram::test_df_input",
"tests/test_matrix.py::TestDendrogram::test_df_multindex_input",
"tests/test_matrix.py::TestDendrogram::test_axis0_input",
"tests/test_matrix.py::TestDendrogram::test_rotate_input",
"tests/test_matrix.py::TestDendrogram::test_rotate_axis0_input",
"tests/test_matrix.py::TestDendrogram::test_custom_linkage",
"tests/test_matrix.py::TestDendrogram::test_label_false",
"tests/test_matrix.py::TestDendrogram::test_linkage_scipy",
"tests/test_matrix.py::TestDendrogram::test_fastcluster_other_method",
"tests/test_matrix.py::TestDendrogram::test_fastcluster_non_euclidean",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_plot",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_rotate",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_ticklabel_rotation",
"tests/test_matrix.py::TestClustermap::test_ndarray_input",
"tests/test_matrix.py::TestClustermap::test_df_input",
"tests/test_matrix.py::TestClustermap::test_corr_df_input",
"tests/test_matrix.py::TestClustermap::test_pivot_input",
"tests/test_matrix.py::TestClustermap::test_colors_input",
"tests/test_matrix.py::TestClustermap::test_categorical_colors_input",
"tests/test_matrix.py::TestClustermap::test_nested_colors_input",
"tests/test_matrix.py::TestClustermap::test_colors_input_custom_cmap",
"tests/test_matrix.py::TestClustermap::test_z_score",
"tests/test_matrix.py::TestClustermap::test_z_score_axis0",
"tests/test_matrix.py::TestClustermap::test_standard_scale",
"tests/test_matrix.py::TestClustermap::test_standard_scale_axis0",
"tests/test_matrix.py::TestClustermap::test_z_score_standard_scale",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap",
"tests/test_matrix.py::TestClustermap::test_nested_color_list_to_matrix_and_cmap",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap_axis1",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap_different_sizes",
"tests/test_matrix.py::TestClustermap::test_savefig",
"tests/test_matrix.py::TestClustermap::test_plot_dendrograms",
"tests/test_matrix.py::TestClustermap::test_cluster_false",
"tests/test_matrix.py::TestClustermap::test_row_col_colors",
"tests/test_matrix.py::TestClustermap::test_cluster_false_row_col_colors",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_shuffled",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_missing",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_one_axis",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series_shuffled",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series_missing",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_ignore_heatmap_kwargs",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_raise_on_mixed_index_types",
"tests/test_matrix.py::TestClustermap::test_mask_reorganization",
"tests/test_matrix.py::TestClustermap::test_ticklabel_reorganization",
"tests/test_matrix.py::TestClustermap::test_noticklabels",
"tests/test_matrix.py::TestClustermap::test_size_ratios",
"tests/test_matrix.py::TestClustermap::test_cbar_pos",
"tests/test_matrix.py::TestClustermap::test_square_warning",
"tests/test_matrix.py::TestClustermap::test_clustermap_annotation",
"tests/test_matrix.py::TestClustermap::test_tree_kws",
"tests/test_rcmod.py::TestFonts::test_set_font",
"tests/test_rcmod.py::TestFonts::test_different_sans_serif",
"tests/test_regression.py::TestRegressionPlotter::test_fast_regression",
"tests/test_regression.py::TestRegressionPlotter::test_regress_poly",
"tests/test_regression.py::TestRegressionPlotter::test_regress_n_boot",
"tests/test_regression.py::TestRegressionPlotter::test_regress_without_bootstrap",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_regression",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_perfect_separation",
"tests/test_regression.py::TestRegressionPlotter::test_robust_regression",
"tests/test_regression.py::TestRegressionPlotter::test_lowess_regression",
"tests/test_regression.py::TestRegressionPlots::test_residplot_lowess",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_simple",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_complex",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[series]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[numpy]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[list]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_wide",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_hues",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_sizes",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_styles",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_weighted_estimator",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_stringy_numerics",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_legend",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_unshared_axis_labels",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_data",
"tests/test_relational.py::TestRelationalPlotter::test_facet_variable_collision",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_scatter_unused_variables",
"tests/test_relational.py::TestRelationalPlotter::test_ax_kwarg_removal",
"tests/test_relational.py::TestRelationalPlotter::test_legend_has_no_offset",
"tests/test_relational.py::TestRelationalPlotter::test_lineplot_2d_dashes",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_style",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue_and_style",
"tests/test_relational.py::TestLinePlotter::test_color",
"tests/test_relational.py::TestLinePlotter::test_legend_no_semantics",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_categorical",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_style_same",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_style_diff",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_size_same",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_full[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_full[size]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_full[style]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_brief[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_brief[size]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_brief[style]",
"tests/test_relational.py::TestLinePlotter::test_legend_value_error",
"tests/test_relational.py::TestLinePlotter::test_legend_log_norm[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_log_norm[size]",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_var[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_var[size]",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_numberic_brief[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_numberic_brief[size]",
"tests/test_relational.py::TestLinePlotter::test_weights",
"tests/test_relational.py::TestLinePlotter::test_non_aggregated_data",
"tests/test_relational.py::TestLinePlotter::test_orient",
"tests/test_relational.py::TestLinePlotter::test_log_scale",
"tests/test_relational.py::TestLinePlotter::test_matplotlib_kwargs",
"tests/test_relational.py::TestLinePlotter::test_nonmapped_dashes",
"tests/test_relational.py::TestLinePlotter::test_lineplot_axes",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_hue",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_style",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_hue_and_style",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics0]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics1]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics2]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics3]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics4]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics5]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics6]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics7]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics8]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics9]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics10]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics11]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_smoke",
"tests/test_relational.py::TestLinePlotter::test_ci_deprecation",
"tests/test_relational.py::TestScatterPlotter::test_color",
"tests/test_relational.py::TestScatterPlotter::test_legend_no_semantics",
"tests/test_relational.py::TestScatterPlotter::test_legend_hue",
"tests/test_relational.py::TestScatterPlotter::test_legend_hue_style_same",
"tests/test_relational.py::TestScatterPlotter::test_legend_hue_style_different",
"tests/test_relational.py::TestScatterPlotter::test_legend_data_hue_size_same",
"tests/test_relational.py::TestScatterPlotter::test_legend_size_numeric_list",
"tests/test_relational.py::TestScatterPlotter::test_legend_size_numeric_dict",
"tests/test_relational.py::TestScatterPlotter::test_legend_numeric_hue_full",
"tests/test_relational.py::TestScatterPlotter::test_legend_numeric_hue_brief",
"tests/test_relational.py::TestScatterPlotter::test_legend_numeric_size_full",
"tests/test_relational.py::TestScatterPlotter::test_legend_numeric_size_brief",
"tests/test_relational.py::TestScatterPlotter::test_legend_attributes_hue",
"tests/test_relational.py::TestScatterPlotter::test_legend_attributes_style",
"tests/test_relational.py::TestScatterPlotter::test_legend_attributes_hue_and_style",
"tests/test_relational.py::TestScatterPlotter::test_legend_value_error",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_axes",
"tests/test_relational.py::TestScatterPlotter::test_literal_attribute_vectors",
"tests/test_relational.py::TestScatterPlotter::test_supplied_color_array",
"tests/test_relational.py::TestScatterPlotter::test_hue_order",
"tests/test_relational.py::TestScatterPlotter::test_linewidths",
"tests/test_relational.py::TestScatterPlotter::test_size_norm_extrapolation",
"tests/test_relational.py::TestScatterPlotter::test_datetime_scale",
"tests/test_relational.py::TestScatterPlotter::test_unfilled_marker_edgecolor_warning",
"tests/test_relational.py::TestScatterPlotter::test_short_form_kwargs",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics0]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics1]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics2]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics3]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics4]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics5]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics6]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics7]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics8]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics9]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics10]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics11]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_smoke",
"tests/test_statistics.py::TestKDE::test_cumulative",
"tests/test_statistics.py::TestKDE::test_bivariate_cumulative",
"tests/test_statistics.py::TestECDF::test_against_statsmodels",
"tests/test_utils.py::test_move_legend_with_labels"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-6
|
1.0
|
{
"code": "diff --git b/seaborn/_base.py a/seaborn/_base.py\nindex 3db7c747..0b435231 100644\n--- b/seaborn/_base.py\n+++ a/seaborn/_base.py\n@@ -879,6 +879,91 @@ class VectorPlotter:\n Subset of ``plot_data`` for this combination of semantic values.\n \n \"\"\"\n+ # TODO should this default to using all (non x/y?) semantics?\n+ # or define grouping vars somewhere?\n+ if grouping_vars is None:\n+ grouping_vars = []\n+ elif isinstance(grouping_vars, str):\n+ grouping_vars = [grouping_vars]\n+ elif isinstance(grouping_vars, tuple):\n+ grouping_vars = list(grouping_vars)\n+\n+ # Always insert faceting variables\n+ if by_facet:\n+ facet_vars = {\"col\", \"row\"}\n+ grouping_vars.extend(\n+ facet_vars & set(self.variables) - set(grouping_vars)\n+ )\n+\n+ # Reduce to the semantics used in this plot\n+ grouping_vars = [var for var in grouping_vars if var in self.variables]\n+\n+ if from_comp_data:\n+ data = self.comp_data\n+ else:\n+ data = self.plot_data\n+\n+ if dropna:\n+ data = data.dropna()\n+\n+ levels = self.var_levels.copy()\n+ if from_comp_data:\n+ for axis in {\"x\", \"y\"} & set(grouping_vars):\n+ converter = self.converters[axis].iloc[0]\n+ if self.var_types[axis] == \"categorical\":\n+ if self._var_ordered[axis]:\n+ # If the axis is ordered, then the axes in a possible\n+ # facet grid are by definition \"shared\", or there is a\n+ # single axis with a unique cat -> idx mapping.\n+ # So we can just take the first converter object.\n+ levels[axis] = converter.convert_units(levels[axis])\n+ else:\n+ # Otherwise, the mappings may not be unique, but we can\n+ # use the unique set of index values in comp_data.\n+ levels[axis] = np.sort(data[axis].unique())\n+ else:\n+ transform = converter.get_transform().transform\n+ levels[axis] = transform(converter.convert_units(levels[axis]))\n+\n+ if grouping_vars:\n+\n+ grouped_data = data.groupby(\n+ grouping_vars, sort=False, as_index=False, observed=False,\n+ )\n+\n+ grouping_keys = []\n+ for var in grouping_vars:\n+ key = levels.get(var)\n+ grouping_keys.append([] if key is None else key)\n+\n+ iter_keys = itertools.product(*grouping_keys)\n+ if reverse:\n+ iter_keys = reversed(list(iter_keys))\n+\n+ for key in iter_keys:\n+\n+ pd_key = (\n+ key[0] if len(key) == 1 and _version_predates(pd, \"2.2.0\") else key\n+ )\n+ try:\n+ data_subset = grouped_data.get_group(pd_key)\n+ except KeyError:\n+ # XXX we are adding this to allow backwards compatibility\n+ # with the empty artists that old categorical plots would\n+ # add (before 0.12), which we may decide to break, in which\n+ # case this option could be removed\n+ data_subset = data.loc[[]]\n+\n+ if data_subset.empty and not allow_empty:\n+ continue\n+\n+ sub_vars = dict(zip(grouping_vars, key))\n+\n+ yield sub_vars, data_subset.copy()\n+\n+ else:\n+\n+ yield {}, data.copy()\n \n @property\n def comp_data(self):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_base.py b/seaborn/_base.py\nindex 0b435231..3db7c747 100644\n--- a/seaborn/_base.py\n+++ b/seaborn/_base.py\n@@ -879,91 +879,6 @@ class VectorPlotter:\n Subset of ``plot_data`` for this combination of semantic values.\n \n \"\"\"\n- # TODO should this default to using all (non x/y?) semantics?\n- # or define grouping vars somewhere?\n- if grouping_vars is None:\n- grouping_vars = []\n- elif isinstance(grouping_vars, str):\n- grouping_vars = [grouping_vars]\n- elif isinstance(grouping_vars, tuple):\n- grouping_vars = list(grouping_vars)\n-\n- # Always insert faceting variables\n- if by_facet:\n- facet_vars = {\"col\", \"row\"}\n- grouping_vars.extend(\n- facet_vars & set(self.variables) - set(grouping_vars)\n- )\n-\n- # Reduce to the semantics used in this plot\n- grouping_vars = [var for var in grouping_vars if var in self.variables]\n-\n- if from_comp_data:\n- data = self.comp_data\n- else:\n- data = self.plot_data\n-\n- if dropna:\n- data = data.dropna()\n-\n- levels = self.var_levels.copy()\n- if from_comp_data:\n- for axis in {\"x\", \"y\"} & set(grouping_vars):\n- converter = self.converters[axis].iloc[0]\n- if self.var_types[axis] == \"categorical\":\n- if self._var_ordered[axis]:\n- # If the axis is ordered, then the axes in a possible\n- # facet grid are by definition \"shared\", or there is a\n- # single axis with a unique cat -> idx mapping.\n- # So we can just take the first converter object.\n- levels[axis] = converter.convert_units(levels[axis])\n- else:\n- # Otherwise, the mappings may not be unique, but we can\n- # use the unique set of index values in comp_data.\n- levels[axis] = np.sort(data[axis].unique())\n- else:\n- transform = converter.get_transform().transform\n- levels[axis] = transform(converter.convert_units(levels[axis]))\n-\n- if grouping_vars:\n-\n- grouped_data = data.groupby(\n- grouping_vars, sort=False, as_index=False, observed=False,\n- )\n-\n- grouping_keys = []\n- for var in grouping_vars:\n- key = levels.get(var)\n- grouping_keys.append([] if key is None else key)\n-\n- iter_keys = itertools.product(*grouping_keys)\n- if reverse:\n- iter_keys = reversed(list(iter_keys))\n-\n- for key in iter_keys:\n-\n- pd_key = (\n- key[0] if len(key) == 1 and _version_predates(pd, \"2.2.0\") else key\n- )\n- try:\n- data_subset = grouped_data.get_group(pd_key)\n- except KeyError:\n- # XXX we are adding this to allow backwards compatibility\n- # with the empty artists that old categorical plots would\n- # add (before 0.12), which we may decide to break, in which\n- # case this option could be removed\n- data_subset = data.loc[[]]\n-\n- if data_subset.empty and not allow_empty:\n- continue\n-\n- sub_vars = dict(zip(grouping_vars, key))\n-\n- yield sub_vars, data_subset.copy()\n-\n- else:\n-\n- yield {}, data.copy()\n \n @property\n def comp_data(self):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_base.py.\nHere is the description for the function:\n def iter_data(\n self, grouping_vars=None, *,\n reverse=False, from_comp_data=False,\n by_facet=True, allow_empty=False, dropna=True,\n ):\n \"\"\"Generator for getting subsets of data defined by semantic variables.\n\n Also injects \"col\" and \"row\" into grouping semantics.\n\n Parameters\n ----------\n grouping_vars : string or list of strings\n Semantic variables that define the subsets of data.\n reverse : bool\n If True, reverse the order of iteration.\n from_comp_data : bool\n If True, use self.comp_data rather than self.plot_data\n by_facet : bool\n If True, add faceting variables to the set of grouping variables.\n allow_empty : bool\n If True, yield an empty dataframe when no observations exist for\n combinations of grouping variables.\n dropna : bool\n If True, remove rows with missing data.\n\n Yields\n ------\n sub_vars : dict\n Keys are semantic names, values are the level of that semantic.\n sub_data : :class:`pandas.DataFrame`\n Subset of ``plot_data`` for this combination of semantic values.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_core/test_data.py::TestPlotData::test_data_interchange_support_test",
"tests/_core/test_plot.py::TestLayerAddition::test_stat_default",
"tests/_core/test_plot.py::TestScaling::test_categorical_as_datetime",
"tests/_core/test_plot.py::TestScaling::test_log_scale_name",
"tests/_core/test_plot.py::TestScaling::test_identity_mapping_color_strings",
"tests/_core/test_plot.py::TestScaling::test_undefined_variable_raises",
"tests/_core/test_scales.py::TestNominal::test_color_numeric_int_float_mix",
"tests/_stats/test_density.py::TestKDE::test_cumulative[True]",
"tests/_stats/test_density.py::TestKDE::test_cumulative[False]",
"tests/test_axisgrid.py::TestFacetGrid::test_set_ticklabels",
"tests/test_axisgrid.py::TestFacetGrid::test_categorical_warning",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_color",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_palette",
"tests/test_axisgrid.py::TestPairGrid::test_diag_sharey",
"tests/test_axisgrid.py::TestPairGrid::test_dropna[scatterplot]",
"tests/test_axisgrid.py::TestPairGrid::test_dropna[scatter]",
"tests/test_axisgrid.py::TestPairGrid::test_histplot_legend",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg_hue",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_diag_kde",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_kde",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_hist",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_markers",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_column_multiindex",
"tests/test_axisgrid.py::TestPairGrid::test_corner_despine",
"tests/test_axisgrid.py::TestPairGrid::test_legend",
"tests/test_axisgrid.py::TestJointGrid::test_univariate_plot",
"tests/test_axisgrid.py::TestJointGrid::test_univariate_plot_distplot",
"tests/test_axisgrid.py::TestJointGrid::test_plot",
"tests/test_axisgrid.py::TestJointGrid::test_hue[True]",
"tests/test_axisgrid.py::TestJointGrid::test_hue[False]",
"tests/test_axisgrid.py::TestJointGrid::test_refline",
"tests/test_axisgrid.py::TestJointPlot::test_scatter",
"tests/test_axisgrid.py::TestJointPlot::test_scatter_hue",
"tests/test_axisgrid.py::TestJointPlot::test_reg",
"tests/test_axisgrid.py::TestJointPlot::test_resid",
"tests/test_axisgrid.py::TestJointPlot::test_hist",
"tests/test_axisgrid.py::TestJointPlot::test_hex",
"tests/test_axisgrid.py::TestJointPlot::test_kde",
"tests/test_axisgrid.py::TestJointPlot::test_kde_hue",
"tests/test_axisgrid.py::TestJointPlot::test_color",
"tests/test_axisgrid.py::TestJointPlot::test_palette",
"tests/test_axisgrid.py::TestJointPlot::test_hex_customise",
"tests/test_axisgrid.py::TestJointPlot::test_leaky_dict",
"tests/test_axisgrid.py::TestJointPlot::test_distplot_kwarg_warning",
"tests/test_axisgrid.py::TestJointPlot::test_ax_warning",
"tests/test_base.py::TestVectorPlotter::test_iter_data_quantitites",
"tests/test_base.py::TestVectorPlotter::test_iter_data_keys",
"tests/test_base.py::TestVectorPlotter::test_iter_data_values",
"tests/test_base.py::TestVectorPlotter::test_iter_data_reverse",
"tests/test_base.py::TestVectorPlotter::test_iter_data_dropna",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_mixed_facets",
"tests/test_base.py::TestVectorPlotter::test_attach_shared_axes",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs0]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs1]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs2]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs3]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs4]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs5]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs6]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs7]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs8]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs9]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs10]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs11]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs12]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs13]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs14]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs15]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs16]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs17]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs18]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs19]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs20]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs21]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs22]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs23]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs24]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs25]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs26]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs27]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs28]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs29]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs30]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs31]",
"tests/test_categorical.py::TestStripPlot::test_labels_long[x]",
"tests/test_categorical.py::TestStripPlot::test_labels_long[y]",
"tests/test_categorical.py::TestStripPlot::test_labels_wide",
"tests/test_categorical.py::TestStripPlot::test_labels_hue_order",
"tests/test_categorical.py::TestStripPlot::test_two_calls",
"tests/test_categorical.py::TestStripPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestStripPlot::test_color",
"tests/test_categorical.py::TestStripPlot::test_supplied_color_array",
"tests/test_categorical.py::TestStripPlot::test_unfilled_marker",
"tests/test_categorical.py::TestStripPlot::test_wide[h-dataframe]",
"tests/test_categorical.py::TestStripPlot::test_wide[h-dict]",
"tests/test_categorical.py::TestStripPlot::test_wide[v-dataframe]",
"tests/test_categorical.py::TestStripPlot::test_wide[v-dict]",
"tests/test_categorical.py::TestStripPlot::test_wide[y-dataframe]",
"tests/test_categorical.py::TestStripPlot::test_wide[y-dict]",
"tests/test_categorical.py::TestStripPlot::test_wide[x-dataframe]",
"tests/test_categorical.py::TestStripPlot::test_wide[x-dict]",
"tests/test_categorical.py::TestStripPlot::test_flat[h]",
"tests/test_categorical.py::TestStripPlot::test_flat[v]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables0-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables1-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables2-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables3-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables4-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables5-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables6-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables7-h]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables8-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables9-h]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables10-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables11-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables12-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables13-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables14-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables15-None]",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables0]",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables1]",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables2]",
"tests/test_categorical.py::TestStripPlot::test_positions_unfixed[a]",
"tests/test_categorical.py::TestStripPlot::test_positions_unfixed[s]",
"tests/test_categorical.py::TestStripPlot::test_positions_unfixed[d]",
"tests/test_categorical.py::TestStripPlot::test_order[str-None]",
"tests/test_categorical.py::TestStripPlot::test_order[str-order1]",
"tests/test_categorical.py::TestStripPlot::test_order[str-order2]",
"tests/test_categorical.py::TestStripPlot::test_order[str-order3]",
"tests/test_categorical.py::TestStripPlot::test_order[int-None]",
"tests/test_categorical.py::TestStripPlot::test_order[int-order5]",
"tests/test_categorical.py::TestStripPlot::test_order[int-order6]",
"tests/test_categorical.py::TestStripPlot::test_order[int-order7]",
"tests/test_categorical.py::TestStripPlot::test_order[int-order8]",
"tests/test_categorical.py::TestStripPlot::test_hue_categorical[a]",
"tests/test_categorical.py::TestStripPlot::test_hue_categorical[b]",
"tests/test_categorical.py::TestStripPlot::test_hue_dodged[a]",
"tests/test_categorical.py::TestStripPlot::test_hue_dodged[b]",
"tests/test_categorical.py::TestStripPlot::test_single[x-b-None]",
"tests/test_categorical.py::TestStripPlot::test_single[x-b-a]",
"tests/test_categorical.py::TestStripPlot::test_single[x-y-None]",
"tests/test_categorical.py::TestStripPlot::test_single[x-y-a]",
"tests/test_categorical.py::TestStripPlot::test_single[x-t-None]",
"tests/test_categorical.py::TestStripPlot::test_single[x-t-a]",
"tests/test_categorical.py::TestStripPlot::test_single[y-b-None]",
"tests/test_categorical.py::TestStripPlot::test_single[y-b-a]",
"tests/test_categorical.py::TestStripPlot::test_single[y-y-None]",
"tests/test_categorical.py::TestStripPlot::test_single[y-y-a]",
"tests/test_categorical.py::TestStripPlot::test_single[y-t-None]",
"tests/test_categorical.py::TestStripPlot::test_single[y-t-a]",
"tests/test_categorical.py::TestStripPlot::test_attributes",
"tests/test_categorical.py::TestStripPlot::test_three_points",
"tests/test_categorical.py::TestStripPlot::test_legend_categorical",
"tests/test_categorical.py::TestStripPlot::test_legend_numeric",
"tests/test_categorical.py::TestStripPlot::test_legend_attributes",
"tests/test_categorical.py::TestStripPlot::test_legend_disabled",
"tests/test_categorical.py::TestStripPlot::test_palette_from_color_deprecation",
"tests/test_categorical.py::TestStripPlot::test_palette_with_hue_deprecation",
"tests/test_categorical.py::TestStripPlot::test_log_scale",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestStripPlot::test_jitter_unfixed",
"tests/test_categorical.py::TestStripPlot::test_jitter[v-True]",
"tests/test_categorical.py::TestStripPlot::test_jitter[v-0.1]",
"tests/test_categorical.py::TestStripPlot::test_jitter[h-True]",
"tests/test_categorical.py::TestStripPlot::test_jitter[h-0.1]",
"tests/test_categorical.py::TestSwarmPlot::test_labels_long[x]",
"tests/test_categorical.py::TestSwarmPlot::test_labels_long[y]",
"tests/test_categorical.py::TestSwarmPlot::test_labels_wide",
"tests/test_categorical.py::TestSwarmPlot::test_labels_hue_order",
"tests/test_categorical.py::TestSwarmPlot::test_two_calls",
"tests/test_categorical.py::TestSwarmPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestSwarmPlot::test_color",
"tests/test_categorical.py::TestSwarmPlot::test_supplied_color_array",
"tests/test_categorical.py::TestSwarmPlot::test_unfilled_marker",
"tests/test_categorical.py::TestSwarmPlot::test_wide[h-dataframe]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[h-dict]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[v-dataframe]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[v-dict]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[y-dataframe]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[y-dict]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[x-dataframe]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[x-dict]",
"tests/test_categorical.py::TestSwarmPlot::test_flat[h]",
"tests/test_categorical.py::TestSwarmPlot::test_flat[v]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables0-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables1-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables2-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables3-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables4-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables5-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables6-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables7-h]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables8-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables9-h]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables10-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables11-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables12-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables13-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables14-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables15-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables0]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables1]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables2]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_unfixed[a]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_unfixed[s]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_unfixed[d]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-None]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-order1]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-order2]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-order3]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-None]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order5]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order6]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order7]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order8]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_categorical[a]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_categorical[b]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_dodged[a]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_dodged[b]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-b-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-b-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-y-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-y-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-t-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-t-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-b-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-b-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-y-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-y-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-t-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-t-a]",
"tests/test_categorical.py::TestSwarmPlot::test_attributes",
"tests/test_categorical.py::TestSwarmPlot::test_three_points",
"tests/test_categorical.py::TestSwarmPlot::test_legend_categorical",
"tests/test_categorical.py::TestSwarmPlot::test_legend_numeric",
"tests/test_categorical.py::TestSwarmPlot::test_legend_attributes",
"tests/test_categorical.py::TestSwarmPlot::test_legend_disabled",
"tests/test_categorical.py::TestSwarmPlot::test_palette_from_color_deprecation",
"tests/test_categorical.py::TestSwarmPlot::test_palette_with_hue_deprecation",
"tests/test_categorical.py::TestSwarmPlot::test_log_scale",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestBoxPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestBoxPlot::test_legend_attributes",
"tests/test_categorical.py::TestBoxPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBoxPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBoxPlot::test_labels_wide",
"tests/test_categorical.py::TestBoxPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBoxPlot::test_two_calls",
"tests/test_categorical.py::TestBoxPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBoxPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBoxPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBoxPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestBoxPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestBoxPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestBoxPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestBoxPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestBoxPlot::test_wide_data[h]",
"tests/test_categorical.py::TestBoxPlot::test_wide_data[v]",
"tests/test_categorical.py::TestBoxPlot::test_grouped[x]",
"tests/test_categorical.py::TestBoxPlot::test_grouped[y]",
"tests/test_categorical.py::TestBoxPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestBoxPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestBoxPlot::test_hue_not_dodged",
"tests/test_categorical.py::TestBoxPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestBoxPlot::test_dodge_native_scale_log",
"tests/test_categorical.py::TestBoxPlot::test_dodge_without_hue",
"tests/test_categorical.py::TestBoxPlot::test_log_data_scale[x]",
"tests/test_categorical.py::TestBoxPlot::test_log_data_scale[y]",
"tests/test_categorical.py::TestBoxPlot::test_color",
"tests/test_categorical.py::TestBoxPlot::test_wide_data_multicolored",
"tests/test_categorical.py::TestBoxPlot::test_wide_data_single_color",
"tests/test_categorical.py::TestBoxPlot::test_hue_colors",
"tests/test_categorical.py::TestBoxPlot::test_linecolor",
"tests/test_categorical.py::TestBoxPlot::test_linecolor_gray_warning",
"tests/test_categorical.py::TestBoxPlot::test_saturation",
"tests/test_categorical.py::TestBoxPlot::test_linewidth",
"tests/test_categorical.py::TestBoxPlot::test_fill",
"tests/test_categorical.py::TestBoxPlot::test_notch[notch]",
"tests/test_categorical.py::TestBoxPlot::test_notch[shownotches]",
"tests/test_categorical.py::TestBoxPlot::test_whis",
"tests/test_categorical.py::TestBoxPlot::test_gap",
"tests/test_categorical.py::TestBoxPlot::test_prop_dicts",
"tests/test_categorical.py::TestBoxPlot::test_showfliers",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_attributes",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_wide",
"tests/test_categorical.py::TestBoxenPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBoxenPlot::test_two_calls",
"tests/test_categorical.py::TestBoxenPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBoxenPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBoxenPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBoxenPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestBoxenPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[h]",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[v]",
"tests/test_categorical.py::TestBoxenPlot::test_grouped[x]",
"tests/test_categorical.py::TestBoxenPlot::test_grouped[y]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestBoxenPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestBoxenPlot::test_color",
"tests/test_categorical.py::TestBoxenPlot::test_hue_colors",
"tests/test_categorical.py::TestBoxenPlot::test_linecolor",
"tests/test_categorical.py::TestBoxenPlot::test_linewidth",
"tests/test_categorical.py::TestBoxenPlot::test_saturation",
"tests/test_categorical.py::TestBoxenPlot::test_gap",
"tests/test_categorical.py::TestBoxenPlot::test_fill",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_int",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_full",
"tests/test_categorical.py::TestBoxenPlot::test_trust_alpha",
"tests/test_categorical.py::TestBoxenPlot::test_outlier_prop",
"tests/test_categorical.py::TestBoxenPlot::test_exponential_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_linear_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_area_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_box_kws",
"tests/test_categorical.py::TestBoxenPlot::test_line_kws",
"tests/test_categorical.py::TestBoxenPlot::test_flier_kws",
"tests/test_categorical.py::TestBoxenPlot::test_scale_deprecation",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestViolinPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestViolinPlot::test_legend_attributes",
"tests/test_categorical.py::TestViolinPlot::test_labels_long[x]",
"tests/test_categorical.py::TestViolinPlot::test_labels_long[y]",
"tests/test_categorical.py::TestViolinPlot::test_labels_wide",
"tests/test_categorical.py::TestViolinPlot::test_labels_hue_order",
"tests/test_categorical.py::TestViolinPlot::test_two_calls",
"tests/test_categorical.py::TestViolinPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestViolinPlot::test_log_scale[x]",
"tests/test_categorical.py::TestViolinPlot::test_log_scale[y]",
"tests/test_categorical.py::TestViolinPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestViolinPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestViolinPlot::test_wide_data[h]",
"tests/test_categorical.py::TestViolinPlot::test_wide_data[v]",
"tests/test_categorical.py::TestViolinPlot::test_grouped[x]",
"tests/test_categorical.py::TestViolinPlot::test_grouped[y]",
"tests/test_categorical.py::TestViolinPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestViolinPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestViolinPlot::test_hue_not_dodged",
"tests/test_categorical.py::TestViolinPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestViolinPlot::test_dodge_native_scale_log",
"tests/test_categorical.py::TestViolinPlot::test_color",
"tests/test_categorical.py::TestViolinPlot::test_hue_colors",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[box]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[quart]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[stick]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[point]",
"tests/test_categorical.py::TestViolinPlot::test_linewidth",
"tests/test_categorical.py::TestViolinPlot::test_saturation",
"tests/test_categorical.py::TestViolinPlot::test_fill[box]",
"tests/test_categorical.py::TestViolinPlot::test_fill[quart]",
"tests/test_categorical.py::TestViolinPlot::test_fill[stick]",
"tests/test_categorical.py::TestViolinPlot::test_fill[point]",
"tests/test_categorical.py::TestViolinPlot::test_inner_box[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_box[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_quartiles[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_quartiles[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_stick[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_stick[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_points[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_points[y]",
"tests/test_categorical.py::TestViolinPlot::test_split_single",
"tests/test_categorical.py::TestViolinPlot::test_split_multi",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_area",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_count",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_width",
"tests/test_categorical.py::TestViolinPlot::test_common_norm",
"tests/test_categorical.py::TestViolinPlot::test_scale_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_scale_hue_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_bw_adjust",
"tests/test_categorical.py::TestViolinPlot::test_bw_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_gap",
"tests/test_categorical.py::TestViolinPlot::test_inner_kws",
"tests/test_categorical.py::TestViolinPlot::test_box_inner_kws",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestBarPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBarPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBarPlot::test_labels_wide",
"tests/test_categorical.py::TestBarPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBarPlot::test_color",
"tests/test_categorical.py::TestBarPlot::test_two_calls",
"tests/test_categorical.py::TestBarPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBarPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBarPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBarPlot::test_labels_flat",
"tests/test_categorical.py::TestBarPlot::test_single_var[x]",
"tests/test_categorical.py::TestBarPlot::test_single_var[y]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[x]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[y]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[h]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[v]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[x]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[y]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[h]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[v]",
"tests/test_categorical.py::TestBarPlot::test_xy_vertical",
"tests/test_categorical.py::TestBarPlot::test_xy_horizontal",
"tests/test_categorical.py::TestBarPlot::test_xy_with_na_grouper",
"tests/test_categorical.py::TestBarPlot::test_xy_with_na_value",
"tests/test_categorical.py::TestBarPlot::test_hue_redundant",
"tests/test_categorical.py::TestBarPlot::test_hue_matched",
"tests/test_categorical.py::TestBarPlot::test_hue_matched_by_name",
"tests/test_categorical.py::TestBarPlot::test_hue_dodged",
"tests/test_categorical.py::TestBarPlot::test_gap",
"tests/test_categorical.py::TestBarPlot::test_hue_undodged",
"tests/test_categorical.py::TestBarPlot::test_hue_order",
"tests/test_categorical.py::TestBarPlot::test_hue_norm",
"tests/test_categorical.py::TestBarPlot::test_fill",
"tests/test_categorical.py::TestBarPlot::test_xy_native_scale",
"tests/test_categorical.py::TestBarPlot::test_xy_native_scale_log_transform",
"tests/test_categorical.py::TestBarPlot::test_datetime_native_scale_axis",
"tests/test_categorical.py::TestBarPlot::test_native_scale_dodged",
"tests/test_categorical.py::TestBarPlot::test_native_scale_log_transform_dodged",
"tests/test_categorical.py::TestBarPlot::test_estimate_default",
"tests/test_categorical.py::TestBarPlot::test_estimate_string",
"tests/test_categorical.py::TestBarPlot::test_estimate_func",
"tests/test_categorical.py::TestBarPlot::test_weighted_estimate",
"tests/test_categorical.py::TestBarPlot::test_estimate_log_transform",
"tests/test_categorical.py::TestBarPlot::test_errorbars",
"tests/test_categorical.py::TestBarPlot::test_width",
"tests/test_categorical.py::TestBarPlot::test_width_native_scale",
"tests/test_categorical.py::TestBarPlot::test_width_spaced_categories",
"tests/test_categorical.py::TestBarPlot::test_saturation_color",
"tests/test_categorical.py::TestBarPlot::test_saturation_palette",
"tests/test_categorical.py::TestBarPlot::test_legend_numeric_auto",
"tests/test_categorical.py::TestBarPlot::test_legend_numeric_full",
"tests/test_categorical.py::TestBarPlot::test_legend_disabled",
"tests/test_categorical.py::TestBarPlot::test_error_caps",
"tests/test_categorical.py::TestBarPlot::test_error_caps_native_scale",
"tests/test_categorical.py::TestBarPlot::test_error_caps_native_scale_log_transform",
"tests/test_categorical.py::TestBarPlot::test_bar_kwargs",
"tests/test_categorical.py::TestBarPlot::test_legend_attributes",
"tests/test_categorical.py::TestBarPlot::test_legend_unfilled",
"tests/test_categorical.py::TestBarPlot::test_err_kws[True]",
"tests/test_categorical.py::TestBarPlot::test_err_kws[False]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBarPlot::test_errwidth_deprecation",
"tests/test_categorical.py::TestBarPlot::test_errcolor_deprecation",
"tests/test_categorical.py::TestBarPlot::test_capsize_as_none_deprecation",
"tests/test_categorical.py::TestBarPlot::test_hue_implied_by_palette_deprecation",
"tests/test_categorical.py::TestPointPlot::test_labels_long[x]",
"tests/test_categorical.py::TestPointPlot::test_labels_long[y]",
"tests/test_categorical.py::TestPointPlot::test_labels_wide",
"tests/test_categorical.py::TestPointPlot::test_labels_hue_order",
"tests/test_categorical.py::TestPointPlot::test_color",
"tests/test_categorical.py::TestPointPlot::test_two_calls",
"tests/test_categorical.py::TestPointPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestPointPlot::test_log_scale[x]",
"tests/test_categorical.py::TestPointPlot::test_log_scale[y]",
"tests/test_categorical.py::TestPointPlot::test_labels_flat",
"tests/test_categorical.py::TestPointPlot::test_single_var[x]",
"tests/test_categorical.py::TestPointPlot::test_single_var[y]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[x]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[y]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[h]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[v]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[x]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[y]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[h]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[v]",
"tests/test_categorical.py::TestPointPlot::test_xy_vertical",
"tests/test_categorical.py::TestPointPlot::test_xy_horizontal",
"tests/test_categorical.py::TestPointPlot::test_xy_with_na_grouper",
"tests/test_categorical.py::TestPointPlot::test_xy_with_na_value",
"tests/test_categorical.py::TestPointPlot::test_hue",
"tests/test_categorical.py::TestPointPlot::test_wide_data_is_joined",
"tests/test_categorical.py::TestPointPlot::test_xy_native_scale",
"tests/test_categorical.py::TestPointPlot::test_estimate[mean]",
"tests/test_categorical.py::TestPointPlot::test_estimate[<lambda>]",
"tests/test_categorical.py::TestPointPlot::test_weighted_estimate",
"tests/test_categorical.py::TestPointPlot::test_estimate_log_transform",
"tests/test_categorical.py::TestPointPlot::test_errorbars",
"tests/test_categorical.py::TestPointPlot::test_marker_linestyle",
"tests/test_categorical.py::TestPointPlot::test_markers_linestyles_single",
"tests/test_categorical.py::TestPointPlot::test_markers_linestyles_mapped",
"tests/test_categorical.py::TestPointPlot::test_dodge_boolean",
"tests/test_categorical.py::TestPointPlot::test_dodge_float",
"tests/test_categorical.py::TestPointPlot::test_dodge_log_scale",
"tests/test_categorical.py::TestPointPlot::test_err_kws",
"tests/test_categorical.py::TestPointPlot::test_err_kws_inherited",
"tests/test_categorical.py::TestPointPlot::test_legend_contents",
"tests/test_categorical.py::TestPointPlot::test_legend_set_props",
"tests/test_categorical.py::TestPointPlot::test_legend_synced_props",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs20]",
"tests/test_categorical.py::TestPointPlot::test_legend_disabled",
"tests/test_categorical.py::TestPointPlot::test_join_deprecation",
"tests/test_categorical.py::TestPointPlot::test_scale_deprecation",
"tests/test_categorical.py::TestPointPlot::test_layered_plot_clipping",
"tests/test_categorical.py::TestCountPlot::test_labels_long",
"tests/test_categorical.py::TestCountPlot::test_wide_data",
"tests/test_categorical.py::TestCountPlot::test_flat_series",
"tests/test_categorical.py::TestCountPlot::test_x_series",
"tests/test_categorical.py::TestCountPlot::test_y_series",
"tests/test_categorical.py::TestCountPlot::test_hue_redundant",
"tests/test_categorical.py::TestCountPlot::test_hue_dodged",
"tests/test_categorical.py::TestCountPlot::test_stat[percent]",
"tests/test_categorical.py::TestCountPlot::test_stat[probability]",
"tests/test_categorical.py::TestCountPlot::test_stat[proportion]",
"tests/test_categorical.py::TestCountPlot::test_legend_numeric_auto",
"tests/test_categorical.py::TestCountPlot::test_legend_disabled",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestCatPlot::test_facet_organization",
"tests/test_categorical.py::TestCatPlot::test_plot_elements",
"tests/test_categorical.py::TestCatPlot::test_plot_colors",
"tests/test_categorical.py::TestCatPlot::test_ax_kwarg_removal",
"tests/test_categorical.py::TestCatPlot::test_share_xy",
"tests/test_categorical.py::TestCatPlot::test_facetgrid_data",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[col]",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[row]",
"tests/test_categorical.py::TestCatPlot::test_legend_with_auto",
"tests/test_categorical.py::TestCatPlot::test_weights_warning",
"tests/test_distributions.py::TestDistPlot::test_hist_bins",
"tests/test_distributions.py::TestDistPlot::test_elements",
"tests/test_distributions.py::TestDistPlot::test_distplot_with_nans",
"tests/test_distributions.py::TestRugPlot::test_color",
"tests/test_distributions.py::TestRugPlot::test_long_data[x]",
"tests/test_distributions.py::TestRugPlot::test_long_data[y]",
"tests/test_distributions.py::TestRugPlot::test_bivariate_data",
"tests/test_distributions.py::TestRugPlot::test_wide_vs_long_data",
"tests/test_distributions.py::TestRugPlot::test_flat_vector",
"tests/test_distributions.py::TestRugPlot::test_datetime_data",
"tests/test_distributions.py::TestRugPlot::test_a_deprecation",
"tests/test_distributions.py::TestRugPlot::test_axis_deprecation[x]",
"tests/test_distributions.py::TestRugPlot::test_axis_deprecation[y]",
"tests/test_distributions.py::TestRugPlot::test_vertical_deprecation",
"tests/test_distributions.py::TestRugPlot::test_rug_data",
"tests/test_distributions.py::TestRugPlot::test_rug_colors",
"tests/test_distributions.py::TestRugPlot::test_expand_margins",
"tests/test_distributions.py::TestRugPlot::test_multiple_rugs",
"tests/test_distributions.py::TestRugPlot::test_matplotlib_kwargs",
"tests/test_distributions.py::TestRugPlot::test_axis_labels",
"tests/test_distributions.py::TestRugPlot::test_log_scale",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_color[True]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_color[False]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_long_vectors[x]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_long_vectors[y]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_wide_vs_long_data",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_flat_vector",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_singular_data",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_variable_assignment",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_vertical_deprecation",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_bw_deprecation",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_kernel_deprecation",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_shade_deprecation",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[layer]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[stack]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[fill]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_stacking",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_filling",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_default[stack]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_default[fill]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[layer]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[stack]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[fill]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_color_cycle_interaction",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_artist_color[True]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_artist_color[False]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_datetime_scale",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_cut",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_clip",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_line_is_density",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_cumulative",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_common_norm",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_common_grid",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_bw_method",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_bw_adjust",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_implicit",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_explicit",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_with_hue",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_normalization",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_weights",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_weight_norm",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_sticky_edges",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_line_kws",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_axis_labels",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_legend",
"tests/test_distributions.py::TestKDEPlotBivariate::test_long_vectors",
"tests/test_distributions.py::TestKDEPlotBivariate::test_singular_data",
"tests/test_distributions.py::TestKDEPlotBivariate::test_fill_artists",
"tests/test_distributions.py::TestKDEPlotBivariate::test_common_norm",
"tests/test_distributions.py::TestKDEPlotBivariate::test_log_scale",
"tests/test_distributions.py::TestKDEPlotBivariate::test_bandwidth",
"tests/test_distributions.py::TestKDEPlotBivariate::test_weights",
"tests/test_distributions.py::TestKDEPlotBivariate::test_hue_ignores_cmap",
"tests/test_distributions.py::TestKDEPlotBivariate::test_contour_line_colors",
"tests/test_distributions.py::TestKDEPlotBivariate::test_contour_line_cmap",
"tests/test_distributions.py::TestKDEPlotBivariate::test_contour_fill_colors",
"tests/test_distributions.py::TestKDEPlotBivariate::test_colorbar",
"tests/test_distributions.py::TestKDEPlotBivariate::test_levels_and_thresh",
"tests/test_distributions.py::TestHistPlotUnivariate::test_color[bars-True]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_color[bars-False]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_color[step-True]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_color[step-False]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_color[poly-True]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_color[poly-False]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_long_vectors[x]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_long_vectors[y]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_wide_vs_long_data",
"tests/test_distributions.py::TestHistPlotUnivariate::test_flat_vector",
"tests/test_distributions.py::TestHistPlotUnivariate::test_variable_assignment",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[layer-bars]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[layer-step]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[layer-poly]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[dodge-bars]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[dodge-step]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[dodge-poly]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[stack-bars]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[stack-step]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[stack-poly]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[fill-bars]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[fill-step]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[fill-poly]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_stack",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_dodge",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_as_numpy_dodged",
"tests/test_distributions.py::TestHistPlotUnivariate::test_count_stat",
"tests/test_distributions.py::TestHistPlotUnivariate::test_density_stat",
"tests/test_distributions.py::TestHistPlotUnivariate::test_density_stat_common_norm",
"tests/test_distributions.py::TestHistPlotUnivariate::test_density_stat_unique_norm",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat[probability]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat[proportion]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_common_norm[probability]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_common_norm[proportion]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_unique_norm[probability]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_unique_norm[proportion]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_percent_stat",
"tests/test_distributions.py::TestHistPlotUnivariate::test_common_bins",
"tests/test_distributions.py::TestHistPlotUnivariate::test_unique_bins",
"tests/test_distributions.py::TestHistPlotUnivariate::test_range_with_inf",
"tests/test_distributions.py::TestHistPlotUnivariate::test_weights_with_missing",
"tests/test_distributions.py::TestHistPlotUnivariate::test_weight_norm",
"tests/test_distributions.py::TestHistPlotUnivariate::test_discrete",
"tests/test_distributions.py::TestHistPlotUnivariate::test_discrete_categorical_default",
"tests/test_distributions.py::TestHistPlotUnivariate::test_categorical_yaxis_inversion",
"tests/test_distributions.py::TestHistPlotUnivariate::test_datetime_scale",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde[count]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde[density]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde[probability]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[count-layer]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[count-dodge]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[density-layer]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[density-dodge]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[probability-layer]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[probability-dodge]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_default_cut",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_hue",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_yaxis",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_line_kws",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_singular_data",
"tests/test_distributions.py::TestHistPlotUnivariate::test_element_default",
"tests/test_distributions.py::TestHistPlotUnivariate::test_bars_no_fill",
"tests/test_distributions.py::TestHistPlotUnivariate::test_step_fill",
"tests/test_distributions.py::TestHistPlotUnivariate::test_poly_fill",
"tests/test_distributions.py::TestHistPlotUnivariate::test_poly_no_fill",
"tests/test_distributions.py::TestHistPlotUnivariate::test_step_no_fill",
"tests/test_distributions.py::TestHistPlotUnivariate::test_step_fill_xy",
"tests/test_distributions.py::TestHistPlotUnivariate::test_step_no_fill_xy",
"tests/test_distributions.py::TestHistPlotUnivariate::test_weighted_histogram",
"tests/test_distributions.py::TestHistPlotUnivariate::test_weights_with_auto_bins",
"tests/test_distributions.py::TestHistPlotUnivariate::test_shrink",
"tests/test_distributions.py::TestHistPlotUnivariate::test_log_scale_explicit",
"tests/test_distributions.py::TestHistPlotUnivariate::test_log_scale_implicit",
"tests/test_distributions.py::TestHistPlotUnivariate::test_log_scale_dodge",
"tests/test_distributions.py::TestHistPlotUnivariate::test_log_scale_kde",
"tests/test_distributions.py::TestHistPlotUnivariate::test_auto_linewidth[True]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_auto_linewidth[False]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_bar_kwargs",
"tests/test_distributions.py::TestHistPlotUnivariate::test_step_fill_kwargs",
"tests/test_distributions.py::TestHistPlotUnivariate::test_step_line_kwargs",
"tests/test_distributions.py::TestHistPlotUnivariate::test_label",
"tests/test_distributions.py::TestHistPlotUnivariate::test_default_color_scout_cleanup",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_with_hue",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_with_hue_unique_bins",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_with_col_unique_bins",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_log_scale",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_thresh",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_sticky_edges",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_common_norm",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_unique_norm",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_normalization[probability]",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_normalization[proportion]",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_normalization[percent]",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_colors",
"tests/test_distributions.py::TestHistPlotBivariate::test_color_limits",
"tests/test_distributions.py::TestHistPlotBivariate::test_hue_color_limits",
"tests/test_distributions.py::TestHistPlotBivariate::test_colorbar",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_color",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_long_vectors[x]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_long_vectors[y]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_hue",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_line_kwargs",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_drawstyle[x]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_drawstyle[y]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_proportion_limits[x-y]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_proportion_limits[y-x]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_proportion_limits_complementary[x-y]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_proportion_limits_complementary[y-x]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_proportion_count[x-y]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_proportion_count[y-x]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_weights",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_log_scale",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs3]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs9]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs10]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs11]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs12]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs13]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs14]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs15]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs3]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs9]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs10]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs11]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs3]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs9]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_facets[col]",
"tests/test_distributions.py::TestDisPlot::test_facets[row]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[dodge]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[stack]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[fill]",
"tests/test_distributions.py::TestDisPlot::test_ax_warning",
"tests/test_distributions.py::TestDisPlot::test_array_faceting[col]",
"tests/test_distributions.py::TestDisPlot::test_array_faceting[row]",
"tests/test_distributions.py::TestDisPlot::test_legend",
"tests/test_distributions.py::TestDisPlot::test_bivariate_kde_norm",
"tests/test_distributions.py::TestDisPlot::test_bivariate_hist_norm",
"tests/test_distributions.py::TestDisPlot::test_facetgrid_data",
"tests/test_matrix.py::TestDendrogram::test_ndarray_input",
"tests/test_matrix.py::TestDendrogram::test_df_input",
"tests/test_matrix.py::TestDendrogram::test_df_multindex_input",
"tests/test_matrix.py::TestDendrogram::test_axis0_input",
"tests/test_matrix.py::TestDendrogram::test_rotate_input",
"tests/test_matrix.py::TestDendrogram::test_rotate_axis0_input",
"tests/test_matrix.py::TestDendrogram::test_custom_linkage",
"tests/test_matrix.py::TestDendrogram::test_label_false",
"tests/test_matrix.py::TestDendrogram::test_linkage_scipy",
"tests/test_matrix.py::TestDendrogram::test_fastcluster_other_method",
"tests/test_matrix.py::TestDendrogram::test_fastcluster_non_euclidean",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_plot",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_rotate",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_ticklabel_rotation",
"tests/test_matrix.py::TestClustermap::test_ndarray_input",
"tests/test_matrix.py::TestClustermap::test_df_input",
"tests/test_matrix.py::TestClustermap::test_corr_df_input",
"tests/test_matrix.py::TestClustermap::test_pivot_input",
"tests/test_matrix.py::TestClustermap::test_colors_input",
"tests/test_matrix.py::TestClustermap::test_categorical_colors_input",
"tests/test_matrix.py::TestClustermap::test_nested_colors_input",
"tests/test_matrix.py::TestClustermap::test_colors_input_custom_cmap",
"tests/test_matrix.py::TestClustermap::test_z_score",
"tests/test_matrix.py::TestClustermap::test_z_score_axis0",
"tests/test_matrix.py::TestClustermap::test_standard_scale",
"tests/test_matrix.py::TestClustermap::test_standard_scale_axis0",
"tests/test_matrix.py::TestClustermap::test_z_score_standard_scale",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap",
"tests/test_matrix.py::TestClustermap::test_nested_color_list_to_matrix_and_cmap",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap_axis1",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap_different_sizes",
"tests/test_matrix.py::TestClustermap::test_savefig",
"tests/test_matrix.py::TestClustermap::test_plot_dendrograms",
"tests/test_matrix.py::TestClustermap::test_cluster_false",
"tests/test_matrix.py::TestClustermap::test_row_col_colors",
"tests/test_matrix.py::TestClustermap::test_cluster_false_row_col_colors",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_shuffled",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_missing",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_one_axis",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series_shuffled",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series_missing",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_ignore_heatmap_kwargs",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_raise_on_mixed_index_types",
"tests/test_matrix.py::TestClustermap::test_mask_reorganization",
"tests/test_matrix.py::TestClustermap::test_ticklabel_reorganization",
"tests/test_matrix.py::TestClustermap::test_noticklabels",
"tests/test_matrix.py::TestClustermap::test_size_ratios",
"tests/test_matrix.py::TestClustermap::test_cbar_pos",
"tests/test_matrix.py::TestClustermap::test_square_warning",
"tests/test_matrix.py::TestClustermap::test_clustermap_annotation",
"tests/test_matrix.py::TestClustermap::test_tree_kws",
"tests/test_rcmod.py::TestFonts::test_set_font",
"tests/test_rcmod.py::TestFonts::test_different_sans_serif",
"tests/test_regression.py::TestRegressionPlotter::test_fast_regression",
"tests/test_regression.py::TestRegressionPlotter::test_regress_poly",
"tests/test_regression.py::TestRegressionPlotter::test_regress_n_boot",
"tests/test_regression.py::TestRegressionPlotter::test_regress_without_bootstrap",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_regression",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_perfect_separation",
"tests/test_regression.py::TestRegressionPlotter::test_robust_regression",
"tests/test_regression.py::TestRegressionPlotter::test_lowess_regression",
"tests/test_regression.py::TestRegressionPlots::test_residplot_lowess",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_simple",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_weighted_estimator",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_legend",
"tests/test_relational.py::TestRelationalPlotter::test_lineplot_2d_dashes",
"tests/test_relational.py::TestLinePlotter::test_color",
"tests/test_relational.py::TestLinePlotter::test_legend_no_semantics",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_categorical",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_style_same",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_style_diff",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_size_same",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_full[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_full[size]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_full[style]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_brief[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_brief[size]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_brief[style]",
"tests/test_relational.py::TestLinePlotter::test_legend_value_error",
"tests/test_relational.py::TestLinePlotter::test_legend_log_norm[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_log_norm[size]",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_var[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_var[size]",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_numberic_brief[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_numberic_brief[size]",
"tests/test_relational.py::TestLinePlotter::test_plot",
"tests/test_relational.py::TestLinePlotter::test_weights",
"tests/test_relational.py::TestLinePlotter::test_non_aggregated_data",
"tests/test_relational.py::TestLinePlotter::test_orient",
"tests/test_relational.py::TestLinePlotter::test_log_scale",
"tests/test_relational.py::TestLinePlotter::test_axis_labels",
"tests/test_relational.py::TestLinePlotter::test_matplotlib_kwargs",
"tests/test_relational.py::TestLinePlotter::test_nonmapped_dashes",
"tests/test_relational.py::TestLinePlotter::test_lineplot_axes",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_hue",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_style",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_hue_and_style",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics0]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics1]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics2]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics3]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics4]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics5]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics6]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics7]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics8]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics9]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics10]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics11]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_smoke",
"tests/test_relational.py::TestLinePlotter::test_ci_deprecation",
"tests/test_statistics.py::TestKDE::test_cumulative",
"tests/test_statistics.py::TestKDE::test_bivariate_cumulative",
"tests/test_statistics.py::TestECDF::test_against_statsmodels"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-7
|
1.0
|
{
"code": "diff --git b/seaborn/_base.py a/seaborn/_base.py\nindex d039c441..0b435231 100644\n--- b/seaborn/_base.py\n+++ a/seaborn/_base.py\n@@ -1373,6 +1373,80 @@ class VectorPlotter:\n self\n \n \"\"\"\n+ # This method both modifies the internal representation of the data\n+ # (converting it to string) and sets some attributes on self. It might be\n+ # a good idea to have a separate object attached to self that contains the\n+ # information in those attributes (i.e. whether to enforce variable order\n+ # across facets, the order to use) similar to the SemanticMapping objects\n+ # we have for semantic variables. That object could also hold the converter\n+ # objects that get used, if we can decouple those from an existing axis\n+ # (cf. https://github.com/matplotlib/matplotlib/issues/19229).\n+ # There are some interactions with faceting information that would need\n+ # to be thought through, since the converts to use depend on facets.\n+ # If we go that route, these methods could become \"borrowed\" methods similar\n+ # to what happens with the alternate semantic mapper constructors, although\n+ # that approach is kind of fussy and confusing.\n+\n+ # TODO this method could also set the grid state? Since we like to have no\n+ # grid on the categorical axis by default. Again, a case where we'll need to\n+ # store information until we use it, so best to have a way to collect the\n+ # attributes that this method sets.\n+\n+ # TODO if we are going to set visual properties of the axes with these methods,\n+ # then we could do the steps currently in CategoricalPlotter._adjust_cat_axis\n+\n+ # TODO another, and distinct idea, is to expose a cut= param here\n+\n+ _check_argument(\"axis\", [\"x\", \"y\"], axis)\n+\n+ # Categorical plots can be \"univariate\" in which case they get an anonymous\n+ # category label on the opposite axis.\n+ if axis not in self.variables:\n+ self.variables[axis] = None\n+ self.var_types[axis] = \"categorical\"\n+ self.plot_data[axis] = \"\"\n+\n+ # If the \"categorical\" variable has a numeric type, sort the rows so that\n+ # the default result from categorical_order has those values sorted after\n+ # they have been coerced to strings. The reason for this is so that later\n+ # we can get facet-wise orders that are correct.\n+ # XXX Should this also sort datetimes?\n+ # It feels more consistent, but technically will be a default change\n+ # If so, should also change categorical_order to behave that way\n+ if self.var_types[axis] == \"numeric\":\n+ self.plot_data = self.plot_data.sort_values(axis, kind=\"mergesort\")\n+\n+ # Now get a reference to the categorical data vector and remove na values\n+ cat_data = self.plot_data[axis].dropna()\n+\n+ # Get the initial categorical order, which we do before string\n+ # conversion to respect the original types of the order list.\n+ # Track whether the order is given explicitly so that we can know\n+ # whether or not to use the order constructed here downstream\n+ self._var_ordered[axis] = order is not None or cat_data.dtype.name == \"category\"\n+ order = pd.Index(categorical_order(cat_data, order), name=axis)\n+\n+ # Then convert data to strings. This is because in matplotlib,\n+ # \"categorical\" data really mean \"string\" data, so doing this artists\n+ # will be drawn on the categorical axis with a fixed scale.\n+ # TODO implement formatter here; check that it returns strings?\n+ if formatter is not None:\n+ cat_data = cat_data.map(formatter)\n+ order = order.map(formatter)\n+ else:\n+ cat_data = cat_data.astype(str)\n+ order = order.astype(str)\n+\n+ # Update the levels list with the type-converted order variable\n+ self.var_levels[axis] = order\n+\n+ # Now ensure that seaborn will use categorical rules internally\n+ self.var_types[axis] = \"categorical\"\n+\n+ # Put the string-typed categorical vector back into the plot_data structure\n+ self.plot_data[axis] = cat_data\n+\n+ return self\n \n \n class VariableType(UserString):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_base.py b/seaborn/_base.py\nindex 0b435231..d039c441 100644\n--- a/seaborn/_base.py\n+++ b/seaborn/_base.py\n@@ -1373,80 +1373,6 @@ class VectorPlotter:\n self\n \n \"\"\"\n- # This method both modifies the internal representation of the data\n- # (converting it to string) and sets some attributes on self. It might be\n- # a good idea to have a separate object attached to self that contains the\n- # information in those attributes (i.e. whether to enforce variable order\n- # across facets, the order to use) similar to the SemanticMapping objects\n- # we have for semantic variables. That object could also hold the converter\n- # objects that get used, if we can decouple those from an existing axis\n- # (cf. https://github.com/matplotlib/matplotlib/issues/19229).\n- # There are some interactions with faceting information that would need\n- # to be thought through, since the converts to use depend on facets.\n- # If we go that route, these methods could become \"borrowed\" methods similar\n- # to what happens with the alternate semantic mapper constructors, although\n- # that approach is kind of fussy and confusing.\n-\n- # TODO this method could also set the grid state? Since we like to have no\n- # grid on the categorical axis by default. Again, a case where we'll need to\n- # store information until we use it, so best to have a way to collect the\n- # attributes that this method sets.\n-\n- # TODO if we are going to set visual properties of the axes with these methods,\n- # then we could do the steps currently in CategoricalPlotter._adjust_cat_axis\n-\n- # TODO another, and distinct idea, is to expose a cut= param here\n-\n- _check_argument(\"axis\", [\"x\", \"y\"], axis)\n-\n- # Categorical plots can be \"univariate\" in which case they get an anonymous\n- # category label on the opposite axis.\n- if axis not in self.variables:\n- self.variables[axis] = None\n- self.var_types[axis] = \"categorical\"\n- self.plot_data[axis] = \"\"\n-\n- # If the \"categorical\" variable has a numeric type, sort the rows so that\n- # the default result from categorical_order has those values sorted after\n- # they have been coerced to strings. The reason for this is so that later\n- # we can get facet-wise orders that are correct.\n- # XXX Should this also sort datetimes?\n- # It feels more consistent, but technically will be a default change\n- # If so, should also change categorical_order to behave that way\n- if self.var_types[axis] == \"numeric\":\n- self.plot_data = self.plot_data.sort_values(axis, kind=\"mergesort\")\n-\n- # Now get a reference to the categorical data vector and remove na values\n- cat_data = self.plot_data[axis].dropna()\n-\n- # Get the initial categorical order, which we do before string\n- # conversion to respect the original types of the order list.\n- # Track whether the order is given explicitly so that we can know\n- # whether or not to use the order constructed here downstream\n- self._var_ordered[axis] = order is not None or cat_data.dtype.name == \"category\"\n- order = pd.Index(categorical_order(cat_data, order), name=axis)\n-\n- # Then convert data to strings. This is because in matplotlib,\n- # \"categorical\" data really mean \"string\" data, so doing this artists\n- # will be drawn on the categorical axis with a fixed scale.\n- # TODO implement formatter here; check that it returns strings?\n- if formatter is not None:\n- cat_data = cat_data.map(formatter)\n- order = order.map(formatter)\n- else:\n- cat_data = cat_data.astype(str)\n- order = order.astype(str)\n-\n- # Update the levels list with the type-converted order variable\n- self.var_levels[axis] = order\n-\n- # Now ensure that seaborn will use categorical rules internally\n- self.var_types[axis] = \"categorical\"\n-\n- # Put the string-typed categorical vector back into the plot_data structure\n- self.plot_data[axis] = cat_data\n-\n- return self\n \n \n class VariableType(UserString):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_base.py.\nHere is the description for the function:\n def scale_categorical(self, axis, order=None, formatter=None):\n \"\"\"\n Enforce categorical (fixed-scale) rules for the data on given axis.\n\n Parameters\n ----------\n axis : \"x\" or \"y\"\n Axis of the plot to operate on.\n order : list\n Order that unique values should appear in.\n formatter : callable\n Function mapping values to a string representation.\n\n Returns\n -------\n self\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_core/test_data.py::TestPlotData::test_data_interchange_support_test",
"tests/_core/test_plot.py::TestLayerAddition::test_stat_default",
"tests/_core/test_plot.py::TestScaling::test_categorical_as_datetime",
"tests/_core/test_plot.py::TestScaling::test_log_scale_name",
"tests/_core/test_plot.py::TestScaling::test_identity_mapping_color_strings",
"tests/_core/test_plot.py::TestScaling::test_undefined_variable_raises",
"tests/_core/test_scales.py::TestNominal::test_color_numeric_int_float_mix",
"tests/_stats/test_density.py::TestKDE::test_cumulative[True]",
"tests/_stats/test_density.py::TestKDE::test_cumulative[False]",
"tests/test_axisgrid.py::TestFacetGrid::test_set_ticklabels",
"tests/test_axisgrid.py::TestFacetGrid::test_categorical_warning",
"tests/test_base.py::TestVectorPlotter::test_scale_categorical",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs0]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs1]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs2]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs3]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs4]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs5]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs6]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs7]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs8]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs9]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs10]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs11]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs12]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs13]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs14]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs15]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs16]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs17]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs18]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs19]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs20]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs21]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs22]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs23]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs24]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs25]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs26]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs27]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs28]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs29]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs30]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs31]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_empty[catplot]",
"tests/test_categorical.py::TestStripPlot::test_labels_long[x]",
"tests/test_categorical.py::TestStripPlot::test_labels_long[y]",
"tests/test_categorical.py::TestStripPlot::test_labels_wide",
"tests/test_categorical.py::TestStripPlot::test_labels_hue_order",
"tests/test_categorical.py::TestStripPlot::test_two_calls",
"tests/test_categorical.py::TestStripPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestStripPlot::test_color",
"tests/test_categorical.py::TestStripPlot::test_supplied_color_array",
"tests/test_categorical.py::TestStripPlot::test_unfilled_marker",
"tests/test_categorical.py::TestStripPlot::test_wide[h-dataframe]",
"tests/test_categorical.py::TestStripPlot::test_wide[h-dict]",
"tests/test_categorical.py::TestStripPlot::test_wide[v-dataframe]",
"tests/test_categorical.py::TestStripPlot::test_wide[v-dict]",
"tests/test_categorical.py::TestStripPlot::test_wide[y-dataframe]",
"tests/test_categorical.py::TestStripPlot::test_wide[y-dict]",
"tests/test_categorical.py::TestStripPlot::test_wide[x-dataframe]",
"tests/test_categorical.py::TestStripPlot::test_wide[x-dict]",
"tests/test_categorical.py::TestStripPlot::test_flat[h]",
"tests/test_categorical.py::TestStripPlot::test_flat[v]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables0-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables1-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables2-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables3-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables4-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables5-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables6-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables7-h]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables8-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables9-h]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables10-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables11-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables12-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables13-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables14-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables15-None]",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables0]",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables1]",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables2]",
"tests/test_categorical.py::TestStripPlot::test_positions_unfixed[a]",
"tests/test_categorical.py::TestStripPlot::test_order[str-None]",
"tests/test_categorical.py::TestStripPlot::test_order[str-order1]",
"tests/test_categorical.py::TestStripPlot::test_order[str-order2]",
"tests/test_categorical.py::TestStripPlot::test_order[str-order3]",
"tests/test_categorical.py::TestStripPlot::test_order[int-None]",
"tests/test_categorical.py::TestStripPlot::test_order[int-order5]",
"tests/test_categorical.py::TestStripPlot::test_order[int-order6]",
"tests/test_categorical.py::TestStripPlot::test_order[int-order7]",
"tests/test_categorical.py::TestStripPlot::test_order[int-order8]",
"tests/test_categorical.py::TestStripPlot::test_hue_categorical[a]",
"tests/test_categorical.py::TestStripPlot::test_hue_categorical[b]",
"tests/test_categorical.py::TestStripPlot::test_hue_dodged[a]",
"tests/test_categorical.py::TestStripPlot::test_hue_dodged[b]",
"tests/test_categorical.py::TestStripPlot::test_single[x-b-None]",
"tests/test_categorical.py::TestStripPlot::test_single[x-b-a]",
"tests/test_categorical.py::TestStripPlot::test_single[x-y-None]",
"tests/test_categorical.py::TestStripPlot::test_single[x-y-a]",
"tests/test_categorical.py::TestStripPlot::test_single[x-t-None]",
"tests/test_categorical.py::TestStripPlot::test_single[x-t-a]",
"tests/test_categorical.py::TestStripPlot::test_single[y-b-None]",
"tests/test_categorical.py::TestStripPlot::test_single[y-b-a]",
"tests/test_categorical.py::TestStripPlot::test_single[y-y-None]",
"tests/test_categorical.py::TestStripPlot::test_single[y-y-a]",
"tests/test_categorical.py::TestStripPlot::test_single[y-t-None]",
"tests/test_categorical.py::TestStripPlot::test_single[y-t-a]",
"tests/test_categorical.py::TestStripPlot::test_attributes",
"tests/test_categorical.py::TestStripPlot::test_three_points",
"tests/test_categorical.py::TestStripPlot::test_legend_categorical",
"tests/test_categorical.py::TestStripPlot::test_legend_numeric",
"tests/test_categorical.py::TestStripPlot::test_legend_attributes",
"tests/test_categorical.py::TestStripPlot::test_legend_disabled",
"tests/test_categorical.py::TestStripPlot::test_palette_from_color_deprecation",
"tests/test_categorical.py::TestStripPlot::test_palette_with_hue_deprecation",
"tests/test_categorical.py::TestStripPlot::test_log_scale",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestStripPlot::test_jitter[v-True]",
"tests/test_categorical.py::TestStripPlot::test_jitter[v-0.1]",
"tests/test_categorical.py::TestStripPlot::test_jitter[h-True]",
"tests/test_categorical.py::TestStripPlot::test_jitter[h-0.1]",
"tests/test_categorical.py::TestSwarmPlot::test_labels_long[x]",
"tests/test_categorical.py::TestSwarmPlot::test_labels_long[y]",
"tests/test_categorical.py::TestSwarmPlot::test_labels_wide",
"tests/test_categorical.py::TestSwarmPlot::test_labels_hue_order",
"tests/test_categorical.py::TestSwarmPlot::test_two_calls",
"tests/test_categorical.py::TestSwarmPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestSwarmPlot::test_color",
"tests/test_categorical.py::TestSwarmPlot::test_supplied_color_array",
"tests/test_categorical.py::TestSwarmPlot::test_unfilled_marker",
"tests/test_categorical.py::TestSwarmPlot::test_wide[h-dataframe]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[h-dict]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[v-dataframe]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[v-dict]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[y-dataframe]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[y-dict]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[x-dataframe]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[x-dict]",
"tests/test_categorical.py::TestSwarmPlot::test_flat[h]",
"tests/test_categorical.py::TestSwarmPlot::test_flat[v]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables0-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables1-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables2-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables3-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables4-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables5-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables6-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables7-h]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables8-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables9-h]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables10-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables11-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables12-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables13-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables14-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables15-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables0]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables1]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables2]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_unfixed[a]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-None]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-order1]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-order2]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-order3]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-None]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order5]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order6]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order7]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order8]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_categorical[a]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_categorical[b]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_dodged[a]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_dodged[b]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-b-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-b-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-y-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-y-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-t-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-t-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-b-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-b-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-y-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-y-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-t-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-t-a]",
"tests/test_categorical.py::TestSwarmPlot::test_attributes",
"tests/test_categorical.py::TestSwarmPlot::test_three_points",
"tests/test_categorical.py::TestSwarmPlot::test_legend_categorical",
"tests/test_categorical.py::TestSwarmPlot::test_legend_numeric",
"tests/test_categorical.py::TestSwarmPlot::test_legend_attributes",
"tests/test_categorical.py::TestSwarmPlot::test_legend_disabled",
"tests/test_categorical.py::TestSwarmPlot::test_palette_from_color_deprecation",
"tests/test_categorical.py::TestSwarmPlot::test_palette_with_hue_deprecation",
"tests/test_categorical.py::TestSwarmPlot::test_log_scale",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestBoxPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestBoxPlot::test_legend_attributes",
"tests/test_categorical.py::TestBoxPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBoxPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBoxPlot::test_labels_wide",
"tests/test_categorical.py::TestBoxPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBoxPlot::test_two_calls",
"tests/test_categorical.py::TestBoxPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBoxPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBoxPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBoxPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestBoxPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestBoxPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestBoxPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestBoxPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestBoxPlot::test_wide_data[h]",
"tests/test_categorical.py::TestBoxPlot::test_wide_data[v]",
"tests/test_categorical.py::TestBoxPlot::test_grouped[x]",
"tests/test_categorical.py::TestBoxPlot::test_grouped[y]",
"tests/test_categorical.py::TestBoxPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestBoxPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestBoxPlot::test_hue_not_dodged",
"tests/test_categorical.py::TestBoxPlot::test_dodge_without_hue",
"tests/test_categorical.py::TestBoxPlot::test_log_data_scale[x]",
"tests/test_categorical.py::TestBoxPlot::test_log_data_scale[y]",
"tests/test_categorical.py::TestBoxPlot::test_color",
"tests/test_categorical.py::TestBoxPlot::test_wide_data_multicolored",
"tests/test_categorical.py::TestBoxPlot::test_wide_data_single_color",
"tests/test_categorical.py::TestBoxPlot::test_hue_colors",
"tests/test_categorical.py::TestBoxPlot::test_linecolor",
"tests/test_categorical.py::TestBoxPlot::test_linecolor_gray_warning",
"tests/test_categorical.py::TestBoxPlot::test_saturation",
"tests/test_categorical.py::TestBoxPlot::test_linewidth",
"tests/test_categorical.py::TestBoxPlot::test_fill",
"tests/test_categorical.py::TestBoxPlot::test_notch[notch]",
"tests/test_categorical.py::TestBoxPlot::test_notch[shownotches]",
"tests/test_categorical.py::TestBoxPlot::test_whis",
"tests/test_categorical.py::TestBoxPlot::test_gap",
"tests/test_categorical.py::TestBoxPlot::test_prop_dicts",
"tests/test_categorical.py::TestBoxPlot::test_showfliers",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_attributes",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_wide",
"tests/test_categorical.py::TestBoxenPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBoxenPlot::test_two_calls",
"tests/test_categorical.py::TestBoxenPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBoxenPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBoxenPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBoxenPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestBoxenPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[h]",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[v]",
"tests/test_categorical.py::TestBoxenPlot::test_grouped[x]",
"tests/test_categorical.py::TestBoxenPlot::test_grouped[y]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestBoxenPlot::test_color",
"tests/test_categorical.py::TestBoxenPlot::test_hue_colors",
"tests/test_categorical.py::TestBoxenPlot::test_linecolor",
"tests/test_categorical.py::TestBoxenPlot::test_linewidth",
"tests/test_categorical.py::TestBoxenPlot::test_saturation",
"tests/test_categorical.py::TestBoxenPlot::test_gap",
"tests/test_categorical.py::TestBoxenPlot::test_fill",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_int",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_full",
"tests/test_categorical.py::TestBoxenPlot::test_trust_alpha",
"tests/test_categorical.py::TestBoxenPlot::test_outlier_prop",
"tests/test_categorical.py::TestBoxenPlot::test_exponential_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_linear_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_area_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_box_kws",
"tests/test_categorical.py::TestBoxenPlot::test_line_kws",
"tests/test_categorical.py::TestBoxenPlot::test_flier_kws",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_checks",
"tests/test_categorical.py::TestBoxenPlot::test_width_method_check",
"tests/test_categorical.py::TestBoxenPlot::test_scale_deprecation",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestViolinPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestViolinPlot::test_legend_attributes",
"tests/test_categorical.py::TestViolinPlot::test_labels_long[x]",
"tests/test_categorical.py::TestViolinPlot::test_labels_long[y]",
"tests/test_categorical.py::TestViolinPlot::test_labels_wide",
"tests/test_categorical.py::TestViolinPlot::test_labels_hue_order",
"tests/test_categorical.py::TestViolinPlot::test_two_calls",
"tests/test_categorical.py::TestViolinPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestViolinPlot::test_log_scale[x]",
"tests/test_categorical.py::TestViolinPlot::test_log_scale[y]",
"tests/test_categorical.py::TestViolinPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestViolinPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestViolinPlot::test_wide_data[h]",
"tests/test_categorical.py::TestViolinPlot::test_wide_data[v]",
"tests/test_categorical.py::TestViolinPlot::test_grouped[x]",
"tests/test_categorical.py::TestViolinPlot::test_grouped[y]",
"tests/test_categorical.py::TestViolinPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestViolinPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestViolinPlot::test_hue_not_dodged",
"tests/test_categorical.py::TestViolinPlot::test_color",
"tests/test_categorical.py::TestViolinPlot::test_hue_colors",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[box]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[quart]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[stick]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[point]",
"tests/test_categorical.py::TestViolinPlot::test_linewidth",
"tests/test_categorical.py::TestViolinPlot::test_saturation",
"tests/test_categorical.py::TestViolinPlot::test_fill[box]",
"tests/test_categorical.py::TestViolinPlot::test_fill[quart]",
"tests/test_categorical.py::TestViolinPlot::test_fill[stick]",
"tests/test_categorical.py::TestViolinPlot::test_fill[point]",
"tests/test_categorical.py::TestViolinPlot::test_inner_box[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_box[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_quartiles[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_quartiles[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_stick[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_stick[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_points[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_points[y]",
"tests/test_categorical.py::TestViolinPlot::test_split_single",
"tests/test_categorical.py::TestViolinPlot::test_split_multi",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_area",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_count",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_width",
"tests/test_categorical.py::TestViolinPlot::test_common_norm",
"tests/test_categorical.py::TestViolinPlot::test_scale_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_scale_hue_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_bw_adjust",
"tests/test_categorical.py::TestViolinPlot::test_bw_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_gap",
"tests/test_categorical.py::TestViolinPlot::test_inner_kws",
"tests/test_categorical.py::TestViolinPlot::test_box_inner_kws",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestBarPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBarPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBarPlot::test_labels_wide",
"tests/test_categorical.py::TestBarPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBarPlot::test_color",
"tests/test_categorical.py::TestBarPlot::test_two_calls",
"tests/test_categorical.py::TestBarPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBarPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBarPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBarPlot::test_labels_flat",
"tests/test_categorical.py::TestBarPlot::test_single_var[x]",
"tests/test_categorical.py::TestBarPlot::test_single_var[y]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[x]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[y]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[h]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[v]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[x]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[y]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[h]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[v]",
"tests/test_categorical.py::TestBarPlot::test_xy_vertical",
"tests/test_categorical.py::TestBarPlot::test_xy_horizontal",
"tests/test_categorical.py::TestBarPlot::test_xy_with_na_grouper",
"tests/test_categorical.py::TestBarPlot::test_xy_with_na_value",
"tests/test_categorical.py::TestBarPlot::test_hue_redundant",
"tests/test_categorical.py::TestBarPlot::test_hue_matched",
"tests/test_categorical.py::TestBarPlot::test_hue_matched_by_name",
"tests/test_categorical.py::TestBarPlot::test_hue_dodged",
"tests/test_categorical.py::TestBarPlot::test_gap",
"tests/test_categorical.py::TestBarPlot::test_hue_undodged",
"tests/test_categorical.py::TestBarPlot::test_hue_order",
"tests/test_categorical.py::TestBarPlot::test_hue_norm",
"tests/test_categorical.py::TestBarPlot::test_fill",
"tests/test_categorical.py::TestBarPlot::test_estimate_default",
"tests/test_categorical.py::TestBarPlot::test_estimate_string",
"tests/test_categorical.py::TestBarPlot::test_estimate_func",
"tests/test_categorical.py::TestBarPlot::test_weighted_estimate",
"tests/test_categorical.py::TestBarPlot::test_estimate_log_transform",
"tests/test_categorical.py::TestBarPlot::test_errorbars",
"tests/test_categorical.py::TestBarPlot::test_width",
"tests/test_categorical.py::TestBarPlot::test_width_spaced_categories",
"tests/test_categorical.py::TestBarPlot::test_saturation_color",
"tests/test_categorical.py::TestBarPlot::test_saturation_palette",
"tests/test_categorical.py::TestBarPlot::test_legend_numeric_auto",
"tests/test_categorical.py::TestBarPlot::test_legend_numeric_full",
"tests/test_categorical.py::TestBarPlot::test_legend_disabled",
"tests/test_categorical.py::TestBarPlot::test_error_caps",
"tests/test_categorical.py::TestBarPlot::test_bar_kwargs",
"tests/test_categorical.py::TestBarPlot::test_legend_attributes",
"tests/test_categorical.py::TestBarPlot::test_legend_unfilled",
"tests/test_categorical.py::TestBarPlot::test_err_kws[True]",
"tests/test_categorical.py::TestBarPlot::test_err_kws[False]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBarPlot::test_errwidth_deprecation",
"tests/test_categorical.py::TestBarPlot::test_errcolor_deprecation",
"tests/test_categorical.py::TestBarPlot::test_capsize_as_none_deprecation",
"tests/test_categorical.py::TestBarPlot::test_hue_implied_by_palette_deprecation",
"tests/test_categorical.py::TestPointPlot::test_labels_long[x]",
"tests/test_categorical.py::TestPointPlot::test_labels_long[y]",
"tests/test_categorical.py::TestPointPlot::test_labels_wide",
"tests/test_categorical.py::TestPointPlot::test_labels_hue_order",
"tests/test_categorical.py::TestPointPlot::test_color",
"tests/test_categorical.py::TestPointPlot::test_two_calls",
"tests/test_categorical.py::TestPointPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestPointPlot::test_log_scale[x]",
"tests/test_categorical.py::TestPointPlot::test_log_scale[y]",
"tests/test_categorical.py::TestPointPlot::test_labels_flat",
"tests/test_categorical.py::TestPointPlot::test_single_var[x]",
"tests/test_categorical.py::TestPointPlot::test_single_var[y]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[x]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[y]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[h]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[v]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[x]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[y]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[h]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[v]",
"tests/test_categorical.py::TestPointPlot::test_xy_vertical",
"tests/test_categorical.py::TestPointPlot::test_xy_horizontal",
"tests/test_categorical.py::TestPointPlot::test_xy_with_na_grouper",
"tests/test_categorical.py::TestPointPlot::test_xy_with_na_value",
"tests/test_categorical.py::TestPointPlot::test_hue",
"tests/test_categorical.py::TestPointPlot::test_wide_data_is_joined",
"tests/test_categorical.py::TestPointPlot::test_estimate[mean]",
"tests/test_categorical.py::TestPointPlot::test_estimate[<lambda>]",
"tests/test_categorical.py::TestPointPlot::test_weighted_estimate",
"tests/test_categorical.py::TestPointPlot::test_estimate_log_transform",
"tests/test_categorical.py::TestPointPlot::test_errorbars",
"tests/test_categorical.py::TestPointPlot::test_marker_linestyle",
"tests/test_categorical.py::TestPointPlot::test_markers_linestyles_single",
"tests/test_categorical.py::TestPointPlot::test_markers_linestyles_mapped",
"tests/test_categorical.py::TestPointPlot::test_dodge_boolean",
"tests/test_categorical.py::TestPointPlot::test_dodge_float",
"tests/test_categorical.py::TestPointPlot::test_err_kws",
"tests/test_categorical.py::TestPointPlot::test_err_kws_inherited",
"tests/test_categorical.py::TestPointPlot::test_legend_contents",
"tests/test_categorical.py::TestPointPlot::test_legend_set_props",
"tests/test_categorical.py::TestPointPlot::test_legend_synced_props",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs20]",
"tests/test_categorical.py::TestPointPlot::test_legend_disabled",
"tests/test_categorical.py::TestPointPlot::test_join_deprecation",
"tests/test_categorical.py::TestPointPlot::test_scale_deprecation",
"tests/test_categorical.py::TestPointPlot::test_layered_plot_clipping",
"tests/test_categorical.py::TestCountPlot::test_labels_long",
"tests/test_categorical.py::TestCountPlot::test_wide_data",
"tests/test_categorical.py::TestCountPlot::test_flat_series",
"tests/test_categorical.py::TestCountPlot::test_x_series",
"tests/test_categorical.py::TestCountPlot::test_y_series",
"tests/test_categorical.py::TestCountPlot::test_hue_redundant",
"tests/test_categorical.py::TestCountPlot::test_hue_dodged",
"tests/test_categorical.py::TestCountPlot::test_stat[percent]",
"tests/test_categorical.py::TestCountPlot::test_stat[probability]",
"tests/test_categorical.py::TestCountPlot::test_stat[proportion]",
"tests/test_categorical.py::TestCountPlot::test_legend_numeric_auto",
"tests/test_categorical.py::TestCountPlot::test_legend_disabled",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestCatPlot::test_facet_organization",
"tests/test_categorical.py::TestCatPlot::test_plot_elements",
"tests/test_categorical.py::TestCatPlot::test_bad_plot_kind_error",
"tests/test_categorical.py::TestCatPlot::test_plot_colors",
"tests/test_categorical.py::TestCatPlot::test_ax_kwarg_removal",
"tests/test_categorical.py::TestCatPlot::test_share_xy",
"tests/test_categorical.py::TestCatPlot::test_facetgrid_data",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[col]",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[row]",
"tests/test_categorical.py::TestCatPlot::test_invalid_kind",
"tests/test_categorical.py::TestCatPlot::test_legend_with_auto",
"tests/test_categorical.py::TestCatPlot::test_weights_warning",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_cumulative",
"tests/test_matrix.py::TestDendrogram::test_ndarray_input",
"tests/test_matrix.py::TestDendrogram::test_df_input",
"tests/test_matrix.py::TestDendrogram::test_df_multindex_input",
"tests/test_matrix.py::TestDendrogram::test_axis0_input",
"tests/test_matrix.py::TestDendrogram::test_rotate_input",
"tests/test_matrix.py::TestDendrogram::test_rotate_axis0_input",
"tests/test_matrix.py::TestDendrogram::test_custom_linkage",
"tests/test_matrix.py::TestDendrogram::test_label_false",
"tests/test_matrix.py::TestDendrogram::test_linkage_scipy",
"tests/test_matrix.py::TestDendrogram::test_fastcluster_other_method",
"tests/test_matrix.py::TestDendrogram::test_fastcluster_non_euclidean",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_plot",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_rotate",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_ticklabel_rotation",
"tests/test_matrix.py::TestClustermap::test_ndarray_input",
"tests/test_matrix.py::TestClustermap::test_df_input",
"tests/test_matrix.py::TestClustermap::test_corr_df_input",
"tests/test_matrix.py::TestClustermap::test_pivot_input",
"tests/test_matrix.py::TestClustermap::test_colors_input",
"tests/test_matrix.py::TestClustermap::test_categorical_colors_input",
"tests/test_matrix.py::TestClustermap::test_nested_colors_input",
"tests/test_matrix.py::TestClustermap::test_colors_input_custom_cmap",
"tests/test_matrix.py::TestClustermap::test_z_score",
"tests/test_matrix.py::TestClustermap::test_z_score_axis0",
"tests/test_matrix.py::TestClustermap::test_standard_scale",
"tests/test_matrix.py::TestClustermap::test_standard_scale_axis0",
"tests/test_matrix.py::TestClustermap::test_z_score_standard_scale",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap",
"tests/test_matrix.py::TestClustermap::test_nested_color_list_to_matrix_and_cmap",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap_axis1",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap_different_sizes",
"tests/test_matrix.py::TestClustermap::test_savefig",
"tests/test_matrix.py::TestClustermap::test_plot_dendrograms",
"tests/test_matrix.py::TestClustermap::test_cluster_false",
"tests/test_matrix.py::TestClustermap::test_row_col_colors",
"tests/test_matrix.py::TestClustermap::test_cluster_false_row_col_colors",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_shuffled",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_missing",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_one_axis",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series_shuffled",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series_missing",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_ignore_heatmap_kwargs",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_raise_on_mixed_index_types",
"tests/test_matrix.py::TestClustermap::test_mask_reorganization",
"tests/test_matrix.py::TestClustermap::test_ticklabel_reorganization",
"tests/test_matrix.py::TestClustermap::test_noticklabels",
"tests/test_matrix.py::TestClustermap::test_size_ratios",
"tests/test_matrix.py::TestClustermap::test_cbar_pos",
"tests/test_matrix.py::TestClustermap::test_square_warning",
"tests/test_matrix.py::TestClustermap::test_clustermap_annotation",
"tests/test_matrix.py::TestClustermap::test_tree_kws",
"tests/test_rcmod.py::TestFonts::test_set_font",
"tests/test_rcmod.py::TestFonts::test_different_sans_serif",
"tests/test_regression.py::TestRegressionPlotter::test_fast_regression",
"tests/test_regression.py::TestRegressionPlotter::test_regress_poly",
"tests/test_regression.py::TestRegressionPlotter::test_regress_n_boot",
"tests/test_regression.py::TestRegressionPlotter::test_regress_without_bootstrap",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_regression",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_perfect_separation",
"tests/test_regression.py::TestRegressionPlotter::test_robust_regression",
"tests/test_regression.py::TestRegressionPlotter::test_lowess_regression",
"tests/test_regression.py::TestRegressionPlots::test_residplot_lowess",
"tests/test_statistics.py::TestKDE::test_cumulative",
"tests/test_statistics.py::TestKDE::test_bivariate_cumulative",
"tests/test_statistics.py::TestECDF::test_against_statsmodels"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-8
|
1.0
|
{
"code": "diff --git b/seaborn/_base.py a/seaborn/_base.py\nindex 7f383673..0b435231 100644\n--- b/seaborn/_base.py\n+++ a/seaborn/_base.py\n@@ -1760,3 +1760,18 @@ def categorical_order(vector, order=None):\n Ordered list of category levels not including null values.\n \n \"\"\"\n+ if order is None:\n+ if hasattr(vector, \"categories\"):\n+ order = vector.categories\n+ else:\n+ try:\n+ order = vector.cat.categories\n+ except (TypeError, AttributeError):\n+\n+ order = pd.Series(vector).unique()\n+\n+ if variable_type(vector) == \"numeric\":\n+ order = np.sort(order)\n+\n+ order = filter(pd.notnull, order)\n+ return list(order)\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_base.py b/seaborn/_base.py\nindex 0b435231..7f383673 100644\n--- a/seaborn/_base.py\n+++ b/seaborn/_base.py\n@@ -1760,18 +1760,3 @@ def categorical_order(vector, order=None):\n Ordered list of category levels not including null values.\n \n \"\"\"\n- if order is None:\n- if hasattr(vector, \"categories\"):\n- order = vector.categories\n- else:\n- try:\n- order = vector.cat.categories\n- except (TypeError, AttributeError):\n-\n- order = pd.Series(vector).unique()\n-\n- if variable_type(vector) == \"numeric\":\n- order = np.sort(order)\n-\n- order = filter(pd.notnull, order)\n- return list(order)\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_base.py.\nHere is the description for the function:\ndef categorical_order(vector, order=None):\n \"\"\"Return a list of unique data values.\n\n Determine an ordered list of levels in ``values``.\n\n Parameters\n ----------\n vector : list, array, Categorical, or Series\n Vector of \"categorical\" values\n order : list-like, optional\n Desired order of category levels to override the order determined\n from the ``values`` object.\n\n Returns\n -------\n order : list\n Ordered list of category levels not including null values.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs0]",
"tests/test_base.py::TestHueMapping::test_plotter_default_init",
"tests/test_axisgrid.py::TestFacetGrid::test_self_axes",
"tests/test_base.py::TestHueMapping::test_plotter_customization",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs1]",
"tests/test_axisgrid.py::TestFacetGrid::test_axes_array_size",
"tests/test_base.py::TestHueMapping::test_hue_map_categorical",
"tests/test_base.py::TestHueMapping::test_hue_map_numeric",
"tests/test_axisgrid.py::TestFacetGrid::test_single_axes",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs2]",
"tests/test_utils.py::test_move_legend_grid_object",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_complex",
"tests/test_base.py::TestHueMapping::test_saturation",
"tests/test_axisgrid.py::TestFacetGrid::test_col_wrap",
"tests/test_utils.py::test_move_legend_with_labels",
"tests/test_distributions.py::TestRugPlot::test_wide_vs_long_data",
"tests/test_base.py::TestSizeMapping::test_plotter_default_init",
"tests/test_axisgrid.py::TestFacetGrid::test_normal_axes",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs3]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[series]",
"tests/test_base.py::TestSizeMapping::test_plotter_customization",
"tests/test_axisgrid.py::TestFacetGrid::test_wrapped_axes",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[numpy]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs4]",
"tests/test_axisgrid.py::TestFacetGrid::test_axes_dict",
"tests/test_base.py::TestSizeMapping::test_map_size_categorical",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[list]",
"tests/test_axisgrid.py::TestFacetGrid::test_figure_size",
"tests/test_base.py::TestSizeMapping::test_array_palette_deprecation",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_wide",
"tests/test_axisgrid.py::TestFacetGrid::test_figure_size_with_legend",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs5]",
"tests/test_base.py::TestStyleMapping::test_plotter_default_init",
"tests/test_distributions.py::TestRugPlot::test_rug_colors",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_hues",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_data",
"tests/test_base.py::TestStyleMapping::test_plotter_customization",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_data_missing_level",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs6]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_sizes",
"tests/test_base.py::TestStyleMapping::test_map_style",
"tests/test_axisgrid.py::TestFacetGrid::test_get_boolean_legend_data",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_tuples",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_styles",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_hue",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs7]",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_options",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_markers",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_weighted_estimator",
"tests/test_axisgrid.py::TestFacetGrid::test_legendout_with_colwrap",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs8]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_marker_linewidths",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_tight_layout",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facets",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_stringy_numerics",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs9]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_hue_col_nolegend",
"tests/test_axisgrid.py::TestFacetGrid::test_gridspec_kws",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_legend",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_wide_vs_long_data",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_scatter_kws",
"tests/test_base.py::TestVectorPlotter::test_iter_data_quantitites",
"tests/test_axisgrid.py::TestFacetGrid::test_gridspec_kws_col_wrap",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs10]",
"tests/test_base.py::TestVectorPlotter::test_iter_data_keys",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_truncate[True]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_unshared_axis_labels",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_truncate[False]",
"tests/test_axisgrid.py::TestFacetGrid::test_data_generator",
"tests/test_base.py::TestVectorPlotter::test_iter_data_values",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs11]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_sharey",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_data",
"tests/test_axisgrid.py::TestFacetGrid::test_map",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_kws",
"tests/test_base.py::TestVectorPlotter::test_iter_data_reverse",
"tests/test_axisgrid.py::TestFacetGrid::test_map_dataframe",
"tests/test_relational.py::TestRelationalPlotter::test_facet_variable_collision",
"tests/test_base.py::TestVectorPlotter::test_iter_data_dropna",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs12]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[layer]",
"tests/test_axisgrid.py::TestFacetGrid::test_set",
"tests/test_axisgrid.py::TestFacetGrid::test_set_titles",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs13]",
"tests/test_axisgrid.py::TestFacetGrid::test_set_titles_margin_titles",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[stack]",
"tests/test_axisgrid.py::TestFacetGrid::test_set_ticklabels",
"tests/test_base.py::TestVectorPlotter::test_attach_basics[variables4]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs14]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[fill]",
"tests/test_axisgrid.py::TestFacetGrid::test_set_axis_labels",
"tests/test_base.py::TestVectorPlotter::test_attach_log_scale",
"tests/test_relational.py::TestRelationalPlotter::test_lineplot_2d_dashes",
"tests/test_axisgrid.py::TestFacetGrid::test_axis_lims",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs15]",
"tests/test_base.py::TestVectorPlotter::test_attach_converters",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_stacking",
"tests/test_axisgrid.py::TestFacetGrid::test_data_orders",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue",
"tests/test_base.py::TestVectorPlotter::test_attach_facets",
"tests/test_axisgrid.py::TestFacetGrid::test_palette",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_style",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs16]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_filling",
"tests/test_axisgrid.py::TestFacetGrid::test_hue_kws",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_identity_facets",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue_and_style",
"tests/test_axisgrid.py::TestFacetGrid::test_dropna",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_facets",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs17]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_default[stack]",
"tests/test_axisgrid.py::TestFacetGrid::test_categorical_column_missing_categories",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_mixed_facets",
"tests/test_axisgrid.py::TestFacetGrid::test_categorical_warning",
"tests/test_base.py::TestVectorPlotter::test_attach_shared_axes",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs18]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_default[fill]",
"tests/test_axisgrid.py::TestFacetGrid::test_refline",
"tests/test_base.py::TestVectorPlotter::test_get_axes_single",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs19]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[layer]",
"tests/test_base.py::TestVectorPlotter::test_get_axes_facets",
"tests/test_axisgrid.py::TestFacetGrid::test_tick_params",
"tests/test_base.py::TestVectorPlotter::test_comp_data",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs20]",
"tests/test_axisgrid.py::TestFacetGrid::test_data_interchange",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[stack]",
"tests/test_base.py::TestVectorPlotter::test_comp_data_category_order",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture1]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs21]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[fill]",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture2]",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture4]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs22]",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture5]",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture7]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs23]",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture8]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_multiple_argument_check",
"tests/test_base.py::TestVectorPlotter::test_var_order",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs24]",
"tests/test_base.py::TestVectorPlotter::test_scale_categorical",
"tests/test_base.py::TestCoreFunc::test_categorical_order",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs25]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_common_norm",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs26]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_common_grid",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_categorical",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_style_same",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs27]",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_style_diff",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_size_same",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs28]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_full[style]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs29]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs30]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_with_hue",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_brief[style]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs31]",
"tests/test_relational.py::TestLinePlotter::test_legend_value_error",
"tests/test_axisgrid.py::TestPairGrid::test_remove_hue_from_default",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_empty[catplot]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_sticky_edges",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_var[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_var[size]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_redundant_hue_backcompat",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_legend",
"tests/test_categorical.py::TestStripPlot::test_labels_long[x]",
"tests/test_categorical.py::TestStripPlot::test_labels_long[y]",
"tests/test_distributions.py::TestKDEPlotBivariate::test_fill_artists",
"tests/test_categorical.py::TestStripPlot::test_labels_wide",
"tests/test_distributions.py::TestKDEPlotBivariate::test_common_norm",
"tests/test_categorical.py::TestStripPlot::test_labels_hue_order",
"tests/test_relational.py::TestLinePlotter::test_plot",
"tests/test_categorical.py::TestStripPlot::test_two_calls",
"tests/test_relational.py::TestLinePlotter::test_weights",
"tests/test_categorical.py::TestStripPlot::test_redundant_hue_legend",
"tests/test_distributions.py::TestKDEPlotBivariate::test_weights",
"tests/test_categorical.py::TestStripPlot::test_color",
"tests/test_distributions.py::TestKDEPlotBivariate::test_hue_ignores_cmap",
"tests/test_categorical.py::TestStripPlot::test_supplied_color_array",
"tests/test_axisgrid.py::TestPairGrid::test_map",
"tests/test_categorical.py::TestStripPlot::test_unfilled_marker",
"tests/test_relational.py::TestLinePlotter::test_lineplot_axes",
"tests/test_categorical.py::TestStripPlot::test_wide[h-dataframe]",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_hue",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_style",
"tests/test_categorical.py::TestStripPlot::test_wide[h-dict]",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_hue_and_style",
"tests/test_categorical.py::TestStripPlot::test_wide[v-dataframe]",
"tests/test_categorical.py::TestStripPlot::test_wide[v-dict]",
"tests/test_categorical.py::TestStripPlot::test_wide[y-dataframe]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_wide_vs_long_data",
"tests/test_categorical.py::TestStripPlot::test_wide[y-dict]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics2]",
"tests/test_categorical.py::TestStripPlot::test_wide[x-dataframe]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[layer-bars]",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag",
"tests/test_categorical.py::TestStripPlot::test_wide[x-dict]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[layer-step]",
"tests/test_categorical.py::TestStripPlot::test_flat[h]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[layer-poly]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[dodge-bars]",
"tests/test_categorical.py::TestStripPlot::test_flat[v]",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_rectangular",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics4]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables0-None]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[dodge-step]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables1-None]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics5]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[dodge-poly]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables2-None]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[stack-bars]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics6]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[stack-step]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables3-None]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[stack-poly]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables4-None]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[fill-bars]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables5-None]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[fill-step]",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_palette",
"tests/test_categorical.py::TestStripPlot::test_positions[variables6-None]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[fill-poly]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables7-h]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_stack",
"tests/test_categorical.py::TestStripPlot::test_positions[variables8-None]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill",
"tests/test_categorical.py::TestStripPlot::test_positions[variables9-h]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_dodge",
"tests/test_categorical.py::TestStripPlot::test_positions[variables10-None]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_as_numpy_dodged",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_matplotlib",
"tests/test_categorical.py::TestStripPlot::test_positions[variables11-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables12-None]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics9]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_density_stat_common_norm",
"tests/test_categorical.py::TestStripPlot::test_positions[variables13-None]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics10]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_density_stat_unique_norm",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics11]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables14-None]",
"tests/test_axisgrid.py::TestPairGrid::test_palette",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_common_norm[probability]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_smoke",
"tests/test_categorical.py::TestStripPlot::test_positions[variables15-None]",
"tests/test_axisgrid.py::TestPairGrid::test_hue_kws",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_common_norm[proportion]",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables0]",
"tests/test_axisgrid.py::TestPairGrid::test_hue_order",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_unique_norm[probability]",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables1]",
"tests/test_axisgrid.py::TestPairGrid::test_hue_order_missing_level",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_unique_norm[proportion]",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables2]",
"tests/test_axisgrid.py::TestPairGrid::test_hue_in_map",
"tests/test_distributions.py::TestHistPlotUnivariate::test_common_bins",
"tests/test_categorical.py::TestStripPlot::test_positions_unfixed[a]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_unique_bins",
"tests/test_categorical.py::TestStripPlot::test_positions_unfixed[s]",
"tests/test_axisgrid.py::TestPairGrid::test_nondefault_index",
"tests/test_relational.py::TestScatterPlotter::test_legend_hue",
"tests/test_categorical.py::TestStripPlot::test_positions_unfixed[d]",
"tests/test_relational.py::TestScatterPlotter::test_legend_hue_style_same",
"tests/test_distributions.py::TestHistPlotUnivariate::test_discrete_categorical_default",
"tests/test_categorical.py::TestStripPlot::test_order[str-None]",
"tests/test_relational.py::TestScatterPlotter::test_legend_hue_style_different",
"tests/test_distributions.py::TestHistPlotUnivariate::test_categorical_yaxis_inversion",
"tests/test_relational.py::TestScatterPlotter::test_legend_data_hue_size_same",
"tests/test_categorical.py::TestStripPlot::test_order[str-order1]",
"tests/test_relational.py::TestScatterPlotter::test_legend_size_numeric_list",
"tests/test_categorical.py::TestStripPlot::test_order[str-order2]",
"tests/test_relational.py::TestScatterPlotter::test_legend_size_numeric_dict",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[count-layer]",
"tests/test_categorical.py::TestStripPlot::test_order[str-order3]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[count-dodge]",
"tests/test_categorical.py::TestStripPlot::test_order[int-None]",
"tests/test_relational.py::TestScatterPlotter::test_legend_attributes_hue",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[density-layer]",
"tests/test_relational.py::TestScatterPlotter::test_legend_attributes_style",
"tests/test_categorical.py::TestStripPlot::test_order[int-order5]",
"tests/test_relational.py::TestScatterPlotter::test_legend_attributes_hue_and_style",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[density-dodge]",
"tests/test_categorical.py::TestStripPlot::test_order[int-order6]",
"tests/test_relational.py::TestScatterPlotter::test_legend_value_error",
"tests/test_categorical.py::TestStripPlot::test_order[int-order7]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[probability-layer]",
"tests/test_relational.py::TestScatterPlotter::test_plot",
"tests/test_axisgrid.py::TestPairGrid::test_histplot_legend",
"tests/test_categorical.py::TestStripPlot::test_order[int-order8]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[probability-dodge]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_axes",
"tests/test_categorical.py::TestStripPlot::test_hue_categorical[a]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_hue",
"tests/test_categorical.py::TestStripPlot::test_hue_categorical[b]",
"tests/test_categorical.py::TestStripPlot::test_hue_dodged[a]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_element_default",
"tests/test_relational.py::TestScatterPlotter::test_hue_order",
"tests/test_categorical.py::TestStripPlot::test_hue_dodged[b]",
"tests/test_categorical.py::TestStripPlot::test_single[x-b-None]",
"tests/test_categorical.py::TestStripPlot::test_single[x-b-a]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics2]",
"tests/test_categorical.py::TestStripPlot::test_single[x-y-None]",
"tests/test_categorical.py::TestStripPlot::test_single[x-y-a]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics4]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_log_scale_dodge",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics5]",
"tests/test_categorical.py::TestStripPlot::test_single[x-t-None]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics6]",
"tests/test_categorical.py::TestStripPlot::test_single[x-t-a]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_auto_linewidth[True]",
"tests/test_categorical.py::TestStripPlot::test_single[y-b-None]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg_hue",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics9]",
"tests/test_categorical.py::TestStripPlot::test_single[y-b-a]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics10]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_auto_linewidth[False]",
"tests/test_categorical.py::TestStripPlot::test_single[y-y-None]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics11]",
"tests/test_categorical.py::TestStripPlot::test_single[y-y-a]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_smoke",
"tests/test_categorical.py::TestStripPlot::test_single[y-t-None]",
"tests/test_categorical.py::TestStripPlot::test_single[y-t-a]",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_with_hue",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_with_hue_unique_bins",
"tests/test_categorical.py::TestStripPlot::test_attributes",
"tests/test_categorical.py::TestStripPlot::test_three_points",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_with_col_unique_bins",
"tests/test_categorical.py::TestStripPlot::test_legend_categorical",
"tests/test_categorical.py::TestStripPlot::test_legend_numeric",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_common_norm",
"tests/test_categorical.py::TestStripPlot::test_legend_attributes",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_unique_norm",
"tests/test_categorical.py::TestStripPlot::test_legend_disabled",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_colors",
"tests/test_categorical.py::TestStripPlot::test_palette_from_color_deprecation",
"tests/test_distributions.py::TestHistPlotBivariate::test_hue_color_limits",
"tests/test_categorical.py::TestStripPlot::test_palette_with_hue_deprecation",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_markers",
"tests/test_categorical.py::TestStripPlot::test_log_scale",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_hue",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs0]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs3]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs1]",
"tests/test_axisgrid.py::TestPairGrid::test_legend",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs2]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs3]",
"tests/test_axisgrid.py::TestPairGrid::test_data_interchange",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs4]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs5]",
"tests/test_categorical.py::TestStripPlot::test_jitter_unfixed",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs6]",
"tests/test_categorical.py::TestStripPlot::test_jitter[v-True]",
"tests/test_categorical.py::TestStripPlot::test_jitter[v-0.1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs7]",
"tests/test_categorical.py::TestStripPlot::test_jitter[h-True]",
"tests/test_categorical.py::TestStripPlot::test_jitter[h-0.1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs8]",
"tests/test_categorical.py::TestSwarmPlot::test_labels_long[x]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs9]",
"tests/test_categorical.py::TestSwarmPlot::test_labels_long[y]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs10]",
"tests/test_axisgrid.py::TestJointGrid::test_hue[True]",
"tests/test_categorical.py::TestSwarmPlot::test_labels_wide",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs11]",
"tests/test_axisgrid.py::TestJointGrid::test_hue[False]",
"tests/test_categorical.py::TestSwarmPlot::test_labels_hue_order",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs12]",
"tests/test_categorical.py::TestSwarmPlot::test_two_calls",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs13]",
"tests/test_categorical.py::TestSwarmPlot::test_redundant_hue_legend",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs14]",
"tests/test_axisgrid.py::TestJointPlot::test_scatter_hue",
"tests/test_categorical.py::TestSwarmPlot::test_color",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs15]",
"tests/test_categorical.py::TestSwarmPlot::test_supplied_color_array",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs0]",
"tests/test_categorical.py::TestSwarmPlot::test_unfilled_marker",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs1]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[h-dataframe]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs2]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[h-dict]",
"tests/test_axisgrid.py::TestJointPlot::test_kde_hue",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs3]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[v-dataframe]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[v-dict]",
"tests/test_axisgrid.py::TestJointPlot::test_palette",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs4]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[y-dataframe]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs5]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[y-dict]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[x-dataframe]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs6]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[x-dict]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs7]",
"tests/test_categorical.py::TestSwarmPlot::test_flat[h]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs8]",
"tests/test_categorical.py::TestSwarmPlot::test_flat[v]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs9]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables0-None]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs10]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables1-None]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs11]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables2-None]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs0]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables3-None]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs1]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables4-None]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs2]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables5-None]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs3]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables6-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables7-h]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs4]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables8-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables9-h]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs5]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables10-None]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs6]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables11-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables12-None]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs7]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables13-None]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs8]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables14-None]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs9]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables15-None]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs0]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables0]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs1]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables1]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables2]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs2]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_unfixed[a]",
"tests/test_distributions.py::TestDisPlot::test_facets[col]",
"tests/test_distributions.py::TestDisPlot::test_facets[row]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_unfixed[s]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[dodge]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_unfixed[d]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-None]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[stack]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-order1]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[fill]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-order2]",
"tests/test_distributions.py::TestDisPlot::test_array_faceting[col]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-order3]",
"tests/test_distributions.py::TestDisPlot::test_array_faceting[row]",
"tests/test_distributions.py::TestDisPlot::test_legend",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-None]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order5]",
"tests/test_distributions.py::TestDisPlot::test_bivariate_kde_norm",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order6]",
"tests/test_distributions.py::TestDisPlot::test_bivariate_hist_norm",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order7]",
"tests/test_distributions.py::TestDisPlot::test_facetgrid_data",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order8]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_categorical[a]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_categorical[b]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_dodged[a]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_dodged[b]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-b-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-b-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-y-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-y-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-t-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-t-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-b-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-b-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-y-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-y-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-t-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-t-a]",
"tests/test_categorical.py::TestSwarmPlot::test_attributes",
"tests/test_categorical.py::TestSwarmPlot::test_three_points",
"tests/test_categorical.py::TestSwarmPlot::test_legend_categorical",
"tests/test_categorical.py::TestSwarmPlot::test_legend_numeric",
"tests/test_categorical.py::TestSwarmPlot::test_legend_attributes",
"tests/test_categorical.py::TestSwarmPlot::test_legend_disabled",
"tests/test_categorical.py::TestSwarmPlot::test_palette_from_color_deprecation",
"tests/test_categorical.py::TestSwarmPlot::test_palette_with_hue_deprecation",
"tests/test_categorical.py::TestSwarmPlot::test_log_scale",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestBoxPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestBoxPlot::test_legend_attributes",
"tests/test_categorical.py::TestBoxPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBoxPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBoxPlot::test_labels_wide",
"tests/test_categorical.py::TestBoxPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBoxPlot::test_two_calls",
"tests/test_categorical.py::TestBoxPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBoxPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBoxPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBoxPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestBoxPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestBoxPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestBoxPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestBoxPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestBoxPlot::test_wide_data[h]",
"tests/test_categorical.py::TestBoxPlot::test_wide_data[v]",
"tests/test_categorical.py::TestBoxPlot::test_grouped[x]",
"tests/test_categorical.py::TestBoxPlot::test_grouped[y]",
"tests/test_categorical.py::TestBoxPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestBoxPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestBoxPlot::test_hue_not_dodged",
"tests/test_categorical.py::TestBoxPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestBoxPlot::test_dodge_native_scale_log",
"tests/test_categorical.py::TestBoxPlot::test_dodge_without_hue",
"tests/test_categorical.py::TestBoxPlot::test_log_data_scale[x]",
"tests/test_categorical.py::TestBoxPlot::test_log_data_scale[y]",
"tests/test_categorical.py::TestBoxPlot::test_color",
"tests/test_categorical.py::TestBoxPlot::test_wide_data_multicolored",
"tests/test_categorical.py::TestBoxPlot::test_wide_data_single_color",
"tests/test_categorical.py::TestBoxPlot::test_hue_colors",
"tests/test_categorical.py::TestBoxPlot::test_linecolor",
"tests/test_categorical.py::TestBoxPlot::test_linecolor_gray_warning",
"tests/test_categorical.py::TestBoxPlot::test_saturation",
"tests/test_categorical.py::TestBoxPlot::test_linewidth",
"tests/test_categorical.py::TestBoxPlot::test_fill",
"tests/test_categorical.py::TestBoxPlot::test_notch[notch]",
"tests/test_categorical.py::TestBoxPlot::test_notch[shownotches]",
"tests/test_categorical.py::TestBoxPlot::test_whis",
"tests/test_categorical.py::TestBoxPlot::test_gap",
"tests/test_categorical.py::TestBoxPlot::test_prop_dicts",
"tests/test_categorical.py::TestBoxPlot::test_showfliers",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_attributes",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_wide",
"tests/test_categorical.py::TestBoxenPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBoxenPlot::test_two_calls",
"tests/test_categorical.py::TestBoxenPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBoxenPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBoxenPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBoxenPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestBoxenPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[h]",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[v]",
"tests/test_categorical.py::TestBoxenPlot::test_grouped[x]",
"tests/test_categorical.py::TestBoxenPlot::test_grouped[y]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestBoxenPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestBoxenPlot::test_color",
"tests/test_categorical.py::TestBoxenPlot::test_hue_colors",
"tests/test_categorical.py::TestBoxenPlot::test_linecolor",
"tests/test_categorical.py::TestBoxenPlot::test_linewidth",
"tests/test_categorical.py::TestBoxenPlot::test_saturation",
"tests/test_categorical.py::TestBoxenPlot::test_gap",
"tests/test_categorical.py::TestBoxenPlot::test_fill",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_int",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_full",
"tests/test_categorical.py::TestBoxenPlot::test_trust_alpha",
"tests/test_categorical.py::TestBoxenPlot::test_outlier_prop",
"tests/test_categorical.py::TestBoxenPlot::test_exponential_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_linear_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_area_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_box_kws",
"tests/test_categorical.py::TestBoxenPlot::test_line_kws",
"tests/test_categorical.py::TestBoxenPlot::test_flier_kws",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_checks",
"tests/test_categorical.py::TestBoxenPlot::test_width_method_check",
"tests/test_categorical.py::TestBoxenPlot::test_scale_deprecation",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestViolinPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestViolinPlot::test_legend_attributes",
"tests/test_categorical.py::TestViolinPlot::test_labels_long[x]",
"tests/test_categorical.py::TestViolinPlot::test_labels_long[y]",
"tests/test_categorical.py::TestViolinPlot::test_labels_wide",
"tests/test_categorical.py::TestViolinPlot::test_labels_hue_order",
"tests/test_categorical.py::TestViolinPlot::test_two_calls",
"tests/test_categorical.py::TestViolinPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestViolinPlot::test_log_scale[x]",
"tests/test_categorical.py::TestViolinPlot::test_log_scale[y]",
"tests/test_categorical.py::TestViolinPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestViolinPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestViolinPlot::test_wide_data[h]",
"tests/test_categorical.py::TestViolinPlot::test_wide_data[v]",
"tests/test_categorical.py::TestViolinPlot::test_grouped[x]",
"tests/test_categorical.py::TestViolinPlot::test_grouped[y]",
"tests/test_categorical.py::TestViolinPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestViolinPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestViolinPlot::test_hue_not_dodged",
"tests/test_categorical.py::TestViolinPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestViolinPlot::test_dodge_native_scale_log",
"tests/test_categorical.py::TestViolinPlot::test_color",
"tests/test_categorical.py::TestViolinPlot::test_hue_colors",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[box]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[quart]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[stick]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[point]",
"tests/test_categorical.py::TestViolinPlot::test_linewidth",
"tests/test_categorical.py::TestViolinPlot::test_saturation",
"tests/test_categorical.py::TestViolinPlot::test_fill[box]",
"tests/test_categorical.py::TestViolinPlot::test_fill[quart]",
"tests/test_categorical.py::TestViolinPlot::test_fill[stick]",
"tests/test_categorical.py::TestViolinPlot::test_fill[point]",
"tests/test_categorical.py::TestViolinPlot::test_inner_box[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_box[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_quartiles[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_quartiles[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_stick[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_stick[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_points[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_points[y]",
"tests/test_categorical.py::TestViolinPlot::test_split_single",
"tests/test_categorical.py::TestViolinPlot::test_split_multi",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_area",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_count",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_width",
"tests/test_categorical.py::TestViolinPlot::test_common_norm",
"tests/test_categorical.py::TestViolinPlot::test_scale_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_scale_hue_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_bw_adjust",
"tests/test_categorical.py::TestViolinPlot::test_bw_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_gap",
"tests/test_categorical.py::TestViolinPlot::test_inner_kws",
"tests/test_categorical.py::TestViolinPlot::test_box_inner_kws",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestBarPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBarPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBarPlot::test_labels_wide",
"tests/test_categorical.py::TestBarPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBarPlot::test_color",
"tests/test_categorical.py::TestBarPlot::test_two_calls",
"tests/test_categorical.py::TestBarPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBarPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBarPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBarPlot::test_labels_flat",
"tests/test_categorical.py::TestBarPlot::test_single_var[x]",
"tests/test_categorical.py::TestBarPlot::test_single_var[y]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[x]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[y]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[h]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[v]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[x]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[y]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[h]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[v]",
"tests/test_categorical.py::TestBarPlot::test_xy_vertical",
"tests/test_categorical.py::TestBarPlot::test_xy_horizontal",
"tests/test_categorical.py::TestBarPlot::test_xy_with_na_grouper",
"tests/test_categorical.py::TestBarPlot::test_xy_with_na_value",
"tests/test_categorical.py::TestBarPlot::test_hue_redundant",
"tests/test_categorical.py::TestBarPlot::test_hue_matched",
"tests/test_categorical.py::TestBarPlot::test_hue_matched_by_name",
"tests/test_categorical.py::TestBarPlot::test_hue_dodged",
"tests/test_categorical.py::TestBarPlot::test_gap",
"tests/test_categorical.py::TestBarPlot::test_hue_undodged",
"tests/test_categorical.py::TestBarPlot::test_hue_order",
"tests/test_categorical.py::TestBarPlot::test_hue_norm",
"tests/test_categorical.py::TestBarPlot::test_fill",
"tests/test_categorical.py::TestBarPlot::test_xy_native_scale",
"tests/test_categorical.py::TestBarPlot::test_xy_native_scale_log_transform",
"tests/test_categorical.py::TestBarPlot::test_datetime_native_scale_axis",
"tests/test_categorical.py::TestBarPlot::test_native_scale_dodged",
"tests/test_categorical.py::TestBarPlot::test_native_scale_log_transform_dodged",
"tests/test_categorical.py::TestBarPlot::test_estimate_default",
"tests/test_categorical.py::TestBarPlot::test_estimate_string",
"tests/test_categorical.py::TestBarPlot::test_estimate_func",
"tests/test_categorical.py::TestBarPlot::test_weighted_estimate",
"tests/test_categorical.py::TestBarPlot::test_estimate_log_transform",
"tests/test_categorical.py::TestBarPlot::test_errorbars",
"tests/test_categorical.py::TestBarPlot::test_width",
"tests/test_categorical.py::TestBarPlot::test_width_native_scale",
"tests/test_categorical.py::TestBarPlot::test_width_spaced_categories",
"tests/test_categorical.py::TestBarPlot::test_saturation_color",
"tests/test_categorical.py::TestBarPlot::test_saturation_palette",
"tests/test_categorical.py::TestBarPlot::test_legend_numeric_auto",
"tests/test_categorical.py::TestBarPlot::test_legend_numeric_full",
"tests/test_categorical.py::TestBarPlot::test_legend_disabled",
"tests/test_categorical.py::TestBarPlot::test_error_caps",
"tests/test_categorical.py::TestBarPlot::test_error_caps_native_scale",
"tests/test_categorical.py::TestBarPlot::test_error_caps_native_scale_log_transform",
"tests/test_categorical.py::TestBarPlot::test_bar_kwargs",
"tests/test_categorical.py::TestBarPlot::test_legend_attributes",
"tests/test_categorical.py::TestBarPlot::test_legend_unfilled",
"tests/test_categorical.py::TestBarPlot::test_err_kws[True]",
"tests/test_categorical.py::TestBarPlot::test_err_kws[False]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBarPlot::test_errwidth_deprecation",
"tests/test_categorical.py::TestBarPlot::test_errcolor_deprecation",
"tests/test_categorical.py::TestBarPlot::test_capsize_as_none_deprecation",
"tests/test_categorical.py::TestBarPlot::test_hue_implied_by_palette_deprecation",
"tests/test_categorical.py::TestPointPlot::test_labels_long[x]",
"tests/test_categorical.py::TestPointPlot::test_labels_long[y]",
"tests/test_categorical.py::TestPointPlot::test_labels_wide",
"tests/test_categorical.py::TestPointPlot::test_labels_hue_order",
"tests/test_categorical.py::TestPointPlot::test_color",
"tests/test_categorical.py::TestPointPlot::test_two_calls",
"tests/test_categorical.py::TestPointPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestPointPlot::test_log_scale[x]",
"tests/test_categorical.py::TestPointPlot::test_log_scale[y]",
"tests/test_categorical.py::TestPointPlot::test_labels_flat",
"tests/test_categorical.py::TestPointPlot::test_single_var[x]",
"tests/test_categorical.py::TestPointPlot::test_single_var[y]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[x]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[y]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[h]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[v]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[x]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[y]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[h]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[v]",
"tests/test_categorical.py::TestPointPlot::test_xy_vertical",
"tests/test_categorical.py::TestPointPlot::test_xy_horizontal",
"tests/test_categorical.py::TestPointPlot::test_xy_with_na_grouper",
"tests/test_categorical.py::TestPointPlot::test_xy_with_na_value",
"tests/test_categorical.py::TestPointPlot::test_hue",
"tests/test_categorical.py::TestPointPlot::test_wide_data_is_joined",
"tests/test_categorical.py::TestPointPlot::test_xy_native_scale",
"tests/test_categorical.py::TestPointPlot::test_estimate[mean]",
"tests/test_categorical.py::TestPointPlot::test_estimate[<lambda>]",
"tests/test_categorical.py::TestPointPlot::test_weighted_estimate",
"tests/test_categorical.py::TestPointPlot::test_estimate_log_transform",
"tests/test_categorical.py::TestPointPlot::test_errorbars",
"tests/test_categorical.py::TestPointPlot::test_marker_linestyle",
"tests/test_categorical.py::TestPointPlot::test_markers_linestyles_single",
"tests/test_categorical.py::TestPointPlot::test_markers_linestyles_mapped",
"tests/test_categorical.py::TestPointPlot::test_dodge_boolean",
"tests/test_categorical.py::TestPointPlot::test_dodge_float",
"tests/test_categorical.py::TestPointPlot::test_dodge_log_scale",
"tests/test_categorical.py::TestPointPlot::test_err_kws",
"tests/test_categorical.py::TestPointPlot::test_err_kws_inherited",
"tests/test_categorical.py::TestPointPlot::test_legend_contents",
"tests/test_categorical.py::TestPointPlot::test_legend_set_props",
"tests/test_categorical.py::TestPointPlot::test_legend_synced_props",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs20]",
"tests/test_categorical.py::TestPointPlot::test_legend_disabled",
"tests/test_categorical.py::TestPointPlot::test_join_deprecation",
"tests/test_categorical.py::TestPointPlot::test_scale_deprecation",
"tests/test_categorical.py::TestPointPlot::test_layered_plot_clipping",
"tests/test_categorical.py::TestCountPlot::test_labels_long",
"tests/test_categorical.py::TestCountPlot::test_wide_data",
"tests/test_categorical.py::TestCountPlot::test_flat_series",
"tests/test_categorical.py::TestCountPlot::test_x_series",
"tests/test_categorical.py::TestCountPlot::test_y_series",
"tests/test_categorical.py::TestCountPlot::test_hue_redundant",
"tests/test_categorical.py::TestCountPlot::test_hue_dodged",
"tests/test_categorical.py::TestCountPlot::test_stat[percent]",
"tests/test_categorical.py::TestCountPlot::test_stat[probability]",
"tests/test_categorical.py::TestCountPlot::test_stat[proportion]",
"tests/test_categorical.py::TestCountPlot::test_legend_numeric_auto",
"tests/test_categorical.py::TestCountPlot::test_legend_disabled",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestCatPlot::test_facet_organization",
"tests/test_categorical.py::TestCatPlot::test_plot_elements",
"tests/test_categorical.py::TestCatPlot::test_bad_plot_kind_error",
"tests/test_categorical.py::TestCatPlot::test_plot_colors",
"tests/test_categorical.py::TestCatPlot::test_ax_kwarg_removal",
"tests/test_categorical.py::TestCatPlot::test_share_xy",
"tests/test_categorical.py::TestCatPlot::test_facetgrid_data",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[col]",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[row]",
"tests/test_categorical.py::TestCatPlot::test_invalid_kind",
"tests/test_categorical.py::TestCatPlot::test_legend_with_auto",
"tests/test_categorical.py::TestCatPlot::test_weights_warning"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-9
|
1.0
|
{
"code": "diff --git b/seaborn/_base.py a/seaborn/_base.py\nindex ca7cf36c..0b435231 100644\n--- b/seaborn/_base.py\n+++ a/seaborn/_base.py\n@@ -1590,6 +1590,59 @@ def infer_orient(x=None, y=None, orient=None, require_numeric=True):\n \n \"\"\"\n \n+ x_type = None if x is None else variable_type(x)\n+ y_type = None if y is None else variable_type(y)\n+\n+ nonnumeric_dv_error = \"{} orientation requires numeric `{}` variable.\"\n+ single_var_warning = \"{} orientation ignored with only `{}` specified.\"\n+\n+ if x is None:\n+ if str(orient).startswith(\"h\"):\n+ warnings.warn(single_var_warning.format(\"Horizontal\", \"y\"))\n+ if require_numeric and y_type != \"numeric\":\n+ raise TypeError(nonnumeric_dv_error.format(\"Vertical\", \"y\"))\n+ return \"x\"\n+\n+ elif y is None:\n+ if str(orient).startswith(\"v\"):\n+ warnings.warn(single_var_warning.format(\"Vertical\", \"x\"))\n+ if require_numeric and x_type != \"numeric\":\n+ raise TypeError(nonnumeric_dv_error.format(\"Horizontal\", \"x\"))\n+ return \"y\"\n+\n+ elif str(orient).startswith(\"v\") or orient == \"x\":\n+ if require_numeric and y_type != \"numeric\":\n+ raise TypeError(nonnumeric_dv_error.format(\"Vertical\", \"y\"))\n+ return \"x\"\n+\n+ elif str(orient).startswith(\"h\") or orient == \"y\":\n+ if require_numeric and x_type != \"numeric\":\n+ raise TypeError(nonnumeric_dv_error.format(\"Horizontal\", \"x\"))\n+ return \"y\"\n+\n+ elif orient is not None:\n+ err = (\n+ \"`orient` must start with 'v' or 'h' or be None, \"\n+ f\"but `{repr(orient)}` was passed.\"\n+ )\n+ raise ValueError(err)\n+\n+ elif x_type != \"categorical\" and y_type == \"categorical\":\n+ return \"y\"\n+\n+ elif x_type != \"numeric\" and y_type == \"numeric\":\n+ return \"x\"\n+\n+ elif x_type == \"numeric\" and y_type != \"numeric\":\n+ return \"y\"\n+\n+ elif require_numeric and \"numeric\" not in (x_type, y_type):\n+ err = \"Neither the `x` nor `y` variable appears to be numeric.\"\n+ raise TypeError(err)\n+\n+ else:\n+ return \"x\"\n+\n \n def unique_dashes(n):\n \"\"\"Build an arbitrarily long list of unique dash styles for lines.\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_base.py b/seaborn/_base.py\nindex 0b435231..ca7cf36c 100644\n--- a/seaborn/_base.py\n+++ b/seaborn/_base.py\n@@ -1590,59 +1590,6 @@ def infer_orient(x=None, y=None, orient=None, require_numeric=True):\n \n \"\"\"\n \n- x_type = None if x is None else variable_type(x)\n- y_type = None if y is None else variable_type(y)\n-\n- nonnumeric_dv_error = \"{} orientation requires numeric `{}` variable.\"\n- single_var_warning = \"{} orientation ignored with only `{}` specified.\"\n-\n- if x is None:\n- if str(orient).startswith(\"h\"):\n- warnings.warn(single_var_warning.format(\"Horizontal\", \"y\"))\n- if require_numeric and y_type != \"numeric\":\n- raise TypeError(nonnumeric_dv_error.format(\"Vertical\", \"y\"))\n- return \"x\"\n-\n- elif y is None:\n- if str(orient).startswith(\"v\"):\n- warnings.warn(single_var_warning.format(\"Vertical\", \"x\"))\n- if require_numeric and x_type != \"numeric\":\n- raise TypeError(nonnumeric_dv_error.format(\"Horizontal\", \"x\"))\n- return \"y\"\n-\n- elif str(orient).startswith(\"v\") or orient == \"x\":\n- if require_numeric and y_type != \"numeric\":\n- raise TypeError(nonnumeric_dv_error.format(\"Vertical\", \"y\"))\n- return \"x\"\n-\n- elif str(orient).startswith(\"h\") or orient == \"y\":\n- if require_numeric and x_type != \"numeric\":\n- raise TypeError(nonnumeric_dv_error.format(\"Horizontal\", \"x\"))\n- return \"y\"\n-\n- elif orient is not None:\n- err = (\n- \"`orient` must start with 'v' or 'h' or be None, \"\n- f\"but `{repr(orient)}` was passed.\"\n- )\n- raise ValueError(err)\n-\n- elif x_type != \"categorical\" and y_type == \"categorical\":\n- return \"y\"\n-\n- elif x_type != \"numeric\" and y_type == \"numeric\":\n- return \"x\"\n-\n- elif x_type == \"numeric\" and y_type != \"numeric\":\n- return \"y\"\n-\n- elif require_numeric and \"numeric\" not in (x_type, y_type):\n- err = \"Neither the `x` nor `y` variable appears to be numeric.\"\n- raise TypeError(err)\n-\n- else:\n- return \"x\"\n-\n \n def unique_dashes(n):\n \"\"\"Build an arbitrarily long list of unique dash styles for lines.\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_base.py.\nHere is the description for the function:\ndef infer_orient(x=None, y=None, orient=None, require_numeric=True):\n \"\"\"Determine how the plot should be oriented based on the data.\n\n For historical reasons, the convention is to call a plot \"horizontally\"\n or \"vertically\" oriented based on the axis representing its dependent\n variable. Practically, this is used when determining the axis for\n numerical aggregation.\n\n Parameters\n ----------\n x, y : Vector data or None\n Positional data vectors for the plot.\n orient : string or None\n Specified orientation. If not None, can be \"x\" or \"y\", or otherwise\n must start with \"v\" or \"h\".\n require_numeric : bool\n If set, raise when the implied dependent variable is not numeric.\n\n Returns\n -------\n orient : \"x\" or \"y\"\n\n Raises\n ------\n ValueError: When `orient` is an unknown string.\n TypeError: When dependent variable is not numeric, with `require_numeric`\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs0]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs1]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs2]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs3]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs4]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs5]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs6]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs7]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs8]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs9]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs10]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs11]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs12]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs13]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs14]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs15]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs16]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs17]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs18]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs19]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs20]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs21]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs22]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs23]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs24]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs25]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs26]",
"tests/test_base.py::TestCoreFunc::test_infer_orient",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs27]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs28]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs29]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs30]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs31]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_empty[catplot]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_empty[barplot]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_empty[boxplot]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_empty[boxenplot]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_empty[pointplot]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_empty[stripplot]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_empty[swarmplot]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_empty[violinplot]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_redundant_hue_backcompat",
"tests/test_categorical.py::TestStripPlot::test_labels_long[x]",
"tests/test_categorical.py::TestStripPlot::test_labels_long[y]",
"tests/test_categorical.py::TestStripPlot::test_labels_wide",
"tests/test_categorical.py::TestStripPlot::test_labels_hue_order",
"tests/test_categorical.py::TestStripPlot::test_two_calls",
"tests/test_categorical.py::TestStripPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestStripPlot::test_color",
"tests/test_categorical.py::TestStripPlot::test_supplied_color_array",
"tests/test_categorical.py::TestStripPlot::test_unfilled_marker",
"tests/test_categorical.py::TestStripPlot::test_wide[h-dataframe]",
"tests/test_categorical.py::TestStripPlot::test_wide[h-dict]",
"tests/test_categorical.py::TestStripPlot::test_wide[v-dataframe]",
"tests/test_categorical.py::TestStripPlot::test_wide[v-dict]",
"tests/test_categorical.py::TestStripPlot::test_wide[y-dataframe]",
"tests/test_categorical.py::TestStripPlot::test_wide[y-dict]",
"tests/test_categorical.py::TestStripPlot::test_wide[x-dataframe]",
"tests/test_categorical.py::TestStripPlot::test_wide[x-dict]",
"tests/test_categorical.py::TestStripPlot::test_flat[h]",
"tests/test_categorical.py::TestStripPlot::test_flat[v]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables0-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables1-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables2-None]",
"tests/test_axisgrid.py::TestFacetGrid::test_set_ticklabels",
"tests/test_categorical.py::TestStripPlot::test_positions[variables3-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables4-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables5-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables6-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables7-h]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables8-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables9-h]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables10-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables11-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables12-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables13-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables14-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables15-None]",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables0]",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables1]",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables2]",
"tests/test_categorical.py::TestStripPlot::test_positions_unfixed[a]",
"tests/test_categorical.py::TestStripPlot::test_positions_unfixed[s]",
"tests/test_axisgrid.py::TestFacetGrid::test_categorical_warning",
"tests/test_categorical.py::TestStripPlot::test_positions_unfixed[d]",
"tests/test_categorical.py::TestStripPlot::test_order[str-None]",
"tests/test_categorical.py::TestStripPlot::test_order[str-order1]",
"tests/test_categorical.py::TestStripPlot::test_order[str-order2]",
"tests/test_categorical.py::TestStripPlot::test_order[str-order3]",
"tests/test_categorical.py::TestStripPlot::test_order[int-None]",
"tests/test_categorical.py::TestStripPlot::test_order[int-order5]",
"tests/test_categorical.py::TestStripPlot::test_order[int-order6]",
"tests/test_categorical.py::TestStripPlot::test_order[int-order7]",
"tests/test_categorical.py::TestStripPlot::test_order[int-order8]",
"tests/test_categorical.py::TestStripPlot::test_hue_categorical[a]",
"tests/test_categorical.py::TestStripPlot::test_hue_categorical[b]",
"tests/test_categorical.py::TestStripPlot::test_hue_dodged[a]",
"tests/test_categorical.py::TestStripPlot::test_hue_dodged[b]",
"tests/test_categorical.py::TestStripPlot::test_single[x-b-None]",
"tests/test_categorical.py::TestStripPlot::test_single[x-b-a]",
"tests/test_categorical.py::TestStripPlot::test_single[x-y-None]",
"tests/test_categorical.py::TestStripPlot::test_single[x-y-a]",
"tests/test_categorical.py::TestStripPlot::test_single[x-t-None]",
"tests/test_categorical.py::TestStripPlot::test_single[x-t-a]",
"tests/test_categorical.py::TestStripPlot::test_single[y-b-None]",
"tests/test_categorical.py::TestStripPlot::test_single[y-b-a]",
"tests/test_categorical.py::TestStripPlot::test_single[y-y-None]",
"tests/test_categorical.py::TestStripPlot::test_single[y-y-a]",
"tests/test_categorical.py::TestStripPlot::test_single[y-t-None]",
"tests/test_categorical.py::TestStripPlot::test_single[y-t-a]",
"tests/test_categorical.py::TestStripPlot::test_attributes",
"tests/test_categorical.py::TestStripPlot::test_three_points",
"tests/test_categorical.py::TestStripPlot::test_legend_categorical",
"tests/test_categorical.py::TestStripPlot::test_legend_numeric",
"tests/test_categorical.py::TestStripPlot::test_legend_attributes",
"tests/test_categorical.py::TestStripPlot::test_legend_disabled",
"tests/test_categorical.py::TestStripPlot::test_palette_from_color_deprecation",
"tests/test_categorical.py::TestStripPlot::test_palette_with_hue_deprecation",
"tests/test_categorical.py::TestStripPlot::test_log_scale",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestStripPlot::test_empty_palette",
"tests/test_categorical.py::TestStripPlot::test_jitter_unfixed",
"tests/test_categorical.py::TestStripPlot::test_jitter[v-True]",
"tests/test_categorical.py::TestStripPlot::test_jitter[v-0.1]",
"tests/test_categorical.py::TestStripPlot::test_jitter[h-True]",
"tests/test_categorical.py::TestStripPlot::test_jitter[h-0.1]",
"tests/test_categorical.py::TestSwarmPlot::test_labels_long[x]",
"tests/test_categorical.py::TestSwarmPlot::test_labels_long[y]",
"tests/test_categorical.py::TestSwarmPlot::test_labels_wide",
"tests/test_categorical.py::TestSwarmPlot::test_labels_hue_order",
"tests/test_categorical.py::TestSwarmPlot::test_two_calls",
"tests/test_categorical.py::TestSwarmPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestSwarmPlot::test_color",
"tests/test_categorical.py::TestSwarmPlot::test_supplied_color_array",
"tests/test_categorical.py::TestSwarmPlot::test_unfilled_marker",
"tests/test_categorical.py::TestSwarmPlot::test_wide[h-dataframe]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[h-dict]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[v-dataframe]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[v-dict]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[y-dataframe]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[y-dict]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[x-dataframe]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[x-dict]",
"tests/test_categorical.py::TestSwarmPlot::test_flat[h]",
"tests/test_categorical.py::TestSwarmPlot::test_flat[v]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables0-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables1-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables2-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables3-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables4-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables5-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables6-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables7-h]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables8-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables9-h]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables10-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables11-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables12-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables13-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables14-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables15-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables0]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables1]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables2]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_unfixed[a]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_unfixed[s]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_unfixed[d]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-None]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-order1]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-order2]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-order3]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-None]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order5]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order6]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order7]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order8]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_categorical[a]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_categorical[b]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_dodged[a]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_dodged[b]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-b-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-b-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-y-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-y-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-t-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-t-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-b-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-b-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-y-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-y-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-t-None]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-t-a]",
"tests/test_categorical.py::TestSwarmPlot::test_attributes",
"tests/test_categorical.py::TestSwarmPlot::test_three_points",
"tests/test_categorical.py::TestSwarmPlot::test_legend_categorical",
"tests/test_categorical.py::TestSwarmPlot::test_legend_numeric",
"tests/test_categorical.py::TestSwarmPlot::test_legend_attributes",
"tests/test_categorical.py::TestSwarmPlot::test_legend_disabled",
"tests/test_categorical.py::TestSwarmPlot::test_palette_from_color_deprecation",
"tests/test_categorical.py::TestSwarmPlot::test_palette_with_hue_deprecation",
"tests/test_categorical.py::TestSwarmPlot::test_log_scale",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestSwarmPlot::test_empty_palette",
"tests/test_categorical.py::TestBoxPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestBoxPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestBoxPlot::test_legend_attributes",
"tests/test_categorical.py::TestBoxPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBoxPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBoxPlot::test_labels_wide",
"tests/test_categorical.py::TestBoxPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBoxPlot::test_two_calls",
"tests/test_categorical.py::TestBoxPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBoxPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBoxPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBoxPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestBoxPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestBoxPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestBoxPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestBoxPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestBoxPlot::test_wide_data[h]",
"tests/test_categorical.py::TestBoxPlot::test_wide_data[v]",
"tests/test_categorical.py::TestBoxPlot::test_grouped[x]",
"tests/test_categorical.py::TestBoxPlot::test_grouped[y]",
"tests/test_categorical.py::TestBoxPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestBoxPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestBoxPlot::test_hue_not_dodged",
"tests/test_categorical.py::TestBoxPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestBoxPlot::test_dodge_native_scale_log",
"tests/test_categorical.py::TestBoxPlot::test_dodge_without_hue",
"tests/test_categorical.py::TestBoxPlot::test_log_data_scale[x]",
"tests/test_categorical.py::TestBoxPlot::test_log_data_scale[y]",
"tests/test_categorical.py::TestBoxPlot::test_color",
"tests/test_categorical.py::TestBoxPlot::test_wide_data_multicolored",
"tests/test_categorical.py::TestBoxPlot::test_wide_data_single_color",
"tests/test_categorical.py::TestBoxPlot::test_hue_colors",
"tests/test_categorical.py::TestBoxPlot::test_linecolor",
"tests/test_categorical.py::TestBoxPlot::test_linecolor_gray_warning",
"tests/test_categorical.py::TestBoxPlot::test_saturation",
"tests/test_categorical.py::TestBoxPlot::test_linewidth",
"tests/test_categorical.py::TestBoxPlot::test_fill",
"tests/test_categorical.py::TestBoxPlot::test_notch[notch]",
"tests/test_categorical.py::TestBoxPlot::test_notch[shownotches]",
"tests/test_categorical.py::TestBoxPlot::test_whis",
"tests/test_categorical.py::TestBoxPlot::test_gap",
"tests/test_categorical.py::TestBoxPlot::test_prop_dicts",
"tests/test_categorical.py::TestBoxPlot::test_showfliers",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_attributes",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_wide",
"tests/test_categorical.py::TestBoxenPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBoxenPlot::test_two_calls",
"tests/test_categorical.py::TestBoxenPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBoxenPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBoxenPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBoxenPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestBoxenPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[h]",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[v]",
"tests/test_categorical.py::TestBoxenPlot::test_grouped[x]",
"tests/test_categorical.py::TestBoxenPlot::test_grouped[y]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestBoxenPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestBoxenPlot::test_color",
"tests/test_categorical.py::TestBoxenPlot::test_hue_colors",
"tests/test_categorical.py::TestBoxenPlot::test_linecolor",
"tests/test_categorical.py::TestBoxenPlot::test_linewidth",
"tests/test_categorical.py::TestBoxenPlot::test_saturation",
"tests/test_categorical.py::TestBoxenPlot::test_gap",
"tests/test_categorical.py::TestBoxenPlot::test_fill",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_int",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_full",
"tests/test_categorical.py::TestBoxenPlot::test_trust_alpha",
"tests/test_categorical.py::TestBoxenPlot::test_outlier_prop",
"tests/test_categorical.py::TestBoxenPlot::test_exponential_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_linear_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_area_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_box_kws",
"tests/test_categorical.py::TestBoxenPlot::test_line_kws",
"tests/test_categorical.py::TestBoxenPlot::test_flier_kws",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_checks",
"tests/test_categorical.py::TestBoxenPlot::test_width_method_check",
"tests/test_categorical.py::TestBoxenPlot::test_scale_deprecation",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestViolinPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestViolinPlot::test_legend_attributes",
"tests/test_categorical.py::TestViolinPlot::test_labels_long[x]",
"tests/test_categorical.py::TestViolinPlot::test_labels_long[y]",
"tests/test_categorical.py::TestViolinPlot::test_labels_wide",
"tests/test_categorical.py::TestViolinPlot::test_labels_hue_order",
"tests/test_categorical.py::TestViolinPlot::test_two_calls",
"tests/test_categorical.py::TestViolinPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestViolinPlot::test_log_scale[x]",
"tests/test_categorical.py::TestViolinPlot::test_log_scale[y]",
"tests/test_categorical.py::TestViolinPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestViolinPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestViolinPlot::test_wide_data[h]",
"tests/test_categorical.py::TestViolinPlot::test_wide_data[v]",
"tests/test_categorical.py::TestViolinPlot::test_grouped[x]",
"tests/test_categorical.py::TestViolinPlot::test_grouped[y]",
"tests/test_categorical.py::TestViolinPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestViolinPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestViolinPlot::test_hue_not_dodged",
"tests/test_categorical.py::TestViolinPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestViolinPlot::test_dodge_native_scale_log",
"tests/test_categorical.py::TestViolinPlot::test_color",
"tests/test_categorical.py::TestViolinPlot::test_hue_colors",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[box]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[quart]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[stick]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[point]",
"tests/test_categorical.py::TestViolinPlot::test_linewidth",
"tests/test_categorical.py::TestViolinPlot::test_saturation",
"tests/test_categorical.py::TestViolinPlot::test_fill[box]",
"tests/test_categorical.py::TestViolinPlot::test_fill[quart]",
"tests/test_categorical.py::TestViolinPlot::test_fill[stick]",
"tests/test_categorical.py::TestViolinPlot::test_fill[point]",
"tests/test_categorical.py::TestViolinPlot::test_inner_box[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_box[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_quartiles[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_quartiles[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_stick[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_stick[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_points[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_points[y]",
"tests/test_categorical.py::TestViolinPlot::test_split_single",
"tests/test_categorical.py::TestViolinPlot::test_split_multi",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_area",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_count",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_width",
"tests/test_categorical.py::TestViolinPlot::test_common_norm",
"tests/test_categorical.py::TestViolinPlot::test_scale_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_scale_hue_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_bw_adjust",
"tests/test_categorical.py::TestViolinPlot::test_bw_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_gap",
"tests/test_categorical.py::TestViolinPlot::test_inner_kws",
"tests/test_categorical.py::TestViolinPlot::test_box_inner_kws",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestBarPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBarPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBarPlot::test_labels_wide",
"tests/test_categorical.py::TestBarPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBarPlot::test_color",
"tests/test_categorical.py::TestBarPlot::test_two_calls",
"tests/test_categorical.py::TestBarPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBarPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBarPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBarPlot::test_labels_flat",
"tests/test_categorical.py::TestBarPlot::test_single_var[x]",
"tests/test_categorical.py::TestBarPlot::test_single_var[y]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[x]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[y]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[h]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[v]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[x]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[y]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[h]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[v]",
"tests/test_categorical.py::TestBarPlot::test_xy_vertical",
"tests/test_categorical.py::TestBarPlot::test_xy_horizontal",
"tests/test_categorical.py::TestBarPlot::test_xy_with_na_grouper",
"tests/test_categorical.py::TestBarPlot::test_xy_with_na_value",
"tests/test_categorical.py::TestBarPlot::test_hue_redundant",
"tests/test_categorical.py::TestBarPlot::test_hue_matched",
"tests/test_categorical.py::TestBarPlot::test_hue_matched_by_name",
"tests/test_categorical.py::TestBarPlot::test_hue_dodged",
"tests/test_categorical.py::TestBarPlot::test_gap",
"tests/test_categorical.py::TestBarPlot::test_hue_undodged",
"tests/test_categorical.py::TestBarPlot::test_hue_order",
"tests/test_categorical.py::TestBarPlot::test_hue_norm",
"tests/test_categorical.py::TestBarPlot::test_fill",
"tests/test_categorical.py::TestBarPlot::test_xy_native_scale",
"tests/test_categorical.py::TestBarPlot::test_xy_native_scale_log_transform",
"tests/test_categorical.py::TestBarPlot::test_datetime_native_scale_axis",
"tests/test_categorical.py::TestBarPlot::test_native_scale_dodged",
"tests/test_categorical.py::TestBarPlot::test_native_scale_log_transform_dodged",
"tests/test_categorical.py::TestBarPlot::test_estimate_default",
"tests/test_categorical.py::TestBarPlot::test_estimate_string",
"tests/test_categorical.py::TestBarPlot::test_estimate_func",
"tests/test_categorical.py::TestBarPlot::test_weighted_estimate",
"tests/test_categorical.py::TestBarPlot::test_estimate_log_transform",
"tests/test_categorical.py::TestBarPlot::test_errorbars",
"tests/test_categorical.py::TestBarPlot::test_width",
"tests/test_categorical.py::TestBarPlot::test_width_native_scale",
"tests/test_categorical.py::TestBarPlot::test_width_spaced_categories",
"tests/test_categorical.py::TestBarPlot::test_saturation_color",
"tests/test_categorical.py::TestBarPlot::test_saturation_palette",
"tests/test_categorical.py::TestBarPlot::test_legend_numeric_auto",
"tests/test_categorical.py::TestBarPlot::test_legend_numeric_full",
"tests/test_categorical.py::TestBarPlot::test_legend_disabled",
"tests/test_categorical.py::TestBarPlot::test_error_caps",
"tests/test_categorical.py::TestBarPlot::test_error_caps_native_scale",
"tests/test_categorical.py::TestBarPlot::test_error_caps_native_scale_log_transform",
"tests/test_categorical.py::TestBarPlot::test_bar_kwargs",
"tests/test_categorical.py::TestBarPlot::test_legend_attributes",
"tests/test_categorical.py::TestBarPlot::test_legend_unfilled",
"tests/test_categorical.py::TestBarPlot::test_err_kws[True]",
"tests/test_categorical.py::TestBarPlot::test_err_kws[False]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBarPlot::test_errwidth_deprecation",
"tests/test_categorical.py::TestBarPlot::test_errcolor_deprecation",
"tests/test_categorical.py::TestBarPlot::test_capsize_as_none_deprecation",
"tests/test_categorical.py::TestBarPlot::test_hue_implied_by_palette_deprecation",
"tests/test_categorical.py::TestPointPlot::test_labels_long[x]",
"tests/test_categorical.py::TestPointPlot::test_labels_long[y]",
"tests/test_categorical.py::TestPointPlot::test_labels_wide",
"tests/test_categorical.py::TestPointPlot::test_labels_hue_order",
"tests/test_categorical.py::TestPointPlot::test_color",
"tests/test_categorical.py::TestPointPlot::test_two_calls",
"tests/test_categorical.py::TestPointPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestPointPlot::test_log_scale[x]",
"tests/test_categorical.py::TestPointPlot::test_log_scale[y]",
"tests/test_categorical.py::TestPointPlot::test_labels_flat",
"tests/test_categorical.py::TestPointPlot::test_single_var[x]",
"tests/test_categorical.py::TestPointPlot::test_single_var[y]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[x]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[y]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[h]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[v]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[x]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[y]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[h]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[v]",
"tests/test_categorical.py::TestPointPlot::test_xy_vertical",
"tests/test_categorical.py::TestPointPlot::test_xy_horizontal",
"tests/test_categorical.py::TestPointPlot::test_xy_with_na_grouper",
"tests/test_categorical.py::TestPointPlot::test_xy_with_na_value",
"tests/test_categorical.py::TestPointPlot::test_hue",
"tests/test_categorical.py::TestPointPlot::test_wide_data_is_joined",
"tests/test_categorical.py::TestPointPlot::test_xy_native_scale",
"tests/test_categorical.py::TestPointPlot::test_estimate[mean]",
"tests/test_categorical.py::TestPointPlot::test_estimate[<lambda>]",
"tests/test_categorical.py::TestPointPlot::test_weighted_estimate",
"tests/test_categorical.py::TestPointPlot::test_estimate_log_transform",
"tests/test_categorical.py::TestPointPlot::test_errorbars",
"tests/test_categorical.py::TestPointPlot::test_marker_linestyle",
"tests/test_categorical.py::TestPointPlot::test_markers_linestyles_single",
"tests/test_categorical.py::TestPointPlot::test_markers_linestyles_mapped",
"tests/test_categorical.py::TestPointPlot::test_dodge_boolean",
"tests/test_categorical.py::TestPointPlot::test_dodge_float",
"tests/test_categorical.py::TestPointPlot::test_dodge_log_scale",
"tests/test_categorical.py::TestPointPlot::test_err_kws",
"tests/test_categorical.py::TestPointPlot::test_err_kws_inherited",
"tests/test_categorical.py::TestPointPlot::test_legend_contents",
"tests/test_categorical.py::TestPointPlot::test_legend_set_props",
"tests/test_categorical.py::TestPointPlot::test_legend_synced_props",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs20]",
"tests/test_categorical.py::TestPointPlot::test_legend_disabled",
"tests/test_categorical.py::TestPointPlot::test_join_deprecation",
"tests/test_categorical.py::TestPointPlot::test_scale_deprecation",
"tests/test_categorical.py::TestPointPlot::test_layered_plot_clipping",
"tests/test_categorical.py::TestCountPlot::test_empty",
"tests/test_categorical.py::TestCountPlot::test_labels_long",
"tests/test_categorical.py::TestCountPlot::test_wide_data",
"tests/test_categorical.py::TestCountPlot::test_flat_series",
"tests/test_categorical.py::TestCountPlot::test_x_series",
"tests/test_categorical.py::TestCountPlot::test_y_series",
"tests/test_categorical.py::TestCountPlot::test_hue_redundant",
"tests/test_categorical.py::TestCountPlot::test_hue_dodged",
"tests/test_categorical.py::TestCountPlot::test_stat[percent]",
"tests/test_categorical.py::TestCountPlot::test_stat[probability]",
"tests/test_categorical.py::TestCountPlot::test_stat[proportion]",
"tests/test_categorical.py::TestCountPlot::test_legend_numeric_auto",
"tests/test_categorical.py::TestCountPlot::test_legend_disabled",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestCatPlot::test_facet_organization",
"tests/test_categorical.py::TestCatPlot::test_plot_elements",
"tests/test_categorical.py::TestCatPlot::test_bad_plot_kind_error",
"tests/test_categorical.py::TestCatPlot::test_plot_colors",
"tests/test_categorical.py::TestCatPlot::test_ax_kwarg_removal",
"tests/test_categorical.py::TestCatPlot::test_share_xy",
"tests/test_categorical.py::TestCatPlot::test_facetgrid_data",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[col]",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[row]",
"tests/test_categorical.py::TestCatPlot::test_invalid_kind",
"tests/test_categorical.py::TestCatPlot::test_legend_with_auto",
"tests/test_categorical.py::TestCatPlot::test_weights_warning"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-10
|
1.0
|
{
"code": "diff --git b/seaborn/_base.py a/seaborn/_base.py\nindex 2a11863c..0b435231 100644\n--- b/seaborn/_base.py\n+++ a/seaborn/_base.py\n@@ -1661,6 +1661,38 @@ def unique_dashes(n):\n dashes.\n \n \"\"\"\n+ # Start with dash specs that are well distinguishable\n+ dashes = [\n+ \"\",\n+ (4, 1.5),\n+ (1, 1),\n+ (3, 1.25, 1.5, 1.25),\n+ (5, 1, 1, 1),\n+ ]\n+\n+ # Now programmatically build as many as we need\n+ p = 3\n+ while len(dashes) < n:\n+\n+ # Take combinations of long and short dashes\n+ a = itertools.combinations_with_replacement([3, 1.25], p)\n+ b = itertools.combinations_with_replacement([4, 1], p)\n+\n+ # Interleave the combinations, reversing one of the streams\n+ segment_list = itertools.chain(*zip(\n+ list(a)[1:-1][::-1],\n+ list(b)[1:-1]\n+ ))\n+\n+ # Now insert the gaps\n+ for segments in segment_list:\n+ gap = min(segments)\n+ spec = tuple(itertools.chain(*((seg, gap) for seg in segments)))\n+ dashes.append(spec)\n+\n+ p += 1\n+\n+ return dashes[:n]\n \n \n def unique_markers(n):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_base.py b/seaborn/_base.py\nindex 0b435231..2a11863c 100644\n--- a/seaborn/_base.py\n+++ b/seaborn/_base.py\n@@ -1661,38 +1661,6 @@ def unique_dashes(n):\n dashes.\n \n \"\"\"\n- # Start with dash specs that are well distinguishable\n- dashes = [\n- \"\",\n- (4, 1.5),\n- (1, 1),\n- (3, 1.25, 1.5, 1.25),\n- (5, 1, 1, 1),\n- ]\n-\n- # Now programmatically build as many as we need\n- p = 3\n- while len(dashes) < n:\n-\n- # Take combinations of long and short dashes\n- a = itertools.combinations_with_replacement([3, 1.25], p)\n- b = itertools.combinations_with_replacement([4, 1], p)\n-\n- # Interleave the combinations, reversing one of the streams\n- segment_list = itertools.chain(*zip(\n- list(a)[1:-1][::-1],\n- list(b)[1:-1]\n- ))\n-\n- # Now insert the gaps\n- for segments in segment_list:\n- gap = min(segments)\n- spec = tuple(itertools.chain(*((seg, gap) for seg in segments)))\n- dashes.append(spec)\n-\n- p += 1\n-\n- return dashes[:n]\n \n \n def unique_markers(n):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_base.py.\nHere is the description for the function:\ndef unique_dashes(n):\n \"\"\"Build an arbitrarily long list of unique dash styles for lines.\n\n Parameters\n ----------\n n : int\n Number of unique dash specs to generate.\n\n Returns\n -------\n dashes : list of strings or tuples\n Valid arguments for the ``dashes`` parameter on\n :class:`matplotlib.lines.Line2D`. The first spec is a solid\n line (``\"\"``), the remainder are sequences of long and short\n dashes.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_base.py::TestStyleMapping::test_plotter_default_init",
"tests/test_base.py::TestStyleMapping::test_plotter_customization",
"tests/test_base.py::TestStyleMapping::test_map_style",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_complex",
"tests/test_base.py::TestVectorPlotter::test_iter_data_quantitites",
"tests/test_base.py::TestVectorPlotter::test_iter_data_keys",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_wide",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_hues",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_styles",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_legend",
"tests/test_relational.py::TestRelationalPlotter::test_lineplot_2d_dashes",
"tests/test_base.py::TestVectorPlotter::test_var_order",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_style",
"tests/test_base.py::TestCoreFunc::test_unique_dashes",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue_and_style",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_style_same",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_style_diff",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_full[style]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_brief[style]",
"tests/test_relational.py::TestLinePlotter::test_plot",
"tests/test_relational.py::TestLinePlotter::test_lineplot_axes",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_style",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_hue_and_style",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics6]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics9]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics10]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics11]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_smoke",
"tests/test_relational.py::TestScatterPlotter::test_legend_hue_style_same",
"tests/test_relational.py::TestScatterPlotter::test_legend_hue_style_different",
"tests/test_relational.py::TestScatterPlotter::test_legend_attributes_style",
"tests/test_relational.py::TestScatterPlotter::test_legend_attributes_hue_and_style",
"tests/test_relational.py::TestScatterPlotter::test_plot",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_axes",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics6]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics9]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics10]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics11]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_smoke",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_markers"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-11
|
1.0
|
{
"code": "diff --git b/seaborn/_base.py a/seaborn/_base.py\nindex 4b716d34..0b435231 100644\n--- b/seaborn/_base.py\n+++ a/seaborn/_base.py\n@@ -1710,6 +1710,35 @@ def unique_markers(n):\n All markers will be filled.\n \n \"\"\"\n+ # Start with marker specs that are well distinguishable\n+ markers = [\n+ \"o\",\n+ \"X\",\n+ (4, 0, 45),\n+ \"P\",\n+ (4, 0, 0),\n+ (4, 1, 0),\n+ \"^\",\n+ (4, 1, 45),\n+ \"v\",\n+ ]\n+\n+ # Now generate more from regular polygons of increasing order\n+ s = 5\n+ while len(markers) < n:\n+ a = 360 / (s + 1) / 2\n+ markers.extend([\n+ (s + 1, 1, a),\n+ (s + 1, 0, a),\n+ (s, 1, 0),\n+ (s, 0, 0),\n+ ])\n+ s += 1\n+\n+ # Convert to MarkerStyle object, using only exactly what we need\n+ # markers = [mpl.markers.MarkerStyle(m) for m in markers[:n]]\n+\n+ return markers[:n]\n \n \n def categorical_order(vector, order=None):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_base.py b/seaborn/_base.py\nindex 0b435231..4b716d34 100644\n--- a/seaborn/_base.py\n+++ b/seaborn/_base.py\n@@ -1710,35 +1710,6 @@ def unique_markers(n):\n All markers will be filled.\n \n \"\"\"\n- # Start with marker specs that are well distinguishable\n- markers = [\n- \"o\",\n- \"X\",\n- (4, 0, 45),\n- \"P\",\n- (4, 0, 0),\n- (4, 1, 0),\n- \"^\",\n- (4, 1, 45),\n- \"v\",\n- ]\n-\n- # Now generate more from regular polygons of increasing order\n- s = 5\n- while len(markers) < n:\n- a = 360 / (s + 1) / 2\n- markers.extend([\n- (s + 1, 1, a),\n- (s + 1, 0, a),\n- (s, 1, 0),\n- (s, 0, 0),\n- ])\n- s += 1\n-\n- # Convert to MarkerStyle object, using only exactly what we need\n- # markers = [mpl.markers.MarkerStyle(m) for m in markers[:n]]\n-\n- return markers[:n]\n \n \n def categorical_order(vector, order=None):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_base.py.\nHere is the description for the function:\ndef unique_markers(n):\n \"\"\"Build an arbitrarily long list of unique marker styles for points.\n\n Parameters\n ----------\n n : int\n Number of unique marker specs to generate.\n\n Returns\n -------\n markers : list of string or tuples\n Values for defining :class:`matplotlib.markers.MarkerStyle` objects.\n All markers will be filled.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_base.py::TestStyleMapping::test_plotter_default_init",
"tests/test_base.py::TestStyleMapping::test_plotter_customization",
"tests/test_base.py::TestStyleMapping::test_map_style",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_complex",
"tests/test_base.py::TestVectorPlotter::test_iter_data_quantitites",
"tests/test_base.py::TestVectorPlotter::test_iter_data_keys",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_wide",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_hues",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_styles",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_legend",
"tests/test_relational.py::TestRelationalPlotter::test_lineplot_2d_dashes",
"tests/test_base.py::TestVectorPlotter::test_var_order",
"tests/test_base.py::TestCoreFunc::test_unique_markers",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_style",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue_and_style",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_style_same",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_style_diff",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_full[style]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_brief[style]",
"tests/test_relational.py::TestLinePlotter::test_plot",
"tests/test_relational.py::TestLinePlotter::test_lineplot_axes",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_style",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_hue_and_style",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics6]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics9]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics10]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics11]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_smoke",
"tests/test_relational.py::TestScatterPlotter::test_legend_hue_style_same",
"tests/test_relational.py::TestScatterPlotter::test_legend_hue_style_different",
"tests/test_relational.py::TestScatterPlotter::test_legend_attributes_style",
"tests/test_relational.py::TestScatterPlotter::test_legend_attributes_hue_and_style",
"tests/test_relational.py::TestScatterPlotter::test_plot",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_axes",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics6]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics9]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics10]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics11]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_smoke",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_markers"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-12
|
1.0
|
{
"code": "diff --git b/seaborn/_base.py a/seaborn/_base.py\nindex ae7332c2..0b435231 100644\n--- b/seaborn/_base.py\n+++ a/seaborn/_base.py\n@@ -1492,6 +1492,73 @@ def variable_type(vector, boolean_type=\"numeric\"):\n var_type : 'numeric', 'categorical', or 'datetime'\n Name identifying the type of data in the vector.\n \"\"\"\n+ vector = pd.Series(vector)\n+\n+ # If a categorical dtype is set, infer categorical\n+ if isinstance(vector.dtype, pd.CategoricalDtype):\n+ return VariableType(\"categorical\")\n+\n+ # Special-case all-na data, which is always \"numeric\"\n+ if pd.isna(vector).all():\n+ return VariableType(\"numeric\")\n+\n+ # At this point, drop nans to simplify further type inference\n+ vector = vector.dropna()\n+\n+ # Special-case binary/boolean data, allow caller to determine\n+ # This triggers a numpy warning when vector has strings/objects\n+ # https://github.com/numpy/numpy/issues/6784\n+ # Because we reduce with .all(), we are agnostic about whether the\n+ # comparison returns a scalar or vector, so we will ignore the warning.\n+ # It triggers a separate DeprecationWarning when the vector has datetimes:\n+ # https://github.com/numpy/numpy/issues/13548\n+ # This is considered a bug by numpy and will likely go away.\n+ with warnings.catch_warnings():\n+ warnings.simplefilter(\n+ action='ignore', category=(FutureWarning, DeprecationWarning)\n+ )\n+ try:\n+ if np.isin(vector, [0, 1]).all():\n+ return VariableType(boolean_type)\n+ except TypeError:\n+ # .isin comparison is not guaranteed to be possible under NumPy\n+ # casting rules, depending on the (unknown) dtype of 'vector'\n+ pass\n+\n+ # Defer to positive pandas tests\n+ if pd.api.types.is_numeric_dtype(vector):\n+ return VariableType(\"numeric\")\n+\n+ if pd.api.types.is_datetime64_dtype(vector):\n+ return VariableType(\"datetime\")\n+\n+ # --- If we get to here, we need to check the entries\n+\n+ # Check for a collection where everything is a number\n+\n+ def all_numeric(x):\n+ for x_i in x:\n+ if not isinstance(x_i, Number):\n+ return False\n+ return True\n+\n+ if all_numeric(vector):\n+ return VariableType(\"numeric\")\n+\n+ # Check for a collection where everything is a datetime\n+\n+ def all_datetime(x):\n+ for x_i in x:\n+ if not isinstance(x_i, (datetime, np.datetime64)):\n+ return False\n+ return True\n+\n+ if all_datetime(vector):\n+ return VariableType(\"datetime\")\n+\n+ # Otherwise, our final fallback is to consider things categorical\n+\n+ return VariableType(\"categorical\")\n \n \n def infer_orient(x=None, y=None, orient=None, require_numeric=True):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_base.py b/seaborn/_base.py\nindex 0b435231..ae7332c2 100644\n--- a/seaborn/_base.py\n+++ b/seaborn/_base.py\n@@ -1492,73 +1492,6 @@ def variable_type(vector, boolean_type=\"numeric\"):\n var_type : 'numeric', 'categorical', or 'datetime'\n Name identifying the type of data in the vector.\n \"\"\"\n- vector = pd.Series(vector)\n-\n- # If a categorical dtype is set, infer categorical\n- if isinstance(vector.dtype, pd.CategoricalDtype):\n- return VariableType(\"categorical\")\n-\n- # Special-case all-na data, which is always \"numeric\"\n- if pd.isna(vector).all():\n- return VariableType(\"numeric\")\n-\n- # At this point, drop nans to simplify further type inference\n- vector = vector.dropna()\n-\n- # Special-case binary/boolean data, allow caller to determine\n- # This triggers a numpy warning when vector has strings/objects\n- # https://github.com/numpy/numpy/issues/6784\n- # Because we reduce with .all(), we are agnostic about whether the\n- # comparison returns a scalar or vector, so we will ignore the warning.\n- # It triggers a separate DeprecationWarning when the vector has datetimes:\n- # https://github.com/numpy/numpy/issues/13548\n- # This is considered a bug by numpy and will likely go away.\n- with warnings.catch_warnings():\n- warnings.simplefilter(\n- action='ignore', category=(FutureWarning, DeprecationWarning)\n- )\n- try:\n- if np.isin(vector, [0, 1]).all():\n- return VariableType(boolean_type)\n- except TypeError:\n- # .isin comparison is not guaranteed to be possible under NumPy\n- # casting rules, depending on the (unknown) dtype of 'vector'\n- pass\n-\n- # Defer to positive pandas tests\n- if pd.api.types.is_numeric_dtype(vector):\n- return VariableType(\"numeric\")\n-\n- if pd.api.types.is_datetime64_dtype(vector):\n- return VariableType(\"datetime\")\n-\n- # --- If we get to here, we need to check the entries\n-\n- # Check for a collection where everything is a number\n-\n- def all_numeric(x):\n- for x_i in x:\n- if not isinstance(x_i, Number):\n- return False\n- return True\n-\n- if all_numeric(vector):\n- return VariableType(\"numeric\")\n-\n- # Check for a collection where everything is a datetime\n-\n- def all_datetime(x):\n- for x_i in x:\n- if not isinstance(x_i, (datetime, np.datetime64)):\n- return False\n- return True\n-\n- if all_datetime(vector):\n- return VariableType(\"datetime\")\n-\n- # Otherwise, our final fallback is to consider things categorical\n-\n- return VariableType(\"categorical\")\n \n \n def infer_orient(x=None, y=None, orient=None, require_numeric=True):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_base.py.\nHere is the description for the function:\ndef variable_type(vector, boolean_type=\"numeric\"):\n \"\"\"\n Determine whether a vector contains numeric, categorical, or datetime data.\n\n This function differs from the pandas typing API in two ways:\n\n - Python sequences or object-typed PyData objects are considered numeric if\n all of their entries are numeric.\n - String or mixed-type data are considered categorical even if not\n explicitly represented as a :class:`pandas.api.types.CategoricalDtype`.\n\n Parameters\n ----------\n vector : :func:`pandas.Series`, :func:`numpy.ndarray`, or Python sequence\n Input data to test.\n boolean_type : 'numeric' or 'categorical'\n Type to use for vectors containing only 0s and 1s (and NAs).\n\n Returns\n -------\n var_type : 'numeric', 'categorical', or 'datetime'\n Name identifying the type of data in the vector.\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_distributions.py::TestDistPlot::test_hist_bins",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs0]",
"tests/test_base.py::TestHueMapping::test_plotter_default_init",
"tests/test_relational.py::TestRelationalPlotter::test_wide_df_variables",
"tests/test_axisgrid.py::TestFacetGrid::test_self_axes",
"tests/test_base.py::TestHueMapping::test_plotter_customization",
"tests/test_relational.py::TestRelationalPlotter::test_wide_df_with_nonnumeric_variables",
"tests/test_distributions.py::TestDistPlot::test_elements",
"tests/test_base.py::TestHueMapping::test_hue_map_null",
"tests/test_base.py::TestHueMapping::test_hue_map_categorical",
"tests/test_relational.py::TestRelationalPlotter::test_wide_array_variables",
"tests/test_relational.py::TestRelationalPlotter::test_flat_array_variables",
"tests/test_axisgrid.py::TestFacetGrid::test_axes_array_size",
"tests/test_utils.py::test_move_legend_grid_object",
"tests/test_base.py::TestHueMapping::test_hue_map_numeric",
"tests/test_base.py::TestHueMapping::test_hue_map_without_hue_dataa",
"tests/test_distributions.py::TestDistPlot::test_distplot_with_nans",
"tests/test_distributions.py::TestRugPlot::test_color",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs1]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs2]",
"tests/test_relational.py::TestRelationalPlotter::test_flat_list_variables",
"tests/test_relational.py::TestRelationalPlotter::test_flat_series_variables",
"tests/test_base.py::TestHueMapping::test_saturation",
"tests/test_axisgrid.py::TestFacetGrid::test_single_axes",
"tests/test_relational.py::TestRelationalPlotter::test_wide_list_of_series_variables",
"tests/test_utils.py::test_move_legend_with_labels",
"tests/test_distributions.py::TestRugPlot::test_long_data[x]",
"tests/test_base.py::TestSizeMapping::test_plotter_default_init",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs3]",
"tests/test_relational.py::TestRelationalPlotter::test_wide_list_of_arrays_variables",
"tests/test_base.py::TestSizeMapping::test_plotter_customization",
"tests/test_relational.py::TestRelationalPlotter::test_wide_list_of_list_variables",
"tests/test_base.py::TestSizeMapping::test_size_map_null",
"tests/test_distributions.py::TestRugPlot::test_long_data[y]",
"tests/test_axisgrid.py::TestFacetGrid::test_col_wrap",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs4]",
"tests/test_base.py::TestSizeMapping::test_map_size_numeric",
"tests/test_relational.py::TestRelationalPlotter::test_wide_dict_of_series_variables",
"tests/test_distributions.py::TestRugPlot::test_bivariate_data",
"tests/test_base.py::TestSizeMapping::test_map_size_categorical",
"tests/test_relational.py::TestRelationalPlotter::test_wide_dict_of_arrays_variables",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs5]",
"tests/test_axisgrid.py::TestFacetGrid::test_normal_axes",
"tests/test_base.py::TestSizeMapping::test_array_palette_deprecation",
"tests/test_relational.py::TestRelationalPlotter::test_wide_dict_of_lists_variables",
"tests/test_distributions.py::TestRugPlot::test_wide_vs_long_data",
"tests/test_base.py::TestStyleMapping::test_plotter_default_init",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_simple",
"tests/test_base.py::TestStyleMapping::test_plotter_customization",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_hue",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs6]",
"tests/test_distributions.py::TestRugPlot::test_flat_vector",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_complex",
"tests/test_base.py::TestStyleMapping::test_style_map_null",
"tests/test_axisgrid.py::TestFacetGrid::test_wrapped_axes",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[series]",
"tests/test_distributions.py::TestRugPlot::test_datetime_data",
"tests/test_base.py::TestStyleMapping::test_map_style",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs7]",
"tests/test_base.py::TestVectorPlotter::test_flat_variables[series]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[numpy]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_markers",
"tests/test_axisgrid.py::TestFacetGrid::test_axes_dict",
"tests/test_base.py::TestVectorPlotter::test_flat_variables[array]",
"tests/test_distributions.py::TestRugPlot::test_a_deprecation",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[list]",
"tests/test_base.py::TestVectorPlotter::test_flat_variables[list]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs8]",
"tests/test_base.py::TestVectorPlotter::test_long_df[long_variables0]",
"tests/test_distributions.py::TestRugPlot::test_axis_deprecation[x]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_marker_linewidths",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_wide",
"tests/test_base.py::TestVectorPlotter::test_long_df[long_variables1]",
"tests/test_axisgrid.py::TestFacetGrid::test_figure_size",
"tests/test_distributions.py::TestRugPlot::test_axis_deprecation[y]",
"tests/test_base.py::TestVectorPlotter::test_long_df[long_variables2]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs9]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_hues",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facets",
"tests/test_base.py::TestVectorPlotter::test_long_df[long_variables3]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_sizes",
"tests/test_axisgrid.py::TestFacetGrid::test_figure_size_with_legend",
"tests/test_base.py::TestVectorPlotter::test_long_df[long_variables4]",
"tests/test_distributions.py::TestRugPlot::test_vertical_deprecation",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_styles",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs10]",
"tests/test_base.py::TestVectorPlotter::test_long_df[long_variables5]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_hue_col_nolegend",
"tests/test_distributions.py::TestRugPlot::test_rug_data",
"tests/test_base.py::TestVectorPlotter::test_long_df[long_variables6]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_weighted_estimator",
"tests/test_base.py::TestVectorPlotter::test_long_df[long_variables7]",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_data",
"tests/test_distributions.py::TestRugPlot::test_rug_colors",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs11]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_scatter_kws",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_stringy_numerics",
"tests/test_base.py::TestVectorPlotter::test_long_df[long_variables8]",
"tests/test_base.py::TestVectorPlotter::test_long_df[long_variables9]",
"tests/test_distributions.py::TestRugPlot::test_expand_margins",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_legend",
"tests/test_base.py::TestVectorPlotter::test_long_df[long_variables10]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs12]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_truncate[True]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_unshared_axis_labels",
"tests/test_axisgrid.py::TestFacetGrid::test_get_boolean_legend_data",
"tests/test_base.py::TestVectorPlotter::test_long_df[long_variables11]",
"tests/test_distributions.py::TestRugPlot::test_multiple_rugs",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_index[long_variables0]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_data",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_index[long_variables1]",
"tests/test_distributions.py::TestRugPlot::test_matplotlib_kwargs",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs13]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_truncate[False]",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_tuples",
"tests/test_relational.py::TestRelationalPlotter::test_facet_variable_collision",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_index[long_variables2]",
"tests/test_distributions.py::TestRugPlot::test_axis_labels",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_index[long_variables3]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_scatter_unused_variables",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs14]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_sharey",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_index[long_variables4]",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_options",
"tests/test_relational.py::TestRelationalPlotter::test_ax_kwarg_removal",
"tests/test_distributions.py::TestRugPlot::test_log_scale",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_index[long_variables5]",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_index[long_variables6]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs15]",
"tests/test_relational.py::TestRelationalPlotter::test_legend_has_no_offset",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_kws",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_color[True]",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_index[long_variables7]",
"tests/test_axisgrid.py::TestFacetGrid::test_legendout_with_colwrap",
"tests/test_relational.py::TestRelationalPlotter::test_lineplot_2d_dashes",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_index[long_variables8]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs16]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_color[False]",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_index[long_variables9]",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_index[long_variables10]",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_tight_layout",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_style",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_index[long_variables11]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs17]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_long_vectors[x]",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_multiindex[long_variables0]",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue_and_style",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_multiindex[long_variables1]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_long_vectors[y]",
"tests/test_relational.py::TestLinePlotter::test_color",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_multiindex[long_variables2]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs18]",
"tests/test_axisgrid.py::TestFacetGrid::test_gridspec_kws",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_multiindex[long_variables3]",
"tests/test_relational.py::TestLinePlotter::test_legend_no_semantics",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_wide_vs_long_data",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_multiindex[long_variables4]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs19]",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_multiindex[long_variables5]",
"tests/test_axisgrid.py::TestFacetGrid::test_gridspec_kws_col_wrap",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_flat_vector",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_multiindex[long_variables6]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs20]",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_multiindex[long_variables7]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_singular_data",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_categorical",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_multiindex[long_variables8]",
"tests/test_axisgrid.py::TestFacetGrid::test_data_generator",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_multiindex[long_variables9]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs21]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_variable_assignment",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_multiindex[long_variables10]",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_style_same",
"tests/test_base.py::TestVectorPlotter::test_long_df_with_multiindex[long_variables11]",
"tests/test_base.py::TestVectorPlotter::test_long_dict[long_variables0]",
"tests/test_axisgrid.py::TestFacetGrid::test_map",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_vertical_deprecation",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs22]",
"tests/test_base.py::TestVectorPlotter::test_long_dict[long_variables1]",
"tests/test_base.py::TestVectorPlotter::test_long_dict[long_variables2]",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_style_diff",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_bw_deprecation",
"tests/test_base.py::TestVectorPlotter::test_long_dict[long_variables3]",
"tests/test_axisgrid.py::TestFacetGrid::test_map_dataframe",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[stripplot-kwargs23]",
"tests/test_base.py::TestVectorPlotter::test_long_dict[long_variables4]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_kernel_deprecation",
"tests/test_base.py::TestVectorPlotter::test_long_dict[long_variables5]",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_size_same",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_full[hue]",
"tests/test_base.py::TestVectorPlotter::test_long_dict[long_variables6]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs24]",
"tests/test_axisgrid.py::TestFacetGrid::test_set",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_full[size]",
"tests/test_base.py::TestVectorPlotter::test_long_dict[long_variables7]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_shade_deprecation",
"tests/test_base.py::TestVectorPlotter::test_long_dict[long_variables8]",
"tests/test_base.py::TestVectorPlotter::test_long_dict[long_variables9]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_full[style]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[layer]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs25]",
"tests/test_axisgrid.py::TestFacetGrid::test_set_titles",
"tests/test_base.py::TestVectorPlotter::test_long_dict[long_variables10]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_brief[hue]",
"tests/test_base.py::TestVectorPlotter::test_long_dict[long_variables11]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[stack]",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables0-series]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_brief[size]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs26]",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables0-numpy]",
"tests/test_axisgrid.py::TestFacetGrid::test_set_titles_margin_titles",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_brief[style]",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables0-list]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[fill]",
"tests/test_relational.py::TestLinePlotter::test_legend_value_error",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables1-series]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[swarmplot-kwargs27]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_stacking",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables1-numpy]",
"tests/test_axisgrid.py::TestFacetGrid::test_set_ticklabels",
"tests/test_relational.py::TestLinePlotter::test_legend_log_norm[hue]",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables1-list]",
"tests/test_relational.py::TestLinePlotter::test_legend_log_norm[size]",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables2-series]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs28]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_filling",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_var[hue]",
"tests/test_axisgrid.py::TestFacetGrid::test_set_axis_labels",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables2-numpy]",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables2-list]",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_var[size]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs29]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_default[stack]",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables3-series]",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_numberic_brief[hue]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_default[fill]",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables3-numpy]",
"tests/test_axisgrid.py::TestFacetGrid::test_axis_lims",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs30]",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables3-list]",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_numberic_brief[size]",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables4-series]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[layer]",
"tests/test_relational.py::TestLinePlotter::test_plot",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables4-numpy]",
"tests/test_axisgrid.py::TestFacetGrid::test_data_orders",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs31]",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables4-list]",
"tests/test_relational.py::TestLinePlotter::test_weights",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[stack]",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables5-series]",
"tests/test_relational.py::TestLinePlotter::test_non_aggregated_data",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables5-numpy]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_empty[catplot]",
"tests/test_axisgrid.py::TestFacetGrid::test_palette",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[fill]",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables5-list]",
"tests/test_relational.py::TestLinePlotter::test_orient",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables6-series]",
"tests/test_relational.py::TestLinePlotter::test_log_scale",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_color_cycle_interaction",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables6-numpy]",
"tests/test_axisgrid.py::TestFacetGrid::test_hue_kws",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables6-list]",
"tests/test_relational.py::TestLinePlotter::test_axis_labels",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables7-series]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_artist_color[True]",
"tests/test_relational.py::TestLinePlotter::test_matplotlib_kwargs",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_redundant_hue_backcompat",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables7-numpy]",
"tests/test_axisgrid.py::TestFacetGrid::test_dropna",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_artist_color[False]",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables7-list]",
"tests/test_relational.py::TestLinePlotter::test_nonmapped_dashes",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables8-series]",
"tests/test_categorical.py::TestStripPlot::test_labels_long[x]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_axes",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables8-numpy]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_datetime_scale",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables8-list]",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_hue",
"tests/test_categorical.py::TestStripPlot::test_labels_long[y]",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables9-series]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_multiple_argument_check",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_style",
"tests/test_axisgrid.py::TestFacetGrid::test_categorical_warning",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables9-numpy]",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables9-list]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_cut",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_hue_and_style",
"tests/test_categorical.py::TestStripPlot::test_labels_wide",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables10-series]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics0]",
"tests/test_axisgrid.py::TestFacetGrid::test_refline",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables10-numpy]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_clip",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables10-list]",
"tests/test_categorical.py::TestStripPlot::test_labels_hue_order",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics1]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_line_is_density",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables11-series]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics2]",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables11-numpy]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics3]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_cumulative_requires_scipy",
"tests/test_base.py::TestVectorPlotter::test_long_vectors[long_variables11-list]",
"tests/test_categorical.py::TestStripPlot::test_two_calls",
"tests/test_axisgrid.py::TestFacetGrid::test_tick_params",
"tests/test_base.py::TestVectorPlotter::test_units",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics4]",
"tests/test_base.py::TestVectorPlotter::test_long_numeric_name[3]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_common_norm",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics5]",
"tests/test_base.py::TestVectorPlotter::test_long_numeric_name[4.5]",
"tests/test_categorical.py::TestStripPlot::test_redundant_hue_legend",
"tests/test_axisgrid.py::TestFacetGrid::test_data_interchange",
"tests/test_base.py::TestVectorPlotter::test_long_hierarchical_index",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_common_grid",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics6]",
"tests/test_base.py::TestVectorPlotter::test_long_scalar_and_data",
"tests/test_categorical.py::TestStripPlot::test_color",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics7]",
"tests/test_base.py::TestVectorPlotter::test_wide_categorical_columns",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_bw_method",
"tests/test_axisgrid.py::TestPairGrid::test_self_data",
"tests/test_base.py::TestVectorPlotter::test_iter_data_quantitites",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics8]",
"tests/test_axisgrid.py::TestPairGrid::test_ignore_datelike_data",
"tests/test_base.py::TestVectorPlotter::test_iter_data_keys",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_bw_adjust",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics9]",
"tests/test_categorical.py::TestStripPlot::test_supplied_color_array",
"tests/test_axisgrid.py::TestPairGrid::test_self_figure",
"tests/test_base.py::TestVectorPlotter::test_iter_data_values",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics10]",
"tests/test_base.py::TestVectorPlotter::test_iter_data_reverse",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_implicit",
"tests/test_axisgrid.py::TestPairGrid::test_self_axes",
"tests/test_categorical.py::TestStripPlot::test_unfilled_marker",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics11]",
"tests/test_axisgrid.py::TestPairGrid::test_default_axes",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_explicit",
"tests/test_relational.py::TestLinePlotter::test_lineplot_smoke",
"tests/test_base.py::TestVectorPlotter::test_iter_data_dropna",
"tests/test_axisgrid.py::TestPairGrid::test_specific_square_axes[vars0]",
"tests/test_categorical.py::TestStripPlot::test_wide[h-dataframe]",
"tests/test_base.py::TestVectorPlotter::test_axis_labels",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_with_hue",
"tests/test_axisgrid.py::TestPairGrid::test_specific_square_axes[vars1]",
"tests/test_base.py::TestVectorPlotter::test_attach_basics[variables0]",
"tests/test_relational.py::TestLinePlotter::test_ci_deprecation",
"tests/test_axisgrid.py::TestPairGrid::test_remove_hue_from_default",
"tests/test_categorical.py::TestStripPlot::test_wide[h-dict]",
"tests/test_base.py::TestVectorPlotter::test_attach_basics[variables1]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_normalization",
"tests/test_relational.py::TestScatterPlotter::test_color",
"tests/test_axisgrid.py::TestPairGrid::test_specific_nonsquare_axes[x_vars0-y_vars0]",
"tests/test_base.py::TestVectorPlotter::test_attach_basics[variables2]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_weights",
"tests/test_axisgrid.py::TestPairGrid::test_specific_nonsquare_axes[x_vars1-z]",
"tests/test_base.py::TestVectorPlotter::test_attach_basics[variables3]",
"tests/test_relational.py::TestScatterPlotter::test_legend_no_semantics",
"tests/test_categorical.py::TestStripPlot::test_wide[v-dataframe]",
"tests/test_axisgrid.py::TestPairGrid::test_specific_nonsquare_axes[x_vars2-y_vars2]",
"tests/test_base.py::TestVectorPlotter::test_attach_basics[variables4]",
"tests/test_relational.py::TestScatterPlotter::test_legend_hue",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_weight_norm",
"tests/test_base.py::TestVectorPlotter::test_attach_disallowed",
"tests/test_axisgrid.py::TestPairGrid::test_corner",
"tests/test_categorical.py::TestStripPlot::test_wide[v-dict]",
"tests/test_relational.py::TestScatterPlotter::test_legend_hue_style_same",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_sticky_edges",
"tests/test_base.py::TestVectorPlotter::test_attach_log_scale",
"tests/test_axisgrid.py::TestPairGrid::test_size",
"tests/test_relational.py::TestScatterPlotter::test_legend_hue_style_different",
"tests/test_base.py::TestVectorPlotter::test_attach_converters",
"tests/test_axisgrid.py::TestPairGrid::test_empty_grid",
"tests/test_categorical.py::TestStripPlot::test_wide[y-dataframe]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_line_kws",
"tests/test_base.py::TestVectorPlotter::test_attach_facets",
"tests/test_relational.py::TestScatterPlotter::test_legend_data_hue_size_same",
"tests/test_axisgrid.py::TestPairGrid::test_map",
"tests/test_relational.py::TestScatterPlotter::test_legend_size_numeric_list",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_input_checking",
"tests/test_axisgrid.py::TestPairGrid::test_map_nonsquare",
"tests/test_categorical.py::TestStripPlot::test_wide[y-dict]",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_identity",
"tests/test_relational.py::TestScatterPlotter::test_legend_size_numeric_dict",
"tests/test_axisgrid.py::TestPairGrid::test_map_lower",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_axis_labels",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_identity_facets",
"tests/test_relational.py::TestScatterPlotter::test_legend_numeric_hue_full",
"tests/test_axisgrid.py::TestPairGrid::test_map_upper",
"tests/test_categorical.py::TestStripPlot::test_wide[x-dataframe]",
"tests/test_relational.py::TestScatterPlotter::test_legend_numeric_hue_brief",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_legend",
"tests/test_axisgrid.py::TestPairGrid::test_map_mixed_funcsig",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_log",
"tests/test_relational.py::TestScatterPlotter::test_legend_numeric_size_full",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_facets",
"tests/test_categorical.py::TestStripPlot::test_wide[x-dict]",
"tests/test_distributions.py::TestKDEPlotBivariate::test_long_vectors",
"tests/test_relational.py::TestScatterPlotter::test_legend_numeric_size_brief",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_rectangular",
"tests/test_distributions.py::TestKDEPlotBivariate::test_singular_data",
"tests/test_relational.py::TestScatterPlotter::test_legend_attributes_hue",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_color",
"tests/test_categorical.py::TestStripPlot::test_flat[h]",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_mixed_facets",
"tests/test_relational.py::TestScatterPlotter::test_legend_attributes_style",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_palette",
"tests/test_distributions.py::TestKDEPlotBivariate::test_fill_artists",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_and_offdiag",
"tests/test_categorical.py::TestStripPlot::test_flat[v]",
"tests/test_relational.py::TestScatterPlotter::test_legend_attributes_hue_and_style",
"tests/test_base.py::TestVectorPlotter::test_attach_shared_axes",
"tests/test_distributions.py::TestKDEPlotBivariate::test_common_norm",
"tests/test_axisgrid.py::TestPairGrid::test_diag_sharey",
"tests/test_relational.py::TestScatterPlotter::test_legend_value_error",
"tests/test_base.py::TestVectorPlotter::test_get_axes_single",
"tests/test_categorical.py::TestStripPlot::test_positions[variables0-None]",
"tests/test_relational.py::TestScatterPlotter::test_plot",
"tests/test_base.py::TestVectorPlotter::test_get_axes_facets",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_matplotlib",
"tests/test_distributions.py::TestKDEPlotBivariate::test_log_scale",
"tests/test_axisgrid.py::TestPairGrid::test_palette",
"tests/test_relational.py::TestScatterPlotter::test_axis_labels",
"tests/test_categorical.py::TestStripPlot::test_positions[variables1-None]",
"tests/test_distributions.py::TestKDEPlotBivariate::test_bandwidth",
"tests/test_axisgrid.py::TestPairGrid::test_hue_kws",
"tests/test_base.py::TestVectorPlotter::test_comp_data",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_axes",
"tests/test_axisgrid.py::TestPairGrid::test_hue_order",
"tests/test_base.py::TestVectorPlotter::test_comp_data_log",
"tests/test_distributions.py::TestKDEPlotBivariate::test_weights",
"tests/test_categorical.py::TestStripPlot::test_positions[variables2-None]",
"tests/test_base.py::TestVectorPlotter::test_comp_data_category_order",
"tests/test_relational.py::TestScatterPlotter::test_literal_attribute_vectors",
"tests/test_axisgrid.py::TestPairGrid::test_hue_order_missing_level",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture0]",
"tests/test_relational.py::TestScatterPlotter::test_supplied_color_array",
"tests/test_axisgrid.py::TestPairGrid::test_hue_in_map",
"tests/test_distributions.py::TestKDEPlotBivariate::test_hue_ignores_cmap",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture1]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables3-None]",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture2]",
"tests/test_axisgrid.py::TestPairGrid::test_nondefault_index",
"tests/test_relational.py::TestScatterPlotter::test_hue_order",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture3]",
"tests/test_distributions.py::TestKDEPlotBivariate::test_contour_line_colors",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture4]",
"tests/test_axisgrid.py::TestPairGrid::test_dropna[scatterplot]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables4-None]",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture5]",
"tests/test_axisgrid.py::TestPairGrid::test_dropna[scatter]",
"tests/test_distributions.py::TestKDEPlotBivariate::test_contour_line_cmap",
"tests/test_relational.py::TestScatterPlotter::test_linewidths",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture6]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables5-None]",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture7]",
"tests/test_relational.py::TestScatterPlotter::test_size_norm_extrapolation",
"tests/test_axisgrid.py::TestPairGrid::test_histplot_legend",
"tests/test_distributions.py::TestKDEPlotBivariate::test_contour_fill_colors",
"tests/test_base.py::TestVectorPlotter::test_comp_data_missing[comp_data_missing_fixture8]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot",
"tests/test_relational.py::TestScatterPlotter::test_datetime_scale",
"tests/test_base.py::TestVectorPlotter::test_comp_data_duplicate_index",
"tests/test_distributions.py::TestKDEPlotBivariate::test_colorbar",
"tests/test_categorical.py::TestStripPlot::test_positions[variables6-None]",
"tests/test_base.py::TestVectorPlotter::test_comp_data_nullable_dtype",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg",
"tests/test_relational.py::TestScatterPlotter::test_unfilled_marker_edgecolor_warning",
"tests/test_base.py::TestVectorPlotter::test_var_order",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg_hue",
"tests/test_distributions.py::TestKDEPlotBivariate::test_levels_and_thresh",
"tests/test_relational.py::TestScatterPlotter::test_short_form_kwargs",
"tests/test_base.py::TestVectorPlotter::test_scale_native",
"tests/test_categorical.py::TestStripPlot::test_positions[variables7-h]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_diag_kde",
"tests/test_base.py::TestVectorPlotter::test_scale_numeric",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics0]",
"tests/test_distributions.py::TestKDEPlotBivariate::test_input_checking",
"tests/test_base.py::TestVectorPlotter::test_scale_datetime",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_kde",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics1]",
"tests/test_base.py::TestVectorPlotter::test_scale_categorical",
"tests/test_categorical.py::TestStripPlot::test_positions[variables8-None]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_color[bars-True]",
"tests/test_base.py::TestCoreFunc::test_variable_type",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics2]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_hist",
"tests/test_base.py::TestCoreFunc::test_infer_orient",
"tests/test_base.py::TestCoreFunc::test_categorical_order",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics3]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables9-h]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_markers",
"tests/test_distributions.py::TestHistPlotUnivariate::test_color[bars-False]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics4]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_column_multiindex",
"tests/test_categorical.py::TestStripPlot::test_positions[variables10-None]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics5]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_color[step-True]",
"tests/test_axisgrid.py::TestPairGrid::test_corner_despine",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics6]",
"tests/test_axisgrid.py::TestPairGrid::test_corner_set",
"tests/test_categorical.py::TestStripPlot::test_positions[variables11-None]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_color[step-False]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics7]",
"tests/test_axisgrid.py::TestPairGrid::test_legend",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics8]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables12-None]",
"tests/test_axisgrid.py::TestPairGrid::test_tick_params",
"tests/test_distributions.py::TestHistPlotUnivariate::test_color[poly-True]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics9]",
"tests/test_axisgrid.py::TestPairGrid::test_data_interchange",
"tests/test_distributions.py::TestHistPlotUnivariate::test_color[poly-False]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables13-None]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics10]",
"tests/test_axisgrid.py::TestJointGrid::test_margin_grid_from_lists",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics11]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_long_vectors[x]",
"tests/test_axisgrid.py::TestJointGrid::test_margin_grid_from_arrays",
"tests/test_categorical.py::TestStripPlot::test_positions[variables14-None]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_smoke",
"tests/test_axisgrid.py::TestJointGrid::test_margin_grid_from_series",
"tests/test_distributions.py::TestHistPlotUnivariate::test_long_vectors[y]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables15-None]",
"tests/test_axisgrid.py::TestJointGrid::test_margin_grid_from_dataframe",
"tests/test_distributions.py::TestHistPlotUnivariate::test_wide_vs_long_data",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables0]",
"tests/test_axisgrid.py::TestJointGrid::test_margin_grid_axis_labels",
"tests/test_distributions.py::TestHistPlotUnivariate::test_flat_vector",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables1]",
"tests/test_axisgrid.py::TestJointGrid::test_dropna",
"tests/test_distributions.py::TestHistPlotUnivariate::test_variable_assignment",
"tests/test_axisgrid.py::TestJointGrid::test_axlims",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables2]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[layer-bars]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[layer-step]",
"tests/test_categorical.py::TestStripPlot::test_positions_unfixed[a]",
"tests/test_axisgrid.py::TestJointGrid::test_bivariate_plot",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[layer-poly]",
"tests/test_categorical.py::TestStripPlot::test_positions_unfixed[s]",
"tests/test_axisgrid.py::TestJointGrid::test_univariate_plot",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[dodge-bars]",
"tests/test_categorical.py::TestStripPlot::test_positions_unfixed[d]",
"tests/test_axisgrid.py::TestJointGrid::test_univariate_plot_distplot",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[dodge-step]",
"tests/test_categorical.py::TestStripPlot::test_order[str-None]",
"tests/test_axisgrid.py::TestJointGrid::test_univariate_plot_matplotlib",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[dodge-poly]",
"tests/test_axisgrid.py::TestJointGrid::test_plot",
"tests/test_categorical.py::TestStripPlot::test_order[str-order1]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[stack-bars]",
"tests/test_axisgrid.py::TestJointGrid::test_space",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[stack-step]",
"tests/test_categorical.py::TestStripPlot::test_order[str-order2]",
"tests/test_axisgrid.py::TestJointGrid::test_hue[True]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[stack-poly]",
"tests/test_categorical.py::TestStripPlot::test_order[str-order3]",
"tests/test_axisgrid.py::TestJointGrid::test_hue[False]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[fill-bars]",
"tests/test_categorical.py::TestStripPlot::test_order[int-None]",
"tests/test_axisgrid.py::TestJointGrid::test_refline",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[fill-step]",
"tests/test_categorical.py::TestStripPlot::test_order[int-order5]",
"tests/test_axisgrid.py::TestJointPlot::test_scatter",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[fill-poly]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_stack",
"tests/test_axisgrid.py::TestJointPlot::test_scatter_hue",
"tests/test_categorical.py::TestStripPlot::test_order[int-order6]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill",
"tests/test_axisgrid.py::TestJointPlot::test_reg",
"tests/test_categorical.py::TestStripPlot::test_order[int-order7]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_dodge",
"tests/test_axisgrid.py::TestJointPlot::test_resid",
"tests/test_categorical.py::TestStripPlot::test_order[int-order8]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_as_numpy_dodged",
"tests/test_axisgrid.py::TestJointPlot::test_hist",
"tests/test_categorical.py::TestStripPlot::test_hue_categorical[a]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_multiple_input_check",
"tests/test_axisgrid.py::TestJointPlot::test_hex",
"tests/test_distributions.py::TestHistPlotUnivariate::test_element_input_check",
"tests/test_categorical.py::TestStripPlot::test_hue_categorical[b]",
"tests/test_axisgrid.py::TestJointPlot::test_kde",
"tests/test_distributions.py::TestHistPlotUnivariate::test_count_stat",
"tests/test_axisgrid.py::TestJointPlot::test_kde_hue",
"tests/test_categorical.py::TestStripPlot::test_hue_dodged[a]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_density_stat",
"tests/test_distributions.py::TestHistPlotUnivariate::test_density_stat_common_norm",
"tests/test_axisgrid.py::TestJointPlot::test_color",
"tests/test_categorical.py::TestStripPlot::test_hue_dodged[b]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_density_stat_unique_norm",
"tests/test_axisgrid.py::TestJointPlot::test_palette",
"tests/test_categorical.py::TestStripPlot::test_single[x-b-None]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat[probability]",
"tests/test_axisgrid.py::TestJointPlot::test_hex_customise",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat[proportion]",
"tests/test_categorical.py::TestStripPlot::test_single[x-b-a]",
"tests/test_axisgrid.py::TestJointPlot::test_leaky_dict",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_common_norm[probability]",
"tests/test_categorical.py::TestStripPlot::test_single[x-y-None]",
"tests/test_axisgrid.py::TestJointPlot::test_distplot_kwarg_warning",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_common_norm[proportion]",
"tests/test_categorical.py::TestStripPlot::test_single[x-y-a]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_unique_norm[probability]",
"tests/test_axisgrid.py::TestJointPlot::test_ax_warning",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_unique_norm[proportion]",
"tests/test_categorical.py::TestStripPlot::test_single[x-t-None]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_percent_stat",
"tests/test_categorical.py::TestStripPlot::test_single[x-t-a]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_common_bins",
"tests/test_categorical.py::TestStripPlot::test_single[y-b-None]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_unique_bins",
"tests/test_distributions.py::TestHistPlotUnivariate::test_range_with_inf",
"tests/test_categorical.py::TestStripPlot::test_single[y-b-a]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_weights_with_missing",
"tests/test_categorical.py::TestStripPlot::test_single[y-y-None]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_weight_norm",
"tests/test_categorical.py::TestStripPlot::test_single[y-y-a]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_discrete",
"tests/test_distributions.py::TestHistPlotUnivariate::test_discrete_categorical_default",
"tests/test_categorical.py::TestStripPlot::test_single[y-t-None]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_categorical_yaxis_inversion",
"tests/test_categorical.py::TestStripPlot::test_single[y-t-a]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_datetime_scale",
"tests/test_categorical.py::TestStripPlot::test_attributes",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde[count]",
"tests/test_categorical.py::TestStripPlot::test_three_points",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde[density]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde[probability]",
"tests/test_categorical.py::TestStripPlot::test_legend_categorical",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[count-layer]",
"tests/test_categorical.py::TestStripPlot::test_legend_numeric",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[count-dodge]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[density-layer]",
"tests/test_categorical.py::TestStripPlot::test_legend_attributes",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[density-dodge]",
"tests/test_categorical.py::TestStripPlot::test_legend_disabled",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[probability-layer]",
"tests/test_categorical.py::TestStripPlot::test_palette_from_color_deprecation",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[probability-dodge]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_default_cut",
"tests/test_categorical.py::TestStripPlot::test_palette_with_hue_deprecation",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_hue",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_yaxis",
"tests/test_categorical.py::TestStripPlot::test_log_scale",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_line_kws",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs0]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_singular_data",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs1]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_element_default",
"tests/test_distributions.py::TestHistPlotUnivariate::test_bars_no_fill",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs2]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_step_fill",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs3]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_poly_fill",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs4]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_poly_no_fill",
"tests/test_distributions.py::TestHistPlotUnivariate::test_step_no_fill",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs5]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_step_fill_xy",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs6]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_step_no_fill_xy",
"tests/test_distributions.py::TestHistPlotUnivariate::test_weighted_histogram",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs7]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_weights_with_auto_bins",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs8]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_shrink",
"tests/test_categorical.py::TestStripPlot::test_jitter_unfixed",
"tests/test_distributions.py::TestHistPlotUnivariate::test_log_scale_explicit",
"tests/test_distributions.py::TestHistPlotUnivariate::test_log_scale_implicit",
"tests/test_categorical.py::TestStripPlot::test_jitter[v-True]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_log_scale_dodge",
"tests/test_categorical.py::TestStripPlot::test_jitter[v-0.1]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_log_scale_kde",
"tests/test_distributions.py::TestHistPlotUnivariate::test_auto_linewidth[True]",
"tests/test_categorical.py::TestStripPlot::test_jitter[h-True]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_auto_linewidth[False]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_bar_kwargs",
"tests/test_categorical.py::TestStripPlot::test_jitter[h-0.1]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_step_fill_kwargs",
"tests/test_categorical.py::TestSwarmPlot::test_labels_long[x]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_step_line_kwargs",
"tests/test_distributions.py::TestHistPlotUnivariate::test_label",
"tests/test_categorical.py::TestSwarmPlot::test_labels_long[y]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_default_color_scout_cleanup",
"tests/test_categorical.py::TestSwarmPlot::test_labels_wide",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_with_hue",
"tests/test_categorical.py::TestSwarmPlot::test_labels_hue_order",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_with_hue_unique_bins",
"tests/test_categorical.py::TestSwarmPlot::test_two_calls",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_with_col_unique_bins",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_log_scale",
"tests/test_categorical.py::TestSwarmPlot::test_redundant_hue_legend",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_thresh",
"tests/test_categorical.py::TestSwarmPlot::test_color",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_sticky_edges",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_common_norm",
"tests/test_categorical.py::TestSwarmPlot::test_supplied_color_array",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_unique_norm",
"tests/test_categorical.py::TestSwarmPlot::test_unfilled_marker",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_normalization[probability]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[h-dataframe]",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_normalization[proportion]",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_normalization[percent]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[h-dict]",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_colors",
"tests/test_categorical.py::TestSwarmPlot::test_wide[v-dataframe]",
"tests/test_distributions.py::TestHistPlotBivariate::test_color_limits",
"tests/test_categorical.py::TestSwarmPlot::test_wide[v-dict]",
"tests/test_distributions.py::TestHistPlotBivariate::test_hue_color_limits",
"tests/test_categorical.py::TestSwarmPlot::test_wide[y-dataframe]",
"tests/test_distributions.py::TestHistPlotBivariate::test_colorbar",
"tests/test_categorical.py::TestSwarmPlot::test_wide[y-dict]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_color",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_long_vectors[x]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[x-dataframe]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_long_vectors[y]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[x-dict]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_hue",
"tests/test_categorical.py::TestSwarmPlot::test_flat[h]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_line_kwargs",
"tests/test_categorical.py::TestSwarmPlot::test_flat[v]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_drawstyle[x]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_drawstyle[y]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables0-None]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_proportion_limits[x-y]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables1-None]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_proportion_limits[y-x]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables2-None]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_proportion_limits_complementary[x-y]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_proportion_limits_complementary[y-x]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables3-None]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_proportion_count[x-y]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables4-None]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_proportion_count[y-x]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_weights",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables5-None]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_bivariate_error",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables6-None]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_log_scale",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables7-h]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs0]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables8-None]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs2]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables9-h]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs3]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables10-None]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs4]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables11-None]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs6]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables12-None]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs7]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables13-None]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs8]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables14-None]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs9]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables15-None]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs10]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs11]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables0]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs12]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs13]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs14]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs15]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_unfixed[a]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs0]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_unfixed[s]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs1]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_unfixed[d]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs3]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-None]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs4]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-order1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs5]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-order2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs6]",
"tests/test_categorical.py::TestSwarmPlot::test_order[str-order3]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs7]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-None]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs9]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs10]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs11]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs0]",
"tests/test_categorical.py::TestSwarmPlot::test_order[int-order8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs2]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_categorical[a]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs3]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_categorical[b]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs5]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_dodged[a]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs6]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_dodged[b]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs8]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-b-None]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs9]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-b-a]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs0]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-y-None]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs1]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-y-a]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_facets[col]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-t-None]",
"tests/test_distributions.py::TestDisPlot::test_facets[row]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-t-a]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[dodge]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-b-None]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[stack]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-b-a]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[fill]",
"tests/test_distributions.py::TestDisPlot::test_ax_warning",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-y-None]",
"tests/test_distributions.py::TestDisPlot::test_array_faceting[col]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-y-a]",
"tests/test_distributions.py::TestDisPlot::test_array_faceting[row]",
"tests/test_distributions.py::TestDisPlot::test_legend",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-t-None]",
"tests/test_distributions.py::TestDisPlot::test_bivariate_ecdf_error",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-t-a]",
"tests/test_distributions.py::TestDisPlot::test_bivariate_kde_norm",
"tests/test_categorical.py::TestSwarmPlot::test_attributes",
"tests/test_distributions.py::TestDisPlot::test_bivariate_hist_norm",
"tests/test_distributions.py::TestDisPlot::test_facetgrid_data",
"tests/test_categorical.py::TestSwarmPlot::test_three_points",
"tests/test_categorical.py::TestSwarmPlot::test_legend_categorical",
"tests/test_categorical.py::TestSwarmPlot::test_legend_numeric",
"tests/test_categorical.py::TestSwarmPlot::test_legend_attributes",
"tests/test_categorical.py::TestSwarmPlot::test_legend_disabled",
"tests/test_categorical.py::TestSwarmPlot::test_palette_from_color_deprecation",
"tests/test_categorical.py::TestSwarmPlot::test_palette_with_hue_deprecation",
"tests/test_categorical.py::TestSwarmPlot::test_log_scale",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestBoxPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestBoxPlot::test_legend_attributes",
"tests/test_categorical.py::TestBoxPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBoxPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBoxPlot::test_labels_wide",
"tests/test_categorical.py::TestBoxPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBoxPlot::test_two_calls",
"tests/test_categorical.py::TestBoxPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBoxPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBoxPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBoxPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestBoxPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestBoxPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestBoxPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestBoxPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestBoxPlot::test_wide_data[h]",
"tests/test_categorical.py::TestBoxPlot::test_wide_data[v]",
"tests/test_categorical.py::TestBoxPlot::test_grouped[x]",
"tests/test_categorical.py::TestBoxPlot::test_grouped[y]",
"tests/test_categorical.py::TestBoxPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestBoxPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestBoxPlot::test_hue_not_dodged",
"tests/test_categorical.py::TestBoxPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestBoxPlot::test_dodge_native_scale_log",
"tests/test_categorical.py::TestBoxPlot::test_dodge_without_hue",
"tests/test_categorical.py::TestBoxPlot::test_log_data_scale[x]",
"tests/test_categorical.py::TestBoxPlot::test_log_data_scale[y]",
"tests/test_categorical.py::TestBoxPlot::test_color",
"tests/test_categorical.py::TestBoxPlot::test_wide_data_multicolored",
"tests/test_categorical.py::TestBoxPlot::test_wide_data_single_color",
"tests/test_categorical.py::TestBoxPlot::test_hue_colors",
"tests/test_categorical.py::TestBoxPlot::test_linecolor",
"tests/test_categorical.py::TestBoxPlot::test_linecolor_gray_warning",
"tests/test_categorical.py::TestBoxPlot::test_saturation",
"tests/test_categorical.py::TestBoxPlot::test_linewidth",
"tests/test_categorical.py::TestBoxPlot::test_fill",
"tests/test_categorical.py::TestBoxPlot::test_notch[notch]",
"tests/test_categorical.py::TestBoxPlot::test_notch[shownotches]",
"tests/test_categorical.py::TestBoxPlot::test_whis",
"tests/test_categorical.py::TestBoxPlot::test_gap",
"tests/test_categorical.py::TestBoxPlot::test_prop_dicts",
"tests/test_categorical.py::TestBoxPlot::test_showfliers",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_attributes",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_wide",
"tests/test_categorical.py::TestBoxenPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBoxenPlot::test_two_calls",
"tests/test_categorical.py::TestBoxenPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBoxenPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBoxenPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBoxenPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestBoxenPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[h]",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[v]",
"tests/test_categorical.py::TestBoxenPlot::test_grouped[x]",
"tests/test_categorical.py::TestBoxenPlot::test_grouped[y]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestBoxenPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestBoxenPlot::test_color",
"tests/test_categorical.py::TestBoxenPlot::test_hue_colors",
"tests/test_categorical.py::TestBoxenPlot::test_linecolor",
"tests/test_categorical.py::TestBoxenPlot::test_linewidth",
"tests/test_categorical.py::TestBoxenPlot::test_saturation",
"tests/test_categorical.py::TestBoxenPlot::test_gap",
"tests/test_categorical.py::TestBoxenPlot::test_fill",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_int",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_full",
"tests/test_categorical.py::TestBoxenPlot::test_trust_alpha",
"tests/test_categorical.py::TestBoxenPlot::test_outlier_prop",
"tests/test_categorical.py::TestBoxenPlot::test_exponential_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_linear_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_area_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_box_kws",
"tests/test_categorical.py::TestBoxenPlot::test_line_kws",
"tests/test_categorical.py::TestBoxenPlot::test_flier_kws",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_checks",
"tests/test_categorical.py::TestBoxenPlot::test_width_method_check",
"tests/test_categorical.py::TestBoxenPlot::test_scale_deprecation",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestViolinPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestViolinPlot::test_legend_attributes",
"tests/test_categorical.py::TestViolinPlot::test_labels_long[x]",
"tests/test_categorical.py::TestViolinPlot::test_labels_long[y]",
"tests/test_categorical.py::TestViolinPlot::test_labels_wide",
"tests/test_categorical.py::TestViolinPlot::test_labels_hue_order",
"tests/test_categorical.py::TestViolinPlot::test_two_calls",
"tests/test_categorical.py::TestViolinPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestViolinPlot::test_log_scale[x]",
"tests/test_categorical.py::TestViolinPlot::test_log_scale[y]",
"tests/test_categorical.py::TestViolinPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestViolinPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestViolinPlot::test_wide_data[h]",
"tests/test_categorical.py::TestViolinPlot::test_wide_data[v]",
"tests/test_categorical.py::TestViolinPlot::test_grouped[x]",
"tests/test_categorical.py::TestViolinPlot::test_grouped[y]",
"tests/test_categorical.py::TestViolinPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestViolinPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestViolinPlot::test_hue_not_dodged",
"tests/test_categorical.py::TestViolinPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestViolinPlot::test_dodge_native_scale_log",
"tests/test_categorical.py::TestViolinPlot::test_color",
"tests/test_categorical.py::TestViolinPlot::test_hue_colors",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[box]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[quart]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[stick]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[point]",
"tests/test_categorical.py::TestViolinPlot::test_linewidth",
"tests/test_categorical.py::TestViolinPlot::test_saturation",
"tests/test_categorical.py::TestViolinPlot::test_fill[box]",
"tests/test_categorical.py::TestViolinPlot::test_fill[quart]",
"tests/test_categorical.py::TestViolinPlot::test_fill[stick]",
"tests/test_categorical.py::TestViolinPlot::test_fill[point]",
"tests/test_categorical.py::TestViolinPlot::test_inner_box[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_box[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_quartiles[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_quartiles[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_stick[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_stick[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_points[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_points[y]",
"tests/test_categorical.py::TestViolinPlot::test_split_single",
"tests/test_categorical.py::TestViolinPlot::test_split_multi",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_area",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_count",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_width",
"tests/test_categorical.py::TestViolinPlot::test_common_norm",
"tests/test_categorical.py::TestViolinPlot::test_scale_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_scale_hue_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_bw_adjust",
"tests/test_categorical.py::TestViolinPlot::test_bw_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_gap",
"tests/test_categorical.py::TestViolinPlot::test_inner_kws",
"tests/test_categorical.py::TestViolinPlot::test_box_inner_kws",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestBarPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBarPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBarPlot::test_labels_wide",
"tests/test_categorical.py::TestBarPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBarPlot::test_color",
"tests/test_categorical.py::TestBarPlot::test_two_calls",
"tests/test_categorical.py::TestBarPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBarPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBarPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBarPlot::test_labels_flat",
"tests/test_categorical.py::TestBarPlot::test_single_var[x]",
"tests/test_categorical.py::TestBarPlot::test_single_var[y]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[x]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[y]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[h]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[v]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[x]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[y]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[h]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[v]",
"tests/test_categorical.py::TestBarPlot::test_xy_vertical",
"tests/test_categorical.py::TestBarPlot::test_xy_horizontal",
"tests/test_categorical.py::TestBarPlot::test_xy_with_na_grouper",
"tests/test_categorical.py::TestBarPlot::test_xy_with_na_value",
"tests/test_categorical.py::TestBarPlot::test_hue_redundant",
"tests/test_categorical.py::TestBarPlot::test_hue_matched",
"tests/test_categorical.py::TestBarPlot::test_hue_matched_by_name",
"tests/test_categorical.py::TestBarPlot::test_hue_dodged",
"tests/test_categorical.py::TestBarPlot::test_gap",
"tests/test_categorical.py::TestBarPlot::test_hue_undodged",
"tests/test_categorical.py::TestBarPlot::test_hue_order",
"tests/test_categorical.py::TestBarPlot::test_hue_norm",
"tests/test_categorical.py::TestBarPlot::test_fill",
"tests/test_categorical.py::TestBarPlot::test_xy_native_scale",
"tests/test_categorical.py::TestBarPlot::test_xy_native_scale_log_transform",
"tests/test_categorical.py::TestBarPlot::test_datetime_native_scale_axis",
"tests/test_categorical.py::TestBarPlot::test_native_scale_dodged",
"tests/test_categorical.py::TestBarPlot::test_native_scale_log_transform_dodged",
"tests/test_categorical.py::TestBarPlot::test_estimate_default",
"tests/test_categorical.py::TestBarPlot::test_estimate_string",
"tests/test_categorical.py::TestBarPlot::test_estimate_func",
"tests/test_categorical.py::TestBarPlot::test_weighted_estimate",
"tests/test_categorical.py::TestBarPlot::test_estimate_log_transform",
"tests/test_categorical.py::TestBarPlot::test_errorbars",
"tests/test_categorical.py::TestBarPlot::test_width",
"tests/test_categorical.py::TestBarPlot::test_width_native_scale",
"tests/test_categorical.py::TestBarPlot::test_width_spaced_categories",
"tests/test_categorical.py::TestBarPlot::test_saturation_color",
"tests/test_categorical.py::TestBarPlot::test_saturation_palette",
"tests/test_categorical.py::TestBarPlot::test_legend_numeric_auto",
"tests/test_categorical.py::TestBarPlot::test_legend_numeric_full",
"tests/test_categorical.py::TestBarPlot::test_legend_disabled",
"tests/test_categorical.py::TestBarPlot::test_error_caps",
"tests/test_categorical.py::TestBarPlot::test_error_caps_native_scale",
"tests/test_categorical.py::TestBarPlot::test_error_caps_native_scale_log_transform",
"tests/test_categorical.py::TestBarPlot::test_bar_kwargs",
"tests/test_categorical.py::TestBarPlot::test_legend_attributes",
"tests/test_categorical.py::TestBarPlot::test_legend_unfilled",
"tests/test_categorical.py::TestBarPlot::test_err_kws[True]",
"tests/test_categorical.py::TestBarPlot::test_err_kws[False]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBarPlot::test_errwidth_deprecation",
"tests/test_categorical.py::TestBarPlot::test_errcolor_deprecation",
"tests/test_categorical.py::TestBarPlot::test_capsize_as_none_deprecation",
"tests/test_categorical.py::TestBarPlot::test_hue_implied_by_palette_deprecation",
"tests/test_categorical.py::TestPointPlot::test_labels_long[x]",
"tests/test_categorical.py::TestPointPlot::test_labels_long[y]",
"tests/test_categorical.py::TestPointPlot::test_labels_wide",
"tests/test_categorical.py::TestPointPlot::test_labels_hue_order",
"tests/test_categorical.py::TestPointPlot::test_color",
"tests/test_categorical.py::TestPointPlot::test_two_calls",
"tests/test_categorical.py::TestPointPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestPointPlot::test_log_scale[x]",
"tests/test_categorical.py::TestPointPlot::test_log_scale[y]",
"tests/test_categorical.py::TestPointPlot::test_labels_flat",
"tests/test_categorical.py::TestPointPlot::test_single_var[x]",
"tests/test_categorical.py::TestPointPlot::test_single_var[y]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[x]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[y]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[h]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[v]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[x]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[y]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[h]",
"tests/test_categorical.py::TestPointPlot::test_vector_orient[v]",
"tests/test_categorical.py::TestPointPlot::test_xy_vertical",
"tests/test_categorical.py::TestPointPlot::test_xy_horizontal",
"tests/test_categorical.py::TestPointPlot::test_xy_with_na_grouper",
"tests/test_categorical.py::TestPointPlot::test_xy_with_na_value",
"tests/test_categorical.py::TestPointPlot::test_hue",
"tests/test_categorical.py::TestPointPlot::test_wide_data_is_joined",
"tests/test_categorical.py::TestPointPlot::test_xy_native_scale",
"tests/test_categorical.py::TestPointPlot::test_estimate[mean]",
"tests/test_categorical.py::TestPointPlot::test_estimate[<lambda>]",
"tests/test_categorical.py::TestPointPlot::test_weighted_estimate",
"tests/test_categorical.py::TestPointPlot::test_estimate_log_transform",
"tests/test_categorical.py::TestPointPlot::test_errorbars",
"tests/test_categorical.py::TestPointPlot::test_marker_linestyle",
"tests/test_categorical.py::TestPointPlot::test_markers_linestyles_single",
"tests/test_categorical.py::TestPointPlot::test_markers_linestyles_mapped",
"tests/test_categorical.py::TestPointPlot::test_dodge_boolean",
"tests/test_categorical.py::TestPointPlot::test_dodge_float",
"tests/test_categorical.py::TestPointPlot::test_dodge_log_scale",
"tests/test_categorical.py::TestPointPlot::test_err_kws",
"tests/test_categorical.py::TestPointPlot::test_err_kws_inherited",
"tests/test_categorical.py::TestPointPlot::test_legend_contents",
"tests/test_categorical.py::TestPointPlot::test_legend_set_props",
"tests/test_categorical.py::TestPointPlot::test_legend_synced_props",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs20]",
"tests/test_categorical.py::TestPointPlot::test_legend_disabled",
"tests/test_categorical.py::TestPointPlot::test_join_deprecation",
"tests/test_categorical.py::TestPointPlot::test_scale_deprecation",
"tests/test_categorical.py::TestPointPlot::test_layered_plot_clipping",
"tests/test_categorical.py::TestCountPlot::test_labels_long",
"tests/test_categorical.py::TestCountPlot::test_wide_data",
"tests/test_categorical.py::TestCountPlot::test_flat_series",
"tests/test_categorical.py::TestCountPlot::test_x_series",
"tests/test_categorical.py::TestCountPlot::test_y_series",
"tests/test_categorical.py::TestCountPlot::test_hue_redundant",
"tests/test_categorical.py::TestCountPlot::test_hue_dodged",
"tests/test_categorical.py::TestCountPlot::test_stat[percent]",
"tests/test_categorical.py::TestCountPlot::test_stat[probability]",
"tests/test_categorical.py::TestCountPlot::test_stat[proportion]",
"tests/test_categorical.py::TestCountPlot::test_legend_numeric_auto",
"tests/test_categorical.py::TestCountPlot::test_legend_disabled",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestCatPlot::test_facet_organization",
"tests/test_categorical.py::TestCatPlot::test_plot_elements",
"tests/test_categorical.py::TestCatPlot::test_bad_plot_kind_error",
"tests/test_categorical.py::TestCatPlot::test_plot_colors",
"tests/test_categorical.py::TestCatPlot::test_ax_kwarg_removal",
"tests/test_categorical.py::TestCatPlot::test_share_xy",
"tests/test_categorical.py::TestCatPlot::test_facetgrid_data",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[col]",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[row]",
"tests/test_categorical.py::TestCatPlot::test_invalid_kind",
"tests/test_categorical.py::TestCatPlot::test_legend_with_auto",
"tests/test_categorical.py::TestCatPlot::test_weights_warning"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-13
|
1.0
|
{
"code": "diff --git b/seaborn/_statistics.py a/seaborn/_statistics.py\nindex 4376a7fc..40346b02 100644\n--- b/seaborn/_statistics.py\n+++ a/seaborn/_statistics.py\n@@ -602,6 +602,19 @@ class LetterValues:\n https://vita.had.co.nz/papers/letter-value-plot.pdf\n \n \"\"\"\n+ k_options = [\"tukey\", \"proportion\", \"trustworthy\", \"full\"]\n+ if isinstance(k_depth, str):\n+ _check_argument(\"k_depth\", k_options, k_depth)\n+ elif not isinstance(k_depth, int):\n+ err = (\n+ \"The `k_depth` parameter must be either an integer or string \"\n+ f\"(one of {k_options}), not {k_depth!r}.\"\n+ )\n+ raise TypeError(err)\n+\n+ self.k_depth = k_depth\n+ self.outlier_prop = outlier_prop\n+ self.trust_alpha = trust_alpha\n \n def _compute_k(self, n):\n \n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_statistics.py b/seaborn/_statistics.py\nindex 40346b02..4376a7fc 100644\n--- a/seaborn/_statistics.py\n+++ b/seaborn/_statistics.py\n@@ -602,19 +602,6 @@ class LetterValues:\n https://vita.had.co.nz/papers/letter-value-plot.pdf\n \n \"\"\"\n- k_options = [\"tukey\", \"proportion\", \"trustworthy\", \"full\"]\n- if isinstance(k_depth, str):\n- _check_argument(\"k_depth\", k_options, k_depth)\n- elif not isinstance(k_depth, int):\n- err = (\n- \"The `k_depth` parameter must be either an integer or string \"\n- f\"(one of {k_options}), not {k_depth!r}.\"\n- )\n- raise TypeError(err)\n-\n- self.k_depth = k_depth\n- self.outlier_prop = outlier_prop\n- self.trust_alpha = trust_alpha\n \n def _compute_k(self, n):\n \n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_statistics.py.\nHere is the description for the function:\n def __init__(self, k_depth, outlier_prop, trust_alpha):\n \"\"\"\n Compute percentiles of a distribution using various tail stopping rules.\n\n Parameters\n ----------\n k_depth: \"tukey\", \"proportion\", \"trustworthy\", or \"full\"\n Stopping rule for choosing tail percentiled to show:\n\n - tukey: Show a similar number of outliers as in a conventional boxplot.\n - proportion: Show approximately `outlier_prop` outliers.\n - trust_alpha: Use `trust_alpha` level for most extreme tail percentile.\n\n outlier_prop: float\n Parameter for `k_depth=\"proportion\"` setting the expected outlier rate.\n trust_alpha: float\n Parameter for `k_depth=\"trustworthy\"` setting the confidence threshold.\n\n Notes\n -----\n Based on the proposal in this paper:\n https://vita.had.co.nz/papers/letter-value-plot.pdf\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs12]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs13]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs14]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs15]",
"tests/test_statistics.py::TestLetterValues::test_levels",
"tests/test_statistics.py::TestLetterValues::test_values",
"tests/test_statistics.py::TestLetterValues::test_fliers",
"tests/test_statistics.py::TestLetterValues::test_median",
"tests/test_statistics.py::TestLetterValues::test_k_depth_int",
"tests/test_statistics.py::TestLetterValues::test_trust_alpha",
"tests/test_statistics.py::TestLetterValues::test_outlier_prop",
"tests/test_categorical.py::TestBoxenPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_attributes",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_wide",
"tests/test_categorical.py::TestBoxenPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBoxenPlot::test_two_calls",
"tests/test_categorical.py::TestBoxenPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBoxenPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBoxenPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBoxenPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestBoxenPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[h]",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[v]",
"tests/test_categorical.py::TestBoxenPlot::test_grouped[x]",
"tests/test_categorical.py::TestBoxenPlot::test_grouped[y]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestBoxenPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestBoxenPlot::test_color",
"tests/test_categorical.py::TestBoxenPlot::test_hue_colors",
"tests/test_categorical.py::TestBoxenPlot::test_linecolor",
"tests/test_categorical.py::TestBoxenPlot::test_linewidth",
"tests/test_categorical.py::TestBoxenPlot::test_saturation",
"tests/test_categorical.py::TestBoxenPlot::test_gap",
"tests/test_categorical.py::TestBoxenPlot::test_fill",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_int",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_full",
"tests/test_categorical.py::TestBoxenPlot::test_trust_alpha",
"tests/test_categorical.py::TestBoxenPlot::test_outlier_prop",
"tests/test_categorical.py::TestBoxenPlot::test_exponential_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_linear_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_area_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_box_kws",
"tests/test_categorical.py::TestBoxenPlot::test_line_kws",
"tests/test_categorical.py::TestBoxenPlot::test_flier_kws",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_checks",
"tests/test_categorical.py::TestBoxenPlot::test_width_method_check",
"tests/test_categorical.py::TestBoxenPlot::test_scale_deprecation",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs18]"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-14
|
1.0
|
{
"code": "diff --git b/seaborn/_statistics.py a/seaborn/_statistics.py\nindex e5e9c7bf..40346b02 100644\n--- b/seaborn/_statistics.py\n+++ a/seaborn/_statistics.py\n@@ -538,6 +538,22 @@ class WeightedAggregator:\n Additional keywords are passed to bootstrap when error_method is \"ci\".\n \n \"\"\"\n+ if estimator != \"mean\":\n+ # Note that, while other weighted estimators may make sense (e.g. median),\n+ # I'm not aware of an implementation in our dependencies. We can add one\n+ # in seaborn later, if there is sufficient interest. For now, limit to mean.\n+ raise ValueError(f\"Weighted estimator must be 'mean', not {estimator!r}.\")\n+ self.estimator = estimator\n+\n+ method, level = _validate_errorbar_arg(errorbar)\n+ if method is not None and method != \"ci\":\n+ # As with the estimator, weighted 'sd' or 'pi' error bars may make sense.\n+ # But we'll keep things simple for now and limit to (bootstrap) CI.\n+ raise ValueError(f\"Error bar method must be 'ci', not {method!r}.\")\n+ self.error_method = method\n+ self.error_level = level\n+\n+ self.boot_kws = boot_kws\n \n def __call__(self, data, var):\n \"\"\"Aggregate over `var` column of `data` with estimate and error interval.\"\"\"\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_statistics.py b/seaborn/_statistics.py\nindex 40346b02..e5e9c7bf 100644\n--- a/seaborn/_statistics.py\n+++ b/seaborn/_statistics.py\n@@ -538,22 +538,6 @@ class WeightedAggregator:\n Additional keywords are passed to bootstrap when error_method is \"ci\".\n \n \"\"\"\n- if estimator != \"mean\":\n- # Note that, while other weighted estimators may make sense (e.g. median),\n- # I'm not aware of an implementation in our dependencies. We can add one\n- # in seaborn later, if there is sufficient interest. For now, limit to mean.\n- raise ValueError(f\"Weighted estimator must be 'mean', not {estimator!r}.\")\n- self.estimator = estimator\n-\n- method, level = _validate_errorbar_arg(errorbar)\n- if method is not None and method != \"ci\":\n- # As with the estimator, weighted 'sd' or 'pi' error bars may make sense.\n- # But we'll keep things simple for now and limit to (bootstrap) CI.\n- raise ValueError(f\"Error bar method must be 'ci', not {method!r}.\")\n- self.error_method = method\n- self.error_level = level\n-\n- self.boot_kws = boot_kws\n \n def __call__(self, data, var):\n \"\"\"Aggregate over `var` column of `data` with estimate and error interval.\"\"\"\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_statistics.py.\nHere is the description for the function:\n def __init__(self, estimator, errorbar=None, **boot_kws):\n \"\"\"\n Data aggregator that produces a weighted estimate and error bar interval.\n\n Parameters\n ----------\n estimator : string\n Function (or method name) that maps a vector to a scalar. Currently\n supports only \"mean\".\n errorbar : string or (string, number) tuple\n Name of errorbar method or a tuple with a method name and a level parameter.\n Currently the only supported method is \"ci\".\n boot_kws\n Additional keywords are passed to bootstrap when error_method is \"ci\".\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_stats/test_aggregation.py::TestEst::test_weighted_mean",
"tests/test_statistics.py::TestWeightedAggregator::test_weighted_mean",
"tests/test_statistics.py::TestWeightedAggregator::test_weighted_ci",
"tests/test_statistics.py::TestWeightedAggregator::test_limited_estimator",
"tests/test_statistics.py::TestWeightedAggregator::test_limited_ci",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_weighted_estimator",
"tests/test_relational.py::TestLinePlotter::test_weights",
"tests/test_categorical.py::TestBarPlot::test_weighted_estimate",
"tests/test_categorical.py::TestPointPlot::test_weighted_estimate"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-15
|
1.0
|
{
"code": "diff --git b/seaborn/algorithms.py a/seaborn/algorithms.py\nindex 2ff5473a..2e34b9dd 100644\n--- b/seaborn/algorithms.py\n+++ a/seaborn/algorithms.py\n@@ -32,6 +32,73 @@ def bootstrap(*args, **kwargs):\n array of bootstrapped statistic values\n \n \"\"\"\n+ # Ensure list of arrays are same length\n+ if len(np.unique(list(map(len, args)))) > 1:\n+ raise ValueError(\"All input arrays must have the same length\")\n+ n = len(args[0])\n+\n+ # Default keyword arguments\n+ n_boot = kwargs.get(\"n_boot\", 10000)\n+ func = kwargs.get(\"func\", \"mean\")\n+ axis = kwargs.get(\"axis\", None)\n+ units = kwargs.get(\"units\", None)\n+ random_seed = kwargs.get(\"random_seed\", None)\n+ if random_seed is not None:\n+ msg = \"`random_seed` has been renamed to `seed` and will be removed\"\n+ warnings.warn(msg)\n+ seed = kwargs.get(\"seed\", random_seed)\n+ if axis is None:\n+ func_kwargs = dict()\n+ else:\n+ func_kwargs = dict(axis=axis)\n+\n+ # Initialize the resampler\n+ if isinstance(seed, np.random.RandomState):\n+ rng = seed\n+ else:\n+ rng = np.random.default_rng(seed)\n+\n+ # Coerce to arrays\n+ args = list(map(np.asarray, args))\n+ if units is not None:\n+ units = np.asarray(units)\n+\n+ if isinstance(func, str):\n+\n+ # Allow named numpy functions\n+ f = getattr(np, func)\n+\n+ # Try to use nan-aware version of function if necessary\n+ missing_data = np.isnan(np.sum(np.column_stack(args)))\n+\n+ if missing_data and not func.startswith(\"nan\"):\n+ nanf = getattr(np, f\"nan{func}\", None)\n+ if nanf is None:\n+ msg = f\"Data contain nans but no nan-aware version of `{func}` found\"\n+ warnings.warn(msg, UserWarning)\n+ else:\n+ f = nanf\n+\n+ else:\n+ f = func\n+\n+ # Handle numpy changes\n+ try:\n+ integers = rng.integers\n+ except AttributeError:\n+ integers = rng.randint\n+\n+ # Do the bootstrap\n+ if units is not None:\n+ return _structured_bootstrap(args, n_boot, units, f,\n+ func_kwargs, integers)\n+\n+ boot_dist = []\n+ for i in range(int(n_boot)):\n+ resampler = integers(0, n, n, dtype=np.intp) # intp is indexing dtype\n+ sample = [a.take(resampler, axis=0) for a in args]\n+ boot_dist.append(f(*sample, **func_kwargs))\n+ return np.array(boot_dist)\n \n \n def _structured_bootstrap(args, n_boot, units, func, func_kwargs, integers):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/algorithms.py b/seaborn/algorithms.py\nindex 2e34b9dd..2ff5473a 100644\n--- a/seaborn/algorithms.py\n+++ b/seaborn/algorithms.py\n@@ -32,73 +32,6 @@ def bootstrap(*args, **kwargs):\n array of bootstrapped statistic values\n \n \"\"\"\n- # Ensure list of arrays are same length\n- if len(np.unique(list(map(len, args)))) > 1:\n- raise ValueError(\"All input arrays must have the same length\")\n- n = len(args[0])\n-\n- # Default keyword arguments\n- n_boot = kwargs.get(\"n_boot\", 10000)\n- func = kwargs.get(\"func\", \"mean\")\n- axis = kwargs.get(\"axis\", None)\n- units = kwargs.get(\"units\", None)\n- random_seed = kwargs.get(\"random_seed\", None)\n- if random_seed is not None:\n- msg = \"`random_seed` has been renamed to `seed` and will be removed\"\n- warnings.warn(msg)\n- seed = kwargs.get(\"seed\", random_seed)\n- if axis is None:\n- func_kwargs = dict()\n- else:\n- func_kwargs = dict(axis=axis)\n-\n- # Initialize the resampler\n- if isinstance(seed, np.random.RandomState):\n- rng = seed\n- else:\n- rng = np.random.default_rng(seed)\n-\n- # Coerce to arrays\n- args = list(map(np.asarray, args))\n- if units is not None:\n- units = np.asarray(units)\n-\n- if isinstance(func, str):\n-\n- # Allow named numpy functions\n- f = getattr(np, func)\n-\n- # Try to use nan-aware version of function if necessary\n- missing_data = np.isnan(np.sum(np.column_stack(args)))\n-\n- if missing_data and not func.startswith(\"nan\"):\n- nanf = getattr(np, f\"nan{func}\", None)\n- if nanf is None:\n- msg = f\"Data contain nans but no nan-aware version of `{func}` found\"\n- warnings.warn(msg, UserWarning)\n- else:\n- f = nanf\n-\n- else:\n- f = func\n-\n- # Handle numpy changes\n- try:\n- integers = rng.integers\n- except AttributeError:\n- integers = rng.randint\n-\n- # Do the bootstrap\n- if units is not None:\n- return _structured_bootstrap(args, n_boot, units, f,\n- func_kwargs, integers)\n-\n- boot_dist = []\n- for i in range(int(n_boot)):\n- resampler = integers(0, n, n, dtype=np.intp) # intp is indexing dtype\n- sample = [a.take(resampler, axis=0) for a in args]\n- boot_dist.append(f(*sample, **func_kwargs))\n- return np.array(boot_dist)\n \n \n def _structured_bootstrap(args, n_boot, units, func, func_kwargs, integers):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/algorithms.py.\nHere is the description for the function:\ndef bootstrap(*args, **kwargs):\n \"\"\"Resample one or more arrays with replacement and store aggregate values.\n\n Positional arguments are a sequence of arrays to bootstrap along the first\n axis and pass to a summary function.\n\n Keyword arguments:\n n_boot : int, default=10000\n Number of iterations\n axis : int, default=None\n Will pass axis to ``func`` as a keyword argument.\n units : array, default=None\n Array of sampling unit IDs. When used the bootstrap resamples units\n and then observations within units instead of individual\n datapoints.\n func : string or callable, default=\"mean\"\n Function to call on the args that are passed in. If string, uses as\n name of function in the numpy namespace. If nans are present in the\n data, will try to use nan-aware version of named function.\n seed : Generator | SeedSequence | RandomState | int | None\n Seed for the random number generator; useful if you want\n reproducible resamples.\n\n Returns\n -------\n boot_dist: array\n array of bootstrapped statistic values\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_algorithms.py::test_bootstrap",
"tests/test_algorithms.py::test_bootstrap_length",
"tests/test_algorithms.py::test_bootstrap_range",
"tests/test_algorithms.py::test_bootstrap_multiarg",
"tests/test_algorithms.py::test_bootstrap_axis",
"tests/test_algorithms.py::test_bootstrap_seed",
"tests/test_algorithms.py::test_bootstrap_ols",
"tests/_stats/test_aggregation.py::TestEst::test_weighted_mean",
"tests/test_regression.py::TestRegressionPlotter::test_regress_logx",
"tests/test_algorithms.py::test_bootstrap_units",
"tests/_stats/test_aggregation.py::TestEst::test_seed",
"tests/test_regression.py::TestRegressionPlotter::test_regress_bootstrap_seed",
"tests/test_algorithms.py::test_bootstrap_arglength",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_simple",
"tests/test_algorithms.py::test_bootstrap_string_func",
"tests/test_algorithms.py::test_bootstrap_reproducibility",
"tests/test_algorithms.py::test_nanaware_func_auto",
"tests/test_algorithms.py::test_nanaware_func_warning",
"tests/test_regression.py::TestRegressionPlotter::test_estimate_data",
"tests/test_regression.py::TestRegressionPlotter::test_estimate_cis",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs4]",
"tests/test_regression.py::TestRegressionPlotter::test_estimate_units",
"tests/test_regression.py::TestRegressionPlotter::test_regression_limits",
"tests/test_regression.py::TestRegressionPlots::test_regplot_basic",
"tests/test_regression.py::TestRegressionPlots::test_regplot_selective",
"tests/test_regression.py::TestRegressionPlots::test_regplot_scatter_kws_alpha",
"tests/test_regression.py::TestRegressionPlots::test_regplot_binned",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_basic",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs5]",
"tests/test_statistics.py::TestEstimateAggregator::test_ci_errorbars",
"tests/test_statistics.py::TestWeightedAggregator::test_weighted_ci",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_hue",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_markers",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs6]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs7]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facets",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_hue_col_nolegend",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs16]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_truncate[True]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs17]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_truncate[False]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs18]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_sharey",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[pointplot-kwargs19]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_kws",
"tests/test_regression.py::TestRegressionPlots::test_three_point_colors",
"tests/test_regression.py::TestRegressionPlots::test_regplot_xlim",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_weighted_estimator",
"tests/test_relational.py::TestLinePlotter::test_color",
"tests/test_relational.py::TestLinePlotter::test_legend_no_semantics",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_categorical",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_style_same",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_style_diff",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_size_same",
"tests/test_relational.py::TestLinePlotter::test_legend_value_error",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_numberic_brief[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_numberic_brief[size]",
"tests/test_relational.py::TestLinePlotter::test_plot",
"tests/test_relational.py::TestLinePlotter::test_weights",
"tests/test_relational.py::TestLinePlotter::test_matplotlib_kwargs",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_hue",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_style",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_hue_and_style",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics0]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics1]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics2]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics4]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics5]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics6]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics7]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics8]",
"tests/test_axisgrid.py::TestFacetGrid::test_categorical_warning",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics9]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics10]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics11]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_smoke",
"tests/test_relational.py::TestLinePlotter::test_ci_deprecation",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg_hue",
"tests/test_categorical.py::TestBarPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBarPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBarPlot::test_labels_wide",
"tests/test_categorical.py::TestBarPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBarPlot::test_color",
"tests/test_categorical.py::TestBarPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBarPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBarPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBarPlot::test_single_var[x]",
"tests/test_categorical.py::TestBarPlot::test_single_var[y]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[x]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[y]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[h]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[v]",
"tests/test_categorical.py::TestBarPlot::test_weighted_estimate",
"tests/test_categorical.py::TestBarPlot::test_estimate_log_transform",
"tests/test_categorical.py::TestBarPlot::test_legend_numeric_auto",
"tests/test_categorical.py::TestBarPlot::test_legend_numeric_full",
"tests/test_categorical.py::TestBarPlot::test_legend_disabled",
"tests/test_categorical.py::TestBarPlot::test_legend_attributes",
"tests/test_categorical.py::TestBarPlot::test_legend_unfilled",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs3]",
"tests/test_axisgrid.py::TestJointPlot::test_reg",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs9]",
"tests/test_axisgrid.py::TestJointPlot::test_leaky_dict",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestPointPlot::test_labels_long[x]",
"tests/test_categorical.py::TestPointPlot::test_labels_long[y]",
"tests/test_categorical.py::TestPointPlot::test_labels_wide",
"tests/test_categorical.py::TestPointPlot::test_labels_hue_order",
"tests/test_categorical.py::TestPointPlot::test_color",
"tests/test_categorical.py::TestPointPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestPointPlot::test_log_scale[x]",
"tests/test_categorical.py::TestPointPlot::test_log_scale[y]",
"tests/test_categorical.py::TestPointPlot::test_single_var[x]",
"tests/test_categorical.py::TestPointPlot::test_single_var[y]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[x]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[y]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[h]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[v]",
"tests/test_categorical.py::TestPointPlot::test_weighted_estimate",
"tests/test_categorical.py::TestPointPlot::test_estimate_log_transform",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs20]",
"tests/test_categorical.py::TestPointPlot::test_legend_disabled",
"tests/test_categorical.py::TestCatPlot::test_plot_elements",
"tests/test_categorical.py::TestCatPlot::test_plot_colors",
"tests/test_categorical.py::TestCatPlot::test_share_xy"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-16
|
1.0
|
{
"code": "diff --git b/seaborn/axisgrid.py a/seaborn/axisgrid.py\nindex 35ce8622..17d333bc 100644\n--- b/seaborn/axisgrid.py\n+++ a/seaborn/axisgrid.py\n@@ -653,6 +653,32 @@ class FacetGrid(Grid):\n is None.\n \n \"\"\"\n+ data = self.data\n+\n+ # Construct masks for the row variable\n+ if self.row_names:\n+ row_masks = [data[self._row_var] == n for n in self.row_names]\n+ else:\n+ row_masks = [np.repeat(True, len(self.data))]\n+\n+ # Construct masks for the column variable\n+ if self.col_names:\n+ col_masks = [data[self._col_var] == n for n in self.col_names]\n+ else:\n+ col_masks = [np.repeat(True, len(self.data))]\n+\n+ # Construct masks for the hue variable\n+ if self.hue_names:\n+ hue_masks = [data[self._hue_var] == n for n in self.hue_names]\n+ else:\n+ hue_masks = [np.repeat(True, len(self.data))]\n+\n+ # Here is the main generator loop\n+ for (i, row), (j, col), (k, hue) in product(enumerate(row_masks),\n+ enumerate(col_masks),\n+ enumerate(hue_masks)):\n+ data_ijk = data[row & col & hue & self._not_na]\n+ yield (i, j, k), data_ijk\n \n def map(self, func, *args, **kwargs):\n \"\"\"Apply a plotting function to each facet's subset of the data.\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/axisgrid.py b/seaborn/axisgrid.py\nindex 17d333bc..35ce8622 100644\n--- a/seaborn/axisgrid.py\n+++ b/seaborn/axisgrid.py\n@@ -653,32 +653,6 @@ class FacetGrid(Grid):\n is None.\n \n \"\"\"\n- data = self.data\n-\n- # Construct masks for the row variable\n- if self.row_names:\n- row_masks = [data[self._row_var] == n for n in self.row_names]\n- else:\n- row_masks = [np.repeat(True, len(self.data))]\n-\n- # Construct masks for the column variable\n- if self.col_names:\n- col_masks = [data[self._col_var] == n for n in self.col_names]\n- else:\n- col_masks = [np.repeat(True, len(self.data))]\n-\n- # Construct masks for the hue variable\n- if self.hue_names:\n- hue_masks = [data[self._hue_var] == n for n in self.hue_names]\n- else:\n- hue_masks = [np.repeat(True, len(self.data))]\n-\n- # Here is the main generator loop\n- for (i, row), (j, col), (k, hue) in product(enumerate(row_masks),\n- enumerate(col_masks),\n- enumerate(hue_masks)):\n- data_ijk = data[row & col & hue & self._not_na]\n- yield (i, j, k), data_ijk\n \n def map(self, func, *args, **kwargs):\n \"\"\"Apply a plotting function to each facet's subset of the data.\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/axisgrid.py.\nHere is the description for the function:\n def facet_data(self):\n \"\"\"Generator for name indices and data subsets for each facet.\n\n Yields\n ------\n (i, j, k), data_ijk : tuple of ints, DataFrame\n The ints provide an index into the {row, col, hue}_names attribute,\n and the dataframe contains a subset of the full data corresponding\n to each facet. The generator yields subsets that correspond with\n the self.axes.flat iterator, or self.axes[i, j] when `col_wrap`\n is None.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_relational.py::TestRelationalPlotter::test_relplot_simple",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_complex",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[series]",
"tests/test_utils.py::test_move_legend_grid_object",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[numpy]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[list]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_wide",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_hues",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_sizes",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_basic",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_hue",
"tests/test_axisgrid.py::TestFacetGrid::test_col_wrap",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_styles",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_markers",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_weighted_estimator",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_marker_linewidths",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facets",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_stringy_numerics",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_legend",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_unshared_axis_labels",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_hue_col_nolegend",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_scatter_kws",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_truncate[True]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_truncate[False]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_sharey",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_data",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_kws",
"tests/test_relational.py::TestRelationalPlotter::test_facet_variable_collision",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_scatter_unused_variables",
"tests/test_relational.py::TestRelationalPlotter::test_ax_kwarg_removal",
"tests/test_relational.py::TestRelationalPlotter::test_legend_has_no_offset",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_style",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue_and_style",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_data",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_data_missing_level",
"tests/test_axisgrid.py::TestFacetGrid::test_get_boolean_legend_data",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_tuples",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_options",
"tests/test_axisgrid.py::TestFacetGrid::test_legendout_with_colwrap",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_tight_layout",
"tests/test_axisgrid.py::TestFacetGrid::test_data_generator",
"tests/test_axisgrid.py::TestFacetGrid::test_map",
"tests/test_axisgrid.py::TestFacetGrid::test_map_dataframe",
"tests/test_axisgrid.py::TestFacetGrid::test_set_titles",
"tests/test_axisgrid.py::TestFacetGrid::test_set_titles_margin_titles",
"tests/test_axisgrid.py::TestFacetGrid::test_set_ticklabels",
"tests/test_axisgrid.py::TestFacetGrid::test_set_axis_labels",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics0]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics1]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics2]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics3]",
"tests/test_axisgrid.py::TestFacetGrid::test_hue_kws",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics4]",
"tests/test_axisgrid.py::TestFacetGrid::test_categorical_warning",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics5]",
"tests/test_axisgrid.py::TestFacetGrid::test_refline",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics6]",
"tests/test_axisgrid.py::TestFacetGrid::test_data_interchange",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics7]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics8]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics9]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics10]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics11]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics0]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics1]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics2]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics3]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics4]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics5]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics6]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics7]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics8]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics9]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics10]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics11]"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-17
|
1.0
|
{
"code": "diff --git b/seaborn/axisgrid.py a/seaborn/axisgrid.py\nindex 2b6b77f7..17d333bc 100644\n--- b/seaborn/axisgrid.py\n+++ a/seaborn/axisgrid.py\n@@ -703,6 +703,64 @@ class FacetGrid(Grid):\n Returns self.\n \n \"\"\"\n+ # If color was a keyword argument, grab it here\n+ kw_color = kwargs.pop(\"color\", None)\n+\n+ # How we use the function depends on where it comes from\n+ func_module = str(getattr(func, \"__module__\", \"\"))\n+\n+ # Check for categorical plots without order information\n+ if func_module == \"seaborn.categorical\":\n+ if \"order\" not in kwargs:\n+ warning = (\"Using the {} function without specifying \"\n+ \"`order` is likely to produce an incorrect \"\n+ \"plot.\".format(func.__name__))\n+ warnings.warn(warning)\n+ if len(args) == 3 and \"hue_order\" not in kwargs:\n+ warning = (\"Using the {} function without specifying \"\n+ \"`hue_order` is likely to produce an incorrect \"\n+ \"plot.\".format(func.__name__))\n+ warnings.warn(warning)\n+\n+ # Iterate over the data subsets\n+ for (row_i, col_j, hue_k), data_ijk in self.facet_data():\n+\n+ # If this subset is null, move on\n+ if not data_ijk.values.size:\n+ continue\n+\n+ # Get the current axis\n+ modify_state = not func_module.startswith(\"seaborn\")\n+ ax = self.facet_axis(row_i, col_j, modify_state)\n+\n+ # Decide what color to plot with\n+ kwargs[\"color\"] = self._facet_color(hue_k, kw_color)\n+\n+ # Insert the other hue aesthetics if appropriate\n+ for kw, val_list in self.hue_kws.items():\n+ kwargs[kw] = val_list[hue_k]\n+\n+ # Insert a label in the keyword arguments for the legend\n+ if self._hue_var is not None:\n+ kwargs[\"label\"] = utils.to_utf8(self.hue_names[hue_k])\n+\n+ # Get the actual data we are going to plot with\n+ plot_data = data_ijk[list(args)]\n+ if self._dropna:\n+ plot_data = plot_data.dropna()\n+ plot_args = [v for k, v in plot_data.items()]\n+\n+ # Some matplotlib functions don't handle pandas objects correctly\n+ if func_module.startswith(\"matplotlib\"):\n+ plot_args = [v.values for v in plot_args]\n+\n+ # Draw the plot\n+ self._facet_plot(func, ax, plot_args, kwargs)\n+\n+ # Finalize the annotations and layout\n+ self._finalize_grid(args[:2])\n+\n+ return self\n \n def map_dataframe(self, func, *args, **kwargs):\n \"\"\"Like ``.map`` but passes args as strings and inserts data in kwargs.\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/axisgrid.py b/seaborn/axisgrid.py\nindex 17d333bc..2b6b77f7 100644\n--- a/seaborn/axisgrid.py\n+++ b/seaborn/axisgrid.py\n@@ -703,64 +703,6 @@ class FacetGrid(Grid):\n Returns self.\n \n \"\"\"\n- # If color was a keyword argument, grab it here\n- kw_color = kwargs.pop(\"color\", None)\n-\n- # How we use the function depends on where it comes from\n- func_module = str(getattr(func, \"__module__\", \"\"))\n-\n- # Check for categorical plots without order information\n- if func_module == \"seaborn.categorical\":\n- if \"order\" not in kwargs:\n- warning = (\"Using the {} function without specifying \"\n- \"`order` is likely to produce an incorrect \"\n- \"plot.\".format(func.__name__))\n- warnings.warn(warning)\n- if len(args) == 3 and \"hue_order\" not in kwargs:\n- warning = (\"Using the {} function without specifying \"\n- \"`hue_order` is likely to produce an incorrect \"\n- \"plot.\".format(func.__name__))\n- warnings.warn(warning)\n-\n- # Iterate over the data subsets\n- for (row_i, col_j, hue_k), data_ijk in self.facet_data():\n-\n- # If this subset is null, move on\n- if not data_ijk.values.size:\n- continue\n-\n- # Get the current axis\n- modify_state = not func_module.startswith(\"seaborn\")\n- ax = self.facet_axis(row_i, col_j, modify_state)\n-\n- # Decide what color to plot with\n- kwargs[\"color\"] = self._facet_color(hue_k, kw_color)\n-\n- # Insert the other hue aesthetics if appropriate\n- for kw, val_list in self.hue_kws.items():\n- kwargs[kw] = val_list[hue_k]\n-\n- # Insert a label in the keyword arguments for the legend\n- if self._hue_var is not None:\n- kwargs[\"label\"] = utils.to_utf8(self.hue_names[hue_k])\n-\n- # Get the actual data we are going to plot with\n- plot_data = data_ijk[list(args)]\n- if self._dropna:\n- plot_data = plot_data.dropna()\n- plot_args = [v for k, v in plot_data.items()]\n-\n- # Some matplotlib functions don't handle pandas objects correctly\n- if func_module.startswith(\"matplotlib\"):\n- plot_args = [v.values for v in plot_args]\n-\n- # Draw the plot\n- self._facet_plot(func, ax, plot_args, kwargs)\n-\n- # Finalize the annotations and layout\n- self._finalize_grid(args[:2])\n-\n- return self\n \n def map_dataframe(self, func, *args, **kwargs):\n \"\"\"Like ``.map`` but passes args as strings and inserts data in kwargs.\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/axisgrid.py.\nHere is the description for the function:\n def map(self, func, *args, **kwargs):\n \"\"\"Apply a plotting function to each facet's subset of the data.\n\n Parameters\n ----------\n func : callable\n A plotting function that takes data and keyword arguments. It\n must plot to the currently active matplotlib Axes and take a\n `color` keyword argument. If faceting on the `hue` dimension,\n it must also take a `label` keyword argument.\n args : strings\n Column names in self.data that identify variables with data to\n plot. The data for each variable is passed to `func` in the\n order the variables are specified in the call.\n kwargs : keyword arguments\n All keyword arguments are passed to the plotting function.\n\n Returns\n -------\n self : object\n Returns self.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_utils.py::test_move_legend_grid_object",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_data",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_data_missing_level",
"tests/test_axisgrid.py::TestFacetGrid::test_get_boolean_legend_data",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_tuples",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_options",
"tests/test_axisgrid.py::TestFacetGrid::test_legendout_with_colwrap",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_tight_layout",
"tests/test_axisgrid.py::TestFacetGrid::test_map",
"tests/test_axisgrid.py::TestFacetGrid::test_set_titles",
"tests/test_axisgrid.py::TestFacetGrid::test_set_titles_margin_titles",
"tests/test_axisgrid.py::TestFacetGrid::test_set_ticklabels",
"tests/test_axisgrid.py::TestFacetGrid::test_set_axis_labels",
"tests/test_axisgrid.py::TestFacetGrid::test_hue_kws",
"tests/test_axisgrid.py::TestFacetGrid::test_categorical_warning",
"tests/test_axisgrid.py::TestFacetGrid::test_refline",
"tests/test_axisgrid.py::TestFacetGrid::test_data_interchange"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-18
|
1.0
|
{
"code": "diff --git b/seaborn/axisgrid.py a/seaborn/axisgrid.py\nindex b1312123..17d333bc 100644\n--- b/seaborn/axisgrid.py\n+++ a/seaborn/axisgrid.py\n@@ -791,6 +791,48 @@ class FacetGrid(Grid):\n \n \"\"\"\n \n+ # If color was a keyword argument, grab it here\n+ kw_color = kwargs.pop(\"color\", None)\n+\n+ # Iterate over the data subsets\n+ for (row_i, col_j, hue_k), data_ijk in self.facet_data():\n+\n+ # If this subset is null, move on\n+ if not data_ijk.values.size:\n+ continue\n+\n+ # Get the current axis\n+ modify_state = not str(func.__module__).startswith(\"seaborn\")\n+ ax = self.facet_axis(row_i, col_j, modify_state)\n+\n+ # Decide what color to plot with\n+ kwargs[\"color\"] = self._facet_color(hue_k, kw_color)\n+\n+ # Insert the other hue aesthetics if appropriate\n+ for kw, val_list in self.hue_kws.items():\n+ kwargs[kw] = val_list[hue_k]\n+\n+ # Insert a label in the keyword arguments for the legend\n+ if self._hue_var is not None:\n+ kwargs[\"label\"] = self.hue_names[hue_k]\n+\n+ # Stick the facet dataframe into the kwargs\n+ if self._dropna:\n+ data_ijk = data_ijk.dropna()\n+ kwargs[\"data\"] = data_ijk\n+\n+ # Draw the plot\n+ self._facet_plot(func, ax, args, kwargs)\n+\n+ # For axis labels, prefer to use positional args for backcompat\n+ # but also extract the x/y kwargs and use if no corresponding arg\n+ axis_labels = [kwargs.get(\"x\", None), kwargs.get(\"y\", None)]\n+ for i, val in enumerate(args[:2]):\n+ axis_labels[i] = val\n+ self._finalize_grid(axis_labels)\n+\n+ return self\n+\n def _facet_color(self, hue_index, kw_color):\n \n color = self._colors[hue_index]\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/axisgrid.py b/seaborn/axisgrid.py\nindex 17d333bc..b1312123 100644\n--- a/seaborn/axisgrid.py\n+++ b/seaborn/axisgrid.py\n@@ -791,48 +791,6 @@ class FacetGrid(Grid):\n \n \"\"\"\n \n- # If color was a keyword argument, grab it here\n- kw_color = kwargs.pop(\"color\", None)\n-\n- # Iterate over the data subsets\n- for (row_i, col_j, hue_k), data_ijk in self.facet_data():\n-\n- # If this subset is null, move on\n- if not data_ijk.values.size:\n- continue\n-\n- # Get the current axis\n- modify_state = not str(func.__module__).startswith(\"seaborn\")\n- ax = self.facet_axis(row_i, col_j, modify_state)\n-\n- # Decide what color to plot with\n- kwargs[\"color\"] = self._facet_color(hue_k, kw_color)\n-\n- # Insert the other hue aesthetics if appropriate\n- for kw, val_list in self.hue_kws.items():\n- kwargs[kw] = val_list[hue_k]\n-\n- # Insert a label in the keyword arguments for the legend\n- if self._hue_var is not None:\n- kwargs[\"label\"] = self.hue_names[hue_k]\n-\n- # Stick the facet dataframe into the kwargs\n- if self._dropna:\n- data_ijk = data_ijk.dropna()\n- kwargs[\"data\"] = data_ijk\n-\n- # Draw the plot\n- self._facet_plot(func, ax, args, kwargs)\n-\n- # For axis labels, prefer to use positional args for backcompat\n- # but also extract the x/y kwargs and use if no corresponding arg\n- axis_labels = [kwargs.get(\"x\", None), kwargs.get(\"y\", None)]\n- for i, val in enumerate(args[:2]):\n- axis_labels[i] = val\n- self._finalize_grid(axis_labels)\n-\n- return self\n-\n def _facet_color(self, hue_index, kw_color):\n \n color = self._colors[hue_index]\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/axisgrid.py.\nHere is the description for the function:\n def map_dataframe(self, func, *args, **kwargs):\n \"\"\"Like ``.map`` but passes args as strings and inserts data in kwargs.\n\n This method is suitable for plotting with functions that accept a\n long-form DataFrame as a `data` keyword argument and access the\n data in that DataFrame using string variable names.\n\n Parameters\n ----------\n func : callable\n A plotting function that takes data and keyword arguments. Unlike\n the `map` method, a function used here must \"understand\" Pandas\n objects. It also must plot to the currently active matplotlib Axes\n and take a `color` keyword argument. If faceting on the `hue`\n dimension, it must also take a `label` keyword argument.\n args : strings\n Column names in self.data that identify variables with data to\n plot. The data for each variable is passed to `func` in the\n order the variables are specified in the call.\n kwargs : keyword arguments\n All keyword arguments are passed to the plotting function.\n\n Returns\n -------\n self : object\n Returns self.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_relational.py::TestRelationalPlotter::test_relplot_simple",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_complex",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[series]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[numpy]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[list]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_wide",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_hues",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_sizes",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_basic",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_styles",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_hue",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_weighted_estimator",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_markers",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_marker_linewidths",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_stringy_numerics",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facets",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_legend",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_unshared_axis_labels",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_hue_col_nolegend",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_scatter_kws",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_truncate[True]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_truncate[False]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_data",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_sharey",
"tests/test_relational.py::TestRelationalPlotter::test_facet_variable_collision",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_kws",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_scatter_unused_variables",
"tests/test_relational.py::TestRelationalPlotter::test_ax_kwarg_removal",
"tests/test_relational.py::TestRelationalPlotter::test_legend_has_no_offset",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_style",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue_and_style",
"tests/test_axisgrid.py::TestFacetGrid::test_map_dataframe",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics0]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics1]",
"tests/test_axisgrid.py::TestFacetGrid::test_set_ticklabels",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics2]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics3]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics4]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics5]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics6]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics7]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics8]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics9]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics10]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics11]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics0]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics1]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics2]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics3]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics4]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics5]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics6]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics7]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics8]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics9]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics10]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics11]"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-19
|
1.0
|
{
"code": "diff --git b/seaborn/axisgrid.py a/seaborn/axisgrid.py\nindex 296907d1..17d333bc 100644\n--- b/seaborn/axisgrid.py\n+++ a/seaborn/axisgrid.py\n@@ -1055,6 +1055,16 @@ class FacetGrid(Grid):\n Returns ``self`` for easy method chaining.\n \n \"\"\"\n+ line_kws['color'] = color\n+ line_kws['linestyle'] = linestyle\n+\n+ if x is not None:\n+ self.map(plt.axvline, x=x, **line_kws)\n+\n+ if y is not None:\n+ self.map(plt.axhline, y=y, **line_kws)\n+\n+ return self\n \n # ------ Properties that are part of the public API and documented by Sphinx\n \n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/axisgrid.py b/seaborn/axisgrid.py\nindex 17d333bc..296907d1 100644\n--- a/seaborn/axisgrid.py\n+++ b/seaborn/axisgrid.py\n@@ -1055,16 +1055,6 @@ class FacetGrid(Grid):\n Returns ``self`` for easy method chaining.\n \n \"\"\"\n- line_kws['color'] = color\n- line_kws['linestyle'] = linestyle\n-\n- if x is not None:\n- self.map(plt.axvline, x=x, **line_kws)\n-\n- if y is not None:\n- self.map(plt.axhline, y=y, **line_kws)\n-\n- return self\n \n # ------ Properties that are part of the public API and documented by Sphinx\n \n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/axisgrid.py.\nHere is the description for the function:\n def refline(self, *, x=None, y=None, color='.5', linestyle='--', **line_kws):\n \"\"\"Add a reference line(s) to each facet.\n\n Parameters\n ----------\n x, y : numeric\n Value(s) to draw the line(s) at.\n color : :mod:`matplotlib color <matplotlib.colors>`\n Specifies the color of the reference line(s). Pass ``color=None`` to\n use ``hue`` mapping.\n linestyle : str\n Specifies the style of the reference line(s).\n line_kws : key, value mappings\n Other keyword arguments are passed to :meth:`matplotlib.axes.Axes.axvline`\n when ``x`` is not None and :meth:`matplotlib.axes.Axes.axhline` when ``y``\n is not None.\n\n Returns\n -------\n :class:`FacetGrid` instance\n Returns ``self`` for easy method chaining.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_axisgrid.py::TestFacetGrid::test_refline"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-20
|
1.0
|
{
"code": "diff --git b/seaborn/axisgrid.py a/seaborn/axisgrid.py\nindex 1ff7828f..17d333bc 100644\n--- b/seaborn/axisgrid.py\n+++ a/seaborn/axisgrid.py\n@@ -963,6 +963,74 @@ class FacetGrid(Grid):\n Returns self.\n \n \"\"\"\n+ args = dict(row_var=self._row_var, col_var=self._col_var)\n+ kwargs[\"size\"] = kwargs.pop(\"size\", mpl.rcParams[\"axes.labelsize\"])\n+\n+ # Establish default templates\n+ if row_template is None:\n+ row_template = \"{row_var} = {row_name}\"\n+ if col_template is None:\n+ col_template = \"{col_var} = {col_name}\"\n+ if template is None:\n+ if self._row_var is None:\n+ template = col_template\n+ elif self._col_var is None:\n+ template = row_template\n+ else:\n+ template = \" | \".join([row_template, col_template])\n+\n+ row_template = utils.to_utf8(row_template)\n+ col_template = utils.to_utf8(col_template)\n+ template = utils.to_utf8(template)\n+\n+ if self._margin_titles:\n+\n+ # Remove any existing title texts\n+ for text in self._margin_titles_texts:\n+ text.remove()\n+ self._margin_titles_texts = []\n+\n+ if self.row_names is not None:\n+ # Draw the row titles on the right edge of the grid\n+ for i, row_name in enumerate(self.row_names):\n+ ax = self.axes[i, -1]\n+ args.update(dict(row_name=row_name))\n+ title = row_template.format(**args)\n+ text = ax.annotate(\n+ title, xy=(1.02, .5), xycoords=\"axes fraction\",\n+ rotation=270, ha=\"left\", va=\"center\",\n+ **kwargs\n+ )\n+ self._margin_titles_texts.append(text)\n+\n+ if self.col_names is not None:\n+ # Draw the column titles as normal titles\n+ for j, col_name in enumerate(self.col_names):\n+ args.update(dict(col_name=col_name))\n+ title = col_template.format(**args)\n+ self.axes[0, j].set_title(title, **kwargs)\n+\n+ return self\n+\n+ # Otherwise title each facet with all the necessary information\n+ if (self._row_var is not None) and (self._col_var is not None):\n+ for i, row_name in enumerate(self.row_names):\n+ for j, col_name in enumerate(self.col_names):\n+ args.update(dict(row_name=row_name, col_name=col_name))\n+ title = template.format(**args)\n+ self.axes[i, j].set_title(title, **kwargs)\n+ elif self.row_names is not None and len(self.row_names):\n+ for i, row_name in enumerate(self.row_names):\n+ args.update(dict(row_name=row_name))\n+ title = template.format(**args)\n+ self.axes[i, 0].set_title(title, **kwargs)\n+ elif self.col_names is not None and len(self.col_names):\n+ for i, col_name in enumerate(self.col_names):\n+ args.update(dict(col_name=col_name))\n+ title = template.format(**args)\n+ # Index the flat array so col_wrap works\n+ self.axes.flat[i].set_title(title, **kwargs)\n+ return self\n \n def refline(self, *, x=None, y=None, color='.5', linestyle='--', **line_kws):\n \"\"\"Add a reference line(s) to each facet.\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/axisgrid.py b/seaborn/axisgrid.py\nindex 17d333bc..1ff7828f 100644\n--- a/seaborn/axisgrid.py\n+++ b/seaborn/axisgrid.py\n@@ -963,74 +963,6 @@ class FacetGrid(Grid):\n Returns self.\n \n \"\"\"\n- args = dict(row_var=self._row_var, col_var=self._col_var)\n- kwargs[\"size\"] = kwargs.pop(\"size\", mpl.rcParams[\"axes.labelsize\"])\n-\n- # Establish default templates\n- if row_template is None:\n- row_template = \"{row_var} = {row_name}\"\n- if col_template is None:\n- col_template = \"{col_var} = {col_name}\"\n- if template is None:\n- if self._row_var is None:\n- template = col_template\n- elif self._col_var is None:\n- template = row_template\n- else:\n- template = \" | \".join([row_template, col_template])\n-\n- row_template = utils.to_utf8(row_template)\n- col_template = utils.to_utf8(col_template)\n- template = utils.to_utf8(template)\n-\n- if self._margin_titles:\n-\n- # Remove any existing title texts\n- for text in self._margin_titles_texts:\n- text.remove()\n- self._margin_titles_texts = []\n-\n- if self.row_names is not None:\n- # Draw the row titles on the right edge of the grid\n- for i, row_name in enumerate(self.row_names):\n- ax = self.axes[i, -1]\n- args.update(dict(row_name=row_name))\n- title = row_template.format(**args)\n- text = ax.annotate(\n- title, xy=(1.02, .5), xycoords=\"axes fraction\",\n- rotation=270, ha=\"left\", va=\"center\",\n- **kwargs\n- )\n- self._margin_titles_texts.append(text)\n-\n- if self.col_names is not None:\n- # Draw the column titles as normal titles\n- for j, col_name in enumerate(self.col_names):\n- args.update(dict(col_name=col_name))\n- title = col_template.format(**args)\n- self.axes[0, j].set_title(title, **kwargs)\n-\n- return self\n-\n- # Otherwise title each facet with all the necessary information\n- if (self._row_var is not None) and (self._col_var is not None):\n- for i, row_name in enumerate(self.row_names):\n- for j, col_name in enumerate(self.col_names):\n- args.update(dict(row_name=row_name, col_name=col_name))\n- title = template.format(**args)\n- self.axes[i, j].set_title(title, **kwargs)\n- elif self.row_names is not None and len(self.row_names):\n- for i, row_name in enumerate(self.row_names):\n- args.update(dict(row_name=row_name))\n- title = template.format(**args)\n- self.axes[i, 0].set_title(title, **kwargs)\n- elif self.col_names is not None and len(self.col_names):\n- for i, col_name in enumerate(self.col_names):\n- args.update(dict(col_name=col_name))\n- title = template.format(**args)\n- # Index the flat array so col_wrap works\n- self.axes.flat[i].set_title(title, **kwargs)\n- return self\n \n def refline(self, *, x=None, y=None, color='.5', linestyle='--', **line_kws):\n \"\"\"Add a reference line(s) to each facet.\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/axisgrid.py.\nHere is the description for the function:\n def set_titles(self, template=None, row_template=None, col_template=None, **kwargs):\n \"\"\"Draw titles either above each facet or on the grid margins.\n\n Parameters\n ----------\n template : string\n Template for all titles with the formatting keys {col_var} and\n {col_name} (if using a `col` faceting variable) and/or {row_var}\n and {row_name} (if using a `row` faceting variable).\n row_template:\n Template for the row variable when titles are drawn on the grid\n margins. Must have {row_var} and {row_name} formatting keys.\n col_template:\n Template for the column variable when titles are drawn on the grid\n margins. Must have {col_var} and {col_name} formatting keys.\n\n Returns\n -------\n self: object\n Returns self.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs0]",
"tests/test_axisgrid.py::TestFacetGrid::test_self_data",
"tests/test_axisgrid.py::TestFacetGrid::test_self_figure",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_simple",
"tests/test_axisgrid.py::TestFacetGrid::test_self_axes",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_complex",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs1]",
"tests/test_axisgrid.py::TestFacetGrid::test_axes_array_size",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[series]",
"tests/test_axisgrid.py::TestFacetGrid::test_single_axes",
"tests/test_utils.py::test_move_legend_grid_object",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs2]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[numpy]",
"tests/test_axisgrid.py::TestFacetGrid::test_col_wrap",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[list]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs3]",
"tests/test_axisgrid.py::TestFacetGrid::test_normal_axes",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_wide",
"tests/test_axisgrid.py::TestFacetGrid::test_wrapped_axes",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_hues",
"tests/test_axisgrid.py::TestFacetGrid::test_axes_dict",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_sizes",
"tests/test_axisgrid.py::TestFacetGrid::test_figure_size",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_styles",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_basic",
"tests/test_axisgrid.py::TestFacetGrid::test_figure_size_with_legend",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_data",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_weighted_estimator",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_stringy_numerics",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_data_missing_level",
"tests/test_base.py::TestVectorPlotter::test_attach_facets",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_hue",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_legend",
"tests/test_axisgrid.py::TestFacetGrid::test_get_boolean_legend_data",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_markers",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_tuples",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_unshared_axis_labels",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_marker_linewidths",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_identity_facets",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facets",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_options",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_facets",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_data",
"tests/test_axisgrid.py::TestFacetGrid::test_legendout_with_colwrap",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_hue_col_nolegend",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_mixed_facets",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_scatter_kws",
"tests/test_relational.py::TestRelationalPlotter::test_facet_variable_collision",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_truncate[True]",
"tests/test_base.py::TestVectorPlotter::test_attach_shared_axes",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_tight_layout",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_scatter_unused_variables",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_empty[catplot]",
"tests/test_base.py::TestVectorPlotter::test_get_axes_facets",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_truncate[False]",
"tests/test_axisgrid.py::TestFacetGrid::test_subplot_kws",
"tests/test_relational.py::TestRelationalPlotter::test_ax_kwarg_removal",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_sharey",
"tests/test_axisgrid.py::TestFacetGrid::test_gridspec_kws",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_kws",
"tests/test_relational.py::TestRelationalPlotter::test_legend_has_no_offset",
"tests/test_axisgrid.py::TestFacetGrid::test_gridspec_kws_col_wrap",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue",
"tests/test_axisgrid.py::TestFacetGrid::test_data_generator",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_style",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue_and_style",
"tests/test_axisgrid.py::TestFacetGrid::test_map",
"tests/test_axisgrid.py::TestFacetGrid::test_map_dataframe",
"tests/test_axisgrid.py::TestFacetGrid::test_set",
"tests/test_axisgrid.py::TestFacetGrid::test_set_titles",
"tests/test_axisgrid.py::TestFacetGrid::test_set_titles_margin_titles",
"tests/test_axisgrid.py::TestFacetGrid::test_set_ticklabels",
"tests/test_axisgrid.py::TestFacetGrid::test_set_axis_labels",
"tests/test_axisgrid.py::TestFacetGrid::test_axis_lims",
"tests/test_axisgrid.py::TestFacetGrid::test_data_orders",
"tests/test_axisgrid.py::TestFacetGrid::test_palette",
"tests/test_axisgrid.py::TestFacetGrid::test_hue_kws",
"tests/test_axisgrid.py::TestFacetGrid::test_dropna",
"tests/test_axisgrid.py::TestFacetGrid::test_categorical_column_missing_categories",
"tests/test_axisgrid.py::TestFacetGrid::test_categorical_warning",
"tests/test_axisgrid.py::TestFacetGrid::test_refline",
"tests/test_axisgrid.py::TestFacetGrid::test_apply",
"tests/test_axisgrid.py::TestFacetGrid::test_pipe",
"tests/test_axisgrid.py::TestFacetGrid::test_tick_params",
"tests/test_axisgrid.py::TestFacetGrid::test_data_interchange",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs8]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics0]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics1]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics2]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics3]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics4]",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_with_col_unique_bins",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics5]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics6]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics7]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs1]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics9]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs3]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs4]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics10]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs7]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics11]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs9]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs10]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs11]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs12]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs13]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs14]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs15]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs0]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs1]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs3]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs3]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs5]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs6]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs8]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs9]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs10]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs11]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs3]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs9]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_facets[col]",
"tests/test_distributions.py::TestDisPlot::test_facets[row]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[dodge]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[stack]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[fill]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_ax_warning",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics0]",
"tests/test_distributions.py::TestDisPlot::test_array_faceting[col]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs3]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics1]",
"tests/test_distributions.py::TestDisPlot::test_array_faceting[row]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics2]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics3]",
"tests/test_distributions.py::TestDisPlot::test_legend",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs4]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics4]",
"tests/test_distributions.py::TestDisPlot::test_empty",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_bivariate_ecdf_error",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics5]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics6]",
"tests/test_distributions.py::TestDisPlot::test_bivariate_kde_norm",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics7]",
"tests/test_distributions.py::TestDisPlot::test_bivariate_hist_norm",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs6]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics8]",
"tests/test_distributions.py::TestDisPlot::test_facetgrid_data",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs7]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics9]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics10]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics11]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs20]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestCatPlot::test_facet_organization",
"tests/test_categorical.py::TestCatPlot::test_plot_elements",
"tests/test_categorical.py::TestCatPlot::test_bad_plot_kind_error",
"tests/test_categorical.py::TestCatPlot::test_plot_colors",
"tests/test_categorical.py::TestCatPlot::test_ax_kwarg_removal",
"tests/test_categorical.py::TestCatPlot::test_share_xy",
"tests/test_categorical.py::TestCatPlot::test_facetgrid_data",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[col]",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[row]",
"tests/test_categorical.py::TestCatPlot::test_invalid_kind",
"tests/test_categorical.py::TestCatPlot::test_legend_with_auto",
"tests/test_categorical.py::TestCatPlot::test_weights_warning"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-21
|
1.0
|
{
"code": "diff --git b/seaborn/axisgrid.py a/seaborn/axisgrid.py\nindex b8333041..17d333bc 100644\n--- b/seaborn/axisgrid.py\n+++ a/seaborn/axisgrid.py\n@@ -151,6 +151,81 @@ class Grid(_BaseGrid):\n Returns self for easy chaining.\n \n \"\"\"\n+ # Find the data for the legend\n+ if legend_data is None:\n+ legend_data = self._legend_data\n+ if label_order is None:\n+ if self.hue_names is None:\n+ label_order = list(legend_data.keys())\n+ else:\n+ label_order = list(map(utils.to_utf8, self.hue_names))\n+\n+ blank_handle = mpl.patches.Patch(alpha=0, linewidth=0)\n+ handles = [legend_data.get(lab, blank_handle) for lab in label_order]\n+ title = self._hue_var if title is None else title\n+ title_size = mpl.rcParams[\"legend.title_fontsize\"]\n+\n+ # Unpack nested labels from a hierarchical legend\n+ labels = []\n+ for entry in label_order:\n+ if isinstance(entry, tuple):\n+ _, label = entry\n+ else:\n+ label = entry\n+ labels.append(label)\n+\n+ # Set default legend kwargs\n+ kwargs.setdefault(\"scatterpoints\", 1)\n+\n+ if self._legend_out:\n+\n+ kwargs.setdefault(\"frameon\", False)\n+ kwargs.setdefault(\"loc\", \"center right\")\n+\n+ # Draw a full-figure legend outside the grid\n+ figlegend = self._figure.legend(handles, labels, **kwargs)\n+\n+ self._legend = figlegend\n+ figlegend.set_title(title, prop={\"size\": title_size})\n+\n+ if adjust_subtitles:\n+ adjust_legend_subtitles(figlegend)\n+\n+ # Draw the plot to set the bounding boxes correctly\n+ _draw_figure(self._figure)\n+\n+ # Calculate and set the new width of the figure so the legend fits\n+ legend_width = figlegend.get_window_extent().width / self._figure.dpi\n+ fig_width, fig_height = self._figure.get_size_inches()\n+ self._figure.set_size_inches(fig_width + legend_width, fig_height)\n+\n+ # Draw the plot again to get the new transformations\n+ _draw_figure(self._figure)\n+\n+ # Now calculate how much space we need on the right side\n+ legend_width = figlegend.get_window_extent().width / self._figure.dpi\n+ space_needed = legend_width / (fig_width + legend_width)\n+ margin = .04 if self._margin_titles else .01\n+ self._space_needed = margin + space_needed\n+ right = 1 - self._space_needed\n+\n+ # Place the subplot axes to give space for the legend\n+ self._figure.subplots_adjust(right=right)\n+ self._tight_layout_rect[2] = right\n+\n+ else:\n+ # Draw a legend in the first axis\n+ ax = self.axes.flat[0]\n+ kwargs.setdefault(\"loc\", \"best\")\n+\n+ leg = ax.legend(handles, labels, **kwargs)\n+ leg.set_title(title, prop={\"size\": title_size})\n+ self._legend = leg\n+\n+ if adjust_subtitles:\n+ adjust_legend_subtitles(leg)\n+\n+ return self\n \n def _update_legend_data(self, ax):\n \"\"\"Extract the legend data from an axes object and save it.\"\"\"\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/axisgrid.py b/seaborn/axisgrid.py\nindex 17d333bc..b8333041 100644\n--- a/seaborn/axisgrid.py\n+++ b/seaborn/axisgrid.py\n@@ -151,81 +151,6 @@ class Grid(_BaseGrid):\n Returns self for easy chaining.\n \n \"\"\"\n- # Find the data for the legend\n- if legend_data is None:\n- legend_data = self._legend_data\n- if label_order is None:\n- if self.hue_names is None:\n- label_order = list(legend_data.keys())\n- else:\n- label_order = list(map(utils.to_utf8, self.hue_names))\n-\n- blank_handle = mpl.patches.Patch(alpha=0, linewidth=0)\n- handles = [legend_data.get(lab, blank_handle) for lab in label_order]\n- title = self._hue_var if title is None else title\n- title_size = mpl.rcParams[\"legend.title_fontsize\"]\n-\n- # Unpack nested labels from a hierarchical legend\n- labels = []\n- for entry in label_order:\n- if isinstance(entry, tuple):\n- _, label = entry\n- else:\n- label = entry\n- labels.append(label)\n-\n- # Set default legend kwargs\n- kwargs.setdefault(\"scatterpoints\", 1)\n-\n- if self._legend_out:\n-\n- kwargs.setdefault(\"frameon\", False)\n- kwargs.setdefault(\"loc\", \"center right\")\n-\n- # Draw a full-figure legend outside the grid\n- figlegend = self._figure.legend(handles, labels, **kwargs)\n-\n- self._legend = figlegend\n- figlegend.set_title(title, prop={\"size\": title_size})\n-\n- if adjust_subtitles:\n- adjust_legend_subtitles(figlegend)\n-\n- # Draw the plot to set the bounding boxes correctly\n- _draw_figure(self._figure)\n-\n- # Calculate and set the new width of the figure so the legend fits\n- legend_width = figlegend.get_window_extent().width / self._figure.dpi\n- fig_width, fig_height = self._figure.get_size_inches()\n- self._figure.set_size_inches(fig_width + legend_width, fig_height)\n-\n- # Draw the plot again to get the new transformations\n- _draw_figure(self._figure)\n-\n- # Now calculate how much space we need on the right side\n- legend_width = figlegend.get_window_extent().width / self._figure.dpi\n- space_needed = legend_width / (fig_width + legend_width)\n- margin = .04 if self._margin_titles else .01\n- self._space_needed = margin + space_needed\n- right = 1 - self._space_needed\n-\n- # Place the subplot axes to give space for the legend\n- self._figure.subplots_adjust(right=right)\n- self._tight_layout_rect[2] = right\n-\n- else:\n- # Draw a legend in the first axis\n- ax = self.axes.flat[0]\n- kwargs.setdefault(\"loc\", \"best\")\n-\n- leg = ax.legend(handles, labels, **kwargs)\n- leg.set_title(title, prop={\"size\": title_size})\n- self._legend = leg\n-\n- if adjust_subtitles:\n- adjust_legend_subtitles(leg)\n-\n- return self\n \n def _update_legend_data(self, ax):\n \"\"\"Extract the legend data from an axes object and save it.\"\"\"\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/axisgrid.py.\nHere is the description for the function:\n def add_legend(self, legend_data=None, title=None, label_order=None,\n adjust_subtitles=False, **kwargs):\n \"\"\"Draw a legend, maybe placing it outside axes and resizing the figure.\n\n Parameters\n ----------\n legend_data : dict\n Dictionary mapping label names (or two-element tuples where the\n second element is a label name) to matplotlib artist handles. The\n default reads from ``self._legend_data``.\n title : string\n Title for the legend. The default reads from ``self._hue_var``.\n label_order : list of labels\n The order that the legend entries should appear in. The default\n reads from ``self.hue_names``.\n adjust_subtitles : bool\n If True, modify entries with invisible artists to left-align\n the labels and set the font size to that of a title.\n kwargs : key, value pairings\n Other keyword arguments are passed to the underlying legend methods\n on the Figure or Axes object.\n\n Returns\n -------\n self : Grid instance\n Returns self for easy chaining.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs0]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs1]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_complex",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs2]",
"tests/test_utils.py::test_move_legend_grid_object",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[series]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs3]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[numpy]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[list]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_wide",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_hue",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_hues",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_markers",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_sizes",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_marker_linewidths",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_styles",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facets",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_stringy_numerics",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_legend",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_data",
"tests/test_relational.py::TestRelationalPlotter::test_legend_has_no_offset",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_style",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_scatter_kws",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue_and_style",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_truncate[True]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_truncate[False]",
"tests/test_axisgrid.py::TestFacetGrid::test_figure_size_with_legend",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_data",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs2]",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_data_missing_level",
"tests/test_axisgrid.py::TestFacetGrid::test_get_boolean_legend_data",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs3]",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_tuples",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_options",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs4]",
"tests/test_axisgrid.py::TestFacetGrid::test_legendout_with_colwrap",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs6]",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_tight_layout",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs8]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs9]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs3]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs10]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs11]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs12]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs13]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs14]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs9]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs10]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs0]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs8]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs9]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs10]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs2]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs12]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[dodge]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs13]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[stack]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs14]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[fill]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs16]",
"tests/test_distributions.py::TestDisPlot::test_legend",
"tests/test_distributions.py::TestDisPlot::test_facetgrid_data",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs9]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics3]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs10]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics4]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs11]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics5]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics6]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics7]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs12]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics8]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs13]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics9]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics10]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics11]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs18]",
"tests/test_axisgrid.py::TestPairGrid::test_histplot_legend",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs8]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg_hue",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs17]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_markers",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs19]",
"tests/test_axisgrid.py::TestPairGrid::test_legend",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestCatPlot::test_facet_organization",
"tests/test_categorical.py::TestCatPlot::test_plot_elements",
"tests/test_categorical.py::TestCatPlot::test_plot_colors",
"tests/test_categorical.py::TestCatPlot::test_ax_kwarg_removal",
"tests/test_categorical.py::TestCatPlot::test_share_xy",
"tests/test_categorical.py::TestCatPlot::test_facetgrid_data",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[col]",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[row]",
"tests/test_categorical.py::TestCatPlot::test_legend_with_auto",
"tests/test_categorical.py::TestCatPlot::test_weights_warning"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-22
|
1.0
|
{
"code": "diff --git b/seaborn/axisgrid.py a/seaborn/axisgrid.py\nindex 7c01ad95..17d333bc 100644\n--- b/seaborn/axisgrid.py\n+++ a/seaborn/axisgrid.py\n@@ -301,6 +301,9 @@ class Grid(_BaseGrid):\n Returns self for easy chaining.\n \n \"\"\"\n+ for ax in self.figure.axes:\n+ ax.tick_params(axis=axis, **kwargs)\n+ return self\n \n \n _facet_docs = dict(\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/axisgrid.py b/seaborn/axisgrid.py\nindex 17d333bc..7c01ad95 100644\n--- a/seaborn/axisgrid.py\n+++ b/seaborn/axisgrid.py\n@@ -301,9 +301,6 @@ class Grid(_BaseGrid):\n Returns self for easy chaining.\n \n \"\"\"\n- for ax in self.figure.axes:\n- ax.tick_params(axis=axis, **kwargs)\n- return self\n \n \n _facet_docs = dict(\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/axisgrid.py.\nHere is the description for the function:\n def tick_params(self, axis='both', **kwargs):\n \"\"\"Modify the ticks, tick labels, and gridlines.\n\n Parameters\n ----------\n axis : {'x', 'y', 'both'}\n The axis on which to apply the formatting.\n kwargs : keyword arguments\n Additional keyword arguments to pass to\n :meth:`matplotlib.axes.Axes.tick_params`.\n\n Returns\n -------\n self : Grid instance\n Returns self for easy chaining.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_axisgrid.py::TestFacetGrid::test_tick_params",
"tests/test_axisgrid.py::TestPairGrid::test_tick_params"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-23
|
1.0
|
{
"code": "diff --git b/seaborn/axisgrid.py a/seaborn/axisgrid.py\nindex 847b0f7b..17d333bc 100644\n--- b/seaborn/axisgrid.py\n+++ a/seaborn/axisgrid.py\n@@ -1795,6 +1795,9 @@ class JointGrid(_BaseGrid):\n Returns ``self`` for easy method chaining.\n \n \"\"\"\n+ self.plot_marginals(marginal_func, **kwargs)\n+ self.plot_joint(joint_func, **kwargs)\n+ return self\n \n def plot_joint(self, func, **kwargs):\n \"\"\"Draw a bivariate plot on the joint axes of the grid.\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/axisgrid.py b/seaborn/axisgrid.py\nindex 17d333bc..847b0f7b 100644\n--- a/seaborn/axisgrid.py\n+++ b/seaborn/axisgrid.py\n@@ -1795,9 +1795,6 @@ class JointGrid(_BaseGrid):\n Returns ``self`` for easy method chaining.\n \n \"\"\"\n- self.plot_marginals(marginal_func, **kwargs)\n- self.plot_joint(joint_func, **kwargs)\n- return self\n \n def plot_joint(self, func, **kwargs):\n \"\"\"Draw a bivariate plot on the joint axes of the grid.\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/axisgrid.py.\nHere is the description for the function:\n def plot(self, joint_func, marginal_func, **kwargs):\n \"\"\"Draw the plot by passing functions for joint and marginal axes.\n\n This method passes the ``kwargs`` dictionary to both functions. If you\n need more control, call :meth:`JointGrid.plot_joint` and\n :meth:`JointGrid.plot_marginals` directly with specific parameters.\n\n Parameters\n ----------\n joint_func, marginal_func : callables\n Functions to draw the bivariate and univariate plots. See methods\n referenced above for information about the required characteristics\n of these functions.\n kwargs\n Additional keyword arguments are passed to both functions.\n\n Returns\n -------\n :class:`JointGrid` instance\n Returns ``self`` for easy method chaining.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_axisgrid.py::TestJointGrid::test_plot",
"tests/test_axisgrid.py::TestJointGrid::test_refline"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-24
|
1.0
|
{
"code": "diff --git b/seaborn/axisgrid.py a/seaborn/axisgrid.py\nindex e373efe2..17d333bc 100644\n--- b/seaborn/axisgrid.py\n+++ a/seaborn/axisgrid.py\n@@ -1819,6 +1819,21 @@ class JointGrid(_BaseGrid):\n Returns ``self`` for easy method chaining.\n \n \"\"\"\n+ kwargs = kwargs.copy()\n+ if str(func.__module__).startswith(\"seaborn\"):\n+ kwargs[\"ax\"] = self.ax_joint\n+ else:\n+ plt.sca(self.ax_joint)\n+ if self.hue is not None:\n+ kwargs[\"hue\"] = self.hue\n+ self._inject_kwargs(func, kwargs, self._hue_params)\n+\n+ if str(func.__module__).startswith(\"seaborn\"):\n+ func(x=self.x, y=self.y, **kwargs)\n+ else:\n+ func(self.x, self.y, **kwargs)\n+\n+ return self\n \n def plot_marginals(self, func, **kwargs):\n \"\"\"Draw univariate plots on each marginal axes.\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/axisgrid.py b/seaborn/axisgrid.py\nindex 17d333bc..e373efe2 100644\n--- a/seaborn/axisgrid.py\n+++ b/seaborn/axisgrid.py\n@@ -1819,21 +1819,6 @@ class JointGrid(_BaseGrid):\n Returns ``self`` for easy method chaining.\n \n \"\"\"\n- kwargs = kwargs.copy()\n- if str(func.__module__).startswith(\"seaborn\"):\n- kwargs[\"ax\"] = self.ax_joint\n- else:\n- plt.sca(self.ax_joint)\n- if self.hue is not None:\n- kwargs[\"hue\"] = self.hue\n- self._inject_kwargs(func, kwargs, self._hue_params)\n-\n- if str(func.__module__).startswith(\"seaborn\"):\n- func(x=self.x, y=self.y, **kwargs)\n- else:\n- func(self.x, self.y, **kwargs)\n-\n- return self\n \n def plot_marginals(self, func, **kwargs):\n \"\"\"Draw univariate plots on each marginal axes.\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/axisgrid.py.\nHere is the description for the function:\n def plot_joint(self, func, **kwargs):\n \"\"\"Draw a bivariate plot on the joint axes of the grid.\n\n Parameters\n ----------\n func : plotting callable\n If a seaborn function, it should accept ``x`` and ``y``. Otherwise,\n it must accept ``x`` and ``y`` vectors of data as the first two\n positional arguments, and it must plot on the \"current\" axes.\n If ``hue`` was defined in the class constructor, the function must\n accept ``hue`` as a parameter.\n kwargs\n Keyword argument are passed to the plotting function.\n\n Returns\n -------\n :class:`JointGrid` instance\n Returns ``self`` for easy method chaining.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_axisgrid.py::TestJointGrid::test_bivariate_plot",
"tests/test_axisgrid.py::TestJointGrid::test_plot",
"tests/test_axisgrid.py::TestJointGrid::test_hue[True]",
"tests/test_axisgrid.py::TestJointGrid::test_hue[False]",
"tests/test_axisgrid.py::TestJointGrid::test_refline",
"tests/test_axisgrid.py::TestJointPlot::test_scatter",
"tests/test_axisgrid.py::TestJointPlot::test_scatter_hue",
"tests/test_axisgrid.py::TestJointPlot::test_reg",
"tests/test_axisgrid.py::TestJointPlot::test_resid",
"tests/test_axisgrid.py::TestJointPlot::test_hist",
"tests/test_axisgrid.py::TestJointPlot::test_hex",
"tests/test_axisgrid.py::TestJointPlot::test_kde",
"tests/test_axisgrid.py::TestJointPlot::test_kde_hue",
"tests/test_axisgrid.py::TestJointPlot::test_color",
"tests/test_axisgrid.py::TestJointPlot::test_palette",
"tests/test_axisgrid.py::TestJointPlot::test_hex_customise",
"tests/test_axisgrid.py::TestJointPlot::test_leaky_dict",
"tests/test_axisgrid.py::TestJointPlot::test_distplot_kwarg_warning",
"tests/test_axisgrid.py::TestJointPlot::test_ax_warning"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-25
|
1.0
|
{
"code": "diff --git b/seaborn/axisgrid.py a/seaborn/axisgrid.py\nindex 5ad61e91..17d333bc 100644\n--- b/seaborn/axisgrid.py\n+++ a/seaborn/axisgrid.py\n@@ -1856,6 +1856,45 @@ class JointGrid(_BaseGrid):\n Returns ``self`` for easy method chaining.\n \n \"\"\"\n+ seaborn_func = (\n+ str(func.__module__).startswith(\"seaborn\")\n+ # deprecated distplot has a legacy API, special case it\n+ and not func.__name__ == \"distplot\"\n+ )\n+ func_params = signature(func).parameters\n+ kwargs = kwargs.copy()\n+ if self.hue is not None:\n+ kwargs[\"hue\"] = self.hue\n+ self._inject_kwargs(func, kwargs, self._hue_params)\n+\n+ if \"legend\" in func_params:\n+ kwargs.setdefault(\"legend\", False)\n+\n+ if \"orientation\" in func_params:\n+ # e.g. plt.hist\n+ orient_kw_x = {\"orientation\": \"vertical\"}\n+ orient_kw_y = {\"orientation\": \"horizontal\"}\n+ elif \"vertical\" in func_params:\n+ # e.g. sns.distplot (also how did this get backwards?)\n+ orient_kw_x = {\"vertical\": False}\n+ orient_kw_y = {\"vertical\": True}\n+\n+ if seaborn_func:\n+ func(x=self.x, ax=self.ax_marg_x, **kwargs)\n+ else:\n+ plt.sca(self.ax_marg_x)\n+ func(self.x, **orient_kw_x, **kwargs)\n+\n+ if seaborn_func:\n+ func(y=self.y, ax=self.ax_marg_y, **kwargs)\n+ else:\n+ plt.sca(self.ax_marg_y)\n+ func(self.y, **orient_kw_y, **kwargs)\n+\n+ self.ax_marg_x.yaxis.get_label().set_visible(False)\n+ self.ax_marg_y.xaxis.get_label().set_visible(False)\n+\n+ return self\n \n def refline(\n self, *, x=None, y=None, joint=True, marginal=True,\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/axisgrid.py b/seaborn/axisgrid.py\nindex 17d333bc..5ad61e91 100644\n--- a/seaborn/axisgrid.py\n+++ b/seaborn/axisgrid.py\n@@ -1856,45 +1856,6 @@ class JointGrid(_BaseGrid):\n Returns ``self`` for easy method chaining.\n \n \"\"\"\n- seaborn_func = (\n- str(func.__module__).startswith(\"seaborn\")\n- # deprecated distplot has a legacy API, special case it\n- and not func.__name__ == \"distplot\"\n- )\n- func_params = signature(func).parameters\n- kwargs = kwargs.copy()\n- if self.hue is not None:\n- kwargs[\"hue\"] = self.hue\n- self._inject_kwargs(func, kwargs, self._hue_params)\n-\n- if \"legend\" in func_params:\n- kwargs.setdefault(\"legend\", False)\n-\n- if \"orientation\" in func_params:\n- # e.g. plt.hist\n- orient_kw_x = {\"orientation\": \"vertical\"}\n- orient_kw_y = {\"orientation\": \"horizontal\"}\n- elif \"vertical\" in func_params:\n- # e.g. sns.distplot (also how did this get backwards?)\n- orient_kw_x = {\"vertical\": False}\n- orient_kw_y = {\"vertical\": True}\n-\n- if seaborn_func:\n- func(x=self.x, ax=self.ax_marg_x, **kwargs)\n- else:\n- plt.sca(self.ax_marg_x)\n- func(self.x, **orient_kw_x, **kwargs)\n-\n- if seaborn_func:\n- func(y=self.y, ax=self.ax_marg_y, **kwargs)\n- else:\n- plt.sca(self.ax_marg_y)\n- func(self.y, **orient_kw_y, **kwargs)\n-\n- self.ax_marg_x.yaxis.get_label().set_visible(False)\n- self.ax_marg_y.xaxis.get_label().set_visible(False)\n-\n- return self\n \n def refline(\n self, *, x=None, y=None, joint=True, marginal=True,\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/axisgrid.py.\nHere is the description for the function:\n def plot_marginals(self, func, **kwargs):\n \"\"\"Draw univariate plots on each marginal axes.\n\n Parameters\n ----------\n func : plotting callable\n If a seaborn function, it should accept ``x`` and ``y`` and plot\n when only one of them is defined. Otherwise, it must accept a vector\n of data as the first positional argument and determine its orientation\n using the ``vertical`` parameter, and it must plot on the \"current\" axes.\n If ``hue`` was defined in the class constructor, it must accept ``hue``\n as a parameter.\n kwargs\n Keyword argument are passed to the plotting function.\n\n Returns\n -------\n :class:`JointGrid` instance\n Returns ``self`` for easy method chaining.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_axisgrid.py::TestJointGrid::test_univariate_plot",
"tests/test_axisgrid.py::TestJointGrid::test_univariate_plot_distplot",
"tests/test_axisgrid.py::TestJointGrid::test_univariate_plot_matplotlib",
"tests/test_axisgrid.py::TestJointGrid::test_plot",
"tests/test_axisgrid.py::TestJointGrid::test_hue[True]",
"tests/test_axisgrid.py::TestJointGrid::test_hue[False]",
"tests/test_axisgrid.py::TestJointGrid::test_refline",
"tests/test_axisgrid.py::TestJointPlot::test_scatter",
"tests/test_axisgrid.py::TestJointPlot::test_scatter_hue",
"tests/test_axisgrid.py::TestJointPlot::test_reg",
"tests/test_axisgrid.py::TestJointPlot::test_hex",
"tests/test_axisgrid.py::TestJointPlot::test_kde",
"tests/test_axisgrid.py::TestJointPlot::test_kde_hue",
"tests/test_axisgrid.py::TestJointPlot::test_color",
"tests/test_axisgrid.py::TestJointPlot::test_palette",
"tests/test_axisgrid.py::TestJointPlot::test_hex_customise",
"tests/test_axisgrid.py::TestJointPlot::test_leaky_dict",
"tests/test_axisgrid.py::TestJointPlot::test_distplot_kwarg_warning",
"tests/test_axisgrid.py::TestJointPlot::test_ax_warning"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-26
|
1.0
|
{
"code": "diff --git b/seaborn/axisgrid.py a/seaborn/axisgrid.py\nindex 31e8b7f9..17d333bc 100644\n--- b/seaborn/axisgrid.py\n+++ a/seaborn/axisgrid.py\n@@ -1923,6 +1923,22 @@ class JointGrid(_BaseGrid):\n Returns ``self`` for easy method chaining.\n \n \"\"\"\n+ line_kws['color'] = color\n+ line_kws['linestyle'] = linestyle\n+\n+ if x is not None:\n+ if joint:\n+ self.ax_joint.axvline(x, **line_kws)\n+ if marginal:\n+ self.ax_marg_x.axvline(x, **line_kws)\n+\n+ if y is not None:\n+ if joint:\n+ self.ax_joint.axhline(y, **line_kws)\n+ if marginal:\n+ self.ax_marg_y.axhline(y, **line_kws)\n+\n+ return self\n \n def set_axis_labels(self, xlabel=\"\", ylabel=\"\", **kwargs):\n \"\"\"Set axis labels on the bivariate axes.\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/axisgrid.py b/seaborn/axisgrid.py\nindex 17d333bc..31e8b7f9 100644\n--- a/seaborn/axisgrid.py\n+++ b/seaborn/axisgrid.py\n@@ -1923,22 +1923,6 @@ class JointGrid(_BaseGrid):\n Returns ``self`` for easy method chaining.\n \n \"\"\"\n- line_kws['color'] = color\n- line_kws['linestyle'] = linestyle\n-\n- if x is not None:\n- if joint:\n- self.ax_joint.axvline(x, **line_kws)\n- if marginal:\n- self.ax_marg_x.axvline(x, **line_kws)\n-\n- if y is not None:\n- if joint:\n- self.ax_joint.axhline(y, **line_kws)\n- if marginal:\n- self.ax_marg_y.axhline(y, **line_kws)\n-\n- return self\n \n def set_axis_labels(self, xlabel=\"\", ylabel=\"\", **kwargs):\n \"\"\"Set axis labels on the bivariate axes.\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/axisgrid.py.\nHere is the description for the function:\n def refline(\n self, *, x=None, y=None, joint=True, marginal=True,\n color='.5', linestyle='--', **line_kws\n ):\n \"\"\"Add a reference line(s) to joint and/or marginal axes.\n\n Parameters\n ----------\n x, y : numeric\n Value(s) to draw the line(s) at.\n joint, marginal : bools\n Whether to add the reference line(s) to the joint/marginal axes.\n color : :mod:`matplotlib color <matplotlib.colors>`\n Specifies the color of the reference line(s).\n linestyle : str\n Specifies the style of the reference line(s).\n line_kws : key, value mappings\n Other keyword arguments are passed to :meth:`matplotlib.axes.Axes.axvline`\n when ``x`` is not None and :meth:`matplotlib.axes.Axes.axhline` when ``y``\n is not None.\n\n Returns\n -------\n :class:`JointGrid` instance\n Returns ``self`` for easy method chaining.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_axisgrid.py::TestJointGrid::test_refline"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-27
|
1.0
|
{
"code": "diff --git b/seaborn/axisgrid.py a/seaborn/axisgrid.py\nindex 22b78dc1..17d333bc 100644\n--- b/seaborn/axisgrid.py\n+++ a/seaborn/axisgrid.py\n@@ -1959,6 +1959,9 @@ class JointGrid(_BaseGrid):\n Returns ``self`` for easy method chaining.\n \n \"\"\"\n+ self.ax_joint.set_xlabel(xlabel, **kwargs)\n+ self.ax_joint.set_ylabel(ylabel, **kwargs)\n+ return self\n \n \n JointGrid.__init__.__doc__ = \"\"\"\\\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/axisgrid.py b/seaborn/axisgrid.py\nindex 17d333bc..22b78dc1 100644\n--- a/seaborn/axisgrid.py\n+++ b/seaborn/axisgrid.py\n@@ -1959,9 +1959,6 @@ class JointGrid(_BaseGrid):\n Returns ``self`` for easy method chaining.\n \n \"\"\"\n- self.ax_joint.set_xlabel(xlabel, **kwargs)\n- self.ax_joint.set_ylabel(ylabel, **kwargs)\n- return self\n \n \n JointGrid.__init__.__doc__ = \"\"\"\\\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/axisgrid.py.\nHere is the description for the function:\n def set_axis_labels(self, xlabel=\"\", ylabel=\"\", **kwargs):\n \"\"\"Set axis labels on the bivariate axes.\n\n Parameters\n ----------\n xlabel, ylabel : strings\n Label names for the x and y variables.\n kwargs : key, value mappings\n Other keyword arguments are passed to the following functions:\n\n - :meth:`matplotlib.axes.Axes.set_xlabel`\n - :meth:`matplotlib.axes.Axes.set_ylabel`\n\n Returns\n -------\n :class:`JointGrid` instance\n Returns ``self`` for easy method chaining.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_axisgrid.py::TestJointGrid::test_margin_grid_axis_labels"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-28
|
1.0
|
{
"code": "diff --git b/seaborn/axisgrid.py a/seaborn/axisgrid.py\nindex afd71e95..17d333bc 100644\n--- b/seaborn/axisgrid.py\n+++ a/seaborn/axisgrid.py\n@@ -1244,6 +1244,125 @@ class PairGrid(Grid):\n \n \"\"\"\n \n+ super().__init__()\n+ data = handle_data_source(data)\n+\n+ # Sort out the variables that define the grid\n+ numeric_cols = self._find_numeric_cols(data)\n+ if hue in numeric_cols:\n+ numeric_cols.remove(hue)\n+ if vars is not None:\n+ x_vars = list(vars)\n+ y_vars = list(vars)\n+ if x_vars is None:\n+ x_vars = numeric_cols\n+ if y_vars is None:\n+ y_vars = numeric_cols\n+\n+ if np.isscalar(x_vars):\n+ x_vars = [x_vars]\n+ if np.isscalar(y_vars):\n+ y_vars = [y_vars]\n+\n+ self.x_vars = x_vars = list(x_vars)\n+ self.y_vars = y_vars = list(y_vars)\n+ self.square_grid = self.x_vars == self.y_vars\n+\n+ if not x_vars:\n+ raise ValueError(\"No variables found for grid columns.\")\n+ if not y_vars:\n+ raise ValueError(\"No variables found for grid rows.\")\n+\n+ # Create the figure and the array of subplots\n+ figsize = len(x_vars) * height * aspect, len(y_vars) * height\n+\n+ with _disable_autolayout():\n+ fig = plt.figure(figsize=figsize)\n+\n+ axes = fig.subplots(len(y_vars), len(x_vars),\n+ sharex=\"col\", sharey=\"row\",\n+ squeeze=False)\n+\n+ # Possibly remove upper axes to make a corner grid\n+ # Note: setting up the axes is usually the most time-intensive part\n+ # of using the PairGrid. We are foregoing the speed improvement that\n+ # we would get by just not setting up the hidden axes so that we can\n+ # avoid implementing fig.subplots ourselves. But worth thinking about.\n+ self._corner = corner\n+ if corner:\n+ hide_indices = np.triu_indices_from(axes, 1)\n+ for i, j in zip(*hide_indices):\n+ axes[i, j].remove()\n+ axes[i, j] = None\n+\n+ self._figure = fig\n+ self.axes = axes\n+ self.data = data\n+\n+ # Save what we are going to do with the diagonal\n+ self.diag_sharey = diag_sharey\n+ self.diag_vars = None\n+ self.diag_axes = None\n+\n+ self._dropna = dropna\n+\n+ # Label the axes\n+ self._add_axis_labels()\n+\n+ # Sort out the hue variable\n+ self._hue_var = hue\n+ if hue is None:\n+ self.hue_names = hue_order = [\"_nolegend_\"]\n+ self.hue_vals = pd.Series([\"_nolegend_\"] * len(data),\n+ index=data.index)\n+ else:\n+ # We need hue_order and hue_names because the former is used to control\n+ # the order of drawing and the latter is used to control the order of\n+ # the legend. hue_names can become string-typed while hue_order must\n+ # retain the type of the input data. This is messy but results from\n+ # the fact that PairGrid can implement the hue-mapping logic itself\n+ # (and was originally written exclusively that way) but now can delegate\n+ # to the axes-level functions, while always handling legend creation.\n+ # See GH2307\n+ hue_names = hue_order = categorical_order(data[hue], hue_order)\n+ if dropna:\n+ # Filter NA from the list of unique hue names\n+ hue_names = list(filter(pd.notnull, hue_names))\n+ self.hue_names = hue_names\n+ self.hue_vals = data[hue]\n+\n+ # Additional dict of kwarg -> list of values for mapping the hue var\n+ self.hue_kws = hue_kws if hue_kws is not None else {}\n+\n+ self._orig_palette = palette\n+ self._hue_order = hue_order\n+ self.palette = self._get_palette(data, hue, hue_order, palette)\n+ self._legend_data = {}\n+\n+ # Make the plot look nice\n+ for ax in axes[:-1, :].flat:\n+ if ax is None:\n+ continue\n+ for label in ax.get_xticklabels():\n+ label.set_visible(False)\n+ ax.xaxis.offsetText.set_visible(False)\n+ ax.xaxis.label.set_visible(False)\n+\n+ for ax in axes[:, 1:].flat:\n+ if ax is None:\n+ continue\n+ for label in ax.get_yticklabels():\n+ label.set_visible(False)\n+ ax.yaxis.offsetText.set_visible(False)\n+ ax.yaxis.label.set_visible(False)\n+\n+ self._tight_layout_rect = [.01, .01, .99, .99]\n+ self._tight_layout_pad = layout_pad\n+ self._despine = despine\n+ if despine:\n+ utils.despine(fig=fig)\n+ self.tight_layout(pad=layout_pad)\n+\n def map(self, func, **kwargs):\n \"\"\"Plot with the same function in every subplot.\n \n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/axisgrid.py b/seaborn/axisgrid.py\nindex 17d333bc..afd71e95 100644\n--- a/seaborn/axisgrid.py\n+++ b/seaborn/axisgrid.py\n@@ -1244,125 +1244,6 @@ class PairGrid(Grid):\n \n \"\"\"\n \n- super().__init__()\n- data = handle_data_source(data)\n-\n- # Sort out the variables that define the grid\n- numeric_cols = self._find_numeric_cols(data)\n- if hue in numeric_cols:\n- numeric_cols.remove(hue)\n- if vars is not None:\n- x_vars = list(vars)\n- y_vars = list(vars)\n- if x_vars is None:\n- x_vars = numeric_cols\n- if y_vars is None:\n- y_vars = numeric_cols\n-\n- if np.isscalar(x_vars):\n- x_vars = [x_vars]\n- if np.isscalar(y_vars):\n- y_vars = [y_vars]\n-\n- self.x_vars = x_vars = list(x_vars)\n- self.y_vars = y_vars = list(y_vars)\n- self.square_grid = self.x_vars == self.y_vars\n-\n- if not x_vars:\n- raise ValueError(\"No variables found for grid columns.\")\n- if not y_vars:\n- raise ValueError(\"No variables found for grid rows.\")\n-\n- # Create the figure and the array of subplots\n- figsize = len(x_vars) * height * aspect, len(y_vars) * height\n-\n- with _disable_autolayout():\n- fig = plt.figure(figsize=figsize)\n-\n- axes = fig.subplots(len(y_vars), len(x_vars),\n- sharex=\"col\", sharey=\"row\",\n- squeeze=False)\n-\n- # Possibly remove upper axes to make a corner grid\n- # Note: setting up the axes is usually the most time-intensive part\n- # of using the PairGrid. We are foregoing the speed improvement that\n- # we would get by just not setting up the hidden axes so that we can\n- # avoid implementing fig.subplots ourselves. But worth thinking about.\n- self._corner = corner\n- if corner:\n- hide_indices = np.triu_indices_from(axes, 1)\n- for i, j in zip(*hide_indices):\n- axes[i, j].remove()\n- axes[i, j] = None\n-\n- self._figure = fig\n- self.axes = axes\n- self.data = data\n-\n- # Save what we are going to do with the diagonal\n- self.diag_sharey = diag_sharey\n- self.diag_vars = None\n- self.diag_axes = None\n-\n- self._dropna = dropna\n-\n- # Label the axes\n- self._add_axis_labels()\n-\n- # Sort out the hue variable\n- self._hue_var = hue\n- if hue is None:\n- self.hue_names = hue_order = [\"_nolegend_\"]\n- self.hue_vals = pd.Series([\"_nolegend_\"] * len(data),\n- index=data.index)\n- else:\n- # We need hue_order and hue_names because the former is used to control\n- # the order of drawing and the latter is used to control the order of\n- # the legend. hue_names can become string-typed while hue_order must\n- # retain the type of the input data. This is messy but results from\n- # the fact that PairGrid can implement the hue-mapping logic itself\n- # (and was originally written exclusively that way) but now can delegate\n- # to the axes-level functions, while always handling legend creation.\n- # See GH2307\n- hue_names = hue_order = categorical_order(data[hue], hue_order)\n- if dropna:\n- # Filter NA from the list of unique hue names\n- hue_names = list(filter(pd.notnull, hue_names))\n- self.hue_names = hue_names\n- self.hue_vals = data[hue]\n-\n- # Additional dict of kwarg -> list of values for mapping the hue var\n- self.hue_kws = hue_kws if hue_kws is not None else {}\n-\n- self._orig_palette = palette\n- self._hue_order = hue_order\n- self.palette = self._get_palette(data, hue, hue_order, palette)\n- self._legend_data = {}\n-\n- # Make the plot look nice\n- for ax in axes[:-1, :].flat:\n- if ax is None:\n- continue\n- for label in ax.get_xticklabels():\n- label.set_visible(False)\n- ax.xaxis.offsetText.set_visible(False)\n- ax.xaxis.label.set_visible(False)\n-\n- for ax in axes[:, 1:].flat:\n- if ax is None:\n- continue\n- for label in ax.get_yticklabels():\n- label.set_visible(False)\n- ax.yaxis.offsetText.set_visible(False)\n- ax.yaxis.label.set_visible(False)\n-\n- self._tight_layout_rect = [.01, .01, .99, .99]\n- self._tight_layout_pad = layout_pad\n- self._despine = despine\n- if despine:\n- utils.despine(fig=fig)\n- self.tight_layout(pad=layout_pad)\n-\n def map(self, func, **kwargs):\n \"\"\"Plot with the same function in every subplot.\n \n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/axisgrid.py.\nHere is the description for the function:\n def __init__(\n self, data, *, hue=None, vars=None, x_vars=None, y_vars=None,\n hue_order=None, palette=None, hue_kws=None, corner=False, diag_sharey=True,\n height=2.5, aspect=1, layout_pad=.5, despine=True, dropna=False,\n ):\n \"\"\"Initialize the plot figure and PairGrid object.\n\n Parameters\n ----------\n data : DataFrame\n Tidy (long-form) dataframe where each column is a variable and\n each row is an observation.\n hue : string (variable name)\n Variable in ``data`` to map plot aspects to different colors. This\n variable will be excluded from the default x and y variables.\n vars : list of variable names\n Variables within ``data`` to use, otherwise use every column with\n a numeric datatype.\n {x, y}_vars : lists of variable names\n Variables within ``data`` to use separately for the rows and\n columns of the figure; i.e. to make a non-square plot.\n hue_order : list of strings\n Order for the levels of the hue variable in the palette\n palette : dict or seaborn color palette\n Set of colors for mapping the ``hue`` variable. If a dict, keys\n should be values in the ``hue`` variable.\n hue_kws : dictionary of param -> list of values mapping\n Other keyword arguments to insert into the plotting call to let\n other plot attributes vary across levels of the hue variable (e.g.\n the markers in a scatterplot).\n corner : bool\n If True, don't add axes to the upper (off-diagonal) triangle of the\n grid, making this a \"corner\" plot.\n height : scalar\n Height (in inches) of each facet.\n aspect : scalar\n Aspect * height gives the width (in inches) of each facet.\n layout_pad : scalar\n Padding between axes; passed to ``fig.tight_layout``.\n despine : boolean\n Remove the top and right spines from the plots.\n dropna : boolean\n Drop missing values from the data before plotting.\n\n See Also\n --------\n pairplot : Easily drawing common uses of :class:`PairGrid`.\n FacetGrid : Subplot grid for plotting conditional relationships.\n\n Examples\n --------\n\n .. include:: ../docstrings/PairGrid.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_axisgrid.py::TestPairGrid::test_self_data",
"tests/test_axisgrid.py::TestPairGrid::test_ignore_datelike_data",
"tests/test_axisgrid.py::TestPairGrid::test_self_figure",
"tests/test_axisgrid.py::TestPairGrid::test_self_axes",
"tests/test_axisgrid.py::TestPairGrid::test_default_axes",
"tests/test_axisgrid.py::TestPairGrid::test_specific_square_axes[vars0]",
"tests/test_axisgrid.py::TestPairGrid::test_specific_square_axes[vars1]",
"tests/test_axisgrid.py::TestPairGrid::test_remove_hue_from_default",
"tests/test_axisgrid.py::TestPairGrid::test_specific_nonsquare_axes[x_vars0-y_vars0]",
"tests/test_axisgrid.py::TestPairGrid::test_specific_nonsquare_axes[x_vars1-z]",
"tests/test_axisgrid.py::TestPairGrid::test_specific_nonsquare_axes[x_vars2-y_vars2]",
"tests/test_axisgrid.py::TestPairGrid::test_corner",
"tests/test_axisgrid.py::TestPairGrid::test_size",
"tests/test_axisgrid.py::TestPairGrid::test_empty_grid",
"tests/test_axisgrid.py::TestPairGrid::test_map",
"tests/test_axisgrid.py::TestPairGrid::test_map_nonsquare",
"tests/test_axisgrid.py::TestPairGrid::test_map_lower",
"tests/test_axisgrid.py::TestPairGrid::test_map_upper",
"tests/test_axisgrid.py::TestPairGrid::test_map_mixed_funcsig",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_rectangular",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_color",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_palette",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_and_offdiag",
"tests/test_axisgrid.py::TestPairGrid::test_diag_sharey",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_matplotlib",
"tests/test_axisgrid.py::TestPairGrid::test_palette",
"tests/test_axisgrid.py::TestPairGrid::test_hue_kws",
"tests/test_axisgrid.py::TestPairGrid::test_hue_order",
"tests/test_axisgrid.py::TestPairGrid::test_hue_order_missing_level",
"tests/test_axisgrid.py::TestPairGrid::test_hue_in_map",
"tests/test_axisgrid.py::TestPairGrid::test_nondefault_index",
"tests/test_axisgrid.py::TestPairGrid::test_dropna[scatterplot]",
"tests/test_axisgrid.py::TestPairGrid::test_dropna[scatter]",
"tests/test_axisgrid.py::TestPairGrid::test_histplot_legend",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg_hue",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_diag_kde",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_kde",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_hist",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_markers",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_column_multiindex",
"tests/test_axisgrid.py::TestPairGrid::test_corner_despine",
"tests/test_axisgrid.py::TestPairGrid::test_corner_set",
"tests/test_axisgrid.py::TestPairGrid::test_legend",
"tests/test_axisgrid.py::TestPairGrid::test_tick_params",
"tests/test_axisgrid.py::TestPairGrid::test_data_interchange"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-29
|
1.0
|
{
"code": "diff --git b/seaborn/axisgrid.py a/seaborn/axisgrid.py\nindex ea0be412..17d333bc 100644\n--- b/seaborn/axisgrid.py\n+++ a/seaborn/axisgrid.py\n@@ -2089,6 +2089,96 @@ def pairplot(\n .. include:: ../docstrings/pairplot.rst\n \n \"\"\"\n+ # Avoid circular import\n+ from .distributions import histplot, kdeplot\n+\n+ # Handle deprecations\n+ if size is not None:\n+ height = size\n+ msg = (\"The `size` parameter has been renamed to `height`; \"\n+ \"please update your code.\")\n+ warnings.warn(msg, UserWarning)\n+\n+ if not isinstance(data, pd.DataFrame):\n+ raise TypeError(\n+ f\"'data' must be pandas DataFrame object, not: {type(data)}\")\n+\n+ plot_kws = {} if plot_kws is None else plot_kws.copy()\n+ diag_kws = {} if diag_kws is None else diag_kws.copy()\n+ grid_kws = {} if grid_kws is None else grid_kws.copy()\n+\n+ # Resolve \"auto\" diag kind\n+ if diag_kind == \"auto\":\n+ if hue is None:\n+ diag_kind = \"kde\" if kind == \"kde\" else \"hist\"\n+ else:\n+ diag_kind = \"hist\" if kind == \"hist\" else \"kde\"\n+\n+ # Set up the PairGrid\n+ grid_kws.setdefault(\"diag_sharey\", diag_kind == \"hist\")\n+ grid = PairGrid(data, vars=vars, x_vars=x_vars, y_vars=y_vars, hue=hue,\n+ hue_order=hue_order, palette=palette, corner=corner,\n+ height=height, aspect=aspect, dropna=dropna, **grid_kws)\n+\n+ # Add the markers here as PairGrid has figured out how many levels of the\n+ # hue variable are needed and we don't want to duplicate that process\n+ if markers is not None:\n+ if kind == \"reg\":\n+ # Needed until regplot supports style\n+ if grid.hue_names is None:\n+ n_markers = 1\n+ else:\n+ n_markers = len(grid.hue_names)\n+ if not isinstance(markers, list):\n+ markers = [markers] * n_markers\n+ if len(markers) != n_markers:\n+ raise ValueError(\"markers must be a singleton or a list of \"\n+ \"markers for each level of the hue variable\")\n+ grid.hue_kws = {\"marker\": markers}\n+ elif kind == \"scatter\":\n+ if isinstance(markers, str):\n+ plot_kws[\"marker\"] = markers\n+ elif hue is not None:\n+ plot_kws[\"style\"] = data[hue]\n+ plot_kws[\"markers\"] = markers\n+\n+ # Draw the marginal plots on the diagonal\n+ diag_kws = diag_kws.copy()\n+ diag_kws.setdefault(\"legend\", False)\n+ if diag_kind == \"hist\":\n+ grid.map_diag(histplot, **diag_kws)\n+ elif diag_kind == \"kde\":\n+ diag_kws.setdefault(\"fill\", True)\n+ diag_kws.setdefault(\"warn_singular\", False)\n+ grid.map_diag(kdeplot, **diag_kws)\n+\n+ # Maybe plot on the off-diagonals\n+ if diag_kind is not None:\n+ plotter = grid.map_offdiag\n+ else:\n+ plotter = grid.map\n+\n+ if kind == \"scatter\":\n+ from .relational import scatterplot # Avoid circular import\n+ plotter(scatterplot, **plot_kws)\n+ elif kind == \"reg\":\n+ from .regression import regplot # Avoid circular import\n+ plotter(regplot, **plot_kws)\n+ elif kind == \"kde\":\n+ from .distributions import kdeplot # Avoid circular import\n+ plot_kws.setdefault(\"warn_singular\", False)\n+ plotter(kdeplot, **plot_kws)\n+ elif kind == \"hist\":\n+ from .distributions import histplot # Avoid circular import\n+ plotter(histplot, **plot_kws)\n+\n+ # Add a legend\n+ if hue is not None:\n+ grid.add_legend()\n+\n+ grid.tight_layout()\n+\n+ return grid\n \n \n def jointplot(\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/axisgrid.py b/seaborn/axisgrid.py\nindex 17d333bc..ea0be412 100644\n--- a/seaborn/axisgrid.py\n+++ b/seaborn/axisgrid.py\n@@ -2089,96 +2089,6 @@ def pairplot(\n .. include:: ../docstrings/pairplot.rst\n \n \"\"\"\n- # Avoid circular import\n- from .distributions import histplot, kdeplot\n-\n- # Handle deprecations\n- if size is not None:\n- height = size\n- msg = (\"The `size` parameter has been renamed to `height`; \"\n- \"please update your code.\")\n- warnings.warn(msg, UserWarning)\n-\n- if not isinstance(data, pd.DataFrame):\n- raise TypeError(\n- f\"'data' must be pandas DataFrame object, not: {type(data)}\")\n-\n- plot_kws = {} if plot_kws is None else plot_kws.copy()\n- diag_kws = {} if diag_kws is None else diag_kws.copy()\n- grid_kws = {} if grid_kws is None else grid_kws.copy()\n-\n- # Resolve \"auto\" diag kind\n- if diag_kind == \"auto\":\n- if hue is None:\n- diag_kind = \"kde\" if kind == \"kde\" else \"hist\"\n- else:\n- diag_kind = \"hist\" if kind == \"hist\" else \"kde\"\n-\n- # Set up the PairGrid\n- grid_kws.setdefault(\"diag_sharey\", diag_kind == \"hist\")\n- grid = PairGrid(data, vars=vars, x_vars=x_vars, y_vars=y_vars, hue=hue,\n- hue_order=hue_order, palette=palette, corner=corner,\n- height=height, aspect=aspect, dropna=dropna, **grid_kws)\n-\n- # Add the markers here as PairGrid has figured out how many levels of the\n- # hue variable are needed and we don't want to duplicate that process\n- if markers is not None:\n- if kind == \"reg\":\n- # Needed until regplot supports style\n- if grid.hue_names is None:\n- n_markers = 1\n- else:\n- n_markers = len(grid.hue_names)\n- if not isinstance(markers, list):\n- markers = [markers] * n_markers\n- if len(markers) != n_markers:\n- raise ValueError(\"markers must be a singleton or a list of \"\n- \"markers for each level of the hue variable\")\n- grid.hue_kws = {\"marker\": markers}\n- elif kind == \"scatter\":\n- if isinstance(markers, str):\n- plot_kws[\"marker\"] = markers\n- elif hue is not None:\n- plot_kws[\"style\"] = data[hue]\n- plot_kws[\"markers\"] = markers\n-\n- # Draw the marginal plots on the diagonal\n- diag_kws = diag_kws.copy()\n- diag_kws.setdefault(\"legend\", False)\n- if diag_kind == \"hist\":\n- grid.map_diag(histplot, **diag_kws)\n- elif diag_kind == \"kde\":\n- diag_kws.setdefault(\"fill\", True)\n- diag_kws.setdefault(\"warn_singular\", False)\n- grid.map_diag(kdeplot, **diag_kws)\n-\n- # Maybe plot on the off-diagonals\n- if diag_kind is not None:\n- plotter = grid.map_offdiag\n- else:\n- plotter = grid.map\n-\n- if kind == \"scatter\":\n- from .relational import scatterplot # Avoid circular import\n- plotter(scatterplot, **plot_kws)\n- elif kind == \"reg\":\n- from .regression import regplot # Avoid circular import\n- plotter(regplot, **plot_kws)\n- elif kind == \"kde\":\n- from .distributions import kdeplot # Avoid circular import\n- plot_kws.setdefault(\"warn_singular\", False)\n- plotter(kdeplot, **plot_kws)\n- elif kind == \"hist\":\n- from .distributions import histplot # Avoid circular import\n- plotter(histplot, **plot_kws)\n-\n- # Add a legend\n- if hue is not None:\n- grid.add_legend()\n-\n- grid.tight_layout()\n-\n- return grid\n \n \n def jointplot(\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/axisgrid.py.\nHere is the description for the function:\ndef pairplot(\n data, *,\n hue=None, hue_order=None, palette=None,\n vars=None, x_vars=None, y_vars=None,\n kind=\"scatter\", diag_kind=\"auto\", markers=None,\n height=2.5, aspect=1, corner=False, dropna=False,\n plot_kws=None, diag_kws=None, grid_kws=None, size=None,\n):\n \"\"\"Plot pairwise relationships in a dataset.\n\n By default, this function will create a grid of Axes such that each numeric\n variable in ``data`` will by shared across the y-axes across a single row and\n the x-axes across a single column. The diagonal plots are treated\n differently: a univariate distribution plot is drawn to show the marginal\n distribution of the data in each column.\n\n It is also possible to show a subset of variables or plot different\n variables on the rows and columns.\n\n This is a high-level interface for :class:`PairGrid` that is intended to\n make it easy to draw a few common styles. You should use :class:`PairGrid`\n directly if you need more flexibility.\n\n Parameters\n ----------\n data : `pandas.DataFrame`\n Tidy (long-form) dataframe where each column is a variable and\n each row is an observation.\n hue : name of variable in ``data``\n Variable in ``data`` to map plot aspects to different colors.\n hue_order : list of strings\n Order for the levels of the hue variable in the palette\n palette : dict or seaborn color palette\n Set of colors for mapping the ``hue`` variable. If a dict, keys\n should be values in the ``hue`` variable.\n vars : list of variable names\n Variables within ``data`` to use, otherwise use every column with\n a numeric datatype.\n {x, y}_vars : lists of variable names\n Variables within ``data`` to use separately for the rows and\n columns of the figure; i.e. to make a non-square plot.\n kind : {'scatter', 'kde', 'hist', 'reg'}\n Kind of plot to make.\n diag_kind : {'auto', 'hist', 'kde', None}\n Kind of plot for the diagonal subplots. If 'auto', choose based on\n whether or not ``hue`` is used.\n markers : single matplotlib marker code or list\n Either the marker to use for all scatterplot points or a list of markers\n with a length the same as the number of levels in the hue variable so that\n differently colored points will also have different scatterplot\n markers.\n height : scalar\n Height (in inches) of each facet.\n aspect : scalar\n Aspect * height gives the width (in inches) of each facet.\n corner : bool\n If True, don't add axes to the upper (off-diagonal) triangle of the\n grid, making this a \"corner\" plot.\n dropna : boolean\n Drop missing values from the data before plotting.\n {plot, diag, grid}_kws : dicts\n Dictionaries of keyword arguments. ``plot_kws`` are passed to the\n bivariate plotting function, ``diag_kws`` are passed to the univariate\n plotting function, and ``grid_kws`` are passed to the :class:`PairGrid`\n constructor.\n\n Returns\n -------\n grid : :class:`PairGrid`\n Returns the underlying :class:`PairGrid` instance for further tweaking.\n\n See Also\n --------\n PairGrid : Subplot grid for more flexible plotting of pairwise relationships.\n JointGrid : Grid for plotting joint and marginal distributions of two variables.\n\n Examples\n --------\n\n .. include:: ../docstrings/pairplot.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_axisgrid.py::TestPairGrid::test_pairplot",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg_hue",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_diag_kde",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_kde",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_hist",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_markers",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_column_multiindex",
"tests/test_axisgrid.py::TestPairGrid::test_legend"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-30
|
1.0
|
{
"code": "diff --git b/seaborn/_marks/base.py a/seaborn/_marks/base.py\nindex 528bfea2..ac8fdf4a 100644\n--- b/seaborn/_marks/base.py\n+++ a/seaborn/_marks/base.py\n@@ -149,6 +149,53 @@ class Mark:\n of values with matching length).\n \n \"\"\"\n+ feature = self._mappable_props[name]\n+ prop = PROPERTIES.get(name, Property(name))\n+ directly_specified = not isinstance(feature, Mappable)\n+ return_multiple = isinstance(data, pd.DataFrame)\n+ return_array = return_multiple and not name.endswith(\"style\")\n+\n+ # Special case width because it needs to be resolved and added to the dataframe\n+ # during layer prep (so the Move operations use it properly).\n+ # TODO how does width *scaling* work, e.g. for violin width by count?\n+ if name == \"width\":\n+ directly_specified = directly_specified and name not in data\n+\n+ if directly_specified:\n+ feature = prop.standardize(feature)\n+ if return_multiple:\n+ feature = [feature] * len(data)\n+ if return_array:\n+ feature = np.array(feature)\n+ return feature\n+\n+ if name in data:\n+ if scales is None or name not in scales:\n+ # TODO Might this obviate the identity scale? Just don't add a scale?\n+ feature = data[name]\n+ else:\n+ scale = scales[name]\n+ value = data[name]\n+ try:\n+ feature = scale(value)\n+ except Exception as err:\n+ raise PlotSpecError._during(\"Scaling operation\", name) from err\n+\n+ if return_array:\n+ feature = np.asarray(feature)\n+ return feature\n+\n+ if feature.depend is not None:\n+ # TODO add source_func or similar to transform the source value?\n+ # e.g. set linewidth as a proportion of pointsize?\n+ return self._resolve(data, feature.depend, scales)\n+\n+ default = prop.standardize(feature.default)\n+ if return_multiple:\n+ default = [default] * len(data)\n+ if return_array:\n+ default = np.array(default)\n+ return default\n \n def _infer_orient(self, scales: dict) -> str: # TODO type scales\n \n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_marks/base.py b/seaborn/_marks/base.py\nindex ac8fdf4a..528bfea2 100644\n--- a/seaborn/_marks/base.py\n+++ b/seaborn/_marks/base.py\n@@ -149,53 +149,6 @@ class Mark:\n of values with matching length).\n \n \"\"\"\n- feature = self._mappable_props[name]\n- prop = PROPERTIES.get(name, Property(name))\n- directly_specified = not isinstance(feature, Mappable)\n- return_multiple = isinstance(data, pd.DataFrame)\n- return_array = return_multiple and not name.endswith(\"style\")\n-\n- # Special case width because it needs to be resolved and added to the dataframe\n- # during layer prep (so the Move operations use it properly).\n- # TODO how does width *scaling* work, e.g. for violin width by count?\n- if name == \"width\":\n- directly_specified = directly_specified and name not in data\n-\n- if directly_specified:\n- feature = prop.standardize(feature)\n- if return_multiple:\n- feature = [feature] * len(data)\n- if return_array:\n- feature = np.array(feature)\n- return feature\n-\n- if name in data:\n- if scales is None or name not in scales:\n- # TODO Might this obviate the identity scale? Just don't add a scale?\n- feature = data[name]\n- else:\n- scale = scales[name]\n- value = data[name]\n- try:\n- feature = scale(value)\n- except Exception as err:\n- raise PlotSpecError._during(\"Scaling operation\", name) from err\n-\n- if return_array:\n- feature = np.asarray(feature)\n- return feature\n-\n- if feature.depend is not None:\n- # TODO add source_func or similar to transform the source value?\n- # e.g. set linewidth as a proportion of pointsize?\n- return self._resolve(data, feature.depend, scales)\n-\n- default = prop.standardize(feature.default)\n- if return_multiple:\n- default = [default] * len(data)\n- if return_array:\n- default = np.array(default)\n- return default\n \n def _infer_orient(self, scales: dict) -> str: # TODO type scales\n \n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_marks/base.py.\nHere is the description for the function:\n def _resolve(\n self,\n data: DataFrame | dict[str, Any],\n name: str,\n scales: dict[str, Scale] | None = None,\n ) -> Any:\n \"\"\"Obtain default, specified, or mapped value for a named feature.\n\n Parameters\n ----------\n data : DataFrame or dict with scalar values\n Container with data values for features that will be semantically mapped.\n name : string\n Identity of the feature / semantic.\n scales: dict\n Mapping from variable to corresponding scale object.\n\n Returns\n -------\n value or array of values\n Outer return type depends on whether `data` is a dict (implying that\n we want a single value) or DataFrame (implying that we want an array\n of values with matching length).\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_marks/test_base.py::TestMappable::test_value",
"tests/_marks/test_area.py::TestArea::test_single_defaults",
"tests/_marks/test_text.py::TestText::test_simple",
"tests/_marks/test_dot.py::TestDot::test_simple",
"tests/_marks/test_line.py::TestPath::test_xy_data",
"tests/_marks/test_bar.py::TestBar::test_categorical_positions_vertical",
"tests/_marks/test_base.py::TestMappable::test_default",
"tests/_marks/test_base.py::TestMappable::test_rcparam",
"tests/_marks/test_base.py::TestMappable::test_depends",
"tests/_marks/test_base.py::TestMappable::test_mapped",
"tests/_marks/test_base.py::TestMappable::test_color",
"tests/_marks/test_base.py::TestMappable::test_color_mapped_alpha",
"tests/_marks/test_bar.py::TestBar::test_categorical_positions_horizontal",
"tests/_marks/test_base.py::TestMappable::test_color_scaled_as_strings",
"tests/_marks/test_dot.py::TestDot::test_filled_unfilled_mix",
"tests/_marks/test_line.py::TestPath::test_shared_colors_direct",
"tests/_marks/test_base.py::TestMappable::test_fillcolor",
"tests/_marks/test_text.py::TestText::test_set_properties",
"tests/_marks/test_area.py::TestArea::test_set_properties",
"tests/_marks/test_bar.py::TestBar::test_numeric_positions_vertical",
"tests/_marks/test_dot.py::TestDot::test_missing_coordinate_data",
"tests/_marks/test_line.py::TestPath::test_separate_colors_direct",
"tests/_marks/test_area.py::TestArea::test_mapped_properties",
"tests/_marks/test_text.py::TestText::test_mapped_properties",
"tests/_marks/test_bar.py::TestBar::test_numeric_positions_horizontal",
"tests/_marks/test_line.py::TestPath::test_shared_colors_mapped",
"tests/_marks/test_area.py::TestArea::test_unfilled",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[color]",
"tests/_marks/test_bar.py::TestBar::test_set_properties",
"tests/_marks/test_text.py::TestText::test_mapped_alignment",
"tests/_marks/test_area.py::TestBand::test_range",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[fill]",
"tests/_marks/test_line.py::TestPath::test_separate_colors_mapped",
"tests/_marks/test_text.py::TestText::test_identity_fontsize",
"tests/_marks/test_bar.py::TestBar::test_mapped_properties",
"tests/_marks/test_area.py::TestBand::test_auto_range",
"tests/_marks/test_line.py::TestPath::test_color_with_alpha",
"tests/_marks/test_bar.py::TestBar::test_zero_height_skipped",
"tests/_marks/test_text.py::TestText::test_offset_centered",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[marker]",
"tests/_marks/test_bar.py::TestBar::test_artist_kws_clip",
"tests/_marks/test_line.py::TestPath::test_color_and_alpha",
"tests/_marks/test_text.py::TestText::test_offset_valign",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[pointsize]",
"tests/_marks/test_bar.py::TestBars::test_positions",
"tests/_marks/test_line.py::TestPath::test_other_props_direct",
"tests/_marks/test_text.py::TestText::test_offset_halign",
"tests/_marks/test_bar.py::TestBars::test_positions_horizontal",
"tests/_marks/test_dot.py::TestDots::test_simple",
"tests/_marks/test_line.py::TestPath::test_other_props_mapped",
"tests/_marks/test_bar.py::TestBars::test_width",
"tests/_marks/test_dot.py::TestDots::test_set_color",
"tests/_marks/test_line.py::TestPath::test_capstyle",
"tests/_marks/test_line.py::TestLine::test_xy_data",
"tests/_marks/test_dot.py::TestDots::test_map_color",
"tests/_marks/test_bar.py::TestBars::test_mapped_color_direct_alpha",
"tests/_marks/test_bar.py::TestBars::test_mapped_edgewidth",
"tests/_marks/test_bar.py::TestBars::test_auto_edgewidth",
"tests/_marks/test_dot.py::TestDots::test_fill",
"tests/_marks/test_line.py::TestPaths::test_xy_data",
"tests/_marks/test_line.py::TestPaths::test_set_properties",
"tests/_marks/test_dot.py::TestDots::test_pointsize",
"tests/_marks/test_bar.py::TestBars::test_unfilled",
"tests/_marks/test_bar.py::TestBars::test_log_scale",
"tests/_marks/test_line.py::TestPaths::test_mapped_properties",
"tests/_marks/test_dot.py::TestDots::test_stroke",
"tests/_marks/test_dot.py::TestDots::test_filled_unfilled_mix",
"tests/_marks/test_line.py::TestPaths::test_color_with_alpha",
"tests/_marks/test_line.py::TestPaths::test_color_and_alpha",
"tests/_marks/test_line.py::TestPaths::test_capstyle",
"tests/_marks/test_line.py::TestLines::test_xy_data",
"tests/_marks/test_line.py::TestLines::test_single_orient_value",
"tests/_marks/test_line.py::TestRange::test_xy_data",
"tests/_marks/test_line.py::TestRange::test_auto_range",
"tests/_marks/test_line.py::TestRange::test_mapped_color",
"tests/_marks/test_line.py::TestRange::test_direct_properties",
"tests/_marks/test_line.py::TestDash::test_xy_data",
"tests/_marks/test_line.py::TestDash::test_xy_data_grouped",
"tests/_marks/test_line.py::TestDash::test_set_properties",
"tests/_marks/test_line.py::TestDash::test_mapped_properties",
"tests/_marks/test_line.py::TestDash::test_width",
"tests/_marks/test_line.py::TestDash::test_dodge",
"tests/_core/test_plot.py::TestExceptions::test_semantic_scaling"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-31
|
1.0
|
{
"code": "diff --git b/seaborn/_marks/base.py a/seaborn/_marks/base.py\nindex b8ee4146..ac8fdf4a 100644\n--- b/seaborn/_marks/base.py\n+++ a/seaborn/_marks/base.py\n@@ -265,6 +265,34 @@ def resolve_color(\n Support \"color\", \"fillcolor\", etc.\n \n \"\"\"\n+ color = mark._resolve(data, f\"{prefix}color\", scales)\n+\n+ if f\"{prefix}alpha\" in mark._mappable_props:\n+ alpha = mark._resolve(data, f\"{prefix}alpha\", scales)\n+ else:\n+ alpha = mark._resolve(data, \"alpha\", scales)\n+\n+ def visible(x, axis=None):\n+ \"\"\"Detect \"invisible\" colors to set alpha appropriately.\"\"\"\n+ # TODO First clause only needed to handle non-rgba arrays,\n+ # which we are trying to handle upstream\n+ return np.array(x).dtype.kind != \"f\" or np.isfinite(x).all(axis)\n+\n+ # Second check here catches vectors of strings with identity scale\n+ # It could probably be handled better upstream. This is a tricky problem\n+ if np.ndim(color) < 2 and all(isinstance(x, float) for x in color):\n+ if len(color) == 4:\n+ return mpl.colors.to_rgba(color)\n+ alpha = alpha if visible(color) else np.nan\n+ return mpl.colors.to_rgba(color, alpha)\n+ else:\n+ if np.ndim(color) == 2 and color.shape[1] == 4:\n+ return mpl.colors.to_rgba_array(color)\n+ alpha = np.where(visible(color, axis=1), alpha, np.nan)\n+ return mpl.colors.to_rgba_array(color, alpha)\n+\n+ # TODO should we be implementing fill here too?\n+ # (i.e. set fillalpha to 0 when fill=False)\n \n \n def document_properties(mark):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_marks/base.py b/seaborn/_marks/base.py\nindex ac8fdf4a..b8ee4146 100644\n--- a/seaborn/_marks/base.py\n+++ b/seaborn/_marks/base.py\n@@ -265,34 +265,6 @@ def resolve_color(\n Support \"color\", \"fillcolor\", etc.\n \n \"\"\"\n- color = mark._resolve(data, f\"{prefix}color\", scales)\n-\n- if f\"{prefix}alpha\" in mark._mappable_props:\n- alpha = mark._resolve(data, f\"{prefix}alpha\", scales)\n- else:\n- alpha = mark._resolve(data, \"alpha\", scales)\n-\n- def visible(x, axis=None):\n- \"\"\"Detect \"invisible\" colors to set alpha appropriately.\"\"\"\n- # TODO First clause only needed to handle non-rgba arrays,\n- # which we are trying to handle upstream\n- return np.array(x).dtype.kind != \"f\" or np.isfinite(x).all(axis)\n-\n- # Second check here catches vectors of strings with identity scale\n- # It could probably be handled better upstream. This is a tricky problem\n- if np.ndim(color) < 2 and all(isinstance(x, float) for x in color):\n- if len(color) == 4:\n- return mpl.colors.to_rgba(color)\n- alpha = alpha if visible(color) else np.nan\n- return mpl.colors.to_rgba(color, alpha)\n- else:\n- if np.ndim(color) == 2 and color.shape[1] == 4:\n- return mpl.colors.to_rgba_array(color)\n- alpha = np.where(visible(color, axis=1), alpha, np.nan)\n- return mpl.colors.to_rgba_array(color, alpha)\n-\n- # TODO should we be implementing fill here too?\n- # (i.e. set fillalpha to 0 when fill=False)\n \n \n def document_properties(mark):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_marks/base.py.\nHere is the description for the function:\ndef resolve_color(\n mark: Mark,\n data: DataFrame | dict,\n prefix: str = \"\",\n scales: dict[str, Scale] | None = None,\n) -> RGBATuple | ndarray:\n \"\"\"\n Obtain a default, specified, or mapped value for a color feature.\n\n This method exists separately to support the relationship between a\n color and its corresponding alpha. We want to respect alpha values that\n are passed in specified (or mapped) color values but also make use of a\n separate `alpha` variable, which can be mapped. This approach may also\n be extended to support mapping of specific color channels (i.e.\n luminance, chroma) in the future.\n\n Parameters\n ----------\n mark :\n Mark with the color property.\n data :\n Container with data values for features that will be semantically mapped.\n prefix :\n Support \"color\", \"fillcolor\", etc.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_marks/test_bar.py::TestBar::test_categorical_positions_vertical",
"tests/_marks/test_dot.py::TestDot::test_simple",
"tests/_marks/test_text.py::TestText::test_simple",
"tests/_marks/test_area.py::TestArea::test_single_defaults",
"tests/_marks/test_line.py::TestPath::test_xy_data",
"tests/_marks/test_base.py::TestMappable::test_color",
"tests/_marks/test_base.py::TestMappable::test_color_mapped_alpha",
"tests/_marks/test_dot.py::TestDot::test_filled_unfilled_mix",
"tests/_marks/test_line.py::TestPath::test_shared_colors_direct",
"tests/_marks/test_area.py::TestArea::test_set_properties",
"tests/_marks/test_base.py::TestMappable::test_color_scaled_as_strings",
"tests/_marks/test_text.py::TestText::test_set_properties",
"tests/_marks/test_base.py::TestMappable::test_fillcolor",
"tests/_marks/test_bar.py::TestBar::test_categorical_positions_horizontal",
"tests/_marks/test_dot.py::TestDot::test_missing_coordinate_data",
"tests/_marks/test_area.py::TestArea::test_mapped_properties",
"tests/_marks/test_line.py::TestPath::test_separate_colors_direct",
"tests/_marks/test_text.py::TestText::test_mapped_properties",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[color]",
"tests/_marks/test_bar.py::TestBar::test_numeric_positions_vertical",
"tests/_marks/test_area.py::TestArea::test_unfilled",
"tests/_marks/test_line.py::TestPath::test_shared_colors_mapped",
"tests/_marks/test_text.py::TestText::test_mapped_alignment",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[fill]",
"tests/_marks/test_bar.py::TestBar::test_numeric_positions_horizontal",
"tests/_marks/test_area.py::TestBand::test_range",
"tests/_marks/test_text.py::TestText::test_identity_fontsize",
"tests/_marks/test_line.py::TestPath::test_separate_colors_mapped",
"tests/_marks/test_bar.py::TestBar::test_set_properties",
"tests/_marks/test_text.py::TestText::test_offset_centered",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[marker]",
"tests/_marks/test_area.py::TestBand::test_auto_range",
"tests/_marks/test_line.py::TestPath::test_color_with_alpha",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[pointsize]",
"tests/_marks/test_text.py::TestText::test_offset_valign",
"tests/_marks/test_bar.py::TestBar::test_mapped_properties",
"tests/_marks/test_line.py::TestPath::test_color_and_alpha",
"tests/_marks/test_dot.py::TestDots::test_simple",
"tests/_marks/test_text.py::TestText::test_offset_halign",
"tests/_marks/test_bar.py::TestBar::test_zero_height_skipped",
"tests/_marks/test_line.py::TestPath::test_other_props_direct",
"tests/_marks/test_dot.py::TestDots::test_set_color",
"tests/_marks/test_bar.py::TestBar::test_artist_kws_clip",
"tests/_marks/test_line.py::TestPath::test_other_props_mapped",
"tests/_marks/test_dot.py::TestDots::test_map_color",
"tests/_marks/test_bar.py::TestBars::test_positions",
"tests/_marks/test_dot.py::TestDots::test_fill",
"tests/_marks/test_line.py::TestPath::test_capstyle",
"tests/_marks/test_line.py::TestLine::test_xy_data",
"tests/_marks/test_bar.py::TestBars::test_positions_horizontal",
"tests/_marks/test_dot.py::TestDots::test_pointsize",
"tests/_marks/test_line.py::TestPaths::test_xy_data",
"tests/_marks/test_bar.py::TestBars::test_width",
"tests/_marks/test_dot.py::TestDots::test_stroke",
"tests/_marks/test_line.py::TestPaths::test_set_properties",
"tests/_marks/test_dot.py::TestDots::test_filled_unfilled_mix",
"tests/_marks/test_bar.py::TestBars::test_mapped_color_direct_alpha",
"tests/_marks/test_line.py::TestPaths::test_mapped_properties",
"tests/_marks/test_bar.py::TestBars::test_mapped_edgewidth",
"tests/_marks/test_line.py::TestPaths::test_color_with_alpha",
"tests/_marks/test_bar.py::TestBars::test_auto_edgewidth",
"tests/_marks/test_line.py::TestPaths::test_color_and_alpha",
"tests/_marks/test_bar.py::TestBars::test_unfilled",
"tests/_marks/test_line.py::TestPaths::test_capstyle",
"tests/_marks/test_bar.py::TestBars::test_log_scale",
"tests/_marks/test_line.py::TestLines::test_xy_data",
"tests/_marks/test_line.py::TestLines::test_single_orient_value",
"tests/_marks/test_line.py::TestRange::test_xy_data",
"tests/_marks/test_line.py::TestRange::test_auto_range",
"tests/_marks/test_line.py::TestRange::test_mapped_color",
"tests/_marks/test_line.py::TestRange::test_direct_properties",
"tests/_marks/test_line.py::TestDash::test_xy_data",
"tests/_marks/test_line.py::TestDash::test_xy_data_grouped",
"tests/_marks/test_line.py::TestDash::test_set_properties",
"tests/_marks/test_line.py::TestDash::test_mapped_properties",
"tests/_marks/test_line.py::TestDash::test_width",
"tests/_marks/test_line.py::TestDash::test_dodge"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-32
|
1.0
|
{
"code": "diff --git b/seaborn/_core/rules.py a/seaborn/_core/rules.py\nindex 30ddcbb4..de6c651d 100644\n--- b/seaborn/_core/rules.py\n+++ a/seaborn/_core/rules.py\n@@ -160,3 +160,14 @@ def categorical_order(vector: Series, order: list | None = None) -> list:\n Ordered list of category levels not including null values.\n \n \"\"\"\n+ if order is not None:\n+ return order\n+\n+ if vector.dtype.name == \"category\":\n+ order = list(vector.cat.categories)\n+ else:\n+ order = list(filter(pd.notnull, vector.unique()))\n+ if variable_type(pd.Series(order)) == \"numeric\":\n+ order.sort()\n+\n+ return order\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_core/rules.py b/seaborn/_core/rules.py\nindex de6c651d..30ddcbb4 100644\n--- a/seaborn/_core/rules.py\n+++ b/seaborn/_core/rules.py\n@@ -160,14 +160,3 @@ def categorical_order(vector: Series, order: list | None = None) -> list:\n Ordered list of category levels not including null values.\n \n \"\"\"\n- if order is not None:\n- return order\n-\n- if vector.dtype.name == \"category\":\n- order = list(vector.cat.categories)\n- else:\n- order = list(filter(pd.notnull, vector.unique()))\n- if variable_type(pd.Series(order)) == \"numeric\":\n- order.sort()\n-\n- return order\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_core/rules.py.\nHere is the description for the function:\ndef categorical_order(vector: Series, order: list | None = None) -> list:\n \"\"\"\n Return a list of unique data values using seaborn's ordering rules.\n\n Parameters\n ----------\n vector : Series\n Vector of \"categorical\" values\n order : list\n Desired order of category levels to override the order determined\n from the `data` object.\n\n Returns\n -------\n order : list\n Ordered list of category levels not including null values.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_core/test_data.py::TestPlotData::test_data_interchange_support_test",
"tests/_core/test_groupby.py::test_agg_one_grouper",
"tests/_core/test_groupby.py::test_agg_two_groupers",
"tests/_core/test_groupby.py::test_apply_one_grouper",
"tests/_core/test_groupby.py::test_apply_mutate_columns",
"tests/_core/test_groupby.py::test_apply_replace_columns",
"tests/_core/test_moves.py::TestDodge::test_default",
"tests/_core/test_moves.py::TestDodge::test_fill",
"tests/_core/test_moves.py::TestDodge::test_drop",
"tests/_core/test_moves.py::TestDodge::test_gap",
"tests/_core/test_moves.py::TestDodge::test_widths_default",
"tests/_core/test_moves.py::TestDodge::test_widths_fill",
"tests/_core/test_moves.py::TestDodge::test_widths_drop",
"tests/_core/test_moves.py::TestDodge::test_faceted_default",
"tests/_core/test_moves.py::TestDodge::test_faceted_fill",
"tests/_core/test_moves.py::TestDodge::test_faceted_drop",
"tests/_core/test_moves.py::TestDodge::test_orient",
"tests/_core/test_moves.py::TestDodge::test_single_semantic[grp2]",
"tests/_core/test_moves.py::TestDodge::test_single_semantic[grp3]",
"tests/_core/test_moves.py::TestDodge::test_two_semantics",
"tests/_core/test_moves.py::TestStack::test_basic",
"tests/_core/test_moves.py::TestStack::test_faceted",
"tests/_core/test_moves.py::TestStack::test_misssing_data",
"tests/_core/test_moves.py::TestStack::test_baseline_homogeneity_check",
"tests/_core/test_moves.py::TestNorm::test_default_groups[x]",
"tests/_core/test_moves.py::TestNorm::test_default_groups[y]",
"tests/_core/test_plot.py::TestLayerAddition::test_stat_default",
"tests/_core/test_plot.py::TestScaling::test_inference",
"tests/_core/test_plot.py::TestScaling::test_inference_from_layer_data",
"tests/_core/test_plot.py::TestScaling::test_inference_joins",
"tests/_core/test_plot.py::TestScaling::test_inferred_categorical_converter",
"tests/_core/test_plot.py::TestScaling::test_explicit_categorical_converter",
"tests/_core/test_plot.py::TestScaling::test_categorical_as_datetime",
"tests/_core/test_plot.py::TestScaling::test_faceted_log_scale",
"tests/_core/test_plot.py::TestScaling::test_log_scale_name",
"tests/_core/test_plot.py::TestScaling::test_mark_data_log_transfrom_with_stat",
"tests/_core/test_plot.py::TestScaling::test_mark_data_from_categorical",
"tests/_core/test_plot.py::TestScaling::test_facet_categories",
"tests/_core/test_plot.py::TestScaling::test_facet_categories_unshared",
"tests/_core/test_plot.py::TestScaling::test_facet_categories_single_dim_shared",
"tests/_core/test_plot.py::TestScaling::test_pair_categories",
"tests/_core/test_plot.py::TestScaling::test_pair_categories_shared",
"tests/_core/test_plot.py::TestScaling::test_inferred_nominal_passed_to_stat",
"tests/_core/test_plot.py::TestScaling::test_identity_mapping_color_strings",
"tests/_core/test_plot.py::TestScaling::test_identity_mapping_color_tuples",
"tests/_core/test_plot.py::TestScaling::test_undefined_variable_raises",
"tests/_core/test_plot.py::TestScaling::test_nominal_x_axis_tweaks",
"tests/_core/test_plot.py::TestScaling::test_nominal_y_axis_tweaks",
"tests/_core/test_plot.py::TestPlotting::test_single_split_multi_layer",
"tests/_core/test_plot.py::TestPlotting::test_one_grouping_variable[color]",
"tests/_core/test_plot.py::TestPlotting::test_one_grouping_variable[group]",
"tests/_core/test_plot.py::TestPlotting::test_two_grouping_variables",
"tests/_core/test_plot.py::TestPlotting::test_facets_no_subgroups",
"tests/_core/test_plot.py::TestPlotting::test_facets_one_subgroup",
"tests/_core/test_plot.py::TestPlotting::test_layer_specific_facet_disabling",
"tests/_core/test_plot.py::TestPlotting::test_paired_variables_one_subset",
"tests/_core/test_plot.py::TestPlotting::test_paired_and_faceted",
"tests/_core/test_plot.py::TestPlotting::test_stat",
"tests/_core/test_plot.py::TestPlotting::test_stat_and_move",
"tests/_core/test_plot.py::TestPlotting::test_stat_log_scale",
"tests/_core/test_plot.py::TestPlotting::test_move_with_range",
"tests/_core/test_plot.py::TestPlotting::test_on_figure[True]",
"tests/_core/test_plot.py::TestPlotting::test_on_subfigure[True]",
"tests/_core/test_plot.py::TestPlotting::test_on_axes_with_subplots_error",
"tests/_core/test_plot.py::TestPlotting::test_axis_labels_from_constructor",
"tests/_core/test_plot.py::TestPlotting::test_axis_labels_from_layer",
"tests/_core/test_plot.py::TestPlotting::test_axis_labels_are_first_name",
"tests/_core/test_plot.py::TestPlotting::test_limits",
"tests/_core/test_plot.py::TestPlotting::test_labels_legend",
"tests/_core/test_plot.py::TestPlotting::test_labels_facets",
"tests/_core/test_plot.py::TestPlotting::test_title_facet_function",
"tests/_core/test_plot.py::TestExceptions::test_scale_setup",
"tests/_core/test_plot.py::TestFacetInterface::test_1d[row]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_as_vector[row]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_with_order[row-reverse]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_with_order[col-reverse]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d[col]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_as_vector[col]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_with_order[col-subset]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_with_order[row-subset]",
"tests/_core/test_plot.py::TestFacetInterface::test_2d_with_order[subset]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_with_order[col-expand]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_with_order[row-expand]",
"tests/_core/test_plot.py::TestFacetInterface::test_2d_with_order[expand]",
"tests/_core/test_plot.py::TestFacetInterface::test_2d_with_order[reverse]",
"tests/_core/test_plot.py::TestFacetInterface::test_2d",
"tests/_core/test_plot.py::TestFacetInterface::test_layout_algo[tight]",
"tests/_core/test_plot.py::TestFacetInterface::test_layout_algo[constrained]",
"tests/_core/test_plot.py::TestFacetInterface::test_axis_sharing",
"tests/_core/test_plot.py::TestFacetInterface::test_unshared_spacing",
"tests/_core/test_plot.py::TestFacetInterface::test_col_wrapping",
"tests/_core/test_plot.py::TestFacetInterface::test_row_wrapping",
"tests/_core/test_plot.py::TestPairInterface::test_with_facets",
"tests/_core/test_plot.py::TestPairInterface::test_error_on_facet_overlap[variables0]",
"tests/_core/test_plot.py::TestPairInterface::test_error_on_facet_overlap[variables1]",
"tests/_core/test_plot.py::TestPairInterface::test_error_on_wrap_overlap[variables0]",
"tests/_core/test_plot.py::TestPairInterface::test_error_on_wrap_overlap[variables1]",
"tests/_core/test_plot.py::TestPairInterface::test_axis_sharing",
"tests/_core/test_plot.py::TestPairInterface::test_axis_sharing_with_facets",
"tests/_core/test_plot.py::TestPairInterface::test_non_cross_wrapping",
"tests/_core/test_plot.py::TestPairInterface::test_orient_inference",
"tests/_core/test_plot.py::TestLabelVisibility::test_single_subplot",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_column[facet_kws0-pair_kws0]",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_column_wrapped",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_row_wrapped",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_column_wrapped_non_cross",
"tests/_core/test_plot.py::TestLabelVisibility::test_2d",
"tests/_core/test_plot.py::TestLabelVisibility::test_2d_unshared",
"tests/_core/test_plot.py::TestLegend::test_single_layer_single_variable",
"tests/_core/test_plot.py::TestLegend::test_single_layer_common_variable",
"tests/_core/test_plot.py::TestLegend::test_single_layer_common_unnamed_variable",
"tests/_core/test_plot.py::TestLegend::test_single_layer_multi_variable",
"tests/_core/test_plot.py::TestLegend::test_multi_layer_single_variable",
"tests/_core/test_plot.py::TestLegend::test_multi_layer_multi_variable",
"tests/_core/test_plot.py::TestLegend::test_multi_layer_different_artists",
"tests/_core/test_plot.py::TestLegend::test_three_layers",
"tests/_core/test_plot.py::TestLegend::test_identity_scale_ignored",
"tests/_core/test_plot.py::TestLegend::test_suppression_in_add_method",
"tests/_core/test_plot.py::TestLegend::test_anonymous_title",
"tests/_core/test_plot.py::TestLegend::test_legendless_mark",
"tests/_core/test_plot.py::TestLegend::test_legend_has_no_offset",
"tests/_core/test_plot.py::TestLegend::test_layer_legend_with_scale_legend",
"tests/_core/test_properties.py::TestColor::test_nominal_default_palette",
"tests/_core/test_properties.py::TestColor::test_nominal_default_palette_large",
"tests/_core/test_properties.py::TestColor::test_nominal_named_palette",
"tests/_core/test_properties.py::TestColor::test_nominal_list_palette",
"tests/_core/test_properties.py::TestColor::test_nominal_dict_palette",
"tests/_core/test_properties.py::TestColor::test_nominal_dict_with_missing_keys",
"tests/_core/test_properties.py::TestColor::test_nominal_list_too_short",
"tests/_core/test_properties.py::TestColor::test_nominal_list_too_long",
"tests/_core/test_properties.py::TestColor::test_bad_scale_values_nominal",
"tests/_core/test_properties.py::TestMarker::test_inference_dict[cat]",
"tests/_core/test_properties.py::TestMarker::test_inference_dict[num]",
"tests/_core/test_properties.py::TestMarker::test_inference_dict[bool]",
"tests/_core/test_properties.py::TestMarker::test_dict_missing",
"tests/_core/test_properties.py::TestMarker::test_mapping_default[cat]",
"tests/_core/test_properties.py::TestMarker::test_mapping_default[num]",
"tests/_core/test_properties.py::TestMarker::test_mapping_from_list[cat]",
"tests/_core/test_properties.py::TestMarker::test_mapping_from_list[num]",
"tests/_core/test_properties.py::TestMarker::test_mapping_from_dict[cat]",
"tests/_core/test_properties.py::TestMarker::test_mapping_from_dict[num]",
"tests/_core/test_properties.py::TestMarker::test_mapping_with_null_value",
"tests/_core/test_properties.py::TestMarker::test_unique_default_large_n",
"tests/_core/test_properties.py::TestMarker::test_bad_scale_values",
"tests/_core/test_properties.py::TestLineStyle::test_inference_dict[cat]",
"tests/_core/test_properties.py::TestLineStyle::test_inference_dict[num]",
"tests/_core/test_properties.py::TestLineStyle::test_inference_dict[bool]",
"tests/_core/test_properties.py::TestLineStyle::test_dict_missing",
"tests/_core/test_properties.py::TestLineStyle::test_mapping_default[cat]",
"tests/_core/test_properties.py::TestLineStyle::test_mapping_default[num]",
"tests/_core/test_properties.py::TestLineStyle::test_mapping_from_list[cat]",
"tests/_core/test_properties.py::TestLineStyle::test_mapping_from_list[num]",
"tests/_core/test_properties.py::TestLineStyle::test_mapping_from_dict[cat]",
"tests/_core/test_properties.py::TestLineStyle::test_mapping_from_dict[num]",
"tests/_core/test_properties.py::TestLineStyle::test_mapping_with_null_value",
"tests/_core/test_properties.py::TestLineStyle::test_unique_default_large_n",
"tests/_core/test_properties.py::TestLineStyle::test_bad_scale_values",
"tests/_core/test_properties.py::TestFill::test_mapping_categorical_data",
"tests/_core/test_properties.py::TestFill::test_mapping_numeric_data",
"tests/_core/test_properties.py::TestFill::test_mapping_list",
"tests/_core/test_properties.py::TestFill::test_mapping_truthy_list",
"tests/_core/test_properties.py::TestFill::test_mapping_dict",
"tests/_core/test_properties.py::TestFill::test_cycle_warning",
"tests/_core/test_properties.py::TestFill::test_values_error",
"tests/_core/test_properties.py::TestAlpha::test_mapped_interval_categorical",
"tests/_core/test_properties.py::TestAlpha::test_bad_scale_values_categorical_data",
"tests/_core/test_properties.py::TestLineWidth::test_mapped_interval_categorical",
"tests/_core/test_properties.py::TestLineWidth::test_bad_scale_values_categorical_data",
"tests/_core/test_properties.py::TestEdgeWidth::test_mapped_interval_categorical",
"tests/_core/test_properties.py::TestEdgeWidth::test_bad_scale_values_categorical_data",
"tests/_core/test_properties.py::TestPointSize::test_mapped_interval_categorical",
"tests/_core/test_properties.py::TestPointSize::test_bad_scale_values_categorical_data",
"tests/_core/test_properties.py::TestPointSize::test_areal_scaling_categorical",
"tests/_core/test_rules.py::test_categorical_order",
"tests/_core/test_scales.py::TestNominal::test_coordinate_defaults",
"tests/_core/test_scales.py::TestNominal::test_coordinate_with_order",
"tests/_core/test_scales.py::TestNominal::test_coordinate_with_subset_order",
"tests/_core/test_scales.py::TestNominal::test_coordinate_axis",
"tests/_core/test_scales.py::TestNominal::test_coordinate_axis_with_order",
"tests/_core/test_scales.py::TestNominal::test_coordinate_axis_with_subset_order",
"tests/_core/test_scales.py::TestNominal::test_coordinate_axis_with_category_dtype",
"tests/_core/test_scales.py::TestNominal::test_coordinate_numeric_data",
"tests/_core/test_scales.py::TestNominal::test_coordinate_numeric_data_with_order",
"tests/_core/test_scales.py::TestNominal::test_color_defaults",
"tests/_core/test_scales.py::TestNominal::test_color_named_palette",
"tests/_core/test_scales.py::TestNominal::test_color_list_palette",
"tests/_core/test_scales.py::TestNominal::test_color_dict_palette",
"tests/_core/test_scales.py::TestNominal::test_color_numeric_data",
"tests/_core/test_scales.py::TestNominal::test_color_numeric_with_order_subset",
"tests/_core/test_scales.py::TestNominal::test_color_numeric_int_float_mix",
"tests/_core/test_scales.py::TestNominal::test_color_alpha_in_palette",
"tests/_core/test_scales.py::TestNominal::test_color_unknown_palette",
"tests/_core/test_scales.py::TestNominal::test_object_defaults",
"tests/_core/test_scales.py::TestNominal::test_object_list",
"tests/_core/test_scales.py::TestNominal::test_object_dict",
"tests/_core/test_scales.py::TestNominal::test_object_order",
"tests/_core/test_scales.py::TestNominal::test_object_order_subset",
"tests/_core/test_scales.py::TestNominal::test_objects_that_are_weird",
"tests/_core/test_scales.py::TestNominal::test_alpha_default",
"tests/_core/test_scales.py::TestNominal::test_fill",
"tests/_core/test_scales.py::TestNominal::test_fill_dict",
"tests/_core/test_scales.py::TestNominal::test_fill_nunique_warning",
"tests/_core/test_scales.py::TestNominal::test_interval_defaults",
"tests/_core/test_scales.py::TestNominal::test_interval_tuple",
"tests/_core/test_scales.py::TestNominal::test_interval_tuple_numeric",
"tests/_core/test_scales.py::TestNominal::test_interval_list",
"tests/_core/test_scales.py::TestNominal::test_interval_dict",
"tests/_core/test_scales.py::TestNominal::test_interval_with_transform",
"tests/_core/test_scales.py::TestNominal::test_empty_data",
"tests/_core/test_scales.py::TestNominal::test_finalize",
"tests/_core/test_scales.py::TestBoolean::test_object_defaults",
"tests/_core/test_scales.py::TestBoolean::test_object_list",
"tests/_core/test_scales.py::TestBoolean::test_object_dict",
"tests/_core/test_scales.py::TestBoolean::test_fill",
"tests/_marks/test_area.py::TestArea::test_mapped_properties",
"tests/_marks/test_bar.py::TestBar::test_categorical_positions_vertical",
"tests/_marks/test_bar.py::TestBar::test_categorical_positions_horizontal",
"tests/_marks/test_bar.py::TestBar::test_set_properties",
"tests/_marks/test_bar.py::TestBar::test_mapped_properties",
"tests/_marks/test_bar.py::TestBar::test_zero_height_skipped",
"tests/_marks/test_bar.py::TestBar::test_artist_kws_clip",
"tests/_marks/test_bar.py::TestBars::test_mapped_color_direct_alpha",
"tests/_marks/test_dot.py::TestDot::test_filled_unfilled_mix",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[color]",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[fill]",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[marker]",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[pointsize]",
"tests/_marks/test_dot.py::TestDots::test_map_color",
"tests/_marks/test_dot.py::TestDots::test_fill",
"tests/_marks/test_dot.py::TestDots::test_filled_unfilled_mix",
"tests/_marks/test_line.py::TestPath::test_xy_data",
"tests/_marks/test_line.py::TestPath::test_shared_colors_mapped",
"tests/_marks/test_line.py::TestPath::test_separate_colors_mapped",
"tests/_marks/test_line.py::TestPath::test_other_props_mapped",
"tests/_marks/test_line.py::TestLine::test_xy_data",
"tests/_marks/test_line.py::TestPaths::test_xy_data",
"tests/_marks/test_line.py::TestPaths::test_mapped_properties",
"tests/_marks/test_line.py::TestLines::test_xy_data",
"tests/_marks/test_line.py::TestRange::test_mapped_color",
"tests/_marks/test_line.py::TestDash::test_xy_data_grouped",
"tests/_marks/test_line.py::TestDash::test_mapped_properties",
"tests/_marks/test_line.py::TestDash::test_dodge",
"tests/_marks/test_text.py::TestText::test_simple",
"tests/_marks/test_text.py::TestText::test_set_properties",
"tests/_marks/test_text.py::TestText::test_mapped_properties",
"tests/_marks/test_text.py::TestText::test_mapped_alignment",
"tests/_marks/test_text.py::TestText::test_identity_fontsize",
"tests/_marks/test_text.py::TestText::test_offset_centered",
"tests/_marks/test_text.py::TestText::test_offset_valign",
"tests/_marks/test_text.py::TestText::test_offset_halign",
"tests/_stats/test_aggregation.py::TestAgg::test_default",
"tests/_stats/test_aggregation.py::TestAgg::test_default_multi",
"tests/_stats/test_aggregation.py::TestAgg::test_func[max]",
"tests/_stats/test_aggregation.py::TestAgg::test_func[<lambda>]",
"tests/_stats/test_aggregation.py::TestEst::test_mean_sd[mean0]",
"tests/_stats/test_aggregation.py::TestEst::test_mean_sd[mean1]",
"tests/_stats/test_aggregation.py::TestEst::test_sd_single_obs",
"tests/_stats/test_aggregation.py::TestEst::test_median_pi",
"tests/_stats/test_aggregation.py::TestEst::test_weighted_mean",
"tests/_stats/test_aggregation.py::TestEst::test_seed",
"tests/_stats/test_counting.py::TestCount::test_single_grouper",
"tests/_stats/test_counting.py::TestCount::test_multiple_groupers",
"tests/_stats/test_counting.py::TestHist::test_common_norm_default",
"tests/_stats/test_counting.py::TestHist::test_common_norm_false",
"tests/_stats/test_counting.py::TestHist::test_common_norm_subset",
"tests/_stats/test_counting.py::TestHist::test_common_norm_warning",
"tests/_stats/test_counting.py::TestHist::test_common_bins_default",
"tests/_stats/test_counting.py::TestHist::test_common_bins_false",
"tests/_stats/test_counting.py::TestHist::test_common_bins_subset",
"tests/_stats/test_counting.py::TestHist::test_common_bins_warning",
"tests/_stats/test_counting.py::TestHist::test_histogram_multiple",
"tests/_stats/test_density.py::TestKDE::test_columns[x]",
"tests/_stats/test_density.py::TestKDE::test_columns[y]",
"tests/_stats/test_density.py::TestKDE::test_common_grid[True]",
"tests/_stats/test_density.py::TestKDE::test_common_grid[False]",
"tests/_stats/test_density.py::TestKDE::test_common_norm[True]",
"tests/_stats/test_density.py::TestKDE::test_common_norm[False]",
"tests/_stats/test_density.py::TestKDE::test_common_norm_variables",
"tests/_stats/test_density.py::TestKDE::test_common_input_checks[norm]",
"tests/_stats/test_density.py::TestKDE::test_common_input_checks[grid]",
"tests/_stats/test_density.py::TestKDE::test_cumulative[True]",
"tests/_stats/test_density.py::TestKDE::test_cumulative[False]",
"tests/_stats/test_density.py::TestKDE::test_singular[vals0]",
"tests/_stats/test_density.py::TestKDE::test_singular[vals1]",
"tests/_stats/test_density.py::TestKDE::test_singular[vals2]",
"tests/_stats/test_density.py::TestKDE::test_singular[vals3]",
"tests/_stats/test_order.py::TestPerc::test_int_k",
"tests/_stats/test_order.py::TestPerc::test_list_k",
"tests/_stats/test_order.py::TestPerc::test_orientation",
"tests/_stats/test_order.py::TestPerc::test_method",
"tests/_stats/test_order.py::TestPerc::test_grouped",
"tests/_stats/test_order.py::TestPerc::test_with_na",
"tests/_stats/test_regression.py::TestPolyFit::test_one_grouper",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_cumulative",
"tests/test_matrix.py::TestDendrogram::test_ndarray_input",
"tests/test_matrix.py::TestDendrogram::test_df_input",
"tests/test_matrix.py::TestDendrogram::test_df_multindex_input",
"tests/test_matrix.py::TestDendrogram::test_axis0_input",
"tests/test_matrix.py::TestDendrogram::test_rotate_input",
"tests/test_matrix.py::TestDendrogram::test_rotate_axis0_input",
"tests/test_matrix.py::TestDendrogram::test_custom_linkage",
"tests/test_matrix.py::TestDendrogram::test_label_false",
"tests/test_matrix.py::TestDendrogram::test_linkage_scipy",
"tests/test_matrix.py::TestDendrogram::test_fastcluster_other_method",
"tests/test_matrix.py::TestDendrogram::test_fastcluster_non_euclidean",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_plot",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_rotate",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_ticklabel_rotation",
"tests/test_matrix.py::TestClustermap::test_ndarray_input",
"tests/test_matrix.py::TestClustermap::test_df_input",
"tests/test_matrix.py::TestClustermap::test_corr_df_input",
"tests/test_matrix.py::TestClustermap::test_pivot_input",
"tests/test_matrix.py::TestClustermap::test_colors_input",
"tests/test_matrix.py::TestClustermap::test_categorical_colors_input",
"tests/test_matrix.py::TestClustermap::test_nested_colors_input",
"tests/test_matrix.py::TestClustermap::test_colors_input_custom_cmap",
"tests/test_matrix.py::TestClustermap::test_z_score",
"tests/test_matrix.py::TestClustermap::test_z_score_axis0",
"tests/test_matrix.py::TestClustermap::test_standard_scale",
"tests/test_matrix.py::TestClustermap::test_standard_scale_axis0",
"tests/test_matrix.py::TestClustermap::test_z_score_standard_scale",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap",
"tests/test_matrix.py::TestClustermap::test_nested_color_list_to_matrix_and_cmap",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap_axis1",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap_different_sizes",
"tests/test_matrix.py::TestClustermap::test_savefig",
"tests/test_matrix.py::TestClustermap::test_plot_dendrograms",
"tests/test_matrix.py::TestClustermap::test_cluster_false",
"tests/test_matrix.py::TestClustermap::test_row_col_colors",
"tests/test_matrix.py::TestClustermap::test_cluster_false_row_col_colors",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_shuffled",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_missing",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_one_axis",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series_shuffled",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series_missing",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_ignore_heatmap_kwargs",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_raise_on_mixed_index_types",
"tests/test_matrix.py::TestClustermap::test_mask_reorganization",
"tests/test_matrix.py::TestClustermap::test_ticklabel_reorganization",
"tests/test_matrix.py::TestClustermap::test_noticklabels",
"tests/test_matrix.py::TestClustermap::test_size_ratios",
"tests/test_matrix.py::TestClustermap::test_cbar_pos",
"tests/test_matrix.py::TestClustermap::test_square_warning",
"tests/test_matrix.py::TestClustermap::test_clustermap_annotation",
"tests/test_matrix.py::TestClustermap::test_tree_kws",
"tests/test_rcmod.py::TestFonts::test_set_font",
"tests/test_rcmod.py::TestFonts::test_different_sans_serif",
"tests/test_regression.py::TestRegressionPlotter::test_fast_regression",
"tests/test_regression.py::TestRegressionPlotter::test_regress_poly",
"tests/test_regression.py::TestRegressionPlotter::test_regress_n_boot",
"tests/test_regression.py::TestRegressionPlotter::test_regress_without_bootstrap",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_regression",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_perfect_separation",
"tests/test_regression.py::TestRegressionPlotter::test_robust_regression",
"tests/test_regression.py::TestRegressionPlotter::test_lowess_regression",
"tests/test_regression.py::TestRegressionPlots::test_residplot_lowess",
"tests/test_statistics.py::TestKDE::test_cumulative",
"tests/test_statistics.py::TestKDE::test_bivariate_cumulative",
"tests/test_statistics.py::TestECDF::test_against_statsmodels"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-33
|
1.0
|
{
"code": "diff --git b/seaborn/palettes.py a/seaborn/palettes.py\nindex 164120cb..f7f42984 100644\n--- b/seaborn/palettes.py\n+++ a/seaborn/palettes.py\n@@ -171,6 +171,88 @@ def color_palette(palette=None, n_colors=None, desat=None, as_cmap=False):\n .. include:: ../docstrings/color_palette.rst\n \n \"\"\"\n+ if palette is None:\n+ palette = get_color_cycle()\n+ if n_colors is None:\n+ n_colors = len(palette)\n+\n+ elif not isinstance(palette, str):\n+ palette = palette\n+ if n_colors is None:\n+ n_colors = len(palette)\n+ else:\n+\n+ if n_colors is None:\n+ # Use all colors in a qualitative palette or 6 of another kind\n+ n_colors = QUAL_PALETTE_SIZES.get(palette, 6)\n+\n+ if palette in SEABORN_PALETTES:\n+ # Named \"seaborn variant\" of matplotlib default color cycle\n+ palette = SEABORN_PALETTES[palette]\n+\n+ elif palette == \"hls\":\n+ # Evenly spaced colors in cylindrical RGB space\n+ palette = hls_palette(n_colors, as_cmap=as_cmap)\n+\n+ elif palette == \"husl\":\n+ # Evenly spaced colors in cylindrical Lab space\n+ palette = husl_palette(n_colors, as_cmap=as_cmap)\n+\n+ elif palette.lower() == \"jet\":\n+ # Paternalism\n+ raise ValueError(\"No.\")\n+\n+ elif palette.startswith(\"ch:\"):\n+ # Cubehelix palette with params specified in string\n+ args, kwargs = _parse_cubehelix_args(palette)\n+ palette = cubehelix_palette(n_colors, *args, **kwargs, as_cmap=as_cmap)\n+\n+ elif palette.startswith(\"light:\"):\n+ # light palette to color specified in string\n+ _, color = palette.split(\":\")\n+ reverse = color.endswith(\"_r\")\n+ if reverse:\n+ color = color[:-2]\n+ palette = light_palette(color, n_colors, reverse=reverse, as_cmap=as_cmap)\n+\n+ elif palette.startswith(\"dark:\"):\n+ # light palette to color specified in string\n+ _, color = palette.split(\":\")\n+ reverse = color.endswith(\"_r\")\n+ if reverse:\n+ color = color[:-2]\n+ palette = dark_palette(color, n_colors, reverse=reverse, as_cmap=as_cmap)\n+\n+ elif palette.startswith(\"blend:\"):\n+ # blend palette between colors specified in string\n+ _, colors = palette.split(\":\")\n+ colors = colors.split(\",\")\n+ palette = blend_palette(colors, n_colors, as_cmap=as_cmap)\n+\n+ else:\n+ try:\n+ # Perhaps a named matplotlib colormap?\n+ palette = mpl_palette(palette, n_colors, as_cmap=as_cmap)\n+ except (ValueError, KeyError): # Error class changed in mpl36\n+ raise ValueError(f\"{palette!r} is not a valid palette name\")\n+\n+ if desat is not None:\n+ palette = [desaturate(c, desat) for c in palette]\n+\n+ if not as_cmap:\n+\n+ # Always return as many colors as we asked for\n+ pal_cycle = cycle(palette)\n+ palette = [next(pal_cycle) for _ in range(n_colors)]\n+\n+ # Always return in r, g, b tuple format\n+ try:\n+ palette = map(mpl.colors.colorConverter.to_rgb, palette)\n+ palette = _ColorPalette(palette)\n+ except ValueError:\n+ raise ValueError(f\"Could not generate a palette for {palette}\")\n+\n+ return palette\n \n \n def hls_palette(n_colors=6, h=.01, l=.6, s=.65, as_cmap=False): # noqa\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/palettes.py b/seaborn/palettes.py\nindex f7f42984..164120cb 100644\n--- a/seaborn/palettes.py\n+++ b/seaborn/palettes.py\n@@ -171,88 +171,6 @@ def color_palette(palette=None, n_colors=None, desat=None, as_cmap=False):\n .. include:: ../docstrings/color_palette.rst\n \n \"\"\"\n- if palette is None:\n- palette = get_color_cycle()\n- if n_colors is None:\n- n_colors = len(palette)\n-\n- elif not isinstance(palette, str):\n- palette = palette\n- if n_colors is None:\n- n_colors = len(palette)\n- else:\n-\n- if n_colors is None:\n- # Use all colors in a qualitative palette or 6 of another kind\n- n_colors = QUAL_PALETTE_SIZES.get(palette, 6)\n-\n- if palette in SEABORN_PALETTES:\n- # Named \"seaborn variant\" of matplotlib default color cycle\n- palette = SEABORN_PALETTES[palette]\n-\n- elif palette == \"hls\":\n- # Evenly spaced colors in cylindrical RGB space\n- palette = hls_palette(n_colors, as_cmap=as_cmap)\n-\n- elif palette == \"husl\":\n- # Evenly spaced colors in cylindrical Lab space\n- palette = husl_palette(n_colors, as_cmap=as_cmap)\n-\n- elif palette.lower() == \"jet\":\n- # Paternalism\n- raise ValueError(\"No.\")\n-\n- elif palette.startswith(\"ch:\"):\n- # Cubehelix palette with params specified in string\n- args, kwargs = _parse_cubehelix_args(palette)\n- palette = cubehelix_palette(n_colors, *args, **kwargs, as_cmap=as_cmap)\n-\n- elif palette.startswith(\"light:\"):\n- # light palette to color specified in string\n- _, color = palette.split(\":\")\n- reverse = color.endswith(\"_r\")\n- if reverse:\n- color = color[:-2]\n- palette = light_palette(color, n_colors, reverse=reverse, as_cmap=as_cmap)\n-\n- elif palette.startswith(\"dark:\"):\n- # light palette to color specified in string\n- _, color = palette.split(\":\")\n- reverse = color.endswith(\"_r\")\n- if reverse:\n- color = color[:-2]\n- palette = dark_palette(color, n_colors, reverse=reverse, as_cmap=as_cmap)\n-\n- elif palette.startswith(\"blend:\"):\n- # blend palette between colors specified in string\n- _, colors = palette.split(\":\")\n- colors = colors.split(\",\")\n- palette = blend_palette(colors, n_colors, as_cmap=as_cmap)\n-\n- else:\n- try:\n- # Perhaps a named matplotlib colormap?\n- palette = mpl_palette(palette, n_colors, as_cmap=as_cmap)\n- except (ValueError, KeyError): # Error class changed in mpl36\n- raise ValueError(f\"{palette!r} is not a valid palette name\")\n-\n- if desat is not None:\n- palette = [desaturate(c, desat) for c in palette]\n-\n- if not as_cmap:\n-\n- # Always return as many colors as we asked for\n- pal_cycle = cycle(palette)\n- palette = [next(pal_cycle) for _ in range(n_colors)]\n-\n- # Always return in r, g, b tuple format\n- try:\n- palette = map(mpl.colors.colorConverter.to_rgb, palette)\n- palette = _ColorPalette(palette)\n- except ValueError:\n- raise ValueError(f\"Could not generate a palette for {palette}\")\n-\n- return palette\n \n \n def hls_palette(n_colors=6, h=.01, l=.6, s=.65, as_cmap=False): # noqa\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/palettes.py.\nHere is the description for the function:\ndef color_palette(palette=None, n_colors=None, desat=None, as_cmap=False):\n \"\"\"Return a list of colors or continuous colormap defining a palette.\n\n Possible ``palette`` values include:\n - Name of a seaborn palette (deep, muted, bright, pastel, dark, colorblind)\n - Name of matplotlib colormap\n - 'husl' or 'hls'\n - 'ch:<cubehelix arguments>'\n - 'light:<color>', 'dark:<color>', 'blend:<color>,<color>',\n - A sequence of colors in any format matplotlib accepts\n\n Calling this function with ``palette=None`` will return the current\n matplotlib color cycle.\n\n This function can also be used in a ``with`` statement to temporarily\n set the color cycle for a plot or set of plots.\n\n See the :ref:`tutorial <palette_tutorial>` for more information.\n\n Parameters\n ----------\n palette : None, string, or sequence, optional\n Name of palette or None to return current palette. If a sequence, input\n colors are used but possibly cycled and desaturated.\n n_colors : int, optional\n Number of colors in the palette. If ``None``, the default will depend\n on how ``palette`` is specified. Named palettes default to 6 colors,\n but grabbing the current palette or passing in a list of colors will\n not change the number of colors unless this is specified. Asking for\n more colors than exist in the palette will cause it to cycle. Ignored\n when ``as_cmap`` is True.\n desat : float, optional\n Proportion to desaturate each color by.\n as_cmap : bool\n If True, return a :class:`matplotlib.colors.ListedColormap`.\n\n Returns\n -------\n list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n See Also\n --------\n set_palette : Set the default color cycle for all plots.\n set_color_codes : Reassign color codes like ``\"b\"``, ``\"g\"``, etc. to\n colors from one of the seaborn palettes.\n\n Examples\n --------\n\n .. include:: ../docstrings/color_palette.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_core/test_data.py::TestPlotData::test_data_interchange_support_test",
"tests/_core/test_properties.py::TestColor::test_nominal_default_palette",
"tests/_core/test_properties.py::TestColor::test_nominal_default_palette_large",
"tests/_core/test_properties.py::TestColor::test_nominal_named_palette",
"tests/_core/test_properties.py::TestColor::test_nominal_list_palette",
"tests/_core/test_properties.py::TestColor::test_nominal_dict_palette",
"tests/_core/test_properties.py::TestColor::test_nominal_dict_with_missing_keys",
"tests/_core/test_properties.py::TestColor::test_nominal_list_too_short",
"tests/_core/test_properties.py::TestColor::test_nominal_list_too_long",
"tests/_core/test_properties.py::TestColor::test_continuous_default_palette",
"tests/_core/test_properties.py::TestColor::test_continuous_named_palette",
"tests/_core/test_properties.py::TestColor::test_continuous_tuple_palette",
"tests/_core/test_properties.py::TestColor::test_continuous_missing",
"tests/_stats/test_density.py::TestKDE::test_cumulative[True]",
"tests/_stats/test_density.py::TestKDE::test_cumulative[False]",
"tests/test_axisgrid.py::TestFacetGrid::test_self_data",
"tests/test_axisgrid.py::TestFacetGrid::test_self_figure",
"tests/test_axisgrid.py::TestFacetGrid::test_self_axes",
"tests/test_axisgrid.py::TestFacetGrid::test_axes_array_size",
"tests/test_axisgrid.py::TestFacetGrid::test_single_axes",
"tests/test_axisgrid.py::TestFacetGrid::test_col_wrap",
"tests/test_axisgrid.py::TestFacetGrid::test_normal_axes",
"tests/test_axisgrid.py::TestFacetGrid::test_wrapped_axes",
"tests/test_axisgrid.py::TestFacetGrid::test_axes_dict",
"tests/test_axisgrid.py::TestFacetGrid::test_figure_size",
"tests/test_axisgrid.py::TestFacetGrid::test_figure_size_with_legend",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_data",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_data_missing_level",
"tests/test_axisgrid.py::TestFacetGrid::test_get_boolean_legend_data",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_tuples",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_options",
"tests/test_axisgrid.py::TestFacetGrid::test_legendout_with_colwrap",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_tight_layout",
"tests/test_axisgrid.py::TestFacetGrid::test_subplot_kws",
"tests/test_axisgrid.py::TestFacetGrid::test_gridspec_kws",
"tests/test_axisgrid.py::TestFacetGrid::test_gridspec_kws_col_wrap",
"tests/test_axisgrid.py::TestFacetGrid::test_data_generator",
"tests/test_axisgrid.py::TestFacetGrid::test_map",
"tests/test_axisgrid.py::TestFacetGrid::test_map_dataframe",
"tests/test_axisgrid.py::TestFacetGrid::test_set",
"tests/test_axisgrid.py::TestFacetGrid::test_set_titles",
"tests/test_axisgrid.py::TestFacetGrid::test_set_titles_margin_titles",
"tests/test_axisgrid.py::TestFacetGrid::test_set_ticklabels",
"tests/test_axisgrid.py::TestFacetGrid::test_set_axis_labels",
"tests/test_axisgrid.py::TestFacetGrid::test_axis_lims",
"tests/test_axisgrid.py::TestFacetGrid::test_data_orders",
"tests/test_axisgrid.py::TestFacetGrid::test_palette",
"tests/test_axisgrid.py::TestFacetGrid::test_hue_kws",
"tests/test_axisgrid.py::TestFacetGrid::test_dropna",
"tests/test_axisgrid.py::TestFacetGrid::test_categorical_column_missing_categories",
"tests/test_axisgrid.py::TestFacetGrid::test_categorical_warning",
"tests/test_axisgrid.py::TestFacetGrid::test_refline",
"tests/test_axisgrid.py::TestFacetGrid::test_apply",
"tests/test_axisgrid.py::TestFacetGrid::test_pipe",
"tests/test_axisgrid.py::TestFacetGrid::test_tick_params",
"tests/test_axisgrid.py::TestFacetGrid::test_data_interchange",
"tests/test_axisgrid.py::TestPairGrid::test_self_data",
"tests/test_axisgrid.py::TestPairGrid::test_ignore_datelike_data",
"tests/test_axisgrid.py::TestPairGrid::test_self_figure",
"tests/test_axisgrid.py::TestPairGrid::test_self_axes",
"tests/test_axisgrid.py::TestPairGrid::test_default_axes",
"tests/test_axisgrid.py::TestPairGrid::test_specific_square_axes[vars0]",
"tests/test_axisgrid.py::TestPairGrid::test_specific_square_axes[vars1]",
"tests/test_axisgrid.py::TestPairGrid::test_remove_hue_from_default",
"tests/test_axisgrid.py::TestPairGrid::test_specific_nonsquare_axes[x_vars0-y_vars0]",
"tests/test_axisgrid.py::TestPairGrid::test_specific_nonsquare_axes[x_vars1-z]",
"tests/test_axisgrid.py::TestPairGrid::test_specific_nonsquare_axes[x_vars2-y_vars2]",
"tests/test_axisgrid.py::TestPairGrid::test_corner",
"tests/test_axisgrid.py::TestPairGrid::test_size",
"tests/test_axisgrid.py::TestPairGrid::test_map",
"tests/test_axisgrid.py::TestPairGrid::test_map_nonsquare",
"tests/test_axisgrid.py::TestPairGrid::test_map_lower",
"tests/test_axisgrid.py::TestPairGrid::test_map_upper",
"tests/test_axisgrid.py::TestPairGrid::test_map_mixed_funcsig",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_rectangular",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_color",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_palette",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_and_offdiag",
"tests/test_axisgrid.py::TestPairGrid::test_diag_sharey",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_matplotlib",
"tests/test_axisgrid.py::TestPairGrid::test_palette",
"tests/test_axisgrid.py::TestPairGrid::test_hue_kws",
"tests/test_axisgrid.py::TestPairGrid::test_hue_order",
"tests/test_axisgrid.py::TestPairGrid::test_hue_order_missing_level",
"tests/test_axisgrid.py::TestPairGrid::test_hue_in_map",
"tests/test_axisgrid.py::TestPairGrid::test_nondefault_index",
"tests/test_axisgrid.py::TestPairGrid::test_dropna[scatterplot]",
"tests/test_axisgrid.py::TestPairGrid::test_dropna[scatter]",
"tests/test_axisgrid.py::TestPairGrid::test_histplot_legend",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg_hue",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_diag_kde",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_kde",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_hist",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_markers",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_column_multiindex",
"tests/test_axisgrid.py::TestPairGrid::test_corner_despine",
"tests/test_axisgrid.py::TestPairGrid::test_corner_set",
"tests/test_axisgrid.py::TestPairGrid::test_legend",
"tests/test_axisgrid.py::TestPairGrid::test_tick_params",
"tests/test_axisgrid.py::TestPairGrid::test_data_interchange",
"tests/test_axisgrid.py::TestJointGrid::test_hue[True]",
"tests/test_axisgrid.py::TestJointGrid::test_hue[False]",
"tests/test_axisgrid.py::TestJointPlot::test_scatter_hue",
"tests/test_axisgrid.py::TestJointPlot::test_kde_hue",
"tests/test_axisgrid.py::TestJointPlot::test_palette",
"tests/test_base.py::TestHueMapping::test_plotter_default_init",
"tests/test_base.py::TestHueMapping::test_plotter_customization",
"tests/test_base.py::TestHueMapping::test_hue_map_categorical",
"tests/test_base.py::TestHueMapping::test_hue_map_numeric",
"tests/test_base.py::TestHueMapping::test_saturation",
"tests/test_base.py::TestSizeMapping::test_array_palette_deprecation",
"tests/test_base.py::TestVectorPlotter::test_iter_data_quantitites",
"tests/test_base.py::TestVectorPlotter::test_iter_data_keys",
"tests/test_base.py::TestVectorPlotter::test_iter_data_values",
"tests/test_base.py::TestVectorPlotter::test_iter_data_reverse",
"tests/test_base.py::TestVectorPlotter::test_iter_data_dropna",
"tests/test_base.py::TestVectorPlotter::test_attach_facets",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_identity_facets",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_facets",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_mixed_facets",
"tests/test_base.py::TestVectorPlotter::test_attach_shared_axes",
"tests/test_base.py::TestVectorPlotter::test_get_axes_single",
"tests/test_base.py::TestVectorPlotter::test_get_axes_facets",
"tests/test_base.py::TestVectorPlotter::test_var_order",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs0]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs1]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs2]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs3]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_empty[catplot]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_redundant_hue_backcompat",
"tests/test_categorical.py::TestStripPlot::test_labels_long[x]",
"tests/test_categorical.py::TestStripPlot::test_labels_long[y]",
"tests/test_categorical.py::TestStripPlot::test_labels_wide",
"tests/test_categorical.py::TestStripPlot::test_labels_hue_order",
"tests/test_categorical.py::TestStripPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestStripPlot::test_wide[h-dataframe]",
"tests/test_categorical.py::TestStripPlot::test_wide[h-dict]",
"tests/test_categorical.py::TestStripPlot::test_wide[v-dataframe]",
"tests/test_categorical.py::TestStripPlot::test_wide[v-dict]",
"tests/test_categorical.py::TestStripPlot::test_wide[y-dataframe]",
"tests/test_categorical.py::TestStripPlot::test_wide[y-dict]",
"tests/test_categorical.py::TestStripPlot::test_wide[x-dataframe]",
"tests/test_categorical.py::TestStripPlot::test_wide[x-dict]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables2-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables3-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables4-None]",
"tests/test_categorical.py::TestStripPlot::test_positions[variables5-None]",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables0]",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables1]",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables2]",
"tests/test_categorical.py::TestStripPlot::test_hue_categorical[a]",
"tests/test_categorical.py::TestStripPlot::test_hue_categorical[b]",
"tests/test_categorical.py::TestStripPlot::test_hue_dodged[a]",
"tests/test_categorical.py::TestStripPlot::test_hue_dodged[b]",
"tests/test_categorical.py::TestStripPlot::test_single[x-b-a]",
"tests/test_categorical.py::TestStripPlot::test_single[x-y-a]",
"tests/test_categorical.py::TestStripPlot::test_single[x-t-a]",
"tests/test_categorical.py::TestStripPlot::test_single[y-b-a]",
"tests/test_categorical.py::TestStripPlot::test_single[y-y-a]",
"tests/test_categorical.py::TestStripPlot::test_single[y-t-a]",
"tests/test_categorical.py::TestStripPlot::test_legend_categorical",
"tests/test_categorical.py::TestStripPlot::test_legend_numeric",
"tests/test_categorical.py::TestStripPlot::test_legend_attributes",
"tests/test_categorical.py::TestStripPlot::test_legend_disabled",
"tests/test_categorical.py::TestStripPlot::test_palette_from_color_deprecation",
"tests/test_categorical.py::TestStripPlot::test_palette_with_hue_deprecation",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestSwarmPlot::test_labels_long[x]",
"tests/test_categorical.py::TestSwarmPlot::test_labels_long[y]",
"tests/test_categorical.py::TestSwarmPlot::test_labels_wide",
"tests/test_categorical.py::TestSwarmPlot::test_labels_hue_order",
"tests/test_categorical.py::TestSwarmPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestSwarmPlot::test_wide[h-dataframe]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[h-dict]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[v-dataframe]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[v-dict]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[y-dataframe]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[y-dict]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[x-dataframe]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[x-dict]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables2-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables3-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables4-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables5-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables0]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables1]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables2]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_categorical[a]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_categorical[b]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_dodged[a]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_dodged[b]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-b-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-y-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-t-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-b-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-y-a]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-t-a]",
"tests/test_categorical.py::TestSwarmPlot::test_legend_categorical",
"tests/test_categorical.py::TestSwarmPlot::test_legend_numeric",
"tests/test_categorical.py::TestSwarmPlot::test_legend_attributes",
"tests/test_categorical.py::TestSwarmPlot::test_legend_disabled",
"tests/test_categorical.py::TestSwarmPlot::test_palette_from_color_deprecation",
"tests/test_categorical.py::TestSwarmPlot::test_palette_with_hue_deprecation",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestBoxPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestBoxPlot::test_legend_attributes",
"tests/test_categorical.py::TestBoxPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBoxPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBoxPlot::test_labels_wide",
"tests/test_categorical.py::TestBoxPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBoxPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBoxPlot::test_wide_data[h]",
"tests/test_categorical.py::TestBoxPlot::test_wide_data[v]",
"tests/test_categorical.py::TestBoxPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestBoxPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestBoxPlot::test_hue_not_dodged",
"tests/test_categorical.py::TestBoxPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestBoxPlot::test_dodge_native_scale_log",
"tests/test_categorical.py::TestBoxPlot::test_wide_data_multicolored",
"tests/test_categorical.py::TestBoxPlot::test_wide_data_single_color",
"tests/test_categorical.py::TestBoxPlot::test_hue_colors",
"tests/test_categorical.py::TestBoxPlot::test_gap",
"tests/test_categorical.py::TestBoxPlot::test_prop_dicts",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_attributes",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_wide",
"tests/test_categorical.py::TestBoxenPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBoxenPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[h]",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[v]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestBoxenPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestBoxenPlot::test_hue_colors",
"tests/test_categorical.py::TestBoxenPlot::test_gap",
"tests/test_categorical.py::TestBoxenPlot::test_fill",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestViolinPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestViolinPlot::test_legend_attributes",
"tests/test_categorical.py::TestViolinPlot::test_labels_long[x]",
"tests/test_categorical.py::TestViolinPlot::test_labels_long[y]",
"tests/test_categorical.py::TestViolinPlot::test_labels_wide",
"tests/test_categorical.py::TestViolinPlot::test_labels_hue_order",
"tests/test_categorical.py::TestViolinPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestViolinPlot::test_wide_data[h]",
"tests/test_categorical.py::TestViolinPlot::test_wide_data[v]",
"tests/test_categorical.py::TestViolinPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestViolinPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestViolinPlot::test_hue_not_dodged",
"tests/test_categorical.py::TestViolinPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestViolinPlot::test_dodge_native_scale_log",
"tests/test_categorical.py::TestViolinPlot::test_hue_colors",
"tests/test_categorical.py::TestViolinPlot::test_split_multi",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_area",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_count",
"tests/test_categorical.py::TestViolinPlot::test_common_norm",
"tests/test_categorical.py::TestViolinPlot::test_scale_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_scale_hue_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_gap",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestBarPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBarPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBarPlot::test_labels_wide",
"tests/test_categorical.py::TestBarPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBarPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBarPlot::test_wide_df[x]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[y]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[h]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[v]",
"tests/test_categorical.py::TestBarPlot::test_hue_redundant",
"tests/test_categorical.py::TestBarPlot::test_hue_matched",
"tests/test_categorical.py::TestBarPlot::test_hue_matched_by_name",
"tests/test_categorical.py::TestBarPlot::test_hue_dodged",
"tests/test_categorical.py::TestBarPlot::test_gap",
"tests/test_categorical.py::TestBarPlot::test_hue_undodged",
"tests/test_categorical.py::TestBarPlot::test_hue_order",
"tests/test_categorical.py::TestBarPlot::test_hue_norm",
"tests/test_categorical.py::TestBarPlot::test_fill",
"tests/test_categorical.py::TestBarPlot::test_native_scale_dodged",
"tests/test_categorical.py::TestBarPlot::test_native_scale_log_transform_dodged",
"tests/test_categorical.py::TestBarPlot::test_saturation_palette",
"tests/test_categorical.py::TestBarPlot::test_legend_numeric_auto",
"tests/test_categorical.py::TestBarPlot::test_legend_numeric_full",
"tests/test_categorical.py::TestBarPlot::test_legend_disabled",
"tests/test_categorical.py::TestBarPlot::test_legend_attributes",
"tests/test_categorical.py::TestBarPlot::test_legend_unfilled",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBarPlot::test_hue_implied_by_palette_deprecation",
"tests/test_categorical.py::TestPointPlot::test_labels_long[x]",
"tests/test_categorical.py::TestPointPlot::test_labels_long[y]",
"tests/test_categorical.py::TestPointPlot::test_labels_wide",
"tests/test_categorical.py::TestPointPlot::test_labels_hue_order",
"tests/test_categorical.py::TestPointPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestPointPlot::test_wide_df[x]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[y]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[h]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[v]",
"tests/test_categorical.py::TestPointPlot::test_hue",
"tests/test_categorical.py::TestPointPlot::test_wide_data_is_joined",
"tests/test_categorical.py::TestPointPlot::test_markers_linestyles_mapped",
"tests/test_categorical.py::TestPointPlot::test_dodge_boolean",
"tests/test_categorical.py::TestPointPlot::test_dodge_float",
"tests/test_categorical.py::TestPointPlot::test_dodge_log_scale",
"tests/test_categorical.py::TestPointPlot::test_legend_contents",
"tests/test_categorical.py::TestPointPlot::test_legend_set_props",
"tests/test_categorical.py::TestPointPlot::test_legend_synced_props",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs20]",
"tests/test_categorical.py::TestPointPlot::test_legend_disabled",
"tests/test_categorical.py::TestCountPlot::test_wide_data",
"tests/test_categorical.py::TestCountPlot::test_hue_redundant",
"tests/test_categorical.py::TestCountPlot::test_hue_dodged",
"tests/test_categorical.py::TestCountPlot::test_legend_numeric_auto",
"tests/test_categorical.py::TestCountPlot::test_legend_disabled",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestCatPlot::test_facet_organization",
"tests/test_categorical.py::TestCatPlot::test_plot_elements",
"tests/test_categorical.py::TestCatPlot::test_bad_plot_kind_error",
"tests/test_categorical.py::TestCatPlot::test_plot_colors",
"tests/test_categorical.py::TestCatPlot::test_ax_kwarg_removal",
"tests/test_categorical.py::TestCatPlot::test_share_xy",
"tests/test_categorical.py::TestCatPlot::test_facetgrid_data",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[col]",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[row]",
"tests/test_categorical.py::TestCatPlot::test_invalid_kind",
"tests/test_categorical.py::TestCatPlot::test_legend_with_auto",
"tests/test_categorical.py::TestCatPlot::test_weights_warning",
"tests/test_distributions.py::TestRugPlot::test_wide_vs_long_data",
"tests/test_distributions.py::TestRugPlot::test_rug_colors",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_wide_vs_long_data",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[layer]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[stack]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[fill]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_stacking",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_filling",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_default[stack]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_default[fill]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[layer]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[stack]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[fill]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_multiple_argument_check",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_cumulative",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_common_norm",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_common_grid",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_with_hue",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_weight_norm",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_sticky_edges",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_legend",
"tests/test_distributions.py::TestKDEPlotBivariate::test_fill_artists",
"tests/test_distributions.py::TestKDEPlotBivariate::test_common_norm",
"tests/test_distributions.py::TestKDEPlotBivariate::test_weights",
"tests/test_distributions.py::TestKDEPlotBivariate::test_hue_ignores_cmap",
"tests/test_distributions.py::TestKDEPlotBivariate::test_contour_line_cmap",
"tests/test_distributions.py::TestHistPlotUnivariate::test_wide_vs_long_data",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[layer-bars]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[layer-step]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[layer-poly]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[dodge-bars]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[dodge-step]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[dodge-poly]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[stack-bars]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[stack-step]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[stack-poly]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[fill-bars]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[fill-step]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[fill-poly]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_stack",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_dodge",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_as_numpy_dodged",
"tests/test_distributions.py::TestHistPlotUnivariate::test_density_stat_common_norm",
"tests/test_distributions.py::TestHistPlotUnivariate::test_density_stat_unique_norm",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_common_norm[probability]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_common_norm[proportion]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_unique_norm[probability]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_unique_norm[proportion]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_common_bins",
"tests/test_distributions.py::TestHistPlotUnivariate::test_unique_bins",
"tests/test_distributions.py::TestHistPlotUnivariate::test_weight_norm",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[count-layer]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[count-dodge]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[density-layer]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[density-dodge]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[probability-layer]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[probability-dodge]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_hue",
"tests/test_distributions.py::TestHistPlotUnivariate::test_element_default",
"tests/test_distributions.py::TestHistPlotUnivariate::test_log_scale_dodge",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_with_hue",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_with_hue_unique_bins",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_with_col_unique_bins",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_common_norm",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_unique_norm",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_colors",
"tests/test_distributions.py::TestHistPlotBivariate::test_hue_color_limits",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_hue",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs3]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs9]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs10]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs11]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs12]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs13]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs14]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs15]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs3]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs9]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs10]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs11]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs3]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs9]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_facets[col]",
"tests/test_distributions.py::TestDisPlot::test_facets[row]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[dodge]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[stack]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[fill]",
"tests/test_distributions.py::TestDisPlot::test_ax_warning",
"tests/test_distributions.py::TestDisPlot::test_array_faceting[col]",
"tests/test_distributions.py::TestDisPlot::test_array_faceting[row]",
"tests/test_distributions.py::TestDisPlot::test_legend",
"tests/test_distributions.py::TestDisPlot::test_empty",
"tests/test_distributions.py::TestDisPlot::test_bivariate_ecdf_error",
"tests/test_distributions.py::TestDisPlot::test_bivariate_kde_norm",
"tests/test_distributions.py::TestDisPlot::test_bivariate_hist_norm",
"tests/test_distributions.py::TestDisPlot::test_facetgrid_data",
"tests/test_miscplot.py::TestPalPlot::test_palplot_size",
"tests/test_palettes.py::TestColorPalettes::test_current_palette",
"tests/test_palettes.py::TestColorPalettes::test_palette_context",
"tests/test_palettes.py::TestColorPalettes::test_big_palette_context",
"tests/test_palettes.py::TestColorPalettes::test_palette_size",
"tests/test_palettes.py::TestColorPalettes::test_seaborn_palettes",
"tests/test_palettes.py::TestColorPalettes::test_hls_palette",
"tests/test_palettes.py::TestColorPalettes::test_husl_palette",
"tests/test_palettes.py::TestColorPalettes::test_mpl_palette",
"tests/test_palettes.py::TestColorPalettes::test_mpl_dark_palette",
"tests/test_palettes.py::TestColorPalettes::test_bad_palette_name",
"tests/test_palettes.py::TestColorPalettes::test_terrible_palette_name",
"tests/test_palettes.py::TestColorPalettes::test_bad_palette_colors",
"tests/test_palettes.py::TestColorPalettes::test_palette_desat",
"tests/test_palettes.py::TestColorPalettes::test_palette_is_list_of_tuples",
"tests/test_palettes.py::TestColorPalettes::test_palette_cycles",
"tests/test_palettes.py::TestColorPalettes::test_light_palette",
"tests/test_palettes.py::TestColorPalettes::test_dark_palette",
"tests/test_palettes.py::TestColorPalettes::test_blend_palette",
"tests/test_palettes.py::TestColorPalettes::test_cubehelix_code",
"tests/test_palettes.py::TestColorPalettes::test_xkcd_palette",
"tests/test_palettes.py::TestColorPalettes::test_crayon_palette",
"tests/test_palettes.py::TestColorPalettes::test_color_codes",
"tests/test_palettes.py::TestColorPalettes::test_as_hex",
"tests/test_palettes.py::TestColorPalettes::test_preserved_palette_length",
"tests/test_palettes.py::TestColorPalettes::test_html_repr",
"tests/test_rcmod.py::TestAxesStyle::test_set_rc",
"tests/test_rcmod.py::TestAxesStyle::test_set_with_palette",
"tests/test_rcmod.py::TestAxesStyle::test_reset_defaults",
"tests/test_rcmod.py::TestAxesStyle::test_reset_orig",
"tests/test_rcmod.py::TestAxesStyle::test_set_is_alias",
"tests/test_rcmod.py::TestPalette::test_set_palette",
"tests/test_rcmod.py::TestFonts::test_set_font",
"tests/test_rcmod.py::TestFonts::test_set_serif_font",
"tests/test_rcmod.py::TestFonts::test_different_sans_serif",
"tests/test_regression.py::TestRegressionPlotter::test_fast_regression",
"tests/test_regression.py::TestRegressionPlotter::test_regress_poly",
"tests/test_regression.py::TestRegressionPlotter::test_regress_n_boot",
"tests/test_regression.py::TestRegressionPlotter::test_regress_without_bootstrap",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_regression",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_perfect_separation",
"tests/test_regression.py::TestRegressionPlotter::test_robust_regression",
"tests/test_regression.py::TestRegressionPlotter::test_lowess_regression",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_basic",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_hue",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_markers",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_marker_linewidths",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facets",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_hue_col_nolegend",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_scatter_kws",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_truncate[True]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_truncate[False]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_sharey",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_kws",
"tests/test_regression.py::TestRegressionPlots::test_residplot_lowess",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_simple",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_complex",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[series]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[numpy]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[list]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_wide",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_hues",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_sizes",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_styles",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_weighted_estimator",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_stringy_numerics",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_legend",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_unshared_axis_labels",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_data",
"tests/test_relational.py::TestRelationalPlotter::test_facet_variable_collision",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_scatter_unused_variables",
"tests/test_relational.py::TestRelationalPlotter::test_ax_kwarg_removal",
"tests/test_relational.py::TestRelationalPlotter::test_legend_has_no_offset",
"tests/test_relational.py::TestRelationalPlotter::test_lineplot_2d_dashes",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_style",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue_and_style",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_categorical",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_style_same",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_style_diff",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_size_same",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_full[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_brief[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_value_error",
"tests/test_relational.py::TestLinePlotter::test_legend_log_norm[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_var[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_var[size]",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_numberic_brief[hue]",
"tests/test_relational.py::TestLinePlotter::test_plot",
"tests/test_relational.py::TestLinePlotter::test_lineplot_axes",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_hue",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_hue_and_style",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics0]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics1]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics2]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics3]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics4]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics5]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics6]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics7]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics8]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics9]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics10]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics11]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_smoke",
"tests/test_relational.py::TestScatterPlotter::test_legend_hue",
"tests/test_relational.py::TestScatterPlotter::test_legend_hue_style_same",
"tests/test_relational.py::TestScatterPlotter::test_legend_hue_style_different",
"tests/test_relational.py::TestScatterPlotter::test_legend_data_hue_size_same",
"tests/test_relational.py::TestScatterPlotter::test_legend_numeric_hue_full",
"tests/test_relational.py::TestScatterPlotter::test_legend_numeric_hue_brief",
"tests/test_relational.py::TestScatterPlotter::test_legend_attributes_hue",
"tests/test_relational.py::TestScatterPlotter::test_legend_attributes_hue_and_style",
"tests/test_relational.py::TestScatterPlotter::test_legend_value_error",
"tests/test_relational.py::TestScatterPlotter::test_plot",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_axes",
"tests/test_relational.py::TestScatterPlotter::test_hue_order",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics0]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics1]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics2]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics3]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics4]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics5]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics6]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics7]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics8]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics9]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics10]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics11]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_smoke",
"tests/test_statistics.py::TestKDE::test_cumulative",
"tests/test_statistics.py::TestKDE::test_bivariate_cumulative",
"tests/test_statistics.py::TestECDF::test_against_statsmodels",
"tests/test_utils.py::test_ticklabels_overlap",
"tests/test_utils.py::test_move_legend_grid_object",
"tests/test_utils.py::test_move_legend_with_labels"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-34
|
1.0
|
{
"code": "diff --git b/seaborn/utils.py a/seaborn/utils.py\nindex 9e6a20ff..98720ba3 100644\n--- b/seaborn/utils.py\n+++ a/seaborn/utils.py\n@@ -160,6 +160,27 @@ def desaturate(color, prop):\n desaturated color code in RGB tuple representation\n \n \"\"\"\n+ # Check inputs\n+ if not 0 <= prop <= 1:\n+ raise ValueError(\"prop must be between 0 and 1\")\n+\n+ # Get rgb tuple rep\n+ rgb = to_rgb(color)\n+\n+ # Short circuit to avoid floating point issues\n+ if prop == 1:\n+ return rgb\n+\n+ # Convert to hls\n+ h, l, s = colorsys.rgb_to_hls(*rgb)\n+\n+ # Desaturate the saturation channel\n+ s *= prop\n+\n+ # Convert back to rgb\n+ new_color = colorsys.hls_to_rgb(h, l, s)\n+\n+ return new_color\n \n \n def saturate(color):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/utils.py b/seaborn/utils.py\nindex 98720ba3..9e6a20ff 100644\n--- a/seaborn/utils.py\n+++ b/seaborn/utils.py\n@@ -160,27 +160,6 @@ def desaturate(color, prop):\n desaturated color code in RGB tuple representation\n \n \"\"\"\n- # Check inputs\n- if not 0 <= prop <= 1:\n- raise ValueError(\"prop must be between 0 and 1\")\n-\n- # Get rgb tuple rep\n- rgb = to_rgb(color)\n-\n- # Short circuit to avoid floating point issues\n- if prop == 1:\n- return rgb\n-\n- # Convert to hls\n- h, l, s = colorsys.rgb_to_hls(*rgb)\n-\n- # Desaturate the saturation channel\n- s *= prop\n-\n- # Convert back to rgb\n- new_color = colorsys.hls_to_rgb(h, l, s)\n-\n- return new_color\n \n \n def saturate(color):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/utils.py.\nHere is the description for the function:\ndef desaturate(color, prop):\n \"\"\"Decrease the saturation channel of a color by some percent.\n\n Parameters\n ----------\n color : matplotlib color\n hex, rgb-tuple, or html color name\n prop : float\n saturation channel of color will be multiplied by this value\n\n Returns\n -------\n new_color : rgb tuple\n desaturated color code in RGB tuple representation\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_core/test_data.py::TestPlotData::test_data_interchange_support_test",
"tests/_core/test_plot.py::TestLayerAddition::test_stat_default",
"tests/_core/test_plot.py::TestScaling::test_categorical_as_datetime",
"tests/_core/test_plot.py::TestScaling::test_log_scale_name",
"tests/_core/test_plot.py::TestScaling::test_identity_mapping_color_strings",
"tests/_core/test_plot.py::TestScaling::test_undefined_variable_raises",
"tests/_core/test_scales.py::TestNominal::test_color_numeric_int_float_mix",
"tests/_stats/test_density.py::TestKDE::test_cumulative[True]",
"tests/_stats/test_density.py::TestKDE::test_cumulative[False]",
"tests/test_base.py::TestHueMapping::test_saturation",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs4]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs5]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs6]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[barplot-kwargs7]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs8]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs9]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs10]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxplot-kwargs11]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs12]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs13]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs14]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs15]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs28]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs29]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs30]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs31]",
"tests/test_categorical.py::TestBoxPlot::test_legend_attributes",
"tests/test_categorical.py::TestBoxPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBoxPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBoxPlot::test_labels_wide",
"tests/test_categorical.py::TestBoxPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBoxPlot::test_two_calls",
"tests/test_categorical.py::TestBoxPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBoxPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBoxPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBoxPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestBoxPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestBoxPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestBoxPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestBoxPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestBoxPlot::test_wide_data[h]",
"tests/test_categorical.py::TestBoxPlot::test_wide_data[v]",
"tests/test_categorical.py::TestBoxPlot::test_grouped[x]",
"tests/test_categorical.py::TestBoxPlot::test_grouped[y]",
"tests/test_categorical.py::TestBoxPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestBoxPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestBoxPlot::test_hue_not_dodged",
"tests/test_categorical.py::TestBoxPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestBoxPlot::test_dodge_native_scale_log",
"tests/test_categorical.py::TestBoxPlot::test_dodge_without_hue",
"tests/test_categorical.py::TestBoxPlot::test_log_data_scale[x]",
"tests/test_categorical.py::TestBoxPlot::test_log_data_scale[y]",
"tests/test_categorical.py::TestBoxPlot::test_wide_data_multicolored",
"tests/test_categorical.py::TestBoxPlot::test_linecolor",
"tests/test_categorical.py::TestBoxPlot::test_linecolor_gray_warning",
"tests/test_categorical.py::TestBoxPlot::test_saturation",
"tests/test_categorical.py::TestBoxPlot::test_linewidth",
"tests/test_categorical.py::TestBoxPlot::test_notch[notch]",
"tests/test_categorical.py::TestBoxPlot::test_notch[shownotches]",
"tests/test_categorical.py::TestBoxPlot::test_whis",
"tests/test_categorical.py::TestBoxPlot::test_gap",
"tests/test_categorical.py::TestBoxPlot::test_prop_dicts",
"tests/test_categorical.py::TestBoxPlot::test_showfliers",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_attributes",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_wide",
"tests/test_categorical.py::TestBoxenPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBoxenPlot::test_two_calls",
"tests/test_categorical.py::TestBoxenPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBoxenPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBoxenPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBoxenPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestBoxenPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[h]",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[v]",
"tests/test_categorical.py::TestBoxenPlot::test_grouped[x]",
"tests/test_categorical.py::TestBoxenPlot::test_grouped[y]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestBoxenPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestBoxenPlot::test_linecolor",
"tests/test_categorical.py::TestBoxenPlot::test_linewidth",
"tests/test_categorical.py::TestBoxenPlot::test_saturation",
"tests/test_categorical.py::TestBoxenPlot::test_gap",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_int",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_full",
"tests/test_categorical.py::TestBoxenPlot::test_trust_alpha",
"tests/test_categorical.py::TestBoxenPlot::test_outlier_prop",
"tests/test_categorical.py::TestBoxenPlot::test_exponential_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_linear_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_area_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_box_kws",
"tests/test_categorical.py::TestBoxenPlot::test_line_kws",
"tests/test_categorical.py::TestBoxenPlot::test_flier_kws",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_checks",
"tests/test_categorical.py::TestBoxenPlot::test_width_method_check",
"tests/test_categorical.py::TestBoxenPlot::test_scale_deprecation",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_legend_attributes",
"tests/test_categorical.py::TestViolinPlot::test_labels_long[x]",
"tests/test_categorical.py::TestViolinPlot::test_labels_long[y]",
"tests/test_categorical.py::TestViolinPlot::test_labels_wide",
"tests/test_categorical.py::TestViolinPlot::test_labels_hue_order",
"tests/test_categorical.py::TestViolinPlot::test_two_calls",
"tests/test_categorical.py::TestViolinPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestViolinPlot::test_log_scale[x]",
"tests/test_categorical.py::TestViolinPlot::test_log_scale[y]",
"tests/test_categorical.py::TestViolinPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestViolinPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestViolinPlot::test_wide_data[h]",
"tests/test_categorical.py::TestViolinPlot::test_wide_data[v]",
"tests/test_categorical.py::TestViolinPlot::test_grouped[x]",
"tests/test_categorical.py::TestViolinPlot::test_grouped[y]",
"tests/test_categorical.py::TestViolinPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestViolinPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestViolinPlot::test_hue_not_dodged",
"tests/test_categorical.py::TestViolinPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestViolinPlot::test_dodge_native_scale_log",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[box]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[quart]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[stick]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[point]",
"tests/test_categorical.py::TestViolinPlot::test_linewidth",
"tests/test_categorical.py::TestViolinPlot::test_saturation",
"tests/test_categorical.py::TestViolinPlot::test_inner_box[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_box[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_quartiles[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_quartiles[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_stick[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_stick[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_points[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_points[y]",
"tests/test_categorical.py::TestViolinPlot::test_split_single",
"tests/test_categorical.py::TestViolinPlot::test_split_multi",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_area",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_count",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_width",
"tests/test_categorical.py::TestViolinPlot::test_common_norm",
"tests/test_categorical.py::TestViolinPlot::test_scale_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_scale_hue_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_bw_adjust",
"tests/test_categorical.py::TestViolinPlot::test_bw_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_gap",
"tests/test_categorical.py::TestViolinPlot::test_inner_kws",
"tests/test_categorical.py::TestViolinPlot::test_box_inner_kws",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestBarPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBarPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBarPlot::test_labels_wide",
"tests/test_categorical.py::TestBarPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBarPlot::test_two_calls",
"tests/test_categorical.py::TestBarPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBarPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBarPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBarPlot::test_labels_flat",
"tests/test_categorical.py::TestBarPlot::test_single_var[x]",
"tests/test_categorical.py::TestBarPlot::test_single_var[y]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[x]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[y]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[h]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[v]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[x]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[y]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[h]",
"tests/test_categorical.py::TestBarPlot::test_vector_orient[v]",
"tests/test_categorical.py::TestBarPlot::test_xy_vertical",
"tests/test_categorical.py::TestBarPlot::test_xy_horizontal",
"tests/test_categorical.py::TestBarPlot::test_xy_with_na_grouper",
"tests/test_categorical.py::TestBarPlot::test_xy_with_na_value",
"tests/test_categorical.py::TestBarPlot::test_gap",
"tests/test_categorical.py::TestBarPlot::test_hue_norm",
"tests/test_categorical.py::TestBarPlot::test_xy_native_scale",
"tests/test_categorical.py::TestBarPlot::test_xy_native_scale_log_transform",
"tests/test_categorical.py::TestBarPlot::test_datetime_native_scale_axis",
"tests/test_categorical.py::TestBarPlot::test_native_scale_dodged",
"tests/test_categorical.py::TestBarPlot::test_native_scale_log_transform_dodged",
"tests/test_categorical.py::TestBarPlot::test_estimate_default",
"tests/test_categorical.py::TestBarPlot::test_estimate_string",
"tests/test_categorical.py::TestBarPlot::test_estimate_func",
"tests/test_categorical.py::TestBarPlot::test_weighted_estimate",
"tests/test_categorical.py::TestBarPlot::test_estimate_log_transform",
"tests/test_categorical.py::TestBarPlot::test_errorbars",
"tests/test_categorical.py::TestBarPlot::test_width",
"tests/test_categorical.py::TestBarPlot::test_width_native_scale",
"tests/test_categorical.py::TestBarPlot::test_width_spaced_categories",
"tests/test_categorical.py::TestBarPlot::test_saturation_color",
"tests/test_categorical.py::TestBarPlot::test_saturation_palette",
"tests/test_categorical.py::TestBarPlot::test_legend_numeric_auto",
"tests/test_categorical.py::TestBarPlot::test_legend_numeric_full",
"tests/test_categorical.py::TestBarPlot::test_legend_disabled",
"tests/test_categorical.py::TestBarPlot::test_error_caps",
"tests/test_categorical.py::TestBarPlot::test_error_caps_native_scale",
"tests/test_categorical.py::TestBarPlot::test_error_caps_native_scale_log_transform",
"tests/test_categorical.py::TestBarPlot::test_bar_kwargs",
"tests/test_categorical.py::TestBarPlot::test_err_kws[True]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBarPlot::test_errwidth_deprecation",
"tests/test_categorical.py::TestBarPlot::test_errcolor_deprecation",
"tests/test_categorical.py::TestBarPlot::test_capsize_as_none_deprecation",
"tests/test_categorical.py::TestCountPlot::test_labels_long",
"tests/test_categorical.py::TestCountPlot::test_wide_data",
"tests/test_categorical.py::TestCountPlot::test_flat_series",
"tests/test_categorical.py::TestCountPlot::test_x_series",
"tests/test_categorical.py::TestCountPlot::test_y_series",
"tests/test_categorical.py::TestCountPlot::test_stat[percent]",
"tests/test_categorical.py::TestCountPlot::test_stat[probability]",
"tests/test_categorical.py::TestCountPlot::test_stat[proportion]",
"tests/test_categorical.py::TestCountPlot::test_legend_numeric_auto",
"tests/test_categorical.py::TestCountPlot::test_legend_disabled",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestCatPlot::test_plot_elements",
"tests/test_categorical.py::TestCatPlot::test_plot_colors",
"tests/test_categorical.py::TestCatPlot::test_share_xy",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_cumulative",
"tests/test_matrix.py::TestDendrogram::test_ndarray_input",
"tests/test_matrix.py::TestDendrogram::test_df_input",
"tests/test_matrix.py::TestDendrogram::test_df_multindex_input",
"tests/test_matrix.py::TestDendrogram::test_axis0_input",
"tests/test_matrix.py::TestDendrogram::test_rotate_input",
"tests/test_matrix.py::TestDendrogram::test_rotate_axis0_input",
"tests/test_matrix.py::TestDendrogram::test_custom_linkage",
"tests/test_matrix.py::TestDendrogram::test_label_false",
"tests/test_matrix.py::TestDendrogram::test_linkage_scipy",
"tests/test_matrix.py::TestDendrogram::test_fastcluster_other_method",
"tests/test_matrix.py::TestDendrogram::test_fastcluster_non_euclidean",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_plot",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_rotate",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_ticklabel_rotation",
"tests/test_matrix.py::TestClustermap::test_ndarray_input",
"tests/test_matrix.py::TestClustermap::test_df_input",
"tests/test_matrix.py::TestClustermap::test_corr_df_input",
"tests/test_matrix.py::TestClustermap::test_pivot_input",
"tests/test_matrix.py::TestClustermap::test_colors_input",
"tests/test_matrix.py::TestClustermap::test_categorical_colors_input",
"tests/test_matrix.py::TestClustermap::test_nested_colors_input",
"tests/test_matrix.py::TestClustermap::test_colors_input_custom_cmap",
"tests/test_matrix.py::TestClustermap::test_z_score",
"tests/test_matrix.py::TestClustermap::test_z_score_axis0",
"tests/test_matrix.py::TestClustermap::test_standard_scale",
"tests/test_matrix.py::TestClustermap::test_standard_scale_axis0",
"tests/test_matrix.py::TestClustermap::test_z_score_standard_scale",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap",
"tests/test_matrix.py::TestClustermap::test_nested_color_list_to_matrix_and_cmap",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap_axis1",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap_different_sizes",
"tests/test_matrix.py::TestClustermap::test_savefig",
"tests/test_matrix.py::TestClustermap::test_plot_dendrograms",
"tests/test_matrix.py::TestClustermap::test_cluster_false",
"tests/test_matrix.py::TestClustermap::test_row_col_colors",
"tests/test_matrix.py::TestClustermap::test_cluster_false_row_col_colors",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_shuffled",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_missing",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_one_axis",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series_shuffled",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series_missing",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_ignore_heatmap_kwargs",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_raise_on_mixed_index_types",
"tests/test_matrix.py::TestClustermap::test_mask_reorganization",
"tests/test_matrix.py::TestClustermap::test_ticklabel_reorganization",
"tests/test_matrix.py::TestClustermap::test_noticklabels",
"tests/test_matrix.py::TestClustermap::test_size_ratios",
"tests/test_matrix.py::TestClustermap::test_cbar_pos",
"tests/test_matrix.py::TestClustermap::test_square_warning",
"tests/test_matrix.py::TestClustermap::test_clustermap_annotation",
"tests/test_matrix.py::TestClustermap::test_tree_kws",
"tests/test_palettes.py::TestColorPalettes::test_palette_desat",
"tests/test_rcmod.py::TestFonts::test_set_font",
"tests/test_rcmod.py::TestFonts::test_different_sans_serif",
"tests/test_regression.py::TestRegressionPlotter::test_fast_regression",
"tests/test_regression.py::TestRegressionPlotter::test_regress_poly",
"tests/test_regression.py::TestRegressionPlotter::test_regress_n_boot",
"tests/test_regression.py::TestRegressionPlotter::test_regress_without_bootstrap",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_regression",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_perfect_separation",
"tests/test_regression.py::TestRegressionPlotter::test_robust_regression",
"tests/test_regression.py::TestRegressionPlotter::test_lowess_regression",
"tests/test_regression.py::TestRegressionPlots::test_residplot_lowess",
"tests/test_statistics.py::TestKDE::test_cumulative",
"tests/test_statistics.py::TestKDE::test_bivariate_cumulative",
"tests/test_statistics.py::TestECDF::test_against_statsmodels",
"tests/test_utils.py::test_desaturate",
"tests/test_utils.py::test_desaturation_prop"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-35
|
1.0
|
{
"code": "diff --git b/seaborn/_core/groupby.py a/seaborn/_core/groupby.py\nindex 4db97378..cb63c670 100644\n--- b/seaborn/_core/groupby.py\n+++ a/seaborn/_core/groupby.py\n@@ -39,6 +39,12 @@ class GroupBy:\n data; these will be dropped before the groups are defined.\n \n \"\"\"\n+ if not order:\n+ raise ValueError(\"GroupBy requires at least one grouping variable\")\n+\n+ if isinstance(order, list):\n+ order = {k: None for k in order}\n+ self.order = order\n \n def _get_groups(\n self, data: DataFrame\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_core/groupby.py b/seaborn/_core/groupby.py\nindex cb63c670..4db97378 100644\n--- a/seaborn/_core/groupby.py\n+++ b/seaborn/_core/groupby.py\n@@ -39,12 +39,6 @@ class GroupBy:\n data; these will be dropped before the groups are defined.\n \n \"\"\"\n- if not order:\n- raise ValueError(\"GroupBy requires at least one grouping variable\")\n-\n- if isinstance(order, list):\n- order = {k: None for k in order}\n- self.order = order\n \n def _get_groups(\n self, data: DataFrame\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_core/groupby.py.\nHere is the description for the function:\n def __init__(self, order: list[str] | dict[str, list | None]):\n \"\"\"\n Initialize the GroupBy from grouping variables and optional level orders.\n\n Parameters\n ----------\n order\n List of variable names or dict mapping names to desired level orders.\n Level order values can be None to use default ordering rules. The\n variables can include names that are not expected to appear in the\n data; these will be dropped before the groups are defined.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_stats/test_counting.py::TestCount::test_single_grouper",
"tests/_core/test_moves.py::TestJitter::test_default",
"tests/_stats/test_aggregation.py::TestAgg::test_default",
"tests/_core/test_groupby.py::test_init_from_list",
"tests/_stats/test_order.py::TestPerc::test_int_k",
"tests/_stats/test_counting.py::TestCount::test_multiple_groupers",
"tests/_stats/test_regression.py::TestPolyFit::test_no_grouper",
"tests/_stats/test_density.py::TestKDE::test_columns[x]",
"tests/_stats/test_density.py::TestKDE::test_columns[y]",
"tests/_core/test_groupby.py::test_init_from_dict",
"tests/_core/test_groupby.py::test_init_requires_order",
"tests/_stats/test_counting.py::TestHist::test_count_stat",
"tests/_core/test_moves.py::TestJitter::test_width",
"tests/_stats/test_order.py::TestPerc::test_list_k",
"tests/_stats/test_order.py::TestPerc::test_orientation",
"tests/_core/test_groupby.py::test_at_least_one_grouping_variable_required",
"tests/_core/test_groupby.py::test_agg_one_grouper",
"tests/_core/test_groupby.py::test_agg_two_groupers",
"tests/_stats/test_density.py::TestKDE::test_gridsize[20]",
"tests/_stats/test_order.py::TestPerc::test_method",
"tests/_stats/test_order.py::TestPerc::test_grouped",
"tests/_stats/test_density.py::TestKDE::test_gridsize[30]",
"tests/_stats/test_regression.py::TestPolyFit::test_one_grouper",
"tests/_stats/test_aggregation.py::TestAgg::test_default_multi",
"tests/_stats/test_aggregation.py::TestAgg::test_func[max]",
"tests/_stats/test_density.py::TestKDE::test_gridsize[None]",
"tests/_stats/test_counting.py::TestHist::test_probability_stat",
"tests/_stats/test_counting.py::TestHist::test_proportion_stat",
"tests/_stats/test_counting.py::TestHist::test_percent_stat",
"tests/_core/test_groupby.py::test_agg_two_groupers_ordered",
"tests/_core/test_groupby.py::test_apply_no_grouper",
"tests/_stats/test_aggregation.py::TestAgg::test_func[<lambda>]",
"tests/_stats/test_density.py::TestKDE::test_cut[1]",
"tests/_core/test_moves.py::TestJitter::test_x",
"tests/_core/test_moves.py::TestJitter::test_y",
"tests/_stats/test_aggregation.py::TestEst::test_mean_sd[mean0]",
"tests/_stats/test_aggregation.py::TestEst::test_mean_sd[mean1]",
"tests/_core/test_groupby.py::test_apply_one_grouper",
"tests/_core/test_groupby.py::test_apply_mutate_columns",
"tests/_stats/test_aggregation.py::TestEst::test_sd_single_obs",
"tests/_stats/test_aggregation.py::TestEst::test_median_pi",
"tests/_core/test_groupby.py::test_apply_replace_columns",
"tests/_core/test_moves.py::TestJitter::test_seed",
"tests/_core/test_moves.py::TestDodge::test_default",
"tests/_stats/test_density.py::TestKDE::test_cut[2]",
"tests/_core/test_moves.py::TestDodge::test_fill",
"tests/_core/test_moves.py::TestDodge::test_drop",
"tests/_stats/test_density.py::TestKDE::test_common_grid[True]",
"tests/_core/test_moves.py::TestDodge::test_gap",
"tests/_stats/test_density.py::TestKDE::test_common_grid[False]",
"tests/_stats/test_density.py::TestKDE::test_common_norm[True]",
"tests/_stats/test_density.py::TestKDE::test_common_norm[False]",
"tests/_core/test_moves.py::TestDodge::test_widths_default",
"tests/_stats/test_aggregation.py::TestEst::test_weighted_mean",
"tests/_core/test_moves.py::TestDodge::test_widths_fill",
"tests/_stats/test_density.py::TestKDE::test_common_norm_variables",
"tests/_stats/test_aggregation.py::TestEst::test_seed",
"tests/_stats/test_order.py::TestPerc::test_with_na",
"tests/_stats/test_regression.py::TestPolyFit::test_missing_data",
"tests/_core/test_moves.py::TestDodge::test_widths_drop",
"tests/_stats/test_density.py::TestKDE::test_common_input_checks[norm]",
"tests/_stats/test_counting.py::TestHist::test_density_stat",
"tests/_stats/test_counting.py::TestHist::test_frequency_stat",
"tests/_core/test_moves.py::TestDodge::test_faceted_default",
"tests/_stats/test_density.py::TestKDE::test_common_input_checks[grid]",
"tests/_stats/test_counting.py::TestHist::test_cumulative_count",
"tests/_core/test_plot.py::TestLayerAddition::test_orient[x-x]",
"tests/_stats/test_density.py::TestKDE::test_bw_adjust",
"tests/_stats/test_density.py::TestKDE::test_bw_method_scalar",
"tests/_stats/test_density.py::TestKDE::test_singular[vals0]",
"tests/_core/test_moves.py::TestDodge::test_faceted_fill",
"tests/_core/test_moves.py::TestDodge::test_faceted_drop",
"tests/_stats/test_counting.py::TestHist::test_cumulative_proportion",
"tests/_stats/test_counting.py::TestHist::test_cumulative_density",
"tests/_stats/test_density.py::TestKDE::test_singular[vals1]",
"tests/_stats/test_density.py::TestKDE::test_singular[vals2]",
"tests/_stats/test_density.py::TestKDE::test_singular[vals3]",
"tests/_core/test_moves.py::TestDodge::test_orient",
"tests/_core/test_moves.py::TestDodge::test_single_semantic[grp2]",
"tests/_stats/test_density.py::TestKDE::test_missing[y]",
"tests/_core/test_moves.py::TestDodge::test_single_semantic[grp3]",
"tests/_core/test_moves.py::TestDodge::test_two_semantics",
"tests/_stats/test_counting.py::TestHist::test_common_norm_default",
"tests/_stats/test_counting.py::TestHist::test_common_norm_false",
"tests/_stats/test_counting.py::TestHist::test_common_norm_subset",
"tests/_stats/test_density.py::TestKDE::test_missing[weight]",
"tests/_stats/test_counting.py::TestHist::test_common_norm_warning",
"tests/_core/test_moves.py::TestStack::test_basic",
"tests/_stats/test_counting.py::TestHist::test_common_bins_default",
"tests/_stats/test_counting.py::TestHist::test_common_bins_false",
"tests/_core/test_moves.py::TestStack::test_faceted",
"tests/_stats/test_counting.py::TestHist::test_common_bins_subset",
"tests/_stats/test_counting.py::TestHist::test_common_bins_warning",
"tests/_core/test_moves.py::TestStack::test_misssing_data",
"tests/_stats/test_counting.py::TestHist::test_histogram_single",
"tests/_core/test_plot.py::TestLayerAddition::test_orient[y-y]",
"tests/_stats/test_counting.py::TestHist::test_histogram_multiple",
"tests/_core/test_moves.py::TestStack::test_baseline_homogeneity_check",
"tests/_core/test_moves.py::TestShift::test_default",
"tests/_core/test_moves.py::TestShift::test_moves[0.3-0]",
"tests/_core/test_moves.py::TestShift::test_moves[0-0.2]",
"tests/_core/test_moves.py::TestShift::test_moves[0.1-0.3]",
"tests/_core/test_moves.py::TestNorm::test_default_no_groups[x]",
"tests/_core/test_moves.py::TestNorm::test_default_no_groups[y]",
"tests/_core/test_moves.py::TestNorm::test_default_groups[x]",
"tests/_core/test_plot.py::TestLayerAddition::test_orient[v-x]",
"tests/_core/test_moves.py::TestNorm::test_default_groups[y]",
"tests/_core/test_moves.py::TestNorm::test_sum",
"tests/_core/test_moves.py::TestNorm::test_where",
"tests/_core/test_plot.py::TestLayerAddition::test_orient[h-y]",
"tests/_core/test_moves.py::TestNorm::test_percent",
"tests/_marks/test_line.py::TestDash::test_dodge",
"tests/_core/test_plot.py::TestScaling::test_mark_data_log_transfrom_with_stat",
"tests/_core/test_plot.py::TestScaling::test_computed_var_ticks",
"tests/_core/test_plot.py::TestScaling::test_computed_var_transform",
"tests/_core/test_plot.py::TestScaling::test_derived_range_with_axis_scaling",
"tests/_core/test_plot.py::TestScaling::test_pair_single_coordinate_stat_orient",
"tests/_core/test_plot.py::TestScaling::test_inferred_nominal_passed_to_stat",
"tests/_core/test_plot.py::TestPlotting::test_stat",
"tests/_core/test_plot.py::TestPlotting::test_move",
"tests/_core/test_plot.py::TestPlotting::test_stat_and_move",
"tests/_core/test_plot.py::TestPlotting::test_stat_log_scale",
"tests/_core/test_plot.py::TestPlotting::test_move_log_scale",
"tests/_core/test_plot.py::TestPlotting::test_multi_move",
"tests/_core/test_plot.py::TestPlotting::test_multi_move_with_pairing",
"tests/_core/test_plot.py::TestPlotting::test_move_with_range",
"tests/_core/test_plot.py::TestPairInterface::test_orient_inference",
"tests/_core/test_plot.py::TestPairInterface::test_computed_coordinate_orient_inference"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-36
|
1.0
|
{
"code": "diff --git b/seaborn/external/kde.py a/seaborn/external/kde.py\nindex dc41f918..6add4e19 100644\n--- b/seaborn/external/kde.py\n+++ a/seaborn/external/kde.py\n@@ -229,6 +229,41 @@ class gaussian_kde:\n the dimensionality of the KDE.\n \n \"\"\"\n+ points = atleast_2d(asarray(points))\n+\n+ d, m = points.shape\n+ if d != self.d:\n+ if d == 1 and m == self.d:\n+ # points was passed in as a row vector\n+ points = reshape(points, (self.d, 1))\n+ m = 1\n+ else:\n+ msg = f\"points have dimension {d}, dataset has dimension {self.d}\"\n+ raise ValueError(msg)\n+\n+ output_dtype = np.common_type(self.covariance, points)\n+ result = zeros((m,), dtype=output_dtype)\n+\n+ whitening = linalg.cholesky(self.inv_cov)\n+ scaled_dataset = dot(whitening, self.dataset)\n+ scaled_points = dot(whitening, points)\n+\n+ if m >= self.n:\n+ # there are more points than data, so loop over data\n+ for i in range(self.n):\n+ diff = scaled_dataset[:, i, newaxis] - scaled_points\n+ energy = sum(diff * diff, axis=0) / 2.0\n+ result += self.weights[i]*exp(-energy)\n+ else:\n+ # loop over points\n+ for i in range(m):\n+ diff = scaled_dataset - scaled_points[:, i, newaxis]\n+ energy = sum(diff * diff, axis=0) / 2.0\n+ result[i] = sum(exp(-energy)*self.weights, axis=0)\n+\n+ result = result / self._norm_factor\n+\n+ return result\n \n __call__ = evaluate\n \n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/external/kde.py b/seaborn/external/kde.py\nindex 6add4e19..dc41f918 100644\n--- a/seaborn/external/kde.py\n+++ b/seaborn/external/kde.py\n@@ -229,41 +229,6 @@ class gaussian_kde:\n the dimensionality of the KDE.\n \n \"\"\"\n- points = atleast_2d(asarray(points))\n-\n- d, m = points.shape\n- if d != self.d:\n- if d == 1 and m == self.d:\n- # points was passed in as a row vector\n- points = reshape(points, (self.d, 1))\n- m = 1\n- else:\n- msg = f\"points have dimension {d}, dataset has dimension {self.d}\"\n- raise ValueError(msg)\n-\n- output_dtype = np.common_type(self.covariance, points)\n- result = zeros((m,), dtype=output_dtype)\n-\n- whitening = linalg.cholesky(self.inv_cov)\n- scaled_dataset = dot(whitening, self.dataset)\n- scaled_points = dot(whitening, points)\n-\n- if m >= self.n:\n- # there are more points than data, so loop over data\n- for i in range(self.n):\n- diff = scaled_dataset[:, i, newaxis] - scaled_points\n- energy = sum(diff * diff, axis=0) / 2.0\n- result += self.weights[i]*exp(-energy)\n- else:\n- # loop over points\n- for i in range(m):\n- diff = scaled_dataset - scaled_points[:, i, newaxis]\n- energy = sum(diff * diff, axis=0) / 2.0\n- result[i] = sum(exp(-energy)*self.weights, axis=0)\n-\n- result = result / self._norm_factor\n-\n- return result\n \n __call__ = evaluate\n \n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/external/kde.py.\nHere is the description for the function:\n def evaluate(self, points):\n \"\"\"Evaluate the estimated pdf on a set of points.\n\n Parameters\n ----------\n points : (# of dimensions, # of points)-array\n Alternatively, a (# of dimensions,) vector can be passed in and\n treated as a single point.\n\n Returns\n -------\n values : (# of points,)-array\n The values at each point.\n\n Raises\n ------\n ValueError : if the dimensionality of the input points is different than\n the dimensionality of the KDE.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_distributions.py::TestDistPlot::test_hist_bins",
"tests/test_statistics.py::TestKDE::test_gridsize",
"tests/_stats/test_density.py::TestKDE::test_columns[x]",
"tests/test_statistics.py::TestKDE::test_cut",
"tests/_stats/test_density.py::TestKDE::test_columns[y]",
"tests/_stats/test_density.py::TestKDE::test_gridsize[20]",
"tests/test_statistics.py::TestKDE::test_clip",
"tests/_stats/test_density.py::TestKDE::test_gridsize[30]",
"tests/test_statistics.py::TestKDE::test_density_normalization",
"tests/_stats/test_density.py::TestKDE::test_gridsize[None]",
"tests/test_statistics.py::TestKDE::test_cached_support",
"tests/_stats/test_density.py::TestKDE::test_cut[1]",
"tests/test_statistics.py::TestKDE::test_bw_method",
"tests/test_distributions.py::TestDistPlot::test_elements",
"tests/_stats/test_density.py::TestKDE::test_cut[2]",
"tests/test_statistics.py::TestKDE::test_bw_adjust",
"tests/_stats/test_density.py::TestKDE::test_common_grid[True]",
"tests/_stats/test_density.py::TestKDE::test_common_grid[False]",
"tests/_stats/test_density.py::TestKDE::test_common_norm[True]",
"tests/test_statistics.py::TestKDE::test_bivariate_grid",
"tests/_stats/test_density.py::TestKDE::test_common_norm[False]",
"tests/test_statistics.py::TestKDE::test_bivariate_normalization",
"tests/_stats/test_density.py::TestKDE::test_common_norm_variables",
"tests/_stats/test_density.py::TestKDE::test_common_input_checks[norm]",
"tests/_stats/test_density.py::TestKDE::test_common_input_checks[grid]",
"tests/test_distributions.py::TestDistPlot::test_distplot_with_nans",
"tests/_stats/test_density.py::TestKDE::test_bw_adjust",
"tests/_stats/test_density.py::TestKDE::test_bw_method_scalar",
"tests/_stats/test_density.py::TestKDE::test_singular[vals0]",
"tests/_stats/test_density.py::TestKDE::test_singular[vals1]",
"tests/_stats/test_density.py::TestKDE::test_singular[vals2]",
"tests/_stats/test_density.py::TestKDE::test_singular[vals3]",
"tests/_stats/test_density.py::TestKDE::test_missing[y]",
"tests/_stats/test_density.py::TestKDE::test_missing[weight]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs28]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_color[True]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs29]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_color[False]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_long_vectors[x]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs30]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_long_vectors[y]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs31]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_wide_vs_long_data",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_flat_vector",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_variable_assignment",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_vertical_deprecation",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_bw_deprecation",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_kernel_deprecation",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_shade_deprecation",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[layer]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[stack]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[fill]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_stacking",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_filling",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_default[stack]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_default[fill]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[layer]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[stack]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[fill]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_color_cycle_interaction",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_artist_color[True]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_artist_color[False]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_datetime_scale",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_cut",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_clip",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_line_is_density",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_common_norm",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_common_grid",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_bw_method",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_bw_adjust",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_implicit",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_explicit",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_with_hue",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_normalization",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_weights",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_weight_norm",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_sticky_edges",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_line_kws",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_axis_labels",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_legend",
"tests/test_distributions.py::TestKDEPlotBivariate::test_long_vectors",
"tests/test_distributions.py::TestKDEPlotBivariate::test_fill_artists",
"tests/test_distributions.py::TestKDEPlotBivariate::test_common_norm",
"tests/test_distributions.py::TestKDEPlotBivariate::test_log_scale",
"tests/test_distributions.py::TestKDEPlotBivariate::test_bandwidth",
"tests/test_distributions.py::TestKDEPlotBivariate::test_weights",
"tests/test_distributions.py::TestKDEPlotBivariate::test_hue_ignores_cmap",
"tests/test_distributions.py::TestKDEPlotBivariate::test_contour_line_colors",
"tests/test_distributions.py::TestKDEPlotBivariate::test_contour_line_cmap",
"tests/test_distributions.py::TestKDEPlotBivariate::test_contour_fill_colors",
"tests/test_distributions.py::TestKDEPlotBivariate::test_colorbar",
"tests/test_distributions.py::TestKDEPlotBivariate::test_levels_and_thresh",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde[count]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde[density]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde[probability]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[count-layer]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[count-dodge]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[density-layer]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[density-dodge]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[probability-layer]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[probability-dodge]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_default_cut",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_hue",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_yaxis",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_line_kws",
"tests/test_distributions.py::TestHistPlotUnivariate::test_log_scale_kde",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs13]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs3]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs9]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs10]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs11]",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_color",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_palette",
"tests/test_axisgrid.py::TestPairGrid::test_diag_sharey",
"tests/test_distributions.py::TestDisPlot::test_facets[col]",
"tests/test_distributions.py::TestDisPlot::test_facets[row]",
"tests/test_categorical.py::TestViolinPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestViolinPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestViolinPlot::test_legend_attributes",
"tests/test_categorical.py::TestViolinPlot::test_labels_long[x]",
"tests/test_categorical.py::TestViolinPlot::test_labels_long[y]",
"tests/test_categorical.py::TestViolinPlot::test_labels_wide",
"tests/test_categorical.py::TestViolinPlot::test_labels_hue_order",
"tests/test_categorical.py::TestViolinPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestViolinPlot::test_log_scale[x]",
"tests/test_distributions.py::TestDisPlot::test_bivariate_kde_norm",
"tests/test_categorical.py::TestViolinPlot::test_log_scale[y]",
"tests/test_categorical.py::TestViolinPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestViolinPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestViolinPlot::test_wide_data[h]",
"tests/test_categorical.py::TestViolinPlot::test_wide_data[v]",
"tests/test_categorical.py::TestViolinPlot::test_grouped[x]",
"tests/test_categorical.py::TestViolinPlot::test_grouped[y]",
"tests/test_categorical.py::TestViolinPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestViolinPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestViolinPlot::test_hue_not_dodged",
"tests/test_categorical.py::TestViolinPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestViolinPlot::test_dodge_native_scale_log",
"tests/test_categorical.py::TestViolinPlot::test_color",
"tests/test_categorical.py::TestViolinPlot::test_hue_colors",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[box]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[quart]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[stick]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[point]",
"tests/test_categorical.py::TestViolinPlot::test_linewidth",
"tests/test_categorical.py::TestViolinPlot::test_saturation",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot",
"tests/test_categorical.py::TestViolinPlot::test_fill[box]",
"tests/test_categorical.py::TestViolinPlot::test_fill[quart]",
"tests/test_categorical.py::TestViolinPlot::test_fill[stick]",
"tests/test_categorical.py::TestViolinPlot::test_fill[point]",
"tests/test_categorical.py::TestViolinPlot::test_inner_box[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_box[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_quartiles[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_quartiles[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_stick[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_stick[y]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg_hue",
"tests/test_categorical.py::TestViolinPlot::test_inner_points[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_points[y]",
"tests/test_categorical.py::TestViolinPlot::test_split_single",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_diag_kde",
"tests/test_categorical.py::TestViolinPlot::test_split_multi",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_area",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_kde",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_count",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_width",
"tests/test_categorical.py::TestViolinPlot::test_common_norm",
"tests/test_categorical.py::TestViolinPlot::test_scale_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_scale_hue_deprecation",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_markers",
"tests/test_categorical.py::TestViolinPlot::test_bw_adjust",
"tests/test_categorical.py::TestViolinPlot::test_bw_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_gap",
"tests/test_categorical.py::TestViolinPlot::test_inner_kws",
"tests/test_categorical.py::TestViolinPlot::test_box_inner_kws",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs0]",
"tests/test_axisgrid.py::TestPairGrid::test_legend",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs10]",
"tests/test_axisgrid.py::TestJointGrid::test_univariate_plot",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs11]",
"tests/test_axisgrid.py::TestJointGrid::test_univariate_plot_distplot",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs12]",
"tests/test_axisgrid.py::TestJointGrid::test_plot",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs19]",
"tests/test_axisgrid.py::TestJointPlot::test_scatter_hue",
"tests/test_axisgrid.py::TestJointPlot::test_reg",
"tests/test_axisgrid.py::TestJointPlot::test_kde",
"tests/test_axisgrid.py::TestJointPlot::test_kde_hue",
"tests/test_axisgrid.py::TestJointPlot::test_palette",
"tests/test_axisgrid.py::TestJointPlot::test_leaky_dict",
"tests/test_categorical.py::TestCatPlot::test_plot_elements"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-37
|
1.0
|
{
"code": "diff --git b/seaborn/external/kde.py a/seaborn/external/kde.py\nindex ae986f29..6add4e19 100644\n--- b/seaborn/external/kde.py\n+++ a/seaborn/external/kde.py\n@@ -316,6 +316,24 @@ class gaussian_kde:\n .. versionadded:: 0.11\n \n \"\"\"\n+ if bw_method is None:\n+ pass\n+ elif bw_method == 'scott':\n+ self.covariance_factor = self.scotts_factor\n+ elif bw_method == 'silverman':\n+ self.covariance_factor = self.silverman_factor\n+ elif np.isscalar(bw_method) and not isinstance(bw_method, str):\n+ self._bw_method = 'use constant'\n+ self.covariance_factor = lambda: bw_method\n+ elif callable(bw_method):\n+ self._bw_method = bw_method\n+ self.covariance_factor = lambda: self._bw_method(self)\n+ else:\n+ msg = \"`bw_method` should be 'scott', 'silverman', a scalar \" \\\n+ \"or a callable.\"\n+ raise ValueError(msg)\n+\n+ self._compute_covariance()\n \n def _compute_covariance(self):\n \"\"\"Computes the covariance matrix for each Gaussian kernel using\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/external/kde.py b/seaborn/external/kde.py\nindex 6add4e19..ae986f29 100644\n--- a/seaborn/external/kde.py\n+++ b/seaborn/external/kde.py\n@@ -316,24 +316,6 @@ class gaussian_kde:\n .. versionadded:: 0.11\n \n \"\"\"\n- if bw_method is None:\n- pass\n- elif bw_method == 'scott':\n- self.covariance_factor = self.scotts_factor\n- elif bw_method == 'silverman':\n- self.covariance_factor = self.silverman_factor\n- elif np.isscalar(bw_method) and not isinstance(bw_method, str):\n- self._bw_method = 'use constant'\n- self.covariance_factor = lambda: bw_method\n- elif callable(bw_method):\n- self._bw_method = bw_method\n- self.covariance_factor = lambda: self._bw_method(self)\n- else:\n- msg = \"`bw_method` should be 'scott', 'silverman', a scalar \" \\\n- \"or a callable.\"\n- raise ValueError(msg)\n-\n- self._compute_covariance()\n \n def _compute_covariance(self):\n \"\"\"Computes the covariance matrix for each Gaussian kernel using\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/external/kde.py.\nHere is the description for the function:\n def set_bandwidth(self, bw_method=None):\n \"\"\"Compute the estimator bandwidth with given method.\n\n The new bandwidth calculated after a call to `set_bandwidth` is used\n for subsequent evaluations of the estimated density.\n\n Parameters\n ----------\n bw_method : str, scalar or callable, optional\n The method used to calculate the estimator bandwidth. This can be\n 'scott', 'silverman', a scalar constant or a callable. If a\n scalar, this will be used directly as `kde.factor`. If a callable,\n it should take a `gaussian_kde` instance as only parameter and\n return a scalar. If None (default), nothing happens; the current\n `kde.covariance_factor` method is kept.\n\n Notes\n -----\n .. versionadded:: 0.11\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_distributions.py::TestDistPlot::test_hist_bins",
"tests/_stats/test_density.py::TestKDE::test_columns[x]",
"tests/test_statistics.py::TestKDE::test_gridsize",
"tests/_stats/test_density.py::TestKDE::test_columns[y]",
"tests/test_statistics.py::TestKDE::test_cut",
"tests/_stats/test_density.py::TestKDE::test_gridsize[20]",
"tests/_stats/test_density.py::TestKDE::test_gridsize[30]",
"tests/test_statistics.py::TestKDE::test_clip",
"tests/_stats/test_density.py::TestKDE::test_gridsize[None]",
"tests/_stats/test_density.py::TestKDE::test_cut[1]",
"tests/test_statistics.py::TestKDE::test_density_normalization",
"tests/test_distributions.py::TestDistPlot::test_elements",
"tests/_stats/test_density.py::TestKDE::test_cut[2]",
"tests/_stats/test_density.py::TestKDE::test_common_grid[True]",
"tests/test_statistics.py::TestKDE::test_cached_support",
"tests/_stats/test_density.py::TestKDE::test_common_grid[False]",
"tests/_stats/test_density.py::TestKDE::test_common_norm[True]",
"tests/test_statistics.py::TestKDE::test_bw_method",
"tests/_stats/test_density.py::TestKDE::test_common_norm[False]",
"tests/_stats/test_density.py::TestKDE::test_common_norm_variables",
"tests/test_statistics.py::TestKDE::test_bw_adjust",
"tests/_stats/test_density.py::TestKDE::test_common_input_checks[norm]",
"tests/_stats/test_density.py::TestKDE::test_common_input_checks[grid]",
"tests/_stats/test_density.py::TestKDE::test_bw_adjust",
"tests/test_distributions.py::TestDistPlot::test_distplot_with_nans",
"tests/test_statistics.py::TestKDE::test_bivariate_grid",
"tests/_stats/test_density.py::TestKDE::test_bw_method_scalar",
"tests/_stats/test_density.py::TestKDE::test_singular[vals0]",
"tests/test_statistics.py::TestKDE::test_bivariate_normalization",
"tests/_stats/test_density.py::TestKDE::test_singular[vals1]",
"tests/_stats/test_density.py::TestKDE::test_singular[vals2]",
"tests/_stats/test_density.py::TestKDE::test_singular[vals3]",
"tests/_stats/test_density.py::TestKDE::test_missing[y]",
"tests/_stats/test_density.py::TestKDE::test_missing[weight]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs28]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_color[True]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_color[False]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs29]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_long_vectors[x]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs30]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_long_vectors[y]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[violinplot-kwargs31]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_wide_vs_long_data",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_flat_vector",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_singular_data",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_variable_assignment",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_vertical_deprecation",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_bw_deprecation",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_kernel_deprecation",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_shade_deprecation",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[layer]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[stack]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[fill]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_stacking",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_filling",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_default[stack]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_default[fill]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[layer]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[stack]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[fill]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_color_cycle_interaction",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_artist_color[True]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_artist_color[False]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_datetime_scale",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_cut",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_clip",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_line_is_density",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_common_norm",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_common_grid",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_bw_method",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_bw_adjust",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_implicit",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_explicit",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_with_hue",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_normalization",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_weights",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_weight_norm",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_sticky_edges",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_line_kws",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_axis_labels",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_legend",
"tests/test_distributions.py::TestKDEPlotBivariate::test_long_vectors",
"tests/test_distributions.py::TestKDEPlotBivariate::test_singular_data",
"tests/test_distributions.py::TestKDEPlotBivariate::test_fill_artists",
"tests/test_distributions.py::TestKDEPlotBivariate::test_common_norm",
"tests/test_distributions.py::TestKDEPlotBivariate::test_log_scale",
"tests/test_distributions.py::TestKDEPlotBivariate::test_bandwidth",
"tests/test_distributions.py::TestKDEPlotBivariate::test_weights",
"tests/test_distributions.py::TestKDEPlotBivariate::test_hue_ignores_cmap",
"tests/test_distributions.py::TestKDEPlotBivariate::test_contour_line_colors",
"tests/test_distributions.py::TestKDEPlotBivariate::test_contour_line_cmap",
"tests/test_distributions.py::TestKDEPlotBivariate::test_contour_fill_colors",
"tests/test_distributions.py::TestKDEPlotBivariate::test_colorbar",
"tests/test_distributions.py::TestKDEPlotBivariate::test_levels_and_thresh",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde[count]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde[density]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde[probability]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[count-layer]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[count-dodge]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[density-layer]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[density-dodge]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[probability-layer]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[probability-dodge]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_default_cut",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_hue",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_yaxis",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_line_kws",
"tests/test_distributions.py::TestHistPlotUnivariate::test_log_scale_kde",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs13]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs3]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs4]",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_color",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs9]",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_palette",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs10]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs11]",
"tests/test_axisgrid.py::TestPairGrid::test_diag_sharey",
"tests/test_categorical.py::TestViolinPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestViolinPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestViolinPlot::test_legend_attributes",
"tests/test_categorical.py::TestViolinPlot::test_labels_long[x]",
"tests/test_distributions.py::TestDisPlot::test_facets[col]",
"tests/test_categorical.py::TestViolinPlot::test_labels_long[y]",
"tests/test_distributions.py::TestDisPlot::test_facets[row]",
"tests/test_categorical.py::TestViolinPlot::test_labels_wide",
"tests/test_categorical.py::TestViolinPlot::test_labels_hue_order",
"tests/test_categorical.py::TestViolinPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestViolinPlot::test_log_scale[x]",
"tests/test_categorical.py::TestViolinPlot::test_log_scale[y]",
"tests/test_categorical.py::TestViolinPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestViolinPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[None-x]",
"tests/test_distributions.py::TestDisPlot::test_bivariate_kde_norm",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestViolinPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestViolinPlot::test_wide_data[h]",
"tests/test_categorical.py::TestViolinPlot::test_wide_data[v]",
"tests/test_categorical.py::TestViolinPlot::test_grouped[x]",
"tests/test_categorical.py::TestViolinPlot::test_grouped[y]",
"tests/test_categorical.py::TestViolinPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestViolinPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestViolinPlot::test_hue_not_dodged",
"tests/test_categorical.py::TestViolinPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestViolinPlot::test_dodge_native_scale_log",
"tests/test_categorical.py::TestViolinPlot::test_color",
"tests/test_categorical.py::TestViolinPlot::test_hue_colors",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[box]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[quart]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[stick]",
"tests/test_categorical.py::TestViolinPlot::test_linecolor[point]",
"tests/test_categorical.py::TestViolinPlot::test_linewidth",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot",
"tests/test_categorical.py::TestViolinPlot::test_saturation",
"tests/test_categorical.py::TestViolinPlot::test_fill[box]",
"tests/test_categorical.py::TestViolinPlot::test_fill[quart]",
"tests/test_categorical.py::TestViolinPlot::test_fill[stick]",
"tests/test_categorical.py::TestViolinPlot::test_fill[point]",
"tests/test_categorical.py::TestViolinPlot::test_inner_box[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_box[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_quartiles[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_quartiles[y]",
"tests/test_categorical.py::TestViolinPlot::test_inner_stick[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_stick[y]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg_hue",
"tests/test_categorical.py::TestViolinPlot::test_inner_points[x]",
"tests/test_categorical.py::TestViolinPlot::test_inner_points[y]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_diag_kde",
"tests/test_categorical.py::TestViolinPlot::test_split_single",
"tests/test_categorical.py::TestViolinPlot::test_split_multi",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_area",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_kde",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_count",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_width",
"tests/test_categorical.py::TestViolinPlot::test_common_norm",
"tests/test_categorical.py::TestViolinPlot::test_scale_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_scale_hue_deprecation",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_markers",
"tests/test_categorical.py::TestViolinPlot::test_bw_adjust",
"tests/test_categorical.py::TestViolinPlot::test_bw_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_gap",
"tests/test_categorical.py::TestViolinPlot::test_inner_kws",
"tests/test_categorical.py::TestViolinPlot::test_box_inner_kws",
"tests/test_axisgrid.py::TestPairGrid::test_legend",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs9]",
"tests/test_axisgrid.py::TestJointGrid::test_univariate_plot",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs11]",
"tests/test_axisgrid.py::TestJointGrid::test_univariate_plot_distplot",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs12]",
"tests/test_axisgrid.py::TestJointGrid::test_plot",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs18]",
"tests/test_axisgrid.py::TestJointPlot::test_scatter_hue",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs19]",
"tests/test_axisgrid.py::TestJointPlot::test_reg",
"tests/test_axisgrid.py::TestJointPlot::test_kde",
"tests/test_axisgrid.py::TestJointPlot::test_kde_hue",
"tests/test_axisgrid.py::TestJointPlot::test_palette",
"tests/test_axisgrid.py::TestJointPlot::test_leaky_dict",
"tests/test_categorical.py::TestCatPlot::test_plot_elements"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-38
|
1.0
|
{
"code": "diff --git b/seaborn/utils.py a/seaborn/utils.py\nindex 13577802..98720ba3 100644\n--- b/seaborn/utils.py\n+++ a/seaborn/utils.py\n@@ -553,6 +553,80 @@ def load_dataset(name, cache=True, data_home=None, **kws):\n Tabular data, possibly with some preprocessing applied.\n \n \"\"\"\n+ # A common beginner mistake is to assume that one's personal data needs\n+ # to be passed through this function to be usable with seaborn.\n+ # Let's provide a more helpful error than you would otherwise get.\n+ if isinstance(name, pd.DataFrame):\n+ err = (\n+ \"This function accepts only strings (the name of an example dataset). \"\n+ \"You passed a pandas DataFrame. If you have your own dataset, \"\n+ \"it is not necessary to use this function before plotting.\"\n+ )\n+ raise TypeError(err)\n+\n+ url = f\"{DATASET_SOURCE}/{name}.csv\"\n+\n+ if cache:\n+ cache_path = os.path.join(get_data_home(data_home), os.path.basename(url))\n+ if not os.path.exists(cache_path):\n+ if name not in get_dataset_names():\n+ raise ValueError(f\"'{name}' is not one of the example datasets.\")\n+ urlretrieve(url, cache_path)\n+ full_path = cache_path\n+ else:\n+ full_path = url\n+\n+ df = pd.read_csv(full_path, **kws)\n+\n+ if df.iloc[-1].isnull().all():\n+ df = df.iloc[:-1]\n+\n+ # Set some columns as a categorical type with ordered levels\n+\n+ if name == \"tips\":\n+ df[\"day\"] = pd.Categorical(df[\"day\"], [\"Thur\", \"Fri\", \"Sat\", \"Sun\"])\n+ df[\"sex\"] = pd.Categorical(df[\"sex\"], [\"Male\", \"Female\"])\n+ df[\"time\"] = pd.Categorical(df[\"time\"], [\"Lunch\", \"Dinner\"])\n+ df[\"smoker\"] = pd.Categorical(df[\"smoker\"], [\"Yes\", \"No\"])\n+\n+ elif name == \"flights\":\n+ months = df[\"month\"].str[:3]\n+ df[\"month\"] = pd.Categorical(months, months.unique())\n+\n+ elif name == \"exercise\":\n+ df[\"time\"] = pd.Categorical(df[\"time\"], [\"1 min\", \"15 min\", \"30 min\"])\n+ df[\"kind\"] = pd.Categorical(df[\"kind\"], [\"rest\", \"walking\", \"running\"])\n+ df[\"diet\"] = pd.Categorical(df[\"diet\"], [\"no fat\", \"low fat\"])\n+\n+ elif name == \"titanic\":\n+ df[\"class\"] = pd.Categorical(df[\"class\"], [\"First\", \"Second\", \"Third\"])\n+ df[\"deck\"] = pd.Categorical(df[\"deck\"], list(\"ABCDEFG\"))\n+\n+ elif name == \"penguins\":\n+ df[\"sex\"] = df[\"sex\"].str.title()\n+\n+ elif name == \"diamonds\":\n+ df[\"color\"] = pd.Categorical(\n+ df[\"color\"], [\"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\"],\n+ )\n+ df[\"clarity\"] = pd.Categorical(\n+ df[\"clarity\"], [\"IF\", \"VVS1\", \"VVS2\", \"VS1\", \"VS2\", \"SI1\", \"SI2\", \"I1\"],\n+ )\n+ df[\"cut\"] = pd.Categorical(\n+ df[\"cut\"], [\"Ideal\", \"Premium\", \"Very Good\", \"Good\", \"Fair\"],\n+ )\n+\n+ elif name == \"taxis\":\n+ df[\"pickup\"] = pd.to_datetime(df[\"pickup\"])\n+ df[\"dropoff\"] = pd.to_datetime(df[\"dropoff\"])\n+\n+ elif name == \"seaice\":\n+ df[\"Date\"] = pd.to_datetime(df[\"Date\"])\n+\n+ elif name == \"dowjones\":\n+ df[\"Date\"] = pd.to_datetime(df[\"Date\"])\n+\n+ return df\n \n \n def axis_ticklabels_overlap(labels):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/utils.py b/seaborn/utils.py\nindex 98720ba3..13577802 100644\n--- a/seaborn/utils.py\n+++ b/seaborn/utils.py\n@@ -553,80 +553,6 @@ def load_dataset(name, cache=True, data_home=None, **kws):\n Tabular data, possibly with some preprocessing applied.\n \n \"\"\"\n- # A common beginner mistake is to assume that one's personal data needs\n- # to be passed through this function to be usable with seaborn.\n- # Let's provide a more helpful error than you would otherwise get.\n- if isinstance(name, pd.DataFrame):\n- err = (\n- \"This function accepts only strings (the name of an example dataset). \"\n- \"You passed a pandas DataFrame. If you have your own dataset, \"\n- \"it is not necessary to use this function before plotting.\"\n- )\n- raise TypeError(err)\n-\n- url = f\"{DATASET_SOURCE}/{name}.csv\"\n-\n- if cache:\n- cache_path = os.path.join(get_data_home(data_home), os.path.basename(url))\n- if not os.path.exists(cache_path):\n- if name not in get_dataset_names():\n- raise ValueError(f\"'{name}' is not one of the example datasets.\")\n- urlretrieve(url, cache_path)\n- full_path = cache_path\n- else:\n- full_path = url\n-\n- df = pd.read_csv(full_path, **kws)\n-\n- if df.iloc[-1].isnull().all():\n- df = df.iloc[:-1]\n-\n- # Set some columns as a categorical type with ordered levels\n-\n- if name == \"tips\":\n- df[\"day\"] = pd.Categorical(df[\"day\"], [\"Thur\", \"Fri\", \"Sat\", \"Sun\"])\n- df[\"sex\"] = pd.Categorical(df[\"sex\"], [\"Male\", \"Female\"])\n- df[\"time\"] = pd.Categorical(df[\"time\"], [\"Lunch\", \"Dinner\"])\n- df[\"smoker\"] = pd.Categorical(df[\"smoker\"], [\"Yes\", \"No\"])\n-\n- elif name == \"flights\":\n- months = df[\"month\"].str[:3]\n- df[\"month\"] = pd.Categorical(months, months.unique())\n-\n- elif name == \"exercise\":\n- df[\"time\"] = pd.Categorical(df[\"time\"], [\"1 min\", \"15 min\", \"30 min\"])\n- df[\"kind\"] = pd.Categorical(df[\"kind\"], [\"rest\", \"walking\", \"running\"])\n- df[\"diet\"] = pd.Categorical(df[\"diet\"], [\"no fat\", \"low fat\"])\n-\n- elif name == \"titanic\":\n- df[\"class\"] = pd.Categorical(df[\"class\"], [\"First\", \"Second\", \"Third\"])\n- df[\"deck\"] = pd.Categorical(df[\"deck\"], list(\"ABCDEFG\"))\n-\n- elif name == \"penguins\":\n- df[\"sex\"] = df[\"sex\"].str.title()\n-\n- elif name == \"diamonds\":\n- df[\"color\"] = pd.Categorical(\n- df[\"color\"], [\"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\"],\n- )\n- df[\"clarity\"] = pd.Categorical(\n- df[\"clarity\"], [\"IF\", \"VVS1\", \"VVS2\", \"VS1\", \"VS2\", \"SI1\", \"SI2\", \"I1\"],\n- )\n- df[\"cut\"] = pd.Categorical(\n- df[\"cut\"], [\"Ideal\", \"Premium\", \"Very Good\", \"Good\", \"Fair\"],\n- )\n-\n- elif name == \"taxis\":\n- df[\"pickup\"] = pd.to_datetime(df[\"pickup\"])\n- df[\"dropoff\"] = pd.to_datetime(df[\"dropoff\"])\n-\n- elif name == \"seaice\":\n- df[\"Date\"] = pd.to_datetime(df[\"Date\"])\n-\n- elif name == \"dowjones\":\n- df[\"Date\"] = pd.to_datetime(df[\"Date\"])\n-\n- return df\n \n \n def axis_ticklabels_overlap(labels):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/utils.py.\nHere is the description for the function:\ndef load_dataset(name, cache=True, data_home=None, **kws):\n \"\"\"Load an example dataset from the online repository (requires internet).\n\n This function provides quick access to a small number of example datasets\n that are useful for documenting seaborn or generating reproducible examples\n for bug reports. It is not necessary for normal usage.\n\n Note that some of the datasets have a small amount of preprocessing applied\n to define a proper ordering for categorical variables.\n\n Use :func:`get_dataset_names` to see a list of available datasets.\n\n Parameters\n ----------\n name : str\n Name of the dataset (``{name}.csv`` on\n https://github.com/mwaskom/seaborn-data).\n cache : boolean, optional\n If True, try to load from the local cache first, and save to the cache\n if a download is required.\n data_home : string, optional\n The directory in which to cache data; see :func:`get_data_home`.\n kws : keys and values, optional\n Additional keyword arguments are passed to passed through to\n :func:`pandas.read_csv`.\n\n Returns\n -------\n df : :class:`pandas.DataFrame`\n Tabular data, possibly with some preprocessing applied.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_core/test_data.py::TestPlotData::test_data_interchange_support_test",
"tests/_core/test_plot.py::TestLayerAddition::test_stat_default",
"tests/_core/test_plot.py::TestScaling::test_categorical_as_datetime",
"tests/_core/test_plot.py::TestScaling::test_log_scale_name",
"tests/_core/test_plot.py::TestScaling::test_identity_mapping_color_strings",
"tests/_core/test_plot.py::TestScaling::test_undefined_variable_raises",
"tests/_core/test_scales.py::TestNominal::test_color_numeric_int_float_mix",
"tests/_stats/test_density.py::TestKDE::test_cumulative[True]",
"tests/_stats/test_density.py::TestKDE::test_cumulative[False]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_cumulative",
"tests/test_matrix.py::TestDendrogram::test_ndarray_input",
"tests/test_matrix.py::TestDendrogram::test_df_input",
"tests/test_matrix.py::TestDendrogram::test_df_multindex_input",
"tests/test_matrix.py::TestDendrogram::test_axis0_input",
"tests/test_matrix.py::TestDendrogram::test_rotate_input",
"tests/test_matrix.py::TestDendrogram::test_rotate_axis0_input",
"tests/test_matrix.py::TestDendrogram::test_custom_linkage",
"tests/test_matrix.py::TestDendrogram::test_label_false",
"tests/test_matrix.py::TestDendrogram::test_linkage_scipy",
"tests/test_matrix.py::TestDendrogram::test_fastcluster_other_method",
"tests/test_matrix.py::TestDendrogram::test_fastcluster_non_euclidean",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_plot",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_rotate",
"tests/test_matrix.py::TestDendrogram::test_dendrogram_ticklabel_rotation",
"tests/test_matrix.py::TestClustermap::test_ndarray_input",
"tests/test_matrix.py::TestClustermap::test_df_input",
"tests/test_matrix.py::TestClustermap::test_corr_df_input",
"tests/test_matrix.py::TestClustermap::test_pivot_input",
"tests/test_matrix.py::TestClustermap::test_colors_input",
"tests/test_matrix.py::TestClustermap::test_categorical_colors_input",
"tests/test_matrix.py::TestClustermap::test_nested_colors_input",
"tests/test_matrix.py::TestClustermap::test_colors_input_custom_cmap",
"tests/test_matrix.py::TestClustermap::test_z_score",
"tests/test_matrix.py::TestClustermap::test_z_score_axis0",
"tests/test_matrix.py::TestClustermap::test_standard_scale",
"tests/test_matrix.py::TestClustermap::test_standard_scale_axis0",
"tests/test_matrix.py::TestClustermap::test_z_score_standard_scale",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap",
"tests/test_matrix.py::TestClustermap::test_nested_color_list_to_matrix_and_cmap",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap_axis1",
"tests/test_matrix.py::TestClustermap::test_color_list_to_matrix_and_cmap_different_sizes",
"tests/test_matrix.py::TestClustermap::test_savefig",
"tests/test_matrix.py::TestClustermap::test_plot_dendrograms",
"tests/test_matrix.py::TestClustermap::test_cluster_false",
"tests/test_matrix.py::TestClustermap::test_row_col_colors",
"tests/test_matrix.py::TestClustermap::test_cluster_false_row_col_colors",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_shuffled",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_missing",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_df_one_axis",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series_shuffled",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_series_missing",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_ignore_heatmap_kwargs",
"tests/test_matrix.py::TestClustermap::test_row_col_colors_raise_on_mixed_index_types",
"tests/test_matrix.py::TestClustermap::test_mask_reorganization",
"tests/test_matrix.py::TestClustermap::test_ticklabel_reorganization",
"tests/test_matrix.py::TestClustermap::test_noticklabels",
"tests/test_matrix.py::TestClustermap::test_size_ratios",
"tests/test_matrix.py::TestClustermap::test_cbar_pos",
"tests/test_matrix.py::TestClustermap::test_square_warning",
"tests/test_matrix.py::TestClustermap::test_clustermap_annotation",
"tests/test_matrix.py::TestClustermap::test_tree_kws",
"tests/test_rcmod.py::TestFonts::test_set_font",
"tests/test_rcmod.py::TestFonts::test_different_sans_serif",
"tests/test_regression.py::TestRegressionPlotter::test_fast_regression",
"tests/test_regression.py::TestRegressionPlotter::test_regress_poly",
"tests/test_regression.py::TestRegressionPlotter::test_regress_n_boot",
"tests/test_regression.py::TestRegressionPlotter::test_regress_without_bootstrap",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_regression",
"tests/test_regression.py::TestRegressionPlotter::test_logistic_perfect_separation",
"tests/test_regression.py::TestRegressionPlotter::test_robust_regression",
"tests/test_regression.py::TestRegressionPlotter::test_lowess_regression",
"tests/test_regression.py::TestRegressionPlots::test_residplot_lowess",
"tests/test_statistics.py::TestKDE::test_cumulative",
"tests/test_statistics.py::TestKDE::test_bivariate_cumulative",
"tests/test_statistics.py::TestECDF::test_against_statsmodels",
"tests/test_utils.py::test_load_datasets",
"tests/test_utils.py::test_load_dataset_string_error",
"tests/test_utils.py::test_load_dataset_passed_data_error",
"tests/test_utils.py::test_load_cached_datasets"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-39
|
1.0
|
{
"code": "diff --git b/seaborn/matrix.py a/seaborn/matrix.py\nindex ed947415..6b99c118 100644\n--- b/seaborn/matrix.py\n+++ a/seaborn/matrix.py\n@@ -1246,3 +1246,17 @@ def clustermap(\n .. include:: ../docstrings/clustermap.rst\n \n \"\"\"\n+ if _no_scipy:\n+ raise RuntimeError(\"clustermap requires scipy to be available\")\n+\n+ plotter = ClusterGrid(data, pivot_kws=pivot_kws, figsize=figsize,\n+ row_colors=row_colors, col_colors=col_colors,\n+ z_score=z_score, standard_scale=standard_scale,\n+ mask=mask, dendrogram_ratio=dendrogram_ratio,\n+ colors_ratio=colors_ratio, cbar_pos=cbar_pos)\n+\n+ return plotter.plot(metric=metric, method=method,\n+ colorbar_kws=cbar_kws,\n+ row_cluster=row_cluster, col_cluster=col_cluster,\n+ row_linkage=row_linkage, col_linkage=col_linkage,\n+ tree_kws=tree_kws, **kwargs)\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/matrix.py b/seaborn/matrix.py\nindex 6b99c118..ed947415 100644\n--- a/seaborn/matrix.py\n+++ b/seaborn/matrix.py\n@@ -1246,17 +1246,3 @@ def clustermap(\n .. include:: ../docstrings/clustermap.rst\n \n \"\"\"\n- if _no_scipy:\n- raise RuntimeError(\"clustermap requires scipy to be available\")\n-\n- plotter = ClusterGrid(data, pivot_kws=pivot_kws, figsize=figsize,\n- row_colors=row_colors, col_colors=col_colors,\n- z_score=z_score, standard_scale=standard_scale,\n- mask=mask, dendrogram_ratio=dendrogram_ratio,\n- colors_ratio=colors_ratio, cbar_pos=cbar_pos)\n-\n- return plotter.plot(metric=metric, method=method,\n- colorbar_kws=cbar_kws,\n- row_cluster=row_cluster, col_cluster=col_cluster,\n- row_linkage=row_linkage, col_linkage=col_linkage,\n- tree_kws=tree_kws, **kwargs)\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/matrix.py.\nHere is the description for the function:\ndef clustermap(\n data, *,\n pivot_kws=None, method='average', metric='euclidean',\n z_score=None, standard_scale=None, figsize=(10, 10),\n cbar_kws=None, row_cluster=True, col_cluster=True,\n row_linkage=None, col_linkage=None,\n row_colors=None, col_colors=None, mask=None,\n dendrogram_ratio=.2, colors_ratio=0.03,\n cbar_pos=(.02, .8, .05, .18), tree_kws=None,\n **kwargs\n):\n \"\"\"\n Plot a matrix dataset as a hierarchically-clustered heatmap.\n\n This function requires scipy to be available.\n\n Parameters\n ----------\n data : 2D array-like\n Rectangular data for clustering. Cannot contain NAs.\n pivot_kws : dict, optional\n If `data` is a tidy dataframe, can provide keyword arguments for\n pivot to create a rectangular dataframe.\n method : str, optional\n Linkage method to use for calculating clusters. See\n :func:`scipy.cluster.hierarchy.linkage` documentation for more\n information.\n metric : str, optional\n Distance metric to use for the data. See\n :func:`scipy.spatial.distance.pdist` documentation for more options.\n To use different metrics (or methods) for rows and columns, you may\n construct each linkage matrix yourself and provide them as\n `{row,col}_linkage`.\n z_score : int or None, optional\n Either 0 (rows) or 1 (columns). Whether or not to calculate z-scores\n for the rows or the columns. Z scores are: z = (x - mean)/std, so\n values in each row (column) will get the mean of the row (column)\n subtracted, then divided by the standard deviation of the row (column).\n This ensures that each row (column) has mean of 0 and variance of 1.\n standard_scale : int or None, optional\n Either 0 (rows) or 1 (columns). Whether or not to standardize that\n dimension, meaning for each row or column, subtract the minimum and\n divide each by its maximum.\n figsize : tuple of (width, height), optional\n Overall size of the figure.\n cbar_kws : dict, optional\n Keyword arguments to pass to `cbar_kws` in :func:`heatmap`, e.g. to\n add a label to the colorbar.\n {row,col}_cluster : bool, optional\n If ``True``, cluster the {rows, columns}.\n {row,col}_linkage : :class:`numpy.ndarray`, optional\n Precomputed linkage matrix for the rows or columns. See\n :func:`scipy.cluster.hierarchy.linkage` for specific formats.\n {row,col}_colors : list-like or pandas DataFrame/Series, optional\n List of colors to label for either the rows or columns. Useful to evaluate\n whether samples within a group are clustered together. Can use nested lists or\n DataFrame for multiple color levels of labeling. If given as a\n :class:`pandas.DataFrame` or :class:`pandas.Series`, labels for the colors are\n extracted from the DataFrames column names or from the name of the Series.\n DataFrame/Series colors are also matched to the data by their index, ensuring\n colors are drawn in the correct order.\n mask : bool array or DataFrame, optional\n If passed, data will not be shown in cells where `mask` is True.\n Cells with missing values are automatically masked. Only used for\n visualizing, not for calculating.\n {dendrogram,colors}_ratio : float, or pair of floats, optional\n Proportion of the figure size devoted to the two marginal elements. If\n a pair is given, they correspond to (row, col) ratios.\n cbar_pos : tuple of (left, bottom, width, height), optional\n Position of the colorbar axes in the figure. Setting to ``None`` will\n disable the colorbar.\n tree_kws : dict, optional\n Parameters for the :class:`matplotlib.collections.LineCollection`\n that is used to plot the lines of the dendrogram tree.\n kwargs : other keyword arguments\n All other keyword arguments are passed to :func:`heatmap`.\n\n Returns\n -------\n :class:`ClusterGrid`\n A :class:`ClusterGrid` instance.\n\n See Also\n --------\n heatmap : Plot rectangular data as a color-encoded matrix.\n\n Notes\n -----\n The returned object has a ``savefig`` method that should be used if you\n want to save the figure object without clipping the dendrograms.\n\n To access the reordered row indices, use:\n ``clustergrid.dendrogram_row.reordered_ind``\n\n Column indices, use:\n ``clustergrid.dendrogram_col.reordered_ind``\n\n Examples\n --------\n\n .. include:: ../docstrings/clustermap.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_matrix.py::test_required_scipy_errors"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-40
|
1.0
|
{
"code": "diff --git b/seaborn/matrix.py a/seaborn/matrix.py\nindex 5a24200c..6b99c118 100644\n--- b/seaborn/matrix.py\n+++ a/seaborn/matrix.py\n@@ -681,6 +681,16 @@ def dendrogram(\n dendrogramplotter.reordered_ind\n \n \"\"\"\n+ if _no_scipy:\n+ raise RuntimeError(\"dendrogram requires scipy to be installed\")\n+\n+ plotter = _DendrogramPlotter(data, linkage=linkage, axis=axis,\n+ metric=metric, method=method,\n+ label=label, rotate=rotate)\n+ if ax is None:\n+ ax = plt.gca()\n+\n+ return plotter.plot(ax=ax, tree_kws=tree_kws)\n \n \n class ClusterGrid(Grid):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/matrix.py b/seaborn/matrix.py\nindex 6b99c118..5a24200c 100644\n--- a/seaborn/matrix.py\n+++ b/seaborn/matrix.py\n@@ -681,16 +681,6 @@ def dendrogram(\n dendrogramplotter.reordered_ind\n \n \"\"\"\n- if _no_scipy:\n- raise RuntimeError(\"dendrogram requires scipy to be installed\")\n-\n- plotter = _DendrogramPlotter(data, linkage=linkage, axis=axis,\n- metric=metric, method=method,\n- label=label, rotate=rotate)\n- if ax is None:\n- ax = plt.gca()\n-\n- return plotter.plot(ax=ax, tree_kws=tree_kws)\n \n \n class ClusterGrid(Grid):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/matrix.py.\nHere is the description for the function:\ndef dendrogram(\n data, *,\n linkage=None, axis=1, label=True, metric='euclidean',\n method='average', rotate=False, tree_kws=None, ax=None\n):\n \"\"\"Draw a tree diagram of relationships within a matrix\n\n Parameters\n ----------\n data : pandas.DataFrame\n Rectangular data\n linkage : numpy.array, optional\n Linkage matrix\n axis : int, optional\n Which axis to use to calculate linkage. 0 is rows, 1 is columns.\n label : bool, optional\n If True, label the dendrogram at leaves with column or row names\n metric : str, optional\n Distance metric. Anything valid for scipy.spatial.distance.pdist\n method : str, optional\n Linkage method to use. Anything valid for\n scipy.cluster.hierarchy.linkage\n rotate : bool, optional\n When plotting the matrix, whether to rotate it 90 degrees\n counter-clockwise, so the leaves face right\n tree_kws : dict, optional\n Keyword arguments for the ``matplotlib.collections.LineCollection``\n that is used for plotting the lines of the dendrogram tree.\n ax : matplotlib axis, optional\n Axis to plot on, otherwise uses current axis\n\n Returns\n -------\n dendrogramplotter : _DendrogramPlotter\n A Dendrogram plotter object.\n\n Notes\n -----\n Access the reordered dendrogram indices with\n dendrogramplotter.reordered_ind\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_matrix.py::test_required_scipy_errors"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-41
|
1.0
|
{
"code": "diff --git b/seaborn/matrix.py a/seaborn/matrix.py\nindex 7a141374..6b99c118 100644\n--- b/seaborn/matrix.py\n+++ a/seaborn/matrix.py\n@@ -442,6 +442,22 @@ def heatmap(\n .. include:: ../docstrings/heatmap.rst\n \n \"\"\"\n+ # Initialize the plotter object\n+ plotter = _HeatMapper(data, vmin, vmax, cmap, center, robust, annot, fmt,\n+ annot_kws, cbar, cbar_kws, xticklabels,\n+ yticklabels, mask)\n+\n+ # Add the pcolormesh kwargs here\n+ kwargs[\"linewidths\"] = linewidths\n+ kwargs[\"edgecolor\"] = linecolor\n+\n+ # Draw the plot and return the Axes\n+ if ax is None:\n+ ax = plt.gca()\n+ if square:\n+ ax.set_aspect(\"equal\")\n+ plotter.plot(ax, cbar_ax, kwargs)\n+ return ax\n \n \n class _DendrogramPlotter:\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/matrix.py b/seaborn/matrix.py\nindex 6b99c118..7a141374 100644\n--- a/seaborn/matrix.py\n+++ b/seaborn/matrix.py\n@@ -442,22 +442,6 @@ def heatmap(\n .. include:: ../docstrings/heatmap.rst\n \n \"\"\"\n- # Initialize the plotter object\n- plotter = _HeatMapper(data, vmin, vmax, cmap, center, robust, annot, fmt,\n- annot_kws, cbar, cbar_kws, xticklabels,\n- yticklabels, mask)\n-\n- # Add the pcolormesh kwargs here\n- kwargs[\"linewidths\"] = linewidths\n- kwargs[\"edgecolor\"] = linecolor\n-\n- # Draw the plot and return the Axes\n- if ax is None:\n- ax = plt.gca()\n- if square:\n- ax.set_aspect(\"equal\")\n- plotter.plot(ax, cbar_ax, kwargs)\n- return ax\n \n \n class _DendrogramPlotter:\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/matrix.py.\nHere is the description for the function:\ndef heatmap(\n data, *,\n vmin=None, vmax=None, cmap=None, center=None, robust=False,\n annot=None, fmt=\".2g\", annot_kws=None,\n linewidths=0, linecolor=\"white\",\n cbar=True, cbar_kws=None, cbar_ax=None,\n square=False, xticklabels=\"auto\", yticklabels=\"auto\",\n mask=None, ax=None,\n **kwargs\n):\n \"\"\"Plot rectangular data as a color-encoded matrix.\n\n This is an Axes-level function and will draw the heatmap into the\n currently-active Axes if none is provided to the ``ax`` argument. Part of\n this Axes space will be taken and used to plot a colormap, unless ``cbar``\n is False or a separate Axes is provided to ``cbar_ax``.\n\n Parameters\n ----------\n data : rectangular dataset\n 2D dataset that can be coerced into an ndarray. If a Pandas DataFrame\n is provided, the index/column information will be used to label the\n columns and rows.\n vmin, vmax : floats, optional\n Values to anchor the colormap, otherwise they are inferred from the\n data and other keyword arguments.\n cmap : matplotlib colormap name or object, or list of colors, optional\n The mapping from data values to color space. If not provided, the\n default will depend on whether ``center`` is set.\n center : float, optional\n The value at which to center the colormap when plotting divergent data.\n Using this parameter will change the default ``cmap`` if none is\n specified.\n robust : bool, optional\n If True and ``vmin`` or ``vmax`` are absent, the colormap range is\n computed with robust quantiles instead of the extreme values.\n annot : bool or rectangular dataset, optional\n If True, write the data value in each cell. If an array-like with the\n same shape as ``data``, then use this to annotate the heatmap instead\n of the data. Note that DataFrames will match on position, not index.\n fmt : str, optional\n String formatting code to use when adding annotations.\n annot_kws : dict of key, value mappings, optional\n Keyword arguments for :meth:`matplotlib.axes.Axes.text` when ``annot``\n is True.\n linewidths : float, optional\n Width of the lines that will divide each cell.\n linecolor : color, optional\n Color of the lines that will divide each cell.\n cbar : bool, optional\n Whether to draw a colorbar.\n cbar_kws : dict of key, value mappings, optional\n Keyword arguments for :meth:`matplotlib.figure.Figure.colorbar`.\n cbar_ax : matplotlib Axes, optional\n Axes in which to draw the colorbar, otherwise take space from the\n main Axes.\n square : bool, optional\n If True, set the Axes aspect to \"equal\" so each cell will be\n square-shaped.\n xticklabels, yticklabels : \"auto\", bool, list-like, or int, optional\n If True, plot the column names of the dataframe. If False, don't plot\n the column names. If list-like, plot these alternate labels as the\n xticklabels. If an integer, use the column names but plot only every\n n label. If \"auto\", try to densely plot non-overlapping labels.\n mask : bool array or DataFrame, optional\n If passed, data will not be shown in cells where ``mask`` is True.\n Cells with missing values are automatically masked.\n ax : matplotlib Axes, optional\n Axes in which to draw the plot, otherwise use the currently-active\n Axes.\n kwargs : other keyword arguments\n All other keyword arguments are passed to\n :meth:`matplotlib.axes.Axes.pcolormesh`.\n\n Returns\n -------\n ax : matplotlib Axes\n Axes object with the heatmap.\n\n See Also\n --------\n clustermap : Plot a matrix using hierarchical clustering to arrange the\n rows and columns.\n\n Examples\n --------\n\n .. include:: ../docstrings/heatmap.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_matrix.py::TestHeatmap::test_default_colors",
"tests/test_matrix.py::TestHeatmap::test_custom_vlim_colors",
"tests/test_matrix.py::TestHeatmap::test_custom_center_colors",
"tests/test_matrix.py::TestHeatmap::test_explicit_none_norm",
"tests/test_matrix.py::TestHeatmap::test_heatmap_annotation",
"tests/test_matrix.py::TestHeatmap::test_heatmap_annotation_overwrite_kws",
"tests/test_matrix.py::TestHeatmap::test_heatmap_annotation_with_mask",
"tests/test_matrix.py::TestHeatmap::test_heatmap_annotation_mesh_colors",
"tests/test_matrix.py::TestHeatmap::test_heatmap_annotation_other_data",
"tests/test_matrix.py::TestHeatmap::test_heatmap_annotation_different_shapes",
"tests/test_matrix.py::TestHeatmap::test_heatmap_annotation_with_limited_ticklabels",
"tests/test_matrix.py::TestHeatmap::test_heatmap_cbar",
"tests/test_matrix.py::TestHeatmap::test_heatmap_axes",
"tests/test_matrix.py::TestHeatmap::test_heatmap_ticklabel_rotation",
"tests/test_matrix.py::TestHeatmap::test_heatmap_inner_lines",
"tests/test_matrix.py::TestHeatmap::test_square_aspect",
"tests/test_matrix.py::TestHeatmap::test_cbar_ticks"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-42
|
1.0
|
{
"code": "diff --git b/seaborn/palettes.py a/seaborn/palettes.py\nindex e5a8e08d..f7f42984 100644\n--- b/seaborn/palettes.py\n+++ a/seaborn/palettes.py\n@@ -600,6 +600,13 @@ def blend_palette(colors, n_colors=6, as_cmap=False, input=\"rgb\"):\n .. include: ../docstrings/blend_palette.rst\n \n \"\"\"\n+ colors = [_color_to_rgb(color, input) for color in colors]\n+ name = \"blend\"\n+ pal = mpl.colors.LinearSegmentedColormap.from_list(name, colors)\n+ if not as_cmap:\n+ rgb_array = pal(np.linspace(0, 1, int(n_colors)))[:, :3] # no alpha\n+ pal = _ColorPalette(map(tuple, rgb_array))\n+ return pal\n \n \n def xkcd_palette(colors):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/palettes.py b/seaborn/palettes.py\nindex f7f42984..e5a8e08d 100644\n--- a/seaborn/palettes.py\n+++ b/seaborn/palettes.py\n@@ -600,13 +600,6 @@ def blend_palette(colors, n_colors=6, as_cmap=False, input=\"rgb\"):\n .. include: ../docstrings/blend_palette.rst\n \n \"\"\"\n- colors = [_color_to_rgb(color, input) for color in colors]\n- name = \"blend\"\n- pal = mpl.colors.LinearSegmentedColormap.from_list(name, colors)\n- if not as_cmap:\n- rgb_array = pal(np.linspace(0, 1, int(n_colors)))[:, :3] # no alpha\n- pal = _ColorPalette(map(tuple, rgb_array))\n- return pal\n \n \n def xkcd_palette(colors):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/palettes.py.\nHere is the description for the function:\ndef blend_palette(colors, n_colors=6, as_cmap=False, input=\"rgb\"):\n \"\"\"Make a palette that blends between a list of colors.\n\n Parameters\n ----------\n colors : sequence of colors in various formats interpreted by `input`\n hex code, html color name, or tuple in `input` space.\n n_colors : int, optional\n Number of colors in the palette.\n as_cmap : bool, optional\n If True, return a :class:`matplotlib.colors.ListedColormap`.\n\n Returns\n -------\n palette\n list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n Examples\n --------\n .. include: ../docstrings/blend_palette.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_core/test_scales.py::TestContinuous::test_color_tuple_values",
"tests/_core/test_properties.py::TestColor::test_continuous_tuple_palette",
"tests/test_palettes.py::TestColorPalettes::test_mpl_dark_palette",
"tests/_core/test_scales.py::TestContinuous::test_color_callable_values",
"tests/test_palettes.py::TestColorPalettes::test_light_palette",
"tests/test_palettes.py::TestColorPalettes::test_dark_palette",
"tests/test_palettes.py::TestColorPalettes::test_diverging_palette",
"tests/test_palettes.py::TestColorPalettes::test_blend_palette",
"tests/_core/test_scales.py::TestBoolean::test_color_tuple_palette",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs12]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs13]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs14]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs15]",
"tests/test_distributions.py::TestKDEPlotBivariate::test_contour_fill_colors",
"tests/test_categorical.py::TestStripPlot::test_palette_from_color_deprecation",
"tests/test_categorical.py::TestSwarmPlot::test_palette_from_color_deprecation",
"tests/test_categorical.py::TestBoxenPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_attributes",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_wide",
"tests/test_categorical.py::TestBoxenPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBoxenPlot::test_two_calls",
"tests/test_categorical.py::TestBoxenPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBoxenPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBoxenPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBoxenPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestBoxenPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[h]",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[v]",
"tests/test_categorical.py::TestBoxenPlot::test_grouped[x]",
"tests/test_categorical.py::TestBoxenPlot::test_grouped[y]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestBoxenPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestBoxenPlot::test_color",
"tests/test_categorical.py::TestBoxenPlot::test_hue_colors",
"tests/test_categorical.py::TestBoxenPlot::test_linecolor",
"tests/test_categorical.py::TestBoxenPlot::test_linewidth",
"tests/test_categorical.py::TestBoxenPlot::test_saturation",
"tests/test_categorical.py::TestBoxenPlot::test_gap",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_int",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_full",
"tests/test_categorical.py::TestBoxenPlot::test_trust_alpha",
"tests/test_categorical.py::TestBoxenPlot::test_outlier_prop",
"tests/test_categorical.py::TestBoxenPlot::test_exponential_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_linear_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_area_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_box_kws",
"tests/test_categorical.py::TestBoxenPlot::test_line_kws",
"tests/test_categorical.py::TestBoxenPlot::test_flier_kws",
"tests/test_categorical.py::TestBoxenPlot::test_scale_deprecation",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs18]",
"tests/test_axisgrid.py::TestJointPlot::test_scatter",
"tests/test_axisgrid.py::TestJointPlot::test_scatter_hue",
"tests/test_axisgrid.py::TestJointPlot::test_reg",
"tests/test_axisgrid.py::TestJointPlot::test_resid",
"tests/test_axisgrid.py::TestJointPlot::test_hist",
"tests/test_axisgrid.py::TestJointPlot::test_hex",
"tests/test_axisgrid.py::TestJointPlot::test_kde",
"tests/test_axisgrid.py::TestJointPlot::test_kde_hue",
"tests/test_axisgrid.py::TestJointPlot::test_color",
"tests/test_axisgrid.py::TestJointPlot::test_palette",
"tests/test_axisgrid.py::TestJointPlot::test_hex_customise",
"tests/test_axisgrid.py::TestJointPlot::test_leaky_dict",
"tests/test_axisgrid.py::TestJointPlot::test_distplot_kwarg_warning",
"tests/test_axisgrid.py::TestJointPlot::test_ax_warning"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-43
|
1.0
|
{
"code": "diff --git b/seaborn/palettes.py a/seaborn/palettes.py\nindex 174e514a..f7f42984 100644\n--- b/seaborn/palettes.py\n+++ a/seaborn/palettes.py\n@@ -658,6 +658,8 @@ def crayon_palette(colors):\n xkcd_palette : Make a palette with named colors from the XKCD color survey.\n \n \"\"\"\n+ palette = [crayons[name] for name in colors]\n+ return color_palette(palette, len(palette))\n \n \n def cubehelix_palette(n_colors=6, start=0, rot=.4, gamma=1.0, hue=0.8,\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/palettes.py b/seaborn/palettes.py\nindex f7f42984..174e514a 100644\n--- a/seaborn/palettes.py\n+++ b/seaborn/palettes.py\n@@ -658,8 +658,6 @@ def crayon_palette(colors):\n xkcd_palette : Make a palette with named colors from the XKCD color survey.\n \n \"\"\"\n- palette = [crayons[name] for name in colors]\n- return color_palette(palette, len(palette))\n \n \n def cubehelix_palette(n_colors=6, start=0, rot=.4, gamma=1.0, hue=0.8,\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/palettes.py.\nHere is the description for the function:\ndef crayon_palette(colors):\n \"\"\"Make a palette with color names from Crayola crayons.\n\n Colors are taken from here:\n https://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors\n\n This is just a simple wrapper around the `seaborn.crayons` dictionary.\n\n Parameters\n ----------\n colors : list of strings\n List of keys in the `seaborn.crayons` dictionary.\n\n Returns\n -------\n palette\n A list of colors as RGB tuples.\n\n See Also\n --------\n xkcd_palette : Make a palette with named colors from the XKCD color survey.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_palettes.py::TestColorPalettes::test_crayon_palette"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-44
|
1.0
|
{
"code": "diff --git b/seaborn/palettes.py a/seaborn/palettes.py\nindex f4770be1..f7f42984 100644\n--- b/seaborn/palettes.py\n+++ a/seaborn/palettes.py\n@@ -721,6 +721,44 @@ def cubehelix_palette(n_colors=6, start=0, rot=.4, gamma=1.0, hue=0.8,\n .. include:: ../docstrings/cubehelix_palette.rst\n \n \"\"\"\n+ def get_color_function(p0, p1):\n+ # Copied from matplotlib because it lives in private module\n+ def color(x):\n+ # Apply gamma factor to emphasise low or high intensity values\n+ xg = x ** gamma\n+\n+ # Calculate amplitude and angle of deviation from the black\n+ # to white diagonal in the plane of constant\n+ # perceived intensity.\n+ a = hue * xg * (1 - xg) / 2\n+\n+ phi = 2 * np.pi * (start / 3 + rot * x)\n+\n+ return xg + a * (p0 * np.cos(phi) + p1 * np.sin(phi))\n+ return color\n+\n+ cdict = {\n+ \"red\": get_color_function(-0.14861, 1.78277),\n+ \"green\": get_color_function(-0.29227, -0.90649),\n+ \"blue\": get_color_function(1.97294, 0.0),\n+ }\n+\n+ cmap = mpl.colors.LinearSegmentedColormap(\"cubehelix\", cdict)\n+\n+ x = np.linspace(light, dark, int(n_colors))\n+ pal = cmap(x)[:, :3].tolist()\n+ if reverse:\n+ pal = pal[::-1]\n+\n+ if as_cmap:\n+ x_256 = np.linspace(light, dark, 256)\n+ if reverse:\n+ x_256 = x_256[::-1]\n+ pal_256 = cmap(x_256)\n+ cmap = mpl.colors.ListedColormap(pal_256, \"seaborn_cubehelix\")\n+ return cmap\n+ else:\n+ return _ColorPalette(pal)\n \n \n def _parse_cubehelix_args(argstr):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/palettes.py b/seaborn/palettes.py\nindex f7f42984..f4770be1 100644\n--- a/seaborn/palettes.py\n+++ b/seaborn/palettes.py\n@@ -721,44 +721,6 @@ def cubehelix_palette(n_colors=6, start=0, rot=.4, gamma=1.0, hue=0.8,\n .. include:: ../docstrings/cubehelix_palette.rst\n \n \"\"\"\n- def get_color_function(p0, p1):\n- # Copied from matplotlib because it lives in private module\n- def color(x):\n- # Apply gamma factor to emphasise low or high intensity values\n- xg = x ** gamma\n-\n- # Calculate amplitude and angle of deviation from the black\n- # to white diagonal in the plane of constant\n- # perceived intensity.\n- a = hue * xg * (1 - xg) / 2\n-\n- phi = 2 * np.pi * (start / 3 + rot * x)\n-\n- return xg + a * (p0 * np.cos(phi) + p1 * np.sin(phi))\n- return color\n-\n- cdict = {\n- \"red\": get_color_function(-0.14861, 1.78277),\n- \"green\": get_color_function(-0.29227, -0.90649),\n- \"blue\": get_color_function(1.97294, 0.0),\n- }\n-\n- cmap = mpl.colors.LinearSegmentedColormap(\"cubehelix\", cdict)\n-\n- x = np.linspace(light, dark, int(n_colors))\n- pal = cmap(x)[:, :3].tolist()\n- if reverse:\n- pal = pal[::-1]\n-\n- if as_cmap:\n- x_256 = np.linspace(light, dark, 256)\n- if reverse:\n- x_256 = x_256[::-1]\n- pal_256 = cmap(x_256)\n- cmap = mpl.colors.ListedColormap(pal_256, \"seaborn_cubehelix\")\n- return cmap\n- else:\n- return _ColorPalette(pal)\n \n \n def _parse_cubehelix_args(argstr):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/palettes.py.\nHere is the description for the function:\ndef cubehelix_palette(n_colors=6, start=0, rot=.4, gamma=1.0, hue=0.8,\n light=.85, dark=.15, reverse=False, as_cmap=False):\n \"\"\"Make a sequential palette from the cubehelix system.\n\n This produces a colormap with linearly-decreasing (or increasing)\n brightness. That means that information will be preserved if printed to\n black and white or viewed by someone who is colorblind. \"cubehelix\" is\n also available as a matplotlib-based palette, but this function gives the\n user more control over the look of the palette and has a different set of\n defaults.\n\n In addition to using this function, it is also possible to generate a\n cubehelix palette generally in seaborn using a string starting with\n `ch:` and containing other parameters (e.g. `\"ch:s=.25,r=-.5\"`).\n\n Parameters\n ----------\n n_colors : int\n Number of colors in the palette.\n start : float, 0 <= start <= 3\n The hue value at the start of the helix.\n rot : float\n Rotations around the hue wheel over the range of the palette.\n gamma : float 0 <= gamma\n Nonlinearity to emphasize dark (gamma < 1) or light (gamma > 1) colors.\n hue : float, 0 <= hue <= 1\n Saturation of the colors.\n dark : float 0 <= dark <= 1\n Intensity of the darkest color in the palette.\n light : float 0 <= light <= 1\n Intensity of the lightest color in the palette.\n reverse : bool\n If True, the palette will go from dark to light.\n as_cmap : bool\n If True, return a :class:`matplotlib.colors.ListedColormap`.\n\n Returns\n -------\n palette\n list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n See Also\n --------\n choose_cubehelix_palette : Launch an interactive widget to select cubehelix\n palette parameters.\n dark_palette : Create a sequential palette with dark low values.\n light_palette : Create a sequential palette with bright low values.\n\n References\n ----------\n Green, D. A. (2011). \"A colour scheme for the display of astronomical\n intensity images\". Bulletin of the Astromical Society of India, Vol. 39,\n p. 289-295.\n\n Examples\n --------\n .. include:: ../docstrings/cubehelix_palette.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_base.py::TestHueMapping::test_hue_map_categorical",
"tests/_core/test_scales.py::TestContinuous::test_color_defaults",
"tests/_core/test_properties.py::TestColor::test_continuous_default_palette",
"tests/_core/test_scales.py::TestContinuous::test_color_with_norm",
"tests/test_base.py::TestHueMapping::test_hue_map_numeric",
"tests/_core/test_scales.py::TestContinuous::test_color_with_transform",
"tests/_core/test_properties.py::TestColor::test_continuous_missing",
"tests/test_base.py::TestSizeMapping::test_array_palette_deprecation",
"tests/test_palettes.py::TestColorPalettes::test_cubehelix_against_matplotlib",
"tests/test_palettes.py::TestColorPalettes::test_cubehelix_n_colors",
"tests/test_palettes.py::TestColorPalettes::test_cubehelix_reverse",
"tests/test_palettes.py::TestColorPalettes::test_cubehelix_cmap",
"tests/test_palettes.py::TestColorPalettes::test_cubehelix_code",
"tests/_core/test_scales.py::TestTemporal::test_color_defaults",
"tests/test_categorical.py::TestStripPlot::test_positions[variables5-None]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_weight_norm",
"tests/_core/test_plot.py::TestExceptions::test_semantic_scaling",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables2]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[series]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[numpy]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[list]",
"tests/test_categorical.py::TestStripPlot::test_legend_numeric",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs4]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_legend",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs6]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_weight_norm",
"tests/_core/test_plot.py::TestLegend::test_legend_has_no_offset",
"tests/test_relational.py::TestRelationalPlotter::test_legend_has_no_offset",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables5-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables2]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_full[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_brief[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_log_norm[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_numberic_brief[hue]",
"tests/test_categorical.py::TestSwarmPlot::test_legend_numeric",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs6]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics3]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics7]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs9]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_smoke",
"tests/test_categorical.py::TestBoxenPlot::test_gap",
"tests/test_categorical.py::TestBoxenPlot::test_fill",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs9]",
"tests/test_relational.py::TestScatterPlotter::test_legend_numeric_hue_full",
"tests/test_relational.py::TestScatterPlotter::test_legend_numeric_hue_brief",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics3]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics7]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_smoke",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBarPlot::test_hue_norm",
"tests/test_categorical.py::TestBarPlot::test_legend_numeric_auto",
"tests/test_categorical.py::TestBarPlot::test_legend_numeric_full",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestCountPlot::test_legend_numeric_auto",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs10]"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-45
|
1.0
|
{
"code": "diff --git b/seaborn/palettes.py a/seaborn/palettes.py\nindex eb664326..f7f42984 100644\n--- b/seaborn/palettes.py\n+++ a/seaborn/palettes.py\n@@ -473,6 +473,12 @@ def dark_palette(color, n_colors=6, reverse=False, as_cmap=False, input=\"rgb\"):\n .. include:: ../docstrings/dark_palette.rst\n \n \"\"\"\n+ rgb = _color_to_rgb(color, input)\n+ hue, sat, _ = husl.rgb_to_husl(*rgb)\n+ gray_s, gray_l = .15 * sat, 15\n+ gray = _color_to_rgb((hue, gray_s, gray_l), input=\"husl\")\n+ colors = [rgb, gray] if reverse else [gray, rgb]\n+ return blend_palette(colors, n_colors, as_cmap)\n \n \n def light_palette(color, n_colors=6, reverse=False, as_cmap=False, input=\"rgb\"):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/palettes.py b/seaborn/palettes.py\nindex f7f42984..eb664326 100644\n--- a/seaborn/palettes.py\n+++ b/seaborn/palettes.py\n@@ -473,12 +473,6 @@ def dark_palette(color, n_colors=6, reverse=False, as_cmap=False, input=\"rgb\"):\n .. include:: ../docstrings/dark_palette.rst\n \n \"\"\"\n- rgb = _color_to_rgb(color, input)\n- hue, sat, _ = husl.rgb_to_husl(*rgb)\n- gray_s, gray_l = .15 * sat, 15\n- gray = _color_to_rgb((hue, gray_s, gray_l), input=\"husl\")\n- colors = [rgb, gray] if reverse else [gray, rgb]\n- return blend_palette(colors, n_colors, as_cmap)\n \n \n def light_palette(color, n_colors=6, reverse=False, as_cmap=False, input=\"rgb\"):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/palettes.py.\nHere is the description for the function:\ndef dark_palette(color, n_colors=6, reverse=False, as_cmap=False, input=\"rgb\"):\n \"\"\"Make a sequential palette that blends from dark to ``color``.\n\n This kind of palette is good for data that range between relatively\n uninteresting low values and interesting high values.\n\n The ``color`` parameter can be specified in a number of ways, including\n all options for defining a color in matplotlib and several additional\n color spaces that are handled by seaborn. You can also use the database\n of named colors from the XKCD color survey.\n\n If you are using the IPython notebook, you can also choose this palette\n interactively with the :func:`choose_dark_palette` function.\n\n Parameters\n ----------\n color : base color for high values\n hex, rgb-tuple, or html color name\n n_colors : int, optional\n number of colors in the palette\n reverse : bool, optional\n if True, reverse the direction of the blend\n as_cmap : bool, optional\n If True, return a :class:`matplotlib.colors.ListedColormap`.\n input : {'rgb', 'hls', 'husl', xkcd'}\n Color space to interpret the input color. The first three options\n apply to tuple inputs and the latter applies to string inputs.\n\n Returns\n -------\n palette\n list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n See Also\n --------\n light_palette : Create a sequential palette with bright low values.\n diverging_palette : Create a diverging palette with two colors.\n\n Examples\n --------\n .. include:: ../docstrings/dark_palette.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_palettes.py::TestColorPalettes::test_dark_palette",
"tests/test_palettes.py::TestColorPalettes::test_diverging_palette",
"tests/test_categorical.py::TestStripPlot::test_palette_from_color_deprecation",
"tests/test_categorical.py::TestSwarmPlot::test_palette_from_color_deprecation"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-46
|
1.0
|
{
"code": "diff --git b/seaborn/palettes.py a/seaborn/palettes.py\nindex be6756f5..f7f42984 100644\n--- b/seaborn/palettes.py\n+++ a/seaborn/palettes.py\n@@ -568,6 +568,14 @@ def diverging_palette(h_neg, h_pos, s=75, l=50, sep=1, n=6, # noqa\n .. include: ../docstrings/diverging_palette.rst\n \n \"\"\"\n+ palfunc = dict(dark=dark_palette, light=light_palette)[center]\n+ n_half = int(128 - (sep // 2))\n+ neg = palfunc((h_neg, s, l), n_half, reverse=True, input=\"husl\")\n+ pos = palfunc((h_pos, s, l), n_half, input=\"husl\")\n+ midpoint = dict(light=[(.95, .95, .95)], dark=[(.133, .133, .133)])[center]\n+ mid = midpoint * sep\n+ pal = blend_palette(np.concatenate([neg, mid, pos]), n, as_cmap=as_cmap)\n+ return pal\n \n \n def blend_palette(colors, n_colors=6, as_cmap=False, input=\"rgb\"):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/palettes.py b/seaborn/palettes.py\nindex f7f42984..be6756f5 100644\n--- a/seaborn/palettes.py\n+++ b/seaborn/palettes.py\n@@ -568,14 +568,6 @@ def diverging_palette(h_neg, h_pos, s=75, l=50, sep=1, n=6, # noqa\n .. include: ../docstrings/diverging_palette.rst\n \n \"\"\"\n- palfunc = dict(dark=dark_palette, light=light_palette)[center]\n- n_half = int(128 - (sep // 2))\n- neg = palfunc((h_neg, s, l), n_half, reverse=True, input=\"husl\")\n- pos = palfunc((h_pos, s, l), n_half, input=\"husl\")\n- midpoint = dict(light=[(.95, .95, .95)], dark=[(.133, .133, .133)])[center]\n- mid = midpoint * sep\n- pal = blend_palette(np.concatenate([neg, mid, pos]), n, as_cmap=as_cmap)\n- return pal\n \n \n def blend_palette(colors, n_colors=6, as_cmap=False, input=\"rgb\"):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/palettes.py.\nHere is the description for the function:\ndef diverging_palette(h_neg, h_pos, s=75, l=50, sep=1, n=6, # noqa\n center=\"light\", as_cmap=False):\n \"\"\"Make a diverging palette between two HUSL colors.\n\n If you are using the IPython notebook, you can also choose this palette\n interactively with the :func:`choose_diverging_palette` function.\n\n Parameters\n ----------\n h_neg, h_pos : float in [0, 359]\n Anchor hues for negative and positive extents of the map.\n s : float in [0, 100], optional\n Anchor saturation for both extents of the map.\n l : float in [0, 100], optional\n Anchor lightness for both extents of the map.\n sep : int, optional\n Size of the intermediate region.\n n : int, optional\n Number of colors in the palette (if not returning a cmap)\n center : {\"light\", \"dark\"}, optional\n Whether the center of the palette is light or dark\n as_cmap : bool, optional\n If True, return a :class:`matplotlib.colors.ListedColormap`.\n\n Returns\n -------\n palette\n list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n See Also\n --------\n dark_palette : Create a sequential palette with dark values.\n light_palette : Create a sequential palette with light values.\n\n Examples\n --------\n .. include: ../docstrings/diverging_palette.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_palettes.py::TestColorPalettes::test_diverging_palette"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-47
|
1.0
|
{
"code": "diff --git b/seaborn/palettes.py a/seaborn/palettes.py\nindex 79c5c2ec..f7f42984 100644\n--- b/seaborn/palettes.py\n+++ a/seaborn/palettes.py\n@@ -296,6 +296,17 @@ def hls_palette(n_colors=6, h=.01, l=.6, s=.65, as_cmap=False): # noqa\n .. include:: ../docstrings/hls_palette.rst\n \n \"\"\"\n+ if as_cmap:\n+ n_colors = 256\n+ hues = np.linspace(0, 1, int(n_colors) + 1)[:-1]\n+ hues += h\n+ hues %= 1\n+ hues -= hues.astype(int)\n+ palette = [colorsys.hls_to_rgb(h_i, l, s) for h_i in hues]\n+ if as_cmap:\n+ return mpl.colors.ListedColormap(palette, \"hls\")\n+ else:\n+ return _ColorPalette(palette)\n \n \n def husl_palette(n_colors=6, h=.01, s=.9, l=.65, as_cmap=False): # noqa\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/palettes.py b/seaborn/palettes.py\nindex f7f42984..79c5c2ec 100644\n--- a/seaborn/palettes.py\n+++ b/seaborn/palettes.py\n@@ -296,17 +296,6 @@ def hls_palette(n_colors=6, h=.01, l=.6, s=.65, as_cmap=False): # noqa\n .. include:: ../docstrings/hls_palette.rst\n \n \"\"\"\n- if as_cmap:\n- n_colors = 256\n- hues = np.linspace(0, 1, int(n_colors) + 1)[:-1]\n- hues += h\n- hues %= 1\n- hues -= hues.astype(int)\n- palette = [colorsys.hls_to_rgb(h_i, l, s) for h_i in hues]\n- if as_cmap:\n- return mpl.colors.ListedColormap(palette, \"hls\")\n- else:\n- return _ColorPalette(palette)\n \n \n def husl_palette(n_colors=6, h=.01, s=.9, l=.65, as_cmap=False): # noqa\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/palettes.py.\nHere is the description for the function:\ndef hls_palette(n_colors=6, h=.01, l=.6, s=.65, as_cmap=False): # noqa\n \"\"\"\n Return hues with constant lightness and saturation in the HLS system.\n\n The hues are evenly sampled along a circular path. The resulting palette will be\n appropriate for categorical or cyclical data.\n\n The `h`, `l`, and `s` values should be between 0 and 1.\n\n .. note::\n While the separation of the resulting colors will be mathematically\n constant, the HLS system does not construct a perceptually-uniform space,\n so their apparent intensity will vary.\n\n Parameters\n ----------\n n_colors : int\n Number of colors in the palette.\n h : float\n The value of the first hue.\n l : float\n The lightness value.\n s : float\n The saturation intensity.\n as_cmap : bool\n If True, return a matplotlib colormap object.\n\n Returns\n -------\n palette\n list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n See Also\n --------\n husl_palette : Make a palette using evenly spaced hues in the HUSL system.\n\n Examples\n --------\n .. include:: ../docstrings/hls_palette.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_palettes.py::TestColorPalettes::test_hls_palette",
"tests/test_palettes.py::TestColorPalettes::test_hls_values"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-48
|
1.0
|
{
"code": "diff --git b/seaborn/palettes.py a/seaborn/palettes.py\nindex 54fb1dde..f7f42984 100644\n--- b/seaborn/palettes.py\n+++ a/seaborn/palettes.py\n@@ -348,6 +348,19 @@ def husl_palette(n_colors=6, h=.01, s=.9, l=.65, as_cmap=False): # noqa\n .. include:: ../docstrings/husl_palette.rst\n \n \"\"\"\n+ if as_cmap:\n+ n_colors = 256\n+ hues = np.linspace(0, 1, int(n_colors) + 1)[:-1]\n+ hues += h\n+ hues %= 1\n+ hues *= 359\n+ s *= 99\n+ l *= 99 # noqa\n+ palette = [_color_to_rgb((h_i, s, l), input=\"husl\") for h_i in hues]\n+ if as_cmap:\n+ return mpl.colors.ListedColormap(palette, \"hsl\")\n+ else:\n+ return _ColorPalette(palette)\n \n \n def mpl_palette(name, n_colors=6, as_cmap=False):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/palettes.py b/seaborn/palettes.py\nindex f7f42984..54fb1dde 100644\n--- a/seaborn/palettes.py\n+++ b/seaborn/palettes.py\n@@ -348,19 +348,6 @@ def husl_palette(n_colors=6, h=.01, s=.9, l=.65, as_cmap=False): # noqa\n .. include:: ../docstrings/husl_palette.rst\n \n \"\"\"\n- if as_cmap:\n- n_colors = 256\n- hues = np.linspace(0, 1, int(n_colors) + 1)[:-1]\n- hues += h\n- hues %= 1\n- hues *= 359\n- s *= 99\n- l *= 99 # noqa\n- palette = [_color_to_rgb((h_i, s, l), input=\"husl\") for h_i in hues]\n- if as_cmap:\n- return mpl.colors.ListedColormap(palette, \"hsl\")\n- else:\n- return _ColorPalette(palette)\n \n \n def mpl_palette(name, n_colors=6, as_cmap=False):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/palettes.py.\nHere is the description for the function:\ndef husl_palette(n_colors=6, h=.01, s=.9, l=.65, as_cmap=False): # noqa\n \"\"\"\n Return hues with constant lightness and saturation in the HUSL system.\n\n The hues are evenly sampled along a circular path. The resulting palette will be\n appropriate for categorical or cyclical data.\n\n The `h`, `l`, and `s` values should be between 0 and 1.\n\n This function is similar to :func:`hls_palette`, but it uses a nonlinear color\n space that is more perceptually uniform.\n\n Parameters\n ----------\n n_colors : int\n Number of colors in the palette.\n h : float\n The value of the first hue.\n l : float\n The lightness value.\n s : float\n The saturation intensity.\n as_cmap : bool\n If True, return a matplotlib colormap object.\n\n Returns\n -------\n palette\n list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n See Also\n --------\n hls_palette : Make a palette using evenly spaced hues in the HSL system.\n\n Examples\n --------\n .. include:: ../docstrings/husl_palette.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_core/test_properties.py::TestColor::test_nominal_default_palette_large",
"tests/test_base.py::TestHueMapping::test_hue_map_categorical",
"tests/test_palettes.py::TestColorPalettes::test_big_palette_context",
"tests/test_miscplot.py::TestPalPlot::test_palplot_size",
"tests/test_palettes.py::TestColorPalettes::test_palette_size",
"tests/test_palettes.py::TestColorPalettes::test_husl_palette",
"tests/test_palettes.py::TestColorPalettes::test_palette_desat",
"tests/test_palettes.py::TestColorPalettes::test_husl_values",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_stringy_numerics",
"tests/test_relational.py::TestLinePlotter::test_plot",
"tests/test_axisgrid.py::TestFacetGrid::test_palette",
"tests/test_axisgrid.py::TestPairGrid::test_remove_hue_from_default",
"tests/test_axisgrid.py::TestPairGrid::test_palette",
"tests/test_relational.py::TestScatterPlotter::test_plot"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-49
|
1.0
|
{
"code": "diff --git b/seaborn/palettes.py a/seaborn/palettes.py\nindex 0e194c6b..f7f42984 100644\n--- b/seaborn/palettes.py\n+++ a/seaborn/palettes.py\n@@ -521,6 +521,12 @@ def light_palette(color, n_colors=6, reverse=False, as_cmap=False, input=\"rgb\"):\n .. include:: ../docstrings/light_palette.rst\n \n \"\"\"\n+ rgb = _color_to_rgb(color, input)\n+ hue, sat, _ = husl.rgb_to_husl(*rgb)\n+ gray_s, gray_l = .15 * sat, 95\n+ gray = _color_to_rgb((hue, gray_s, gray_l), input=\"husl\")\n+ colors = [rgb, gray] if reverse else [gray, rgb]\n+ return blend_palette(colors, n_colors, as_cmap)\n \n \n def diverging_palette(h_neg, h_pos, s=75, l=50, sep=1, n=6, # noqa\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/palettes.py b/seaborn/palettes.py\nindex f7f42984..0e194c6b 100644\n--- a/seaborn/palettes.py\n+++ b/seaborn/palettes.py\n@@ -521,12 +521,6 @@ def light_palette(color, n_colors=6, reverse=False, as_cmap=False, input=\"rgb\"):\n .. include:: ../docstrings/light_palette.rst\n \n \"\"\"\n- rgb = _color_to_rgb(color, input)\n- hue, sat, _ = husl.rgb_to_husl(*rgb)\n- gray_s, gray_l = .15 * sat, 95\n- gray = _color_to_rgb((hue, gray_s, gray_l), input=\"husl\")\n- colors = [rgb, gray] if reverse else [gray, rgb]\n- return blend_palette(colors, n_colors, as_cmap)\n \n \n def diverging_palette(h_neg, h_pos, s=75, l=50, sep=1, n=6, # noqa\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/palettes.py.\nHere is the description for the function:\ndef light_palette(color, n_colors=6, reverse=False, as_cmap=False, input=\"rgb\"):\n \"\"\"Make a sequential palette that blends from light to ``color``.\n\n The ``color`` parameter can be specified in a number of ways, including\n all options for defining a color in matplotlib and several additional\n color spaces that are handled by seaborn. You can also use the database\n of named colors from the XKCD color survey.\n\n If you are using a Jupyter notebook, you can also choose this palette\n interactively with the :func:`choose_light_palette` function.\n\n Parameters\n ----------\n color : base color for high values\n hex code, html color name, or tuple in `input` space.\n n_colors : int, optional\n number of colors in the palette\n reverse : bool, optional\n if True, reverse the direction of the blend\n as_cmap : bool, optional\n If True, return a :class:`matplotlib.colors.ListedColormap`.\n input : {'rgb', 'hls', 'husl', xkcd'}\n Color space to interpret the input color. The first three options\n apply to tuple inputs and the latter applies to string inputs.\n\n Returns\n -------\n palette\n list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n See Also\n --------\n dark_palette : Create a sequential palette with dark low values.\n diverging_palette : Create a diverging palette with two colors.\n\n Examples\n --------\n .. include:: ../docstrings/light_palette.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_core/test_scales.py::TestContinuous::test_color_callable_values",
"tests/test_palettes.py::TestColorPalettes::test_light_palette",
"tests/test_palettes.py::TestColorPalettes::test_diverging_palette",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs12]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs13]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs14]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[boxenplot-kwargs15]",
"tests/test_distributions.py::TestKDEPlotBivariate::test_contour_fill_colors",
"tests/test_categorical.py::TestBoxenPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_attributes",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_wide",
"tests/test_categorical.py::TestBoxenPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBoxenPlot::test_two_calls",
"tests/test_categorical.py::TestBoxenPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBoxenPlot::test_log_scale[x]",
"tests/test_categorical.py::TestBoxenPlot::test_log_scale[y]",
"tests/test_categorical.py::TestBoxenPlot::test_single_var[x-y]",
"tests/test_categorical.py::TestBoxenPlot::test_single_var[y-z]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[None-x]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[x-y]",
"tests/test_categorical.py::TestBoxenPlot::test_vector_data[y-z]",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[h]",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[v]",
"tests/test_categorical.py::TestBoxenPlot::test_grouped[x]",
"tests/test_categorical.py::TestBoxenPlot::test_grouped[y]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestBoxenPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestBoxenPlot::test_color",
"tests/test_categorical.py::TestBoxenPlot::test_hue_colors",
"tests/test_categorical.py::TestBoxenPlot::test_linecolor",
"tests/test_categorical.py::TestBoxenPlot::test_linewidth",
"tests/test_categorical.py::TestBoxenPlot::test_saturation",
"tests/test_categorical.py::TestBoxenPlot::test_gap",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_int",
"tests/test_categorical.py::TestBoxenPlot::test_k_depth_full",
"tests/test_categorical.py::TestBoxenPlot::test_trust_alpha",
"tests/test_categorical.py::TestBoxenPlot::test_outlier_prop",
"tests/test_categorical.py::TestBoxenPlot::test_exponential_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_linear_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_area_width_method",
"tests/test_categorical.py::TestBoxenPlot::test_box_kws",
"tests/test_categorical.py::TestBoxenPlot::test_line_kws",
"tests/test_categorical.py::TestBoxenPlot::test_flier_kws",
"tests/test_categorical.py::TestBoxenPlot::test_scale_deprecation",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs18]"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-50
|
1.0
|
{
"code": "diff --git b/seaborn/palettes.py a/seaborn/palettes.py\nindex c1596469..f7f42984 100644\n--- b/seaborn/palettes.py\n+++ a/seaborn/palettes.py\n@@ -815,3 +815,27 @@ def set_color_codes(palette=\"deep\"):\n sets the matplotlib color cycle.\n \n \"\"\"\n+ if palette == \"reset\":\n+ colors = [\n+ (0., 0., 1.),\n+ (0., .5, 0.),\n+ (1., 0., 0.),\n+ (.75, 0., .75),\n+ (.75, .75, 0.),\n+ (0., .75, .75),\n+ (0., 0., 0.)\n+ ]\n+ elif not isinstance(palette, str):\n+ err = \"set_color_codes requires a named seaborn palette\"\n+ raise TypeError(err)\n+ elif palette in SEABORN_PALETTES:\n+ if not palette.endswith(\"6\"):\n+ palette = palette + \"6\"\n+ colors = SEABORN_PALETTES[palette] + [(.1, .1, .1)]\n+ else:\n+ err = f\"Cannot set colors with palette '{palette}'\"\n+ raise ValueError(err)\n+\n+ for code, color in zip(\"bgrmyck\", colors):\n+ rgb = mpl.colors.colorConverter.to_rgb(color)\n+ mpl.colors.colorConverter.colors[code] = rgb\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/palettes.py b/seaborn/palettes.py\nindex f7f42984..c1596469 100644\n--- a/seaborn/palettes.py\n+++ b/seaborn/palettes.py\n@@ -815,27 +815,3 @@ def set_color_codes(palette=\"deep\"):\n sets the matplotlib color cycle.\n \n \"\"\"\n- if palette == \"reset\":\n- colors = [\n- (0., 0., 1.),\n- (0., .5, 0.),\n- (1., 0., 0.),\n- (.75, 0., .75),\n- (.75, .75, 0.),\n- (0., .75, .75),\n- (0., 0., 0.)\n- ]\n- elif not isinstance(palette, str):\n- err = \"set_color_codes requires a named seaborn palette\"\n- raise TypeError(err)\n- elif palette in SEABORN_PALETTES:\n- if not palette.endswith(\"6\"):\n- palette = palette + \"6\"\n- colors = SEABORN_PALETTES[palette] + [(.1, .1, .1)]\n- else:\n- err = f\"Cannot set colors with palette '{palette}'\"\n- raise ValueError(err)\n-\n- for code, color in zip(\"bgrmyck\", colors):\n- rgb = mpl.colors.colorConverter.to_rgb(color)\n- mpl.colors.colorConverter.colors[code] = rgb\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/palettes.py.\nHere is the description for the function:\ndef set_color_codes(palette=\"deep\"):\n \"\"\"Change how matplotlib color shorthands are interpreted.\n\n Calling this will change how shorthand codes like \"b\" or \"g\"\n are interpreted by matplotlib in subsequent plots.\n\n Parameters\n ----------\n palette : {deep, muted, pastel, dark, bright, colorblind}\n Named seaborn palette to use as the source of colors.\n\n See Also\n --------\n set : Color codes can be set through the high-level seaborn style\n manager.\n set_palette : Color codes can also be set through the function that\n sets the matplotlib color cycle.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_palettes.py::TestColorPalettes::test_current_palette",
"tests/test_palettes.py::TestColorPalettes::test_big_palette_context",
"tests/test_rcmod.py::TestAxesStyle::test_set_rc",
"tests/test_rcmod.py::TestAxesStyle::test_set_with_palette",
"tests/test_rcmod.py::TestAxesStyle::test_reset_defaults",
"tests/test_utils.py::test_ticklabels_overlap",
"tests/test_rcmod.py::TestAxesStyle::test_reset_orig",
"tests/test_rcmod.py::TestAxesStyle::test_set_is_alias",
"tests/test_rcmod.py::TestPalette::test_set_palette",
"tests/test_rcmod.py::TestFonts::test_set_serif_font",
"tests/test_palettes.py::TestColorPalettes::test_color_codes",
"tests/test_axisgrid.py::TestFacetGrid::test_palette",
"tests/test_axisgrid.py::TestPairGrid::test_palette"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-51
|
1.0
|
{
"code": "diff --git b/seaborn/palettes.py a/seaborn/palettes.py\nindex a1c2e711..f7f42984 100644\n--- b/seaborn/palettes.py\n+++ a/seaborn/palettes.py\n@@ -631,6 +631,8 @@ def xkcd_palette(colors):\n crayon_palette : Make a palette with Crayola crayon colors.\n \n \"\"\"\n+ palette = [xkcd_rgb[name] for name in colors]\n+ return color_palette(palette, len(palette))\n \n \n def crayon_palette(colors):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/palettes.py b/seaborn/palettes.py\nindex f7f42984..a1c2e711 100644\n--- a/seaborn/palettes.py\n+++ b/seaborn/palettes.py\n@@ -631,8 +631,6 @@ def xkcd_palette(colors):\n crayon_palette : Make a palette with Crayola crayon colors.\n \n \"\"\"\n- palette = [xkcd_rgb[name] for name in colors]\n- return color_palette(palette, len(palette))\n \n \n def crayon_palette(colors):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/palettes.py.\nHere is the description for the function:\ndef xkcd_palette(colors):\n \"\"\"Make a palette with color names from the xkcd color survey.\n\n See xkcd for the full list of colors: https://xkcd.com/color/rgb/\n\n This is just a simple wrapper around the `seaborn.xkcd_rgb` dictionary.\n\n Parameters\n ----------\n colors : list of strings\n List of keys in the `seaborn.xkcd_rgb` dictionary.\n\n Returns\n -------\n palette\n A list of colors as RGB tuples.\n\n See Also\n --------\n crayon_palette : Make a palette with Crayola crayon colors.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_palettes.py::TestColorPalettes::test_xkcd_palette"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-52
|
1.0
|
{
"code": "diff --git b/seaborn/_core/plot.py a/seaborn/_core/plot.py\nindex 1a5b1587..c9dc61c8 100644\n--- b/seaborn/_core/plot.py\n+++ a/seaborn/_core/plot.py\n@@ -798,6 +798,13 @@ class Plot:\n \n \n \"\"\"\n+ new = self._clone()\n+ if title is not None:\n+ new._labels[\"title\"] = title\n+ if legend is not None:\n+ new._labels[\"legend\"] = legend\n+ new._labels.update(variables)\n+ return new\n \n def layout(\n self,\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_core/plot.py b/seaborn/_core/plot.py\nindex c9dc61c8..1a5b1587 100644\n--- a/seaborn/_core/plot.py\n+++ b/seaborn/_core/plot.py\n@@ -798,13 +798,6 @@ class Plot:\n \n \n \"\"\"\n- new = self._clone()\n- if title is not None:\n- new._labels[\"title\"] = title\n- if legend is not None:\n- new._labels[\"legend\"] = legend\n- new._labels.update(variables)\n- return new\n \n def layout(\n self,\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_core/plot.py.\nHere is the description for the function:\n def label(\n self, *,\n title: str | None = None,\n legend: str | None = None,\n **variables: str | Callable[[str], str]\n ) -> Plot:\n \"\"\"\n Control the labels and titles for axes, legends, and subplots.\n\n Additional keywords correspond to variables defined in the plot.\n Values can be one of the following types:\n\n - string (used literally; pass \"\" to clear the default label)\n - function (called on the default label)\n\n For coordinate variables, the value sets the axis label.\n For semantic variables, the value sets the legend title.\n For faceting variables, `title=` modifies the subplot-specific label,\n while `col=` and/or `row=` add a label for the faceting variable.\n\n When using a single subplot, `title=` sets its title.\n\n The `legend=` parameter sets the title for the \"layer\" legend\n (i.e., when using `label` in :meth:`Plot.add`).\n\n Examples\n --------\n .. include:: ../docstrings/objects.Plot.label.rst\n\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_core/test_plot.py::TestPlotting::test_labels_axis",
"tests/_core/test_plot.py::TestPlotting::test_labels_legend",
"tests/_core/test_plot.py::TestPlotting::test_labels_facets",
"tests/_core/test_plot.py::TestPlotting::test_title_single",
"tests/_core/test_plot.py::TestPlotting::test_title_facet_function",
"tests/_core/test_plot.py::TestPairInterface::test_labels",
"tests/_core/test_plot.py::TestLegend::test_layer_legend_title"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-53
|
1.0
|
{
"code": "diff --git b/seaborn/_core/plot.py a/seaborn/_core/plot.py\nindex c56300b7..c9dc61c8 100644\n--- b/seaborn/_core/plot.py\n+++ a/seaborn/_core/plot.py\n@@ -841,6 +841,21 @@ class Plot:\n .. include:: ../docstrings/objects.Plot.layout.rst\n \n \"\"\"\n+ # TODO add an \"auto\" mode for figsize that roughly scales with the rcParams\n+ # figsize (so that works), but expands to prevent subplots from being squished\n+ # Also should we have height=, aspect=, exclusive with figsize? Or working\n+ # with figsize when only one is defined?\n+\n+ new = self._clone()\n+\n+ if size is not default:\n+ new._figure_spec[\"figsize\"] = size\n+ if engine is not default:\n+ new._layout_spec[\"engine\"] = engine\n+ if extent is not default:\n+ new._layout_spec[\"extent\"] = extent\n+\n+ return new\n \n # TODO def legend (ugh)\n \n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_core/plot.py b/seaborn/_core/plot.py\nindex c9dc61c8..c56300b7 100644\n--- a/seaborn/_core/plot.py\n+++ b/seaborn/_core/plot.py\n@@ -841,21 +841,6 @@ class Plot:\n .. include:: ../docstrings/objects.Plot.layout.rst\n \n \"\"\"\n- # TODO add an \"auto\" mode for figsize that roughly scales with the rcParams\n- # figsize (so that works), but expands to prevent subplots from being squished\n- # Also should we have height=, aspect=, exclusive with figsize? Or working\n- # with figsize when only one is defined?\n-\n- new = self._clone()\n-\n- if size is not default:\n- new._figure_spec[\"figsize\"] = size\n- if engine is not default:\n- new._layout_spec[\"engine\"] = engine\n- if extent is not default:\n- new._layout_spec[\"extent\"] = extent\n-\n- return new\n \n # TODO def legend (ugh)\n \n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_core/plot.py.\nHere is the description for the function:\n def layout(\n self,\n *,\n size: tuple[float, float] | Default = default,\n engine: str | None | Default = default,\n extent: tuple[float, float, float, float] | Default = default,\n ) -> Plot:\n \"\"\"\n Control the figure size and layout.\n\n .. note::\n\n Default figure sizes and the API for specifying the figure size are subject\n to change in future \"experimental\" releases of the objects API. The default\n layout engine may also change.\n\n Parameters\n ----------\n size : (width, height)\n Size of the resulting figure, in inches. Size is inclusive of legend when\n using pyplot, but not otherwise.\n engine : {{\"tight\", \"constrained\", \"none\"}}\n Name of method for automatically adjusting the layout to remove overlap.\n The default depends on whether :meth:`Plot.on` is used.\n extent : (left, bottom, right, top)\n Boundaries of the plot layout, in fractions of the figure size. Takes\n effect through the layout engine; exact results will vary across engines.\n Note: the extent includes axis decorations when using a layout engine,\n but it is exclusive of them when `engine=\"none\"`.\n\n Examples\n --------\n .. include:: ../docstrings/objects.Plot.layout.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_core/test_plot.py::TestPlotting::test_layout_size",
"tests/_core/test_plot.py::TestPlotting::test_layout_extent",
"tests/_core/test_plot.py::TestPlotting::test_constrained_layout_extent",
"tests/_core/test_plot.py::TestPlotting::test_base_layout_extent",
"tests/_core/test_plot.py::TestPlotting::test_on_layout_algo_spec",
"tests/_core/test_plot.py::TestFacetInterface::test_layout_algo[tight]",
"tests/_core/test_plot.py::TestFacetInterface::test_layout_algo[constrained]"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-54
|
1.0
|
{
"code": "diff --git b/seaborn/_core/plot.py a/seaborn/_core/plot.py\nindex 9ff4bb84..c9dc61c8 100644\n--- b/seaborn/_core/plot.py\n+++ a/seaborn/_core/plot.py\n@@ -763,6 +763,9 @@ class Plot:\n .. include:: ../docstrings/objects.Plot.limit.rst\n \n \"\"\"\n+ new = self._clone()\n+ new._limits.update(limits)\n+ return new\n \n def label(\n self, *,\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_core/plot.py b/seaborn/_core/plot.py\nindex c9dc61c8..9ff4bb84 100644\n--- a/seaborn/_core/plot.py\n+++ b/seaborn/_core/plot.py\n@@ -763,9 +763,6 @@ class Plot:\n .. include:: ../docstrings/objects.Plot.limit.rst\n \n \"\"\"\n- new = self._clone()\n- new._limits.update(limits)\n- return new\n \n def label(\n self, *,\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_core/plot.py.\nHere is the description for the function:\n def limit(self, **limits: tuple[Any, Any]) -> Plot:\n \"\"\"\n Control the range of visible data.\n\n Keywords correspond to variables defined in the plot, and values are a\n `(min, max)` tuple (where either can be `None` to leave unset).\n\n Limits apply only to the axis; data outside the visible range are\n still used for any stat transforms and added to the plot.\n\n Behavior for non-coordinate variables is currently undefined.\n\n Examples\n --------\n .. include:: ../docstrings/objects.Plot.limit.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_core/test_plot.py::TestScaling::test_nominal_x_axis_tweaks",
"tests/_core/test_plot.py::TestScaling::test_nominal_y_axis_tweaks",
"tests/_core/test_plot.py::TestPlotting::test_limits",
"tests/_core/test_plot.py::TestFacetInterface::test_layout_algo[tight]",
"tests/_core/test_plot.py::TestFacetInterface::test_layout_algo[constrained]",
"tests/_core/test_plot.py::TestPairInterface::test_limits"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-55
|
1.0
|
{
"code": "diff --git b/seaborn/_core/plot.py a/seaborn/_core/plot.py\nindex 7c82620f..c9dc61c8 100644\n--- b/seaborn/_core/plot.py\n+++ a/seaborn/_core/plot.py\n@@ -899,6 +899,10 @@ class Plot:\n :meth:`matplotlib.figure.Figure.savefig`.\n \n \"\"\"\n+ # TODO expose important keyword arguments in our signature?\n+ with theme_context(self._theme_with_defaults()):\n+ self._plot().save(loc, **kwargs)\n+ return self\n \n def show(self, **kwargs) -> None:\n \"\"\"\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_core/plot.py b/seaborn/_core/plot.py\nindex c9dc61c8..7c82620f 100644\n--- a/seaborn/_core/plot.py\n+++ b/seaborn/_core/plot.py\n@@ -899,10 +899,6 @@ class Plot:\n :meth:`matplotlib.figure.Figure.savefig`.\n \n \"\"\"\n- # TODO expose important keyword arguments in our signature?\n- with theme_context(self._theme_with_defaults()):\n- self._plot().save(loc, **kwargs)\n- return self\n \n def show(self, **kwargs) -> None:\n \"\"\"\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_core/plot.py.\nHere is the description for the function:\n def save(self, loc, **kwargs) -> Plot:\n \"\"\"\n Compile the plot and write it to a buffer or file on disk.\n\n Parameters\n ----------\n loc : str, path, or buffer\n Location on disk to save the figure, or a buffer to write into.\n kwargs\n Other keyword arguments are passed through to\n :meth:`matplotlib.figure.Figure.savefig`.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_core/test_plot.py::TestPlotting::test_save"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-56
|
1.0
|
{
"code": "diff --git b/seaborn/_core/plot.py a/seaborn/_core/plot.py\nindex 19bd05d8..c9dc61c8 100644\n--- b/seaborn/_core/plot.py\n+++ a/seaborn/_core/plot.py\n@@ -723,6 +723,9 @@ class Plot:\n .. include:: ../docstrings/objects.Plot.scale.rst\n \n \"\"\"\n+ new = self._clone()\n+ new._scales.update(scales)\n+ return new\n \n def share(self, **shares: bool | str) -> Plot:\n \"\"\"\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_core/plot.py b/seaborn/_core/plot.py\nindex c9dc61c8..19bd05d8 100644\n--- a/seaborn/_core/plot.py\n+++ b/seaborn/_core/plot.py\n@@ -723,9 +723,6 @@ class Plot:\n .. include:: ../docstrings/objects.Plot.scale.rst\n \n \"\"\"\n- new = self._clone()\n- new._scales.update(scales)\n- return new\n \n def share(self, **shares: bool | str) -> Plot:\n \"\"\"\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_core/plot.py.\nHere is the description for the function:\n def scale(self, **scales: Scale) -> Plot:\n \"\"\"\n Specify mappings from data units to visual properties.\n\n Keywords correspond to variables defined in the plot, including coordinate\n variables (`x`, `y`) and semantic variables (`color`, `pointsize`, etc.).\n\n A number of \"magic\" arguments are accepted, including:\n - The name of a transform (e.g., `\"log\"`, `\"sqrt\"`)\n - The name of a palette (e.g., `\"viridis\"`, `\"muted\"`)\n - A tuple of values, defining the output range (e.g. `(1, 5)`)\n - A dict, implying a :class:`Nominal` scale (e.g. `{\"a\": .2, \"b\": .5}`)\n - A list of values, implying a :class:`Nominal` scale (e.g. `[\"b\", \"r\"]`)\n\n For more explicit control, pass a scale spec object such as :class:`Continuous`\n or :class:`Nominal`. Or pass `None` to use an \"identity\" scale, which treats\n data values as literally encoding visual properties.\n\n Examples\n --------\n .. include:: ../docstrings/objects.Plot.scale.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_marks/test_dot.py::TestDot::test_filled_unfilled_mix",
"tests/_marks/test_area.py::TestArea::test_mapped_properties",
"tests/_marks/test_text.py::TestText::test_identity_fontsize",
"tests/_marks/test_dot.py::TestDots::test_filled_unfilled_mix",
"tests/_core/test_plot.py::TestScaling::test_explicit_categorical_converter",
"tests/_marks/test_bar.py::TestBars::test_log_scale",
"tests/_core/test_plot.py::TestScaling::test_faceted_log_scale",
"tests/_core/test_plot.py::TestScaling::test_paired_single_log_scale",
"tests/_core/test_plot.py::TestScaling::test_paired_with_common_fallback",
"tests/_core/test_plot.py::TestScaling::test_mark_data_log_transform_is_inverted",
"tests/_core/test_plot.py::TestScaling::test_mark_data_log_transfrom_with_stat",
"tests/_core/test_plot.py::TestScaling::test_computed_var_ticks",
"tests/_core/test_plot.py::TestScaling::test_computed_var_transform",
"tests/_core/test_plot.py::TestScaling::test_explicit_range_with_axis_scaling",
"tests/_core/test_plot.py::TestScaling::test_derived_range_with_axis_scaling",
"tests/_core/test_plot.py::TestScaling::test_identity_mapping_linewidth",
"tests/_core/test_plot.py::TestScaling::test_identity_mapping_color_tuples",
"tests/_core/test_plot.py::TestPlotting::test_stat_log_scale",
"tests/_core/test_plot.py::TestPlotting::test_move_log_scale",
"tests/_core/test_plot.py::TestExceptions::test_scale_setup",
"tests/_core/test_plot.py::TestExceptions::test_coordinate_scaling",
"tests/_core/test_plot.py::TestExceptions::test_semantic_scaling",
"tests/_core/test_plot.py::TestLegend::test_identity_scale_ignored"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-57
|
1.0
|
{
"code": "diff --git b/seaborn/_core/plot.py a/seaborn/_core/plot.py\nindex 6179ce95..c9dc61c8 100644\n--- b/seaborn/_core/plot.py\n+++ a/seaborn/_core/plot.py\n@@ -742,6 +742,9 @@ class Plot:\n .. include:: ../docstrings/objects.Plot.share.rst\n \n \"\"\"\n+ new = self._clone()\n+ new._shares.update(shares)\n+ return new\n \n def limit(self, **limits: tuple[Any, Any]) -> Plot:\n \"\"\"\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_core/plot.py b/seaborn/_core/plot.py\nindex c9dc61c8..6179ce95 100644\n--- a/seaborn/_core/plot.py\n+++ b/seaborn/_core/plot.py\n@@ -742,9 +742,6 @@ class Plot:\n .. include:: ../docstrings/objects.Plot.share.rst\n \n \"\"\"\n- new = self._clone()\n- new._shares.update(shares)\n- return new\n \n def limit(self, **limits: tuple[Any, Any]) -> Plot:\n \"\"\"\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_core/plot.py.\nHere is the description for the function:\n def share(self, **shares: bool | str) -> Plot:\n \"\"\"\n Control sharing of axis limits and ticks across subplots.\n\n Keywords correspond to variables defined in the plot, and values can be\n boolean (to share across all subplots), or one of \"row\" or \"col\" (to share\n more selectively across one dimension of a grid).\n\n Behavior for non-coordinate variables is currently undefined.\n\n Examples\n --------\n .. include:: ../docstrings/objects.Plot.share.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_core/test_plot.py::TestScaling::test_facet_categories_unshared",
"tests/_core/test_plot.py::TestScaling::test_facet_categories_single_dim_shared",
"tests/_core/test_plot.py::TestScaling::test_pair_categories_shared",
"tests/_core/test_plot.py::TestFacetInterface::test_axis_sharing",
"tests/_core/test_plot.py::TestFacetInterface::test_unshared_spacing",
"tests/_core/test_plot.py::TestPairInterface::test_axis_sharing",
"tests/_core/test_plot.py::TestLabelVisibility::test_2d_unshared"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-58
|
1.0
|
{
"code": "diff --git b/seaborn/_core/plot.py a/seaborn/_core/plot.py\nindex d93bbf96..c9dc61c8 100644\n--- b/seaborn/_core/plot.py\n+++ a/seaborn/_core/plot.py\n@@ -879,6 +879,12 @@ class Plot:\n .. include:: ../docstrings/objects.Plot.theme.rst\n \n \"\"\"\n+ new = self._clone()\n+\n+ rc = mpl.RcParams(config)\n+ new._theme.update(rc)\n+\n+ return new\n \n def save(self, loc, **kwargs) -> Plot:\n \"\"\"\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_core/plot.py b/seaborn/_core/plot.py\nindex c9dc61c8..d93bbf96 100644\n--- a/seaborn/_core/plot.py\n+++ b/seaborn/_core/plot.py\n@@ -879,12 +879,6 @@ class Plot:\n .. include:: ../docstrings/objects.Plot.theme.rst\n \n \"\"\"\n- new = self._clone()\n-\n- rc = mpl.RcParams(config)\n- new._theme.update(rc)\n-\n- return new\n \n def save(self, loc, **kwargs) -> Plot:\n \"\"\"\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_core/plot.py.\nHere is the description for the function:\n def theme(self, config: Mapping[str, Any], /) -> Plot:\n \"\"\"\n Control the appearance of elements in the plot.\n\n .. note::\n\n The API for customizing plot appearance is not yet finalized.\n Currently, the only valid argument is a dict of matplotlib rc parameters.\n (This dict must be passed as a positional argument.)\n\n It is likely that this method will be enhanced in future releases.\n\n Matplotlib rc parameters are documented on the following page:\n https://matplotlib.org/stable/tutorials/introductory/customizing.html\n\n Examples\n --------\n .. include:: ../docstrings/objects.Plot.theme.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_marks/test_line.py::TestPath::test_capstyle",
"tests/_core/test_plot.py::TestPlotting::test_theme_params",
"tests/_core/test_plot.py::TestPlotting::test_theme_validation"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-59
|
1.0
|
{
"code": "diff --git b/seaborn/_core/properties.py a/seaborn/_core/properties.py\nindex 692f64a9..4e2df91b 100644\n--- b/seaborn/_core/properties.py\n+++ a/seaborn/_core/properties.py\n@@ -459,6 +459,31 @@ class LineStyle(ObjectProperty):\n dashes.\n \n \"\"\"\n+ # Start with dash specs that are well distinguishable\n+ dashes: list[str | DashPattern] = [\n+ \"-\", (4, 1.5), (1, 1), (3, 1.25, 1.5, 1.25), (5, 1, 1, 1),\n+ ]\n+\n+ # Now programmatically build as many as we need\n+ p = 3\n+ while len(dashes) < n:\n+\n+ # Take combinations of long and short dashes\n+ a = itertools.combinations_with_replacement([3, 1.25], p)\n+ b = itertools.combinations_with_replacement([4, 1], p)\n+\n+ # Interleave the combinations, reversing one of the streams\n+ segment_list = itertools.chain(*zip(list(a)[1:-1][::-1], list(b)[1:-1]))\n+\n+ # Now insert the gaps\n+ for segments in segment_list:\n+ gap = min(segments)\n+ spec = tuple(itertools.chain(*((seg, gap) for seg in segments)))\n+ dashes.append(spec)\n+\n+ p += 1\n+\n+ return [self._get_dash_pattern(x) for x in dashes]\n \n @staticmethod\n def _get_dash_pattern(style: str | DashPattern) -> DashPatternWithOffset:\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_core/properties.py b/seaborn/_core/properties.py\nindex 4e2df91b..692f64a9 100644\n--- a/seaborn/_core/properties.py\n+++ b/seaborn/_core/properties.py\n@@ -459,31 +459,6 @@ class LineStyle(ObjectProperty):\n dashes.\n \n \"\"\"\n- # Start with dash specs that are well distinguishable\n- dashes: list[str | DashPattern] = [\n- \"-\", (4, 1.5), (1, 1), (3, 1.25, 1.5, 1.25), (5, 1, 1, 1),\n- ]\n-\n- # Now programmatically build as many as we need\n- p = 3\n- while len(dashes) < n:\n-\n- # Take combinations of long and short dashes\n- a = itertools.combinations_with_replacement([3, 1.25], p)\n- b = itertools.combinations_with_replacement([4, 1], p)\n-\n- # Interleave the combinations, reversing one of the streams\n- segment_list = itertools.chain(*zip(list(a)[1:-1][::-1], list(b)[1:-1]))\n-\n- # Now insert the gaps\n- for segments in segment_list:\n- gap = min(segments)\n- spec = tuple(itertools.chain(*((seg, gap) for seg in segments)))\n- dashes.append(spec)\n-\n- p += 1\n-\n- return [self._get_dash_pattern(x) for x in dashes]\n \n @staticmethod\n def _get_dash_pattern(style: str | DashPattern) -> DashPatternWithOffset:\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_core/properties.py.\nHere is the description for the function:\n def _default_values(self, n: int) -> list[DashPatternWithOffset]:\n \"\"\"Build an arbitrarily long list of unique dash styles for lines.\n\n Parameters\n ----------\n n : int\n Number of unique dash specs to generate.\n\n Returns\n -------\n dashes : list of strings or tuples\n Valid arguments for the ``dashes`` parameter on\n :class:`matplotlib.lines.Line2D`. The first spec is a solid\n line (``\"\"``), the remainder are sequences of long and short\n dashes.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_marks/test_line.py::TestPath::test_other_props_mapped",
"tests/_core/test_properties.py::TestLineStyle::test_mapping_default[cat]",
"tests/_core/test_properties.py::TestLineStyle::test_mapping_default[num]",
"tests/_core/test_properties.py::TestLineStyle::test_unique_default_large_n",
"tests/_marks/test_line.py::TestPaths::test_mapped_properties"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-60
|
1.0
|
{
"code": "diff --git b/seaborn/_core/properties.py a/seaborn/_core/properties.py\nindex 011093ad..4e2df91b 100644\n--- b/seaborn/_core/properties.py\n+++ a/seaborn/_core/properties.py\n@@ -418,6 +418,21 @@ class Marker(ObjectProperty):\n All markers will be filled.\n \n \"\"\"\n+ # Start with marker specs that are well distinguishable\n+ markers = [\n+ \"o\", \"X\", (4, 0, 45), \"P\", (4, 0, 0), (4, 1, 0), \"^\", (4, 1, 45), \"v\",\n+ ]\n+\n+ # Now generate more from regular polygons of increasing order\n+ s = 5\n+ while len(markers) < n:\n+ a = 360 / (s + 1) / 2\n+ markers.extend([(s + 1, 1, a), (s + 1, 0, a), (s, 1, 0), (s, 0, 0)])\n+ s += 1\n+\n+ markers = [MarkerStyle(m) for m in markers[:n]]\n+\n+ return markers\n \n \n class LineStyle(ObjectProperty):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_core/properties.py b/seaborn/_core/properties.py\nindex 4e2df91b..011093ad 100644\n--- a/seaborn/_core/properties.py\n+++ b/seaborn/_core/properties.py\n@@ -418,21 +418,6 @@ class Marker(ObjectProperty):\n All markers will be filled.\n \n \"\"\"\n- # Start with marker specs that are well distinguishable\n- markers = [\n- \"o\", \"X\", (4, 0, 45), \"P\", (4, 0, 0), (4, 1, 0), \"^\", (4, 1, 45), \"v\",\n- ]\n-\n- # Now generate more from regular polygons of increasing order\n- s = 5\n- while len(markers) < n:\n- a = 360 / (s + 1) / 2\n- markers.extend([(s + 1, 1, a), (s + 1, 0, a), (s, 1, 0), (s, 0, 0)])\n- s += 1\n-\n- markers = [MarkerStyle(m) for m in markers[:n]]\n-\n- return markers\n \n \n class LineStyle(ObjectProperty):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_core/properties.py.\nHere is the description for the function:\n def _default_values(self, n: int) -> list[MarkerStyle]:\n \"\"\"Build an arbitrarily long list of unique marker styles.\n\n Parameters\n ----------\n n : int\n Number of unique marker specs to generate.\n\n Returns\n -------\n markers : list of string or tuples\n Values for defining :class:`matplotlib.markers.MarkerStyle` objects.\n All markers will be filled.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[marker]",
"tests/_marks/test_line.py::TestPath::test_other_props_mapped",
"tests/_core/test_properties.py::TestMarker::test_mapping_default[cat]",
"tests/_core/test_properties.py::TestMarker::test_mapping_default[num]",
"tests/_core/test_properties.py::TestMarker::test_unique_default_large_n",
"tests/_core/test_plot.py::TestLegend::test_single_layer_common_variable",
"tests/_core/test_plot.py::TestLegend::test_single_layer_common_unnamed_variable",
"tests/_core/test_plot.py::TestLegend::test_single_layer_multi_variable",
"tests/_core/test_plot.py::TestLegend::test_multi_layer_multi_variable"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-61
|
1.0
|
{
"code": "diff --git b/seaborn/rcmod.py a/seaborn/rcmod.py\nindex 5a8eed38..de238323 100644\n--- b/seaborn/rcmod.py\n+++ a/seaborn/rcmod.py\n@@ -465,6 +465,8 @@ def set_context(context=None, font_scale=1, rc=None):\n .. include:: ../docstrings/set_context.rst\n \n \"\"\"\n+ context_object = plotting_context(context, font_scale, rc)\n+ mpl.rcParams.update(context_object)\n \n \n class _RCAesthetics(dict):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/rcmod.py b/seaborn/rcmod.py\nindex de238323..5a8eed38 100644\n--- a/seaborn/rcmod.py\n+++ b/seaborn/rcmod.py\n@@ -465,8 +465,6 @@ def set_context(context=None, font_scale=1, rc=None):\n .. include:: ../docstrings/set_context.rst\n \n \"\"\"\n- context_object = plotting_context(context, font_scale, rc)\n- mpl.rcParams.update(context_object)\n \n \n class _RCAesthetics(dict):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/rcmod.py.\nHere is the description for the function:\ndef set_context(context=None, font_scale=1, rc=None):\n \"\"\"\n Set the parameters that control the scaling of plot elements.\n\n These parameters correspond to label size, line thickness, etc.\n Calling this function modifies the global matplotlib `rcParams`. For more\n information, see the :doc:`aesthetics tutorial <../tutorial/aesthetics>`.\n\n The base context is \"notebook\", and the other contexts are \"paper\", \"talk\",\n and \"poster\", which are version of the notebook parameters scaled by different\n values. Font elements can also be scaled independently of (but relative to)\n the other values.\n\n See :func:`plotting_context` to get the parameter values.\n\n Parameters\n ----------\n context : dict, or one of {paper, notebook, talk, poster}\n A dictionary of parameters or the name of a preconfigured set.\n font_scale : float, optional\n Separate scaling factor to independently scale the size of the\n font elements.\n rc : dict, optional\n Parameter mappings to override the values in the preset seaborn\n context dictionaries. This only updates parameters that are\n considered part of the context definition.\n\n Examples\n --------\n\n .. include:: ../docstrings/set_context.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_palettes.py::TestColorPalettes::test_current_palette",
"tests/test_palettes.py::TestColorPalettes::test_big_palette_context",
"tests/test_rcmod.py::TestAxesStyle::test_set_rc",
"tests/test_rcmod.py::TestAxesStyle::test_set_with_palette",
"tests/test_rcmod.py::TestAxesStyle::test_reset_defaults",
"tests/test_rcmod.py::TestAxesStyle::test_reset_orig",
"tests/test_rcmod.py::TestAxesStyle::test_set_is_alias",
"tests/test_rcmod.py::TestPlottingContext::test_set_context",
"tests/test_rcmod.py::TestPlottingContext::test_context_context_manager",
"tests/test_utils.py::test_ticklabels_overlap",
"tests/test_rcmod.py::TestFonts::test_set_serif_font",
"tests/test_axisgrid.py::TestFacetGrid::test_palette",
"tests/test_axisgrid.py::TestPairGrid::test_palette"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-62
|
1.0
|
{
"code": "diff --git b/seaborn/rcmod.py a/seaborn/rcmod.py\nindex 7501e223..de238323 100644\n--- b/seaborn/rcmod.py\n+++ a/seaborn/rcmod.py\n@@ -523,3 +523,11 @@ def set_palette(palette, n_colors=None, desat=None, color_codes=False):\n set_style : set the default parameters for figure style\n \n \"\"\"\n+ colors = palettes.color_palette(palette, n_colors, desat)\n+ cyl = cycler('color', colors)\n+ mpl.rcParams['axes.prop_cycle'] = cyl\n+ if color_codes:\n+ try:\n+ palettes.set_color_codes(palette)\n+ except (ValueError, TypeError):\n+ pass\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/rcmod.py b/seaborn/rcmod.py\nindex de238323..7501e223 100644\n--- a/seaborn/rcmod.py\n+++ b/seaborn/rcmod.py\n@@ -523,11 +523,3 @@ def set_palette(palette, n_colors=None, desat=None, color_codes=False):\n set_style : set the default parameters for figure style\n \n \"\"\"\n- colors = palettes.color_palette(palette, n_colors, desat)\n- cyl = cycler('color', colors)\n- mpl.rcParams['axes.prop_cycle'] = cyl\n- if color_codes:\n- try:\n- palettes.set_color_codes(palette)\n- except (ValueError, TypeError):\n- pass\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/rcmod.py.\nHere is the description for the function:\ndef set_palette(palette, n_colors=None, desat=None, color_codes=False):\n \"\"\"Set the matplotlib color cycle using a seaborn palette.\n\n Parameters\n ----------\n palette : seaborn color palette | matplotlib colormap | hls | husl\n Palette definition. Should be something :func:`color_palette` can process.\n n_colors : int\n Number of colors in the cycle. The default number of colors will depend\n on the format of ``palette``, see the :func:`color_palette`\n documentation for more information.\n desat : float\n Proportion to desaturate each color by.\n color_codes : bool\n If ``True`` and ``palette`` is a seaborn palette, remap the shorthand\n color codes (e.g. \"b\", \"g\", \"r\", etc.) to the colors from this palette.\n\n See Also\n --------\n color_palette : build a color palette or set the color cycle temporarily\n in a ``with`` statement.\n set_context : set parameters to scale plot elements\n set_style : set the default parameters for figure style\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_palettes.py::TestColorPalettes::test_current_palette",
"tests/test_rcmod.py::TestAxesStyle::test_set_rc",
"tests/test_palettes.py::TestColorPalettes::test_palette_context",
"tests/test_palettes.py::TestColorPalettes::test_big_palette_context",
"tests/test_utils.py::test_ticklabels_overlap",
"tests/_marks/test_dot.py::TestDot::test_simple",
"tests/_marks/test_dot.py::TestDot::test_filled_unfilled_mix",
"tests/test_rcmod.py::TestAxesStyle::test_set_with_palette",
"tests/test_rcmod.py::TestAxesStyle::test_reset_defaults",
"tests/_marks/test_dot.py::TestDot::test_missing_coordinate_data",
"tests/test_rcmod.py::TestAxesStyle::test_reset_orig",
"tests/test_rcmod.py::TestAxesStyle::test_set_is_alias",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[color]",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[fill]",
"tests/test_rcmod.py::TestPalette::test_set_palette",
"tests/test_rcmod.py::TestFonts::test_set_serif_font",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[marker]",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[pointsize]",
"tests/_marks/test_dot.py::TestDots::test_simple",
"tests/_marks/test_dot.py::TestDots::test_set_color",
"tests/_marks/test_dot.py::TestDots::test_map_color",
"tests/_marks/test_dot.py::TestDots::test_fill",
"tests/_marks/test_dot.py::TestDots::test_pointsize",
"tests/_marks/test_dot.py::TestDots::test_stroke",
"tests/_marks/test_dot.py::TestDots::test_filled_unfilled_mix",
"tests/test_axisgrid.py::TestFacetGrid::test_palette",
"tests/test_axisgrid.py::TestPairGrid::test_palette"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-63
|
1.0
|
{
"code": "diff --git b/seaborn/rcmod.py a/seaborn/rcmod.py\nindex 41e820da..de238323 100644\n--- b/seaborn/rcmod.py\n+++ a/seaborn/rcmod.py\n@@ -328,6 +328,8 @@ def set_style(style=None, rc=None):\n .. include:: ../docstrings/set_style.rst\n \n \"\"\"\n+ style_object = axes_style(style, rc)\n+ mpl.rcParams.update(style_object)\n \n \n def plotting_context(context=None, font_scale=1, rc=None):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/rcmod.py b/seaborn/rcmod.py\nindex de238323..41e820da 100644\n--- a/seaborn/rcmod.py\n+++ b/seaborn/rcmod.py\n@@ -328,8 +328,6 @@ def set_style(style=None, rc=None):\n .. include:: ../docstrings/set_style.rst\n \n \"\"\"\n- style_object = axes_style(style, rc)\n- mpl.rcParams.update(style_object)\n \n \n def plotting_context(context=None, font_scale=1, rc=None):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/rcmod.py.\nHere is the description for the function:\ndef set_style(style=None, rc=None):\n \"\"\"\n Set the parameters that control the general style of the plots.\n\n The style parameters control properties like the color of the background and\n whether a grid is enabled by default. This is accomplished using the\n matplotlib rcParams system.\n\n The options are illustrated in the\n :doc:`aesthetics tutorial <../tutorial/aesthetics>`.\n\n See :func:`axes_style` to get the parameter values.\n\n Parameters\n ----------\n style : dict, or one of {darkgrid, whitegrid, dark, white, ticks}\n A dictionary of parameters or the name of a preconfigured style.\n rc : dict, optional\n Parameter mappings to override the values in the preset seaborn\n style dictionaries. This only updates parameters that are\n considered part of the style definition.\n\n Examples\n --------\n\n .. include:: ../docstrings/set_style.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_palettes.py::TestColorPalettes::test_current_palette",
"tests/test_rcmod.py::TestAxesStyle::test_set_style",
"tests/test_palettes.py::TestColorPalettes::test_big_palette_context",
"tests/test_rcmod.py::TestAxesStyle::test_style_context_manager",
"tests/test_rcmod.py::TestAxesStyle::test_set_rc",
"tests/test_rcmod.py::TestAxesStyle::test_set_with_palette",
"tests/test_rcmod.py::TestAxesStyle::test_reset_defaults",
"tests/test_rcmod.py::TestAxesStyle::test_reset_orig",
"tests/test_rcmod.py::TestAxesStyle::test_set_is_alias",
"tests/test_rcmod.py::TestFonts::test_set_serif_font",
"tests/test_utils.py::test_ticklabels_overlap",
"tests/test_axisgrid.py::TestFacetGrid::test_palette",
"tests/test_axisgrid.py::TestPairGrid::test_palette"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-64
|
1.0
|
{
"code": "diff --git b/seaborn/rcmod.py a/seaborn/rcmod.py\nindex 083d169b..de238323 100644\n--- b/seaborn/rcmod.py\n+++ a/seaborn/rcmod.py\n@@ -116,6 +116,11 @@ def set_theme(context=\"notebook\", style=\"darkgrid\", palette=\"deep\",\n .. include:: ../docstrings/set_theme.rst\n \n \"\"\"\n+ set_context(context, font_scale)\n+ set_style(style, rc={\"font.family\": font})\n+ set_palette(palette, color_codes=color_codes)\n+ if rc is not None:\n+ mpl.rcParams.update(rc)\n \n \n def set(*args, **kwargs):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/rcmod.py b/seaborn/rcmod.py\nindex de238323..083d169b 100644\n--- a/seaborn/rcmod.py\n+++ b/seaborn/rcmod.py\n@@ -116,11 +116,6 @@ def set_theme(context=\"notebook\", style=\"darkgrid\", palette=\"deep\",\n .. include:: ../docstrings/set_theme.rst\n \n \"\"\"\n- set_context(context, font_scale)\n- set_style(style, rc={\"font.family\": font})\n- set_palette(palette, color_codes=color_codes)\n- if rc is not None:\n- mpl.rcParams.update(rc)\n \n \n def set(*args, **kwargs):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/rcmod.py.\nHere is the description for the function:\ndef set_theme(context=\"notebook\", style=\"darkgrid\", palette=\"deep\",\n font=\"sans-serif\", font_scale=1, color_codes=True, rc=None):\n \"\"\"\n Set aspects of the visual theme for all matplotlib and seaborn plots.\n\n This function changes the global defaults for all plots using the\n matplotlib rcParams system. The themeing is decomposed into several distinct\n sets of parameter values.\n\n The options are illustrated in the :doc:`aesthetics <../tutorial/aesthetics>`\n and :doc:`color palette <../tutorial/color_palettes>` tutorials.\n\n Parameters\n ----------\n context : string or dict\n Scaling parameters, see :func:`plotting_context`.\n style : string or dict\n Axes style parameters, see :func:`axes_style`.\n palette : string or sequence\n Color palette, see :func:`color_palette`.\n font : string\n Font family, see matplotlib font manager.\n font_scale : float, optional\n Separate scaling factor to independently scale the size of the\n font elements.\n color_codes : bool\n If ``True`` and ``palette`` is a seaborn palette, remap the shorthand\n color codes (e.g. \"b\", \"g\", \"r\", etc.) to the colors from this palette.\n rc : dict or None\n Dictionary of rc parameter mappings to override the above.\n\n Examples\n --------\n\n .. include:: ../docstrings/set_theme.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_palettes.py::TestColorPalettes::test_current_palette",
"tests/test_palettes.py::TestColorPalettes::test_big_palette_context",
"tests/test_rcmod.py::TestAxesStyle::test_set_rc",
"tests/test_rcmod.py::TestAxesStyle::test_set_with_palette",
"tests/test_rcmod.py::TestAxesStyle::test_reset_defaults",
"tests/test_rcmod.py::TestAxesStyle::test_reset_orig",
"tests/test_rcmod.py::TestAxesStyle::test_set_is_alias",
"tests/test_utils.py::test_ticklabels_overlap",
"tests/test_rcmod.py::TestFonts::test_set_serif_font",
"tests/test_axisgrid.py::TestFacetGrid::test_palette",
"tests/test_axisgrid.py::TestPairGrid::test_palette"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-65
|
1.0
|
{
"code": "diff --git b/seaborn/regression.py a/seaborn/regression.py\nindex 5c229f4d..b9a0c455 100644\n--- b/seaborn/regression.py\n+++ a/seaborn/regression.py\n@@ -922,3 +922,29 @@ def residplot(\n .. include:: ../docstrings/residplot.rst\n \n \"\"\"\n+ plotter = _RegressionPlotter(x, y, data, ci=None,\n+ order=order, robust=robust,\n+ x_partial=x_partial, y_partial=y_partial,\n+ dropna=dropna, color=color, label=label)\n+\n+ if ax is None:\n+ ax = plt.gca()\n+\n+ # Calculate the residual from a linear regression\n+ _, yhat, _ = plotter.fit_regression(grid=plotter.x)\n+ plotter.y = plotter.y - yhat\n+\n+ # Set the regression option on the plotter\n+ if lowess:\n+ plotter.lowess = True\n+ else:\n+ plotter.fit_reg = False\n+\n+ # Plot a horizontal line at 0\n+ ax.axhline(0, ls=\":\", c=\".2\")\n+\n+ # Draw the scatterplot\n+ scatter_kws = {} if scatter_kws is None else scatter_kws.copy()\n+ line_kws = {} if line_kws is None else line_kws.copy()\n+ plotter.plot(ax, scatter_kws, line_kws)\n+ return ax\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/regression.py b/seaborn/regression.py\nindex b9a0c455..5c229f4d 100644\n--- a/seaborn/regression.py\n+++ b/seaborn/regression.py\n@@ -922,29 +922,3 @@ def residplot(\n .. include:: ../docstrings/residplot.rst\n \n \"\"\"\n- plotter = _RegressionPlotter(x, y, data, ci=None,\n- order=order, robust=robust,\n- x_partial=x_partial, y_partial=y_partial,\n- dropna=dropna, color=color, label=label)\n-\n- if ax is None:\n- ax = plt.gca()\n-\n- # Calculate the residual from a linear regression\n- _, yhat, _ = plotter.fit_regression(grid=plotter.x)\n- plotter.y = plotter.y - yhat\n-\n- # Set the regression option on the plotter\n- if lowess:\n- plotter.lowess = True\n- else:\n- plotter.fit_reg = False\n-\n- # Plot a horizontal line at 0\n- ax.axhline(0, ls=\":\", c=\".2\")\n-\n- # Draw the scatterplot\n- scatter_kws = {} if scatter_kws is None else scatter_kws.copy()\n- line_kws = {} if line_kws is None else line_kws.copy()\n- plotter.plot(ax, scatter_kws, line_kws)\n- return ax\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/regression.py.\nHere is the description for the function:\ndef residplot(\n data=None, *, x=None, y=None,\n x_partial=None, y_partial=None, lowess=False,\n order=1, robust=False, dropna=True, label=None, color=None,\n scatter_kws=None, line_kws=None, ax=None\n):\n \"\"\"Plot the residuals of a linear regression.\n\n This function will regress y on x (possibly as a robust or polynomial\n regression) and then draw a scatterplot of the residuals. You can\n optionally fit a lowess smoother to the residual plot, which can\n help in determining if there is structure to the residuals.\n\n Parameters\n ----------\n data : DataFrame, optional\n DataFrame to use if `x` and `y` are column names.\n x : vector or string\n Data or column name in `data` for the predictor variable.\n y : vector or string\n Data or column name in `data` for the response variable.\n {x, y}_partial : vectors or string(s) , optional\n These variables are treated as confounding and are removed from\n the `x` or `y` variables before plotting.\n lowess : boolean, optional\n Fit a lowess smoother to the residual scatterplot.\n order : int, optional\n Order of the polynomial to fit when calculating the residuals.\n robust : boolean, optional\n Fit a robust linear regression when calculating the residuals.\n dropna : boolean, optional\n If True, ignore observations with missing data when fitting and\n plotting.\n label : string, optional\n Label that will be used in any plot legends.\n color : matplotlib color, optional\n Color to use for all elements of the plot.\n {scatter, line}_kws : dictionaries, optional\n Additional keyword arguments passed to scatter() and plot() for drawing\n the components of the plot.\n ax : matplotlib axis, optional\n Plot into this axis, otherwise grab the current axis or make a new\n one if not existing.\n\n Returns\n -------\n ax: matplotlib axes\n Axes with the regression plot.\n\n See Also\n --------\n regplot : Plot a simple linear regression model.\n jointplot : Draw a :func:`residplot` with univariate marginal distributions\n (when used with ``kind=\"resid\"``).\n\n Examples\n --------\n\n .. include:: ../docstrings/residplot.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_regression.py::TestRegressionPlots::test_residplot",
"tests/test_regression.py::TestRegressionPlots::test_residplot_statsmodels_missing_errors[robust]",
"tests/test_regression.py::TestRegressionPlots::test_residplot_statsmodels_missing_errors[lowess]",
"tests/test_axisgrid.py::TestJointPlot::test_resid",
"tests/test_axisgrid.py::TestJointPlot::test_leaky_dict"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-66
|
1.0
|
{
"code": "diff --git b/seaborn/_core/rules.py a/seaborn/_core/rules.py\nindex a9daa3af..de6c651d 100644\n--- b/seaborn/_core/rules.py\n+++ a/seaborn/_core/rules.py\n@@ -66,6 +66,81 @@ def variable_type(\n Name identifying the type of data in the vector.\n \"\"\"\n \n+ # If a categorical dtype is set, infer categorical\n+ if isinstance(getattr(vector, 'dtype', None), pd.CategoricalDtype):\n+ return VarType(\"categorical\")\n+\n+ # Special-case all-na data, which is always \"numeric\"\n+ if pd.isna(vector).all():\n+ return VarType(\"numeric\")\n+\n+ # Now drop nulls to simplify further type inference\n+ vector = vector.dropna()\n+\n+ # Special-case binary/boolean data, allow caller to determine\n+ # This triggers a numpy warning when vector has strings/objects\n+ # https://github.com/numpy/numpy/issues/6784\n+ # Because we reduce with .all(), we are agnostic about whether the\n+ # comparison returns a scalar or vector, so we will ignore the warning.\n+ # It triggers a separate DeprecationWarning when the vector has datetimes:\n+ # https://github.com/numpy/numpy/issues/13548\n+ # This is considered a bug by numpy and will likely go away.\n+ with warnings.catch_warnings():\n+ warnings.simplefilter(\n+ action='ignore',\n+ category=(FutureWarning, DeprecationWarning) # type: ignore # mypy bug?\n+ )\n+ if strict_boolean:\n+ if isinstance(vector.dtype, pd.core.dtypes.base.ExtensionDtype):\n+ boolean_dtypes = [\"bool\", \"boolean\"]\n+ else:\n+ boolean_dtypes = [\"bool\"]\n+ boolean_vector = vector.dtype in boolean_dtypes\n+ else:\n+ try:\n+ boolean_vector = bool(np.isin(vector, [0, 1]).all())\n+ except TypeError:\n+ # .isin comparison is not guaranteed to be possible under NumPy\n+ # casting rules, depending on the (unknown) dtype of 'vector'\n+ boolean_vector = False\n+ if boolean_vector:\n+ return VarType(boolean_type)\n+\n+ # Defer to positive pandas tests\n+ if pd.api.types.is_numeric_dtype(vector):\n+ return VarType(\"numeric\")\n+\n+ if pd.api.types.is_datetime64_dtype(vector):\n+ return VarType(\"datetime\")\n+\n+ # --- If we get to here, we need to check the entries\n+\n+ # Check for a collection where everything is a number\n+\n+ def all_numeric(x):\n+ for x_i in x:\n+ if not isinstance(x_i, Number):\n+ return False\n+ return True\n+\n+ if all_numeric(vector):\n+ return VarType(\"numeric\")\n+\n+ # Check for a collection where everything is a datetime\n+\n+ def all_datetime(x):\n+ for x_i in x:\n+ if not isinstance(x_i, (datetime, np.datetime64)):\n+ return False\n+ return True\n+\n+ if all_datetime(vector):\n+ return VarType(\"datetime\")\n+\n+ # Otherwise, our final fallback is to consider things categorical\n+\n+ return VarType(\"categorical\")\n+\n \n def categorical_order(vector: Series, order: list | None = None) -> list:\n \"\"\"\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_core/rules.py b/seaborn/_core/rules.py\nindex de6c651d..a9daa3af 100644\n--- a/seaborn/_core/rules.py\n+++ b/seaborn/_core/rules.py\n@@ -66,81 +66,6 @@ def variable_type(\n Name identifying the type of data in the vector.\n \"\"\"\n \n- # If a categorical dtype is set, infer categorical\n- if isinstance(getattr(vector, 'dtype', None), pd.CategoricalDtype):\n- return VarType(\"categorical\")\n-\n- # Special-case all-na data, which is always \"numeric\"\n- if pd.isna(vector).all():\n- return VarType(\"numeric\")\n-\n- # Now drop nulls to simplify further type inference\n- vector = vector.dropna()\n-\n- # Special-case binary/boolean data, allow caller to determine\n- # This triggers a numpy warning when vector has strings/objects\n- # https://github.com/numpy/numpy/issues/6784\n- # Because we reduce with .all(), we are agnostic about whether the\n- # comparison returns a scalar or vector, so we will ignore the warning.\n- # It triggers a separate DeprecationWarning when the vector has datetimes:\n- # https://github.com/numpy/numpy/issues/13548\n- # This is considered a bug by numpy and will likely go away.\n- with warnings.catch_warnings():\n- warnings.simplefilter(\n- action='ignore',\n- category=(FutureWarning, DeprecationWarning) # type: ignore # mypy bug?\n- )\n- if strict_boolean:\n- if isinstance(vector.dtype, pd.core.dtypes.base.ExtensionDtype):\n- boolean_dtypes = [\"bool\", \"boolean\"]\n- else:\n- boolean_dtypes = [\"bool\"]\n- boolean_vector = vector.dtype in boolean_dtypes\n- else:\n- try:\n- boolean_vector = bool(np.isin(vector, [0, 1]).all())\n- except TypeError:\n- # .isin comparison is not guaranteed to be possible under NumPy\n- # casting rules, depending on the (unknown) dtype of 'vector'\n- boolean_vector = False\n- if boolean_vector:\n- return VarType(boolean_type)\n-\n- # Defer to positive pandas tests\n- if pd.api.types.is_numeric_dtype(vector):\n- return VarType(\"numeric\")\n-\n- if pd.api.types.is_datetime64_dtype(vector):\n- return VarType(\"datetime\")\n-\n- # --- If we get to here, we need to check the entries\n-\n- # Check for a collection where everything is a number\n-\n- def all_numeric(x):\n- for x_i in x:\n- if not isinstance(x_i, Number):\n- return False\n- return True\n-\n- if all_numeric(vector):\n- return VarType(\"numeric\")\n-\n- # Check for a collection where everything is a datetime\n-\n- def all_datetime(x):\n- for x_i in x:\n- if not isinstance(x_i, (datetime, np.datetime64)):\n- return False\n- return True\n-\n- if all_datetime(vector):\n- return VarType(\"datetime\")\n-\n- # Otherwise, our final fallback is to consider things categorical\n-\n- return VarType(\"categorical\")\n-\n \n def categorical_order(vector: Series, order: list | None = None) -> list:\n \"\"\"\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_core/rules.py.\nHere is the description for the function:\ndef variable_type(\n vector: Series,\n boolean_type: Literal[\"numeric\", \"categorical\", \"boolean\"] = \"numeric\",\n strict_boolean: bool = False,\n) -> VarType:\n \"\"\"\n Determine whether a vector contains numeric, categorical, or datetime data.\n\n This function differs from the pandas typing API in a few ways:\n\n - Python sequences or object-typed PyData objects are considered numeric if\n all of their entries are numeric.\n - String or mixed-type data are considered categorical even if not\n explicitly represented as a :class:`pandas.api.types.CategoricalDtype`.\n - There is some flexibility about how to treat binary / boolean data.\n\n Parameters\n ----------\n vector : :func:`pandas.Series`, :func:`numpy.ndarray`, or Python sequence\n Input data to test.\n boolean_type : 'numeric', 'categorical', or 'boolean'\n Type to use for vectors containing only 0s and 1s (and NAs).\n strict_boolean : bool\n If True, only consider data to be boolean when the dtype is bool or Boolean.\n\n Returns\n -------\n var_type : 'numeric', 'categorical', or 'datetime'\n Name identifying the type of data in the vector.\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_marks/test_line.py::TestPath::test_xy_data",
"tests/_stats/test_aggregation.py::TestAgg::test_default",
"tests/_marks/test_bar.py::TestBar::test_categorical_positions_vertical",
"tests/_stats/test_density.py::TestKDE::test_columns[x]",
"tests/_marks/test_area.py::TestArea::test_single_defaults",
"tests/_core/test_moves.py::TestDodge::test_default",
"tests/_stats/test_regression.py::TestPolyFit::test_one_grouper",
"tests/_marks/test_text.py::TestText::test_simple",
"tests/_marks/test_dot.py::TestDot::test_simple",
"tests/_stats/test_order.py::TestPerc::test_int_k",
"tests/_core/test_rules.py::test_variable_type",
"tests/_stats/test_counting.py::TestCount::test_single_grouper",
"tests/_core/test_groupby.py::test_agg_one_grouper",
"tests/_core/test_properties.py::TestColor::test_nominal_default_palette",
"tests/_core/test_properties.py::TestColor::test_nominal_default_palette_large",
"tests/_stats/test_aggregation.py::TestAgg::test_default_multi",
"tests/_core/test_plot.py::TestLayerAddition::test_without_data",
"tests/_stats/test_counting.py::TestCount::test_multiple_groupers",
"tests/_stats/test_density.py::TestKDE::test_columns[y]",
"tests/_stats/test_aggregation.py::TestAgg::test_func[max]",
"tests/_core/test_moves.py::TestDodge::test_fill",
"tests/_core/test_groupby.py::test_agg_two_groupers",
"tests/_stats/test_aggregation.py::TestAgg::test_func[<lambda>]",
"tests/_stats/test_order.py::TestPerc::test_list_k",
"tests/_stats/test_aggregation.py::TestEst::test_mean_sd[mean0]",
"tests/_stats/test_order.py::TestPerc::test_orientation",
"tests/_core/test_groupby.py::test_apply_one_grouper",
"tests/_stats/test_aggregation.py::TestEst::test_mean_sd[mean1]",
"tests/_core/test_groupby.py::test_apply_mutate_columns",
"tests/_core/test_groupby.py::test_apply_replace_columns",
"tests/_stats/test_aggregation.py::TestEst::test_sd_single_obs",
"tests/_stats/test_order.py::TestPerc::test_method",
"tests/_stats/test_counting.py::TestHist::test_common_norm_default",
"tests/_core/test_moves.py::TestDodge::test_drop",
"tests/_core/test_properties.py::TestColor::test_nominal_named_palette",
"tests/_core/test_rules.py::test_categorical_order",
"tests/_stats/test_counting.py::TestHist::test_common_norm_false",
"tests/_stats/test_order.py::TestPerc::test_grouped",
"tests/_core/test_properties.py::TestColor::test_nominal_list_palette",
"tests/_core/test_moves.py::TestDodge::test_gap",
"tests/_marks/test_bar.py::TestBar::test_categorical_positions_horizontal",
"tests/_marks/test_area.py::TestArea::test_set_properties",
"tests/_stats/test_aggregation.py::TestEst::test_median_pi",
"tests/_marks/test_dot.py::TestDot::test_filled_unfilled_mix",
"tests/_core/test_properties.py::TestColor::test_nominal_dict_palette",
"tests/_stats/test_density.py::TestKDE::test_common_grid[True]",
"tests/_stats/test_counting.py::TestHist::test_common_norm_subset",
"tests/_stats/test_order.py::TestPerc::test_with_na",
"tests/_core/test_moves.py::TestDodge::test_widths_default",
"tests/_stats/test_aggregation.py::TestEst::test_weighted_mean",
"tests/_marks/test_text.py::TestText::test_set_properties",
"tests/_core/test_properties.py::TestColor::test_nominal_dict_with_missing_keys",
"tests/_stats/test_density.py::TestKDE::test_common_grid[False]",
"tests/_stats/test_counting.py::TestHist::test_common_norm_warning",
"tests/_core/test_moves.py::TestDodge::test_widths_fill",
"tests/_core/test_plot.py::TestLayerAddition::test_with_new_variable_by_name",
"tests/_stats/test_aggregation.py::TestEst::test_seed",
"tests/_core/test_properties.py::TestColor::test_nominal_list_too_short",
"tests/_stats/test_density.py::TestKDE::test_common_norm[True]",
"tests/_marks/test_area.py::TestArea::test_mapped_properties",
"tests/_marks/test_line.py::TestPath::test_shared_colors_direct",
"tests/_core/test_moves.py::TestDodge::test_widths_drop",
"tests/_core/test_scales.py::TestNominal::test_coordinate_defaults",
"tests/_core/test_properties.py::TestColor::test_nominal_list_too_long",
"tests/_stats/test_counting.py::TestHist::test_common_bins_default",
"tests/_stats/test_density.py::TestKDE::test_common_norm[False]",
"tests/_core/test_moves.py::TestDodge::test_faceted_default",
"tests/_marks/test_bar.py::TestBar::test_numeric_positions_vertical",
"tests/_stats/test_density.py::TestKDE::test_common_norm_variables",
"tests/_core/test_moves.py::TestDodge::test_faceted_fill",
"tests/_stats/test_counting.py::TestHist::test_common_bins_false",
"tests/_stats/test_density.py::TestKDE::test_common_input_checks[norm]",
"tests/_core/test_moves.py::TestDodge::test_faceted_drop",
"tests/_marks/test_dot.py::TestDot::test_missing_coordinate_data",
"tests/_core/test_scales.py::TestNominal::test_coordinate_axis",
"tests/_marks/test_text.py::TestText::test_mapped_properties",
"tests/_stats/test_density.py::TestKDE::test_common_input_checks[grid]",
"tests/_core/test_moves.py::TestDodge::test_orient",
"tests/_stats/test_counting.py::TestHist::test_common_bins_subset",
"tests/_core/test_moves.py::TestDodge::test_single_semantic[grp2]",
"tests/_marks/test_area.py::TestArea::test_unfilled",
"tests/_core/test_moves.py::TestDodge::test_single_semantic[grp3]",
"tests/_stats/test_counting.py::TestHist::test_common_bins_warning",
"tests/_core/test_moves.py::TestDodge::test_two_semantics",
"tests/_core/test_properties.py::TestColor::test_bad_scale_values_nominal",
"tests/_core/test_scales.py::TestNominal::test_coordinate_numeric_data",
"tests/_stats/test_density.py::TestKDE::test_singular[vals0]",
"tests/_core/test_properties.py::TestColor::test_bad_inference_arg",
"tests/_core/test_moves.py::TestStack::test_basic",
"tests/_marks/test_bar.py::TestBar::test_numeric_positions_horizontal",
"tests/_stats/test_density.py::TestKDE::test_singular[vals1]",
"tests/_core/test_properties.py::TestColor::test_default[cat-Nominal]",
"tests/_core/test_scales.py::TestNominal::test_color_defaults",
"tests/_stats/test_counting.py::TestHist::test_histogram_multiple",
"tests/_core/test_properties.py::TestColor::test_default[num-Continuous]",
"tests/_stats/test_density.py::TestKDE::test_singular[vals2]",
"tests/_core/test_scales.py::TestNominal::test_color_named_palette",
"tests/_marks/test_line.py::TestPath::test_separate_colors_direct",
"tests/_core/test_properties.py::TestColor::test_default[bool-Boolean]",
"tests/_stats/test_density.py::TestKDE::test_singular[vals3]",
"tests/_core/test_scales.py::TestNominal::test_color_list_palette",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[color]",
"tests/_core/test_plot.py::TestLayerAddition::test_with_new_variable_by_vector",
"tests/_core/test_properties.py::TestColor::test_default_numeric_data_category_dtype",
"tests/_marks/test_text.py::TestText::test_mapped_alignment",
"tests/_core/test_moves.py::TestStack::test_faceted",
"tests/_core/test_scales.py::TestNominal::test_color_dict_palette",
"tests/_core/test_properties.py::TestColor::test_default_binary_data",
"tests/_core/test_scales.py::TestNominal::test_color_numeric_data",
"tests/_core/test_properties.py::TestColor::test_inference[viridis-cat-Nominal]",
"tests/_marks/test_area.py::TestBand::test_range",
"tests/_core/test_moves.py::TestStack::test_misssing_data",
"tests/_core/test_properties.py::TestColor::test_inference[viridis-num-Continuous]",
"tests/_core/test_properties.py::TestColor::test_inference[viridis-bool-Boolean]",
"tests/_core/test_moves.py::TestStack::test_baseline_homogeneity_check",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[fill]",
"tests/_core/test_moves.py::TestNorm::test_default_groups[x]",
"tests/_core/test_moves.py::TestNorm::test_default_groups[y]",
"tests/_core/test_scales.py::TestNominal::test_color_alpha_in_palette",
"tests/_marks/test_line.py::TestPath::test_shared_colors_mapped",
"tests/_marks/test_bar.py::TestBar::test_set_properties",
"tests/_marks/test_area.py::TestBand::test_auto_range",
"tests/_core/test_plot.py::TestLayerAddition::test_with_late_data_definition",
"tests/_marks/test_text.py::TestText::test_identity_fontsize",
"tests/_core/test_scales.py::TestNominal::test_color_unknown_palette",
"tests/_core/test_scales.py::TestNominal::test_object_defaults",
"tests/_core/test_scales.py::TestNominal::test_object_list",
"tests/_core/test_properties.py::TestColor::test_inference[muted-num-Nominal]",
"tests/_core/test_properties.py::TestColor::test_inference[values4-num-Nominal]",
"tests/_core/test_properties.py::TestColor::test_inference[values5-num-Nominal]",
"tests/_core/test_scales.py::TestNominal::test_object_dict",
"tests/_marks/test_bar.py::TestBar::test_mapped_properties",
"tests/_core/test_properties.py::TestColor::test_inference[values6-num-Continuous]",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[marker]",
"tests/_core/test_properties.py::TestColor::test_inference[values7-cat-Nominal]",
"tests/_core/test_scales.py::TestNominal::test_objects_that_are_weird",
"tests/_core/test_scales.py::TestNominal::test_alpha_default",
"tests/_marks/test_bar.py::TestBar::test_zero_height_skipped",
"tests/_marks/test_text.py::TestText::test_offset_centered",
"tests/_core/test_properties.py::TestColor::test_inference[values8-bool-Boolean]",
"tests/_core/test_properties.py::TestColor::test_inference[values9-num-Continuous]",
"tests/_core/test_scales.py::TestNominal::test_fill",
"tests/_core/test_plot.py::TestLayerAddition::test_with_new_data_definition",
"tests/_marks/test_line.py::TestPath::test_separate_colors_mapped",
"tests/_marks/test_line.py::TestPath::test_color_with_alpha",
"tests/_core/test_properties.py::TestMarker::test_default[cat]",
"tests/_marks/test_text.py::TestText::test_offset_valign",
"tests/_core/test_properties.py::TestMarker::test_default[num]",
"tests/_core/test_properties.py::TestMarker::test_default[bool]",
"tests/_marks/test_bar.py::TestBar::test_artist_kws_clip",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[pointsize]",
"tests/_core/test_scales.py::TestNominal::test_fill_dict",
"tests/_core/test_scales.py::TestNominal::test_fill_nunique_warning",
"tests/_core/test_scales.py::TestNominal::test_interval_defaults",
"tests/_core/test_properties.py::TestMarker::test_inference_list[cat]",
"tests/_marks/test_dot.py::TestDots::test_simple",
"tests/_marks/test_line.py::TestPath::test_color_and_alpha",
"tests/_core/test_scales.py::TestNominal::test_interval_tuple",
"tests/_core/test_plot.py::TestLayerAddition::test_drop_variable",
"tests/_marks/test_text.py::TestText::test_offset_halign",
"tests/_core/test_properties.py::TestMarker::test_inference_list[num]",
"tests/_marks/test_bar.py::TestBars::test_positions",
"tests/_core/test_properties.py::TestMarker::test_inference_list[bool]",
"tests/_core/test_scales.py::TestNominal::test_interval_tuple_numeric",
"tests/_core/test_properties.py::TestMarker::test_inference_dict[cat]",
"tests/_core/test_scales.py::TestNominal::test_interval_list",
"tests/_core/test_properties.py::TestMarker::test_inference_dict[num]",
"tests/_marks/test_dot.py::TestDots::test_set_color",
"tests/_marks/test_line.py::TestPath::test_other_props_direct",
"tests/_core/test_properties.py::TestMarker::test_inference_dict[bool]",
"tests/_core/test_scales.py::TestNominal::test_interval_dict",
"tests/_core/test_properties.py::TestMarker::test_dict_missing",
"tests/_marks/test_bar.py::TestBars::test_positions_horizontal",
"tests/_core/test_properties.py::TestMarker::test_mapping_default[cat]",
"tests/_core/test_scales.py::TestNominal::test_interval_with_transform",
"tests/_core/test_properties.py::TestMarker::test_mapping_default[num]",
"tests/_core/test_plot.py::TestLayerAddition::test_orient[x-x]",
"tests/_core/test_scales.py::TestNominal::test_empty_data",
"tests/_marks/test_dot.py::TestDots::test_map_color",
"tests/_core/test_properties.py::TestMarker::test_mapping_from_list[cat]",
"tests/_marks/test_line.py::TestPath::test_other_props_mapped",
"tests/_marks/test_bar.py::TestBars::test_width",
"tests/_core/test_properties.py::TestMarker::test_mapping_from_list[num]",
"tests/_core/test_scales.py::TestNominal::test_finalize",
"tests/_core/test_properties.py::TestMarker::test_mapping_from_dict[cat]",
"tests/_marks/test_dot.py::TestDots::test_fill",
"tests/_core/test_properties.py::TestMarker::test_mapping_from_dict[num]",
"tests/_marks/test_line.py::TestPath::test_capstyle",
"tests/_core/test_properties.py::TestMarker::test_mapping_with_null_value",
"tests/_core/test_plot.py::TestLayerAddition::test_orient[y-y]",
"tests/_marks/test_bar.py::TestBars::test_mapped_color_direct_alpha",
"tests/_core/test_properties.py::TestMarker::test_unique_default_large_n",
"tests/_core/test_properties.py::TestMarker::test_bad_scale_values",
"tests/_core/test_properties.py::TestLineStyle::test_default[cat]",
"tests/_marks/test_dot.py::TestDots::test_pointsize",
"tests/_marks/test_bar.py::TestBars::test_mapped_edgewidth",
"tests/_marks/test_line.py::TestLine::test_xy_data",
"tests/_core/test_properties.py::TestLineStyle::test_default[num]",
"tests/_core/test_plot.py::TestLayerAddition::test_orient[v-x]",
"tests/_core/test_properties.py::TestLineStyle::test_default[bool]",
"tests/_core/test_properties.py::TestLineStyle::test_inference_list[cat]",
"tests/_marks/test_dot.py::TestDots::test_stroke",
"tests/_marks/test_bar.py::TestBars::test_auto_edgewidth",
"tests/_marks/test_line.py::TestPaths::test_xy_data",
"tests/_core/test_properties.py::TestLineStyle::test_inference_list[num]",
"tests/_core/test_properties.py::TestLineStyle::test_inference_list[bool]",
"tests/_core/test_properties.py::TestLineStyle::test_inference_dict[cat]",
"tests/_core/test_properties.py::TestLineStyle::test_inference_dict[num]",
"tests/_marks/test_dot.py::TestDots::test_filled_unfilled_mix",
"tests/_core/test_plot.py::TestLayerAddition::test_orient[h-y]",
"tests/_core/test_properties.py::TestLineStyle::test_inference_dict[bool]",
"tests/_marks/test_line.py::TestPaths::test_set_properties",
"tests/_core/test_properties.py::TestLineStyle::test_dict_missing",
"tests/_marks/test_bar.py::TestBars::test_unfilled",
"tests/_core/test_properties.py::TestLineStyle::test_mapping_default[cat]",
"tests/_core/test_properties.py::TestLineStyle::test_mapping_default[num]",
"tests/_marks/test_bar.py::TestBars::test_log_scale",
"tests/_core/test_properties.py::TestLineStyle::test_mapping_from_list[cat]",
"tests/_core/test_plot.py::TestScaling::test_inference",
"tests/_marks/test_line.py::TestPaths::test_mapped_properties",
"tests/_core/test_properties.py::TestLineStyle::test_mapping_from_list[num]",
"tests/_core/test_properties.py::TestLineStyle::test_mapping_from_dict[cat]",
"tests/_core/test_properties.py::TestLineStyle::test_mapping_from_dict[num]",
"tests/_core/test_properties.py::TestLineStyle::test_mapping_with_null_value",
"tests/_marks/test_line.py::TestPaths::test_color_with_alpha",
"tests/_core/test_properties.py::TestLineStyle::test_unique_default_large_n",
"tests/_core/test_properties.py::TestLineStyle::test_bad_scale_values",
"tests/_core/test_plot.py::TestScaling::test_inference_from_layer_data",
"tests/_core/test_properties.py::TestFill::test_default[cat]",
"tests/_marks/test_line.py::TestPaths::test_color_and_alpha",
"tests/_core/test_properties.py::TestFill::test_default[num]",
"tests/_core/test_properties.py::TestFill::test_default[bool]",
"tests/_core/test_properties.py::TestFill::test_inference_list[cat]",
"tests/_core/test_properties.py::TestFill::test_inference_list[num]",
"tests/_core/test_properties.py::TestFill::test_inference_list[bool]",
"tests/_marks/test_line.py::TestPaths::test_capstyle",
"tests/_core/test_plot.py::TestScaling::test_inference_joins",
"tests/_core/test_properties.py::TestFill::test_inference_dict[cat]",
"tests/_core/test_properties.py::TestFill::test_inference_dict[num]",
"tests/_core/test_properties.py::TestFill::test_inference_dict[bool]",
"tests/_core/test_properties.py::TestFill::test_mapping_categorical_data",
"tests/_marks/test_line.py::TestLines::test_xy_data",
"tests/_core/test_properties.py::TestFill::test_mapping_numeric_data",
"tests/_core/test_plot.py::TestScaling::test_inferred_categorical_converter",
"tests/_core/test_properties.py::TestFill::test_mapping_list",
"tests/_core/test_properties.py::TestFill::test_mapping_truthy_list",
"tests/_marks/test_line.py::TestLines::test_single_orient_value",
"tests/_core/test_properties.py::TestFill::test_mapping_dict",
"tests/_core/test_properties.py::TestFill::test_cycle_warning",
"tests/_core/test_properties.py::TestFill::test_values_error",
"tests/_core/test_properties.py::TestAlpha::test_default[cat-Nominal]",
"tests/_core/test_plot.py::TestScaling::test_explicit_categorical_converter",
"tests/_marks/test_line.py::TestRange::test_xy_data",
"tests/_core/test_properties.py::TestAlpha::test_default[num-Continuous]",
"tests/_core/test_properties.py::TestAlpha::test_default[bool-Boolean]",
"tests/_core/test_properties.py::TestAlpha::test_inference[arg0-cat-Nominal]",
"tests/_core/test_properties.py::TestAlpha::test_inference[arg1-num-Continuous]",
"tests/_core/test_plot.py::TestScaling::test_faceted_log_scale",
"tests/_marks/test_line.py::TestRange::test_auto_range",
"tests/_core/test_properties.py::TestAlpha::test_inference[arg2-bool-Boolean]",
"tests/_core/test_properties.py::TestAlpha::test_inference[arg3-cat-Nominal]",
"tests/_core/test_properties.py::TestAlpha::test_inference[arg4-num-Nominal]",
"tests/_marks/test_line.py::TestRange::test_mapped_color",
"tests/_core/test_plot.py::TestScaling::test_paired_single_log_scale",
"tests/_core/test_properties.py::TestAlpha::test_inference[arg5-bool-Boolean]",
"tests/_core/test_properties.py::TestAlpha::test_inference[arg6-cat-Nominal]",
"tests/_core/test_properties.py::TestAlpha::test_inference[arg7-num-Nominal]",
"tests/_core/test_properties.py::TestAlpha::test_inference[arg8-bool-Boolean]",
"tests/_core/test_properties.py::TestAlpha::test_mapped_interval_categorical",
"tests/_marks/test_line.py::TestRange::test_direct_properties",
"tests/_core/test_properties.py::TestAlpha::test_bad_scale_values_categorical_data",
"tests/_core/test_properties.py::TestLineWidth::test_default[cat-Nominal]",
"tests/_marks/test_line.py::TestDash::test_xy_data",
"tests/_core/test_plot.py::TestScaling::test_mark_data_log_transfrom_with_stat",
"tests/_core/test_properties.py::TestLineWidth::test_default[num-Continuous]",
"tests/_core/test_properties.py::TestLineWidth::test_default[bool-Boolean]",
"tests/_core/test_properties.py::TestLineWidth::test_inference[arg0-cat-Nominal]",
"tests/_core/test_properties.py::TestLineWidth::test_inference[arg1-num-Continuous]",
"tests/_marks/test_line.py::TestDash::test_xy_data_grouped",
"tests/_core/test_properties.py::TestLineWidth::test_inference[arg2-bool-Boolean]",
"tests/_core/test_plot.py::TestScaling::test_mark_data_from_categorical",
"tests/_core/test_properties.py::TestLineWidth::test_inference[arg3-cat-Nominal]",
"tests/_core/test_properties.py::TestLineWidth::test_inference[arg4-num-Nominal]",
"tests/_marks/test_line.py::TestDash::test_set_properties",
"tests/_core/test_properties.py::TestLineWidth::test_inference[arg5-bool-Boolean]",
"tests/_core/test_properties.py::TestLineWidth::test_inference[arg6-cat-Nominal]",
"tests/_core/test_properties.py::TestLineWidth::test_inference[arg7-num-Nominal]",
"tests/_core/test_properties.py::TestLineWidth::test_inference[arg8-bool-Boolean]",
"tests/_marks/test_line.py::TestDash::test_mapped_properties",
"tests/_core/test_plot.py::TestScaling::test_mark_data_from_datetime",
"tests/_core/test_properties.py::TestLineWidth::test_mapped_interval_categorical",
"tests/_core/test_properties.py::TestLineWidth::test_bad_scale_values_categorical_data",
"tests/_marks/test_line.py::TestDash::test_width",
"tests/_core/test_properties.py::TestEdgeWidth::test_default[cat-Nominal]",
"tests/_core/test_properties.py::TestEdgeWidth::test_default[num-Continuous]",
"tests/_core/test_properties.py::TestEdgeWidth::test_default[bool-Boolean]",
"tests/_core/test_plot.py::TestScaling::test_computed_var_ticks",
"tests/_core/test_properties.py::TestEdgeWidth::test_inference[arg0-cat-Nominal]",
"tests/_marks/test_line.py::TestDash::test_dodge",
"tests/_core/test_properties.py::TestEdgeWidth::test_inference[arg1-num-Continuous]",
"tests/_core/test_properties.py::TestEdgeWidth::test_inference[arg2-bool-Boolean]",
"tests/_core/test_properties.py::TestEdgeWidth::test_inference[arg3-cat-Nominal]",
"tests/_core/test_plot.py::TestScaling::test_computed_var_transform",
"tests/_core/test_properties.py::TestEdgeWidth::test_inference[arg4-num-Nominal]",
"tests/_core/test_properties.py::TestEdgeWidth::test_inference[arg5-bool-Boolean]",
"tests/_core/test_properties.py::TestEdgeWidth::test_inference[arg6-cat-Nominal]",
"tests/_core/test_properties.py::TestEdgeWidth::test_inference[arg7-num-Nominal]",
"tests/_core/test_properties.py::TestEdgeWidth::test_inference[arg8-bool-Boolean]",
"tests/_core/test_properties.py::TestEdgeWidth::test_mapped_interval_categorical",
"tests/_core/test_plot.py::TestScaling::test_explicit_range_with_axis_scaling",
"tests/_core/test_properties.py::TestEdgeWidth::test_bad_scale_values_categorical_data",
"tests/_core/test_properties.py::TestPointSize::test_default[cat-Nominal]",
"tests/_core/test_properties.py::TestPointSize::test_default[num-Continuous]",
"tests/_core/test_properties.py::TestPointSize::test_default[bool-Boolean]",
"tests/_core/test_plot.py::TestScaling::test_derived_range_with_axis_scaling",
"tests/_core/test_properties.py::TestPointSize::test_inference[arg0-cat-Nominal]",
"tests/_core/test_properties.py::TestPointSize::test_inference[arg1-num-Continuous]",
"tests/_core/test_properties.py::TestPointSize::test_inference[arg2-bool-Boolean]",
"tests/_core/test_properties.py::TestPointSize::test_inference[arg3-cat-Nominal]",
"tests/_core/test_properties.py::TestPointSize::test_inference[arg4-num-Nominal]",
"tests/_core/test_plot.py::TestScaling::test_facet_categories",
"tests/_core/test_properties.py::TestPointSize::test_inference[arg5-bool-Boolean]",
"tests/_core/test_properties.py::TestPointSize::test_inference[arg6-cat-Nominal]",
"tests/_core/test_properties.py::TestPointSize::test_inference[arg7-num-Nominal]",
"tests/_core/test_plot.py::TestScaling::test_facet_categories_unshared",
"tests/_core/test_properties.py::TestPointSize::test_inference[arg8-bool-Boolean]",
"tests/_core/test_properties.py::TestPointSize::test_mapped_interval_categorical",
"tests/_core/test_properties.py::TestPointSize::test_bad_scale_values_categorical_data",
"tests/_core/test_properties.py::TestPointSize::test_areal_scaling_categorical",
"tests/_core/test_plot.py::TestScaling::test_facet_categories_single_dim_shared",
"tests/_core/test_plot.py::TestScaling::test_pair_categories",
"tests/_core/test_plot.py::TestScaling::test_pair_categories_shared",
"tests/_core/test_plot.py::TestScaling::test_identity_mapping_linewidth",
"tests/_core/test_plot.py::TestScaling::test_pair_single_coordinate_stat_orient",
"tests/_core/test_plot.py::TestScaling::test_inferred_nominal_passed_to_stat",
"tests/_core/test_plot.py::TestScaling::test_identity_mapping_color_tuples",
"tests/_core/test_plot.py::TestScaling::test_nominal_x_axis_tweaks",
"tests/_core/test_plot.py::TestScaling::test_nominal_y_axis_tweaks",
"tests/_core/test_plot.py::TestPlotting::test_no_orient_variance",
"tests/_core/test_plot.py::TestPlotting::test_single_split_single_layer",
"tests/_core/test_plot.py::TestPlotting::test_single_split_multi_layer",
"tests/_core/test_plot.py::TestPlotting::test_one_grouping_variable[color]",
"tests/_core/test_plot.py::TestPlotting::test_one_grouping_variable[group]",
"tests/_core/test_plot.py::TestPlotting::test_two_grouping_variables",
"tests/_core/test_plot.py::TestPlotting::test_specified_width",
"tests/_core/test_plot.py::TestPlotting::test_facets_no_subgroups",
"tests/_core/test_plot.py::TestPlotting::test_facets_one_subgroup",
"tests/_core/test_plot.py::TestPlotting::test_layer_specific_facet_disabling",
"tests/_core/test_plot.py::TestPlotting::test_paired_variables",
"tests/_core/test_plot.py::TestPlotting::test_paired_one_dimension",
"tests/_core/test_plot.py::TestPlotting::test_paired_variables_one_subset",
"tests/_core/test_plot.py::TestPlotting::test_paired_and_faceted",
"tests/_core/test_plot.py::TestPlotting::test_stat",
"tests/_core/test_plot.py::TestPlotting::test_move",
"tests/_core/test_plot.py::TestPlotting::test_stat_and_move",
"tests/_core/test_plot.py::TestPlotting::test_stat_log_scale",
"tests/_core/test_plot.py::TestPlotting::test_move_log_scale",
"tests/_core/test_plot.py::TestPlotting::test_multi_move",
"tests/_core/test_plot.py::TestPlotting::test_multi_move_with_pairing",
"tests/_core/test_plot.py::TestPlotting::test_move_with_range",
"tests/_core/test_plot.py::TestPlotting::test_on_axes",
"tests/_core/test_plot.py::TestPlotting::test_on_figure[True]",
"tests/_core/test_plot.py::TestPlotting::test_on_figure[False]",
"tests/_core/test_plot.py::TestPlotting::test_on_subfigure[True]",
"tests/_core/test_plot.py::TestPlotting::test_on_subfigure[False]",
"tests/_core/test_plot.py::TestPlotting::test_on_axes_with_subplots_error",
"tests/_core/test_plot.py::TestPlotting::test_axis_labels_from_constructor",
"tests/_core/test_plot.py::TestPlotting::test_axis_labels_from_layer",
"tests/_core/test_plot.py::TestPlotting::test_axis_labels_are_first_name",
"tests/_core/test_plot.py::TestPlotting::test_limits",
"tests/_core/test_plot.py::TestPlotting::test_labels_axis",
"tests/_core/test_plot.py::TestPlotting::test_labels_legend",
"tests/_core/test_plot.py::TestPlotting::test_labels_facets",
"tests/_core/test_plot.py::TestPlotting::test_title_facet_function",
"tests/_core/test_plot.py::TestExceptions::test_scale_setup",
"tests/_core/test_plot.py::TestExceptions::test_semantic_scaling",
"tests/_core/test_plot.py::TestFacetInterface::test_1d[row]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_as_vector[row]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_with_order[row-reverse]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_with_order[col-reverse]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d[col]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_as_vector[col]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_with_order[col-subset]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_with_order[row-subset]",
"tests/_core/test_plot.py::TestFacetInterface::test_2d_with_order[subset]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_with_order[col-expand]",
"tests/_core/test_plot.py::TestFacetInterface::test_1d_with_order[row-expand]",
"tests/_core/test_plot.py::TestFacetInterface::test_2d_with_order[expand]",
"tests/_core/test_plot.py::TestFacetInterface::test_2d_with_order[reverse]",
"tests/_core/test_plot.py::TestFacetInterface::test_2d",
"tests/_core/test_plot.py::TestFacetInterface::test_layout_algo[tight]",
"tests/_core/test_plot.py::TestFacetInterface::test_layout_algo[constrained]",
"tests/_core/test_plot.py::TestFacetInterface::test_axis_sharing",
"tests/_core/test_plot.py::TestFacetInterface::test_unshared_spacing",
"tests/_core/test_plot.py::TestFacetInterface::test_col_wrapping",
"tests/_core/test_plot.py::TestFacetInterface::test_row_wrapping",
"tests/_core/test_plot.py::TestPairInterface::test_all_numeric[list]",
"tests/_core/test_plot.py::TestPairInterface::test_all_numeric[Index]",
"tests/_core/test_plot.py::TestPairInterface::test_single_dimension[x]",
"tests/_core/test_plot.py::TestPairInterface::test_single_dimension[y]",
"tests/_core/test_plot.py::TestPairInterface::test_non_cross",
"tests/_core/test_plot.py::TestPairInterface::test_list_of_vectors",
"tests/_core/test_plot.py::TestPairInterface::test_with_facets",
"tests/_core/test_plot.py::TestPairInterface::test_error_on_facet_overlap[variables0]",
"tests/_core/test_plot.py::TestPairInterface::test_error_on_facet_overlap[variables1]",
"tests/_core/test_plot.py::TestPairInterface::test_error_on_wrap_overlap[variables0]",
"tests/_core/test_plot.py::TestPairInterface::test_error_on_wrap_overlap[variables1]",
"tests/_core/test_plot.py::TestPairInterface::test_axis_sharing",
"tests/_core/test_plot.py::TestPairInterface::test_axis_sharing_with_facets",
"tests/_core/test_plot.py::TestPairInterface::test_x_wrapping",
"tests/_core/test_plot.py::TestPairInterface::test_y_wrapping",
"tests/_core/test_plot.py::TestPairInterface::test_non_cross_wrapping",
"tests/_core/test_plot.py::TestPairInterface::test_orient_inference",
"tests/_core/test_plot.py::TestPairInterface::test_computed_coordinate_orient_inference",
"tests/_core/test_plot.py::TestPairInterface::test_limits",
"tests/_core/test_plot.py::TestPairInterface::test_labels",
"tests/_core/test_plot.py::TestLabelVisibility::test_single_subplot",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_column[facet_kws0-pair_kws0]",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_column[facet_kws1-pair_kws1]",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_row[facet_kws0-pair_kws0]",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_row[facet_kws1-pair_kws1]",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_column_wrapped",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_row_wrapped",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_column_wrapped_non_cross",
"tests/_core/test_plot.py::TestLabelVisibility::test_2d",
"tests/_core/test_plot.py::TestLabelVisibility::test_2d_unshared",
"tests/_core/test_plot.py::TestLegend::test_single_layer_single_variable",
"tests/_core/test_plot.py::TestLegend::test_single_layer_common_variable",
"tests/_core/test_plot.py::TestLegend::test_single_layer_common_unnamed_variable",
"tests/_core/test_plot.py::TestLegend::test_single_layer_multi_variable",
"tests/_core/test_plot.py::TestLegend::test_multi_layer_single_variable",
"tests/_core/test_plot.py::TestLegend::test_multi_layer_multi_variable",
"tests/_core/test_plot.py::TestLegend::test_multi_layer_different_artists",
"tests/_core/test_plot.py::TestLegend::test_three_layers",
"tests/_core/test_plot.py::TestLegend::test_identity_scale_ignored",
"tests/_core/test_plot.py::TestLegend::test_suppression_in_add_method",
"tests/_core/test_plot.py::TestLegend::test_anonymous_title",
"tests/_core/test_plot.py::TestLegend::test_legendless_mark",
"tests/_core/test_plot.py::TestLegend::test_legend_has_no_offset",
"tests/_core/test_plot.py::TestLegend::test_layer_legend",
"tests/_core/test_plot.py::TestLegend::test_layer_legend_with_scale_legend",
"tests/_core/test_plot.py::TestLegend::test_layer_legend_title"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-67
|
1.0
|
{
"code": "diff --git b/seaborn/_core/scales.py a/seaborn/_core/scales.py\nindex 897e5c2b..1e7bef8a 100644\n--- b/seaborn/_core/scales.py\n+++ a/seaborn/_core/scales.py\n@@ -571,6 +571,30 @@ class Continuous(ContinuousBase):\n Copy of self with new tick configuration.\n \n \"\"\"\n+ # Input checks\n+ if locator is not None and not isinstance(locator, Locator):\n+ raise TypeError(\n+ f\"Tick locator must be an instance of {Locator!r}, \"\n+ f\"not {type(locator)!r}.\"\n+ )\n+ log_base, symlog_thresh = self._parse_for_log_params(self.trans)\n+ if log_base or symlog_thresh:\n+ if count is not None and between is None:\n+ raise RuntimeError(\"`count` requires `between` with log transform.\")\n+ if every is not None:\n+ raise RuntimeError(\"`every` not supported with log transform.\")\n+\n+ new = copy(self)\n+ new._tick_params = {\n+ \"locator\": locator,\n+ \"at\": at,\n+ \"upto\": upto,\n+ \"count\": count,\n+ \"every\": every,\n+ \"between\": between,\n+ \"minor\": minor,\n+ }\n+ return new\n \n def label(\n self,\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_core/scales.py b/seaborn/_core/scales.py\nindex 1e7bef8a..897e5c2b 100644\n--- a/seaborn/_core/scales.py\n+++ b/seaborn/_core/scales.py\n@@ -571,30 +571,6 @@ class Continuous(ContinuousBase):\n Copy of self with new tick configuration.\n \n \"\"\"\n- # Input checks\n- if locator is not None and not isinstance(locator, Locator):\n- raise TypeError(\n- f\"Tick locator must be an instance of {Locator!r}, \"\n- f\"not {type(locator)!r}.\"\n- )\n- log_base, symlog_thresh = self._parse_for_log_params(self.trans)\n- if log_base or symlog_thresh:\n- if count is not None and between is None:\n- raise RuntimeError(\"`count` requires `between` with log transform.\")\n- if every is not None:\n- raise RuntimeError(\"`every` not supported with log transform.\")\n-\n- new = copy(self)\n- new._tick_params = {\n- \"locator\": locator,\n- \"at\": at,\n- \"upto\": upto,\n- \"count\": count,\n- \"every\": every,\n- \"between\": between,\n- \"minor\": minor,\n- }\n- return new\n \n def label(\n self,\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_core/scales.py.\nHere is the description for the function:\n def tick(\n self,\n locator: Locator | None = None, *,\n at: Sequence[float] | None = None,\n upto: int | None = None,\n count: int | None = None,\n every: float | None = None,\n between: tuple[float, float] | None = None,\n minor: int | None = None,\n ) -> Continuous:\n \"\"\"\n Configure the selection of ticks for the scale's axis or legend.\n\n Parameters\n ----------\n locator : :class:`matplotlib.ticker.Locator` subclass\n Pre-configured matplotlib locator; other parameters will not be used.\n at : sequence of floats\n Place ticks at these specific locations (in data units).\n upto : int\n Choose \"nice\" locations for ticks, but do not exceed this number.\n count : int\n Choose exactly this number of ticks, bounded by `between` or axis limits.\n every : float\n Choose locations at this interval of separation (in data units).\n between : pair of floats\n Bound upper / lower ticks when using `every` or `count`.\n minor : int\n Number of unlabeled ticks to draw between labeled \"major\" ticks.\n\n Returns\n -------\n scale\n Copy of self with new tick configuration.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_marks/test_dot.py::TestDot::test_simple",
"tests/_core/test_scales.py::TestContinuous::test_coordinate_defaults",
"tests/_marks/test_line.py::TestPath::test_xy_data",
"tests/_marks/test_text.py::TestText::test_simple",
"tests/_marks/test_area.py::TestArea::test_single_defaults",
"tests/_core/test_scales.py::TestContinuous::test_coordinate_transform",
"tests/_core/test_scales.py::TestContinuous::test_coordinate_transform_with_parameter",
"tests/_core/test_scales.py::TestContinuous::test_coordinate_transform_error",
"tests/_core/test_scales.py::TestContinuous::test_interval_defaults",
"tests/_marks/test_bar.py::TestBar::test_categorical_positions_vertical",
"tests/_marks/test_line.py::TestPath::test_shared_colors_direct",
"tests/_marks/test_text.py::TestText::test_set_properties",
"tests/_marks/test_area.py::TestArea::test_set_properties",
"tests/_marks/test_dot.py::TestDot::test_filled_unfilled_mix",
"tests/_core/test_scales.py::TestContinuous::test_interval_with_range",
"tests/_marks/test_bar.py::TestBar::test_categorical_positions_horizontal",
"tests/_core/test_scales.py::TestContinuous::test_interval_with_norm",
"tests/_marks/test_area.py::TestArea::test_mapped_properties",
"tests/_marks/test_dot.py::TestDot::test_missing_coordinate_data",
"tests/_marks/test_line.py::TestPath::test_separate_colors_direct",
"tests/_marks/test_text.py::TestText::test_mapped_properties",
"tests/_core/test_scales.py::TestContinuous::test_interval_with_range_norm_and_transform",
"tests/_core/test_plot.py::TestLayerAddition::test_without_data",
"tests/_core/test_plot.py::TestLayerAddition::test_with_new_variable_by_name",
"tests/_core/test_scales.py::TestContinuous::test_interval_with_bools",
"tests/_marks/test_bar.py::TestBar::test_numeric_positions_vertical",
"tests/_marks/test_area.py::TestArea::test_unfilled",
"tests/_core/test_scales.py::TestContinuous::test_color_defaults",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[color]",
"tests/_core/test_scales.py::TestContinuous::test_color_named_values",
"tests/_marks/test_line.py::TestPath::test_shared_colors_mapped",
"tests/_marks/test_text.py::TestText::test_mapped_alignment",
"tests/_core/test_scales.py::TestContinuous::test_color_tuple_values",
"tests/_marks/test_bar.py::TestBar::test_numeric_positions_horizontal",
"tests/_marks/test_area.py::TestBand::test_range",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[fill]",
"tests/_core/test_scales.py::TestContinuous::test_color_callable_values",
"tests/_core/test_plot.py::TestLayerAddition::test_with_new_variable_by_vector",
"tests/_marks/test_line.py::TestPath::test_separate_colors_mapped",
"tests/_marks/test_text.py::TestText::test_identity_fontsize",
"tests/_core/test_scales.py::TestContinuous::test_color_with_norm",
"tests/_core/test_scales.py::TestContinuous::test_color_with_transform",
"tests/_marks/test_bar.py::TestBar::test_set_properties",
"tests/_marks/test_area.py::TestBand::test_auto_range",
"tests/_core/test_scales.py::TestContinuous::test_tick_locator",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[marker]",
"tests/_core/test_scales.py::TestContinuous::test_tick_locator_input_check",
"tests/_core/test_plot.py::TestLayerAddition::test_with_late_data_definition",
"tests/_marks/test_line.py::TestPath::test_color_with_alpha",
"tests/_core/test_scales.py::TestContinuous::test_tick_upto",
"tests/_marks/test_text.py::TestText::test_offset_centered",
"tests/_marks/test_bar.py::TestBar::test_mapped_properties",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[pointsize]",
"tests/_core/test_scales.py::TestContinuous::test_tick_every",
"tests/_core/test_scales.py::TestContinuous::test_tick_every_between",
"tests/_core/test_scales.py::TestContinuous::test_tick_at",
"tests/_core/test_scales.py::TestContinuous::test_tick_count",
"tests/_core/test_plot.py::TestLayerAddition::test_with_new_data_definition",
"tests/_marks/test_bar.py::TestBar::test_zero_height_skipped",
"tests/_marks/test_line.py::TestPath::test_color_and_alpha",
"tests/_marks/test_dot.py::TestDots::test_simple",
"tests/_marks/test_text.py::TestText::test_offset_valign",
"tests/_core/test_scales.py::TestContinuous::test_tick_count_between",
"tests/_core/test_scales.py::TestContinuous::test_tick_minor",
"tests/_marks/test_bar.py::TestBar::test_artist_kws_clip",
"tests/_marks/test_text.py::TestText::test_offset_halign",
"tests/_marks/test_line.py::TestPath::test_other_props_direct",
"tests/_marks/test_dot.py::TestDots::test_set_color",
"tests/_core/test_plot.py::TestLayerAddition::test_drop_variable",
"tests/_marks/test_line.py::TestPath::test_other_props_mapped",
"tests/_core/test_scales.py::TestContinuous::test_log_tick_default",
"tests/_core/test_scales.py::TestContinuous::test_log_tick_upto",
"tests/_core/test_scales.py::TestContinuous::test_log_tick_count",
"tests/_marks/test_dot.py::TestDots::test_map_color",
"tests/_marks/test_bar.py::TestBars::test_positions",
"tests/_core/test_scales.py::TestContinuous::test_log_tick_format_disabled",
"tests/_core/test_scales.py::TestContinuous::test_log_tick_every",
"tests/_marks/test_line.py::TestPath::test_capstyle",
"tests/_core/test_scales.py::TestContinuous::test_symlog_tick_default",
"tests/_marks/test_dot.py::TestDots::test_fill",
"tests/_core/test_plot.py::TestLayerAddition::test_orient[x-x]",
"tests/_marks/test_bar.py::TestBars::test_positions_horizontal",
"tests/_core/test_scales.py::TestContinuous::test_label_formatter",
"tests/_core/test_scales.py::TestContinuous::test_label_like_pattern",
"tests/_marks/test_line.py::TestLine::test_xy_data",
"tests/_marks/test_bar.py::TestBars::test_width",
"tests/_marks/test_dot.py::TestDots::test_pointsize",
"tests/_core/test_scales.py::TestContinuous::test_label_like_string",
"tests/_core/test_scales.py::TestContinuous::test_label_like_function",
"tests/_core/test_plot.py::TestLayerAddition::test_orient[y-y]",
"tests/_core/test_scales.py::TestContinuous::test_label_base",
"tests/_marks/test_line.py::TestPaths::test_xy_data",
"tests/_marks/test_dot.py::TestDots::test_stroke",
"tests/_core/test_scales.py::TestContinuous::test_label_unit",
"tests/_marks/test_bar.py::TestBars::test_mapped_color_direct_alpha",
"tests/_core/test_scales.py::TestContinuous::test_label_unit_with_sep",
"tests/_core/test_plot.py::TestLayerAddition::test_orient[v-x]",
"tests/_marks/test_dot.py::TestDots::test_filled_unfilled_mix",
"tests/_marks/test_line.py::TestPaths::test_set_properties",
"tests/_core/test_scales.py::TestContinuous::test_label_empty_unit",
"tests/_marks/test_bar.py::TestBars::test_mapped_edgewidth",
"tests/_core/test_scales.py::TestContinuous::test_label_base_from_transform",
"tests/_marks/test_bar.py::TestBars::test_auto_edgewidth",
"tests/_marks/test_line.py::TestPaths::test_mapped_properties",
"tests/_core/test_plot.py::TestLayerAddition::test_orient[h-y]",
"tests/_marks/test_line.py::TestPaths::test_color_with_alpha",
"tests/_core/test_plot.py::TestScaling::test_inference",
"tests/_marks/test_bar.py::TestBars::test_unfilled",
"tests/_marks/test_line.py::TestPaths::test_color_and_alpha",
"tests/_marks/test_bar.py::TestBars::test_log_scale",
"tests/_marks/test_line.py::TestPaths::test_capstyle",
"tests/_core/test_plot.py::TestScaling::test_inference_joins",
"tests/_marks/test_line.py::TestLines::test_xy_data",
"tests/_marks/test_line.py::TestLines::test_single_orient_value",
"tests/_core/test_plot.py::TestScaling::test_faceted_log_scale",
"tests/_marks/test_line.py::TestRange::test_xy_data",
"tests/_core/test_plot.py::TestScaling::test_paired_single_log_scale",
"tests/_marks/test_line.py::TestRange::test_auto_range",
"tests/_marks/test_line.py::TestRange::test_mapped_color",
"tests/_core/test_plot.py::TestScaling::test_paired_with_common_fallback",
"tests/_marks/test_line.py::TestRange::test_direct_properties",
"tests/_core/test_plot.py::TestScaling::test_mark_data_log_transform_is_inverted",
"tests/_marks/test_line.py::TestDash::test_xy_data",
"tests/_marks/test_line.py::TestDash::test_xy_data_grouped",
"tests/_core/test_plot.py::TestScaling::test_mark_data_log_transfrom_with_stat",
"tests/_marks/test_line.py::TestDash::test_set_properties",
"tests/_marks/test_line.py::TestDash::test_mapped_properties",
"tests/_core/test_plot.py::TestScaling::test_computed_var_ticks",
"tests/_core/test_plot.py::TestScaling::test_computed_var_transform",
"tests/_marks/test_line.py::TestDash::test_width",
"tests/_marks/test_line.py::TestDash::test_dodge",
"tests/_core/test_plot.py::TestScaling::test_explicit_range_with_axis_scaling",
"tests/_core/test_plot.py::TestScaling::test_derived_range_with_axis_scaling",
"tests/_core/test_plot.py::TestScaling::test_pair_categories",
"tests/_core/test_plot.py::TestScaling::test_pair_categories_shared",
"tests/_core/test_plot.py::TestScaling::test_identity_mapping_linewidth",
"tests/_core/test_plot.py::TestScaling::test_pair_single_coordinate_stat_orient",
"tests/_core/test_plot.py::TestScaling::test_identity_mapping_color_tuples",
"tests/_core/test_plot.py::TestScaling::test_nominal_x_axis_tweaks",
"tests/_core/test_plot.py::TestScaling::test_nominal_y_axis_tweaks",
"tests/_core/test_plot.py::TestPlotting::test_no_orient_variance",
"tests/_core/test_plot.py::TestPlotting::test_single_split_single_layer",
"tests/_core/test_plot.py::TestPlotting::test_single_split_multi_layer",
"tests/_core/test_plot.py::TestPlotting::test_one_grouping_variable[color]",
"tests/_core/test_plot.py::TestPlotting::test_one_grouping_variable[group]",
"tests/_core/test_plot.py::TestPlotting::test_two_grouping_variables",
"tests/_core/test_plot.py::TestPlotting::test_specified_width",
"tests/_core/test_plot.py::TestPlotting::test_facets_no_subgroups",
"tests/_core/test_plot.py::TestPlotting::test_facets_one_subgroup",
"tests/_core/test_plot.py::TestPlotting::test_layer_specific_facet_disabling",
"tests/_core/test_plot.py::TestPlotting::test_paired_variables",
"tests/_core/test_plot.py::TestPlotting::test_paired_one_dimension",
"tests/_core/test_plot.py::TestPlotting::test_paired_variables_one_subset",
"tests/_core/test_plot.py::TestPlotting::test_paired_and_faceted",
"tests/_core/test_plot.py::TestPlotting::test_stat",
"tests/_core/test_plot.py::TestPlotting::test_move",
"tests/_core/test_plot.py::TestPlotting::test_stat_and_move",
"tests/_core/test_plot.py::TestPlotting::test_stat_log_scale",
"tests/_core/test_plot.py::TestPlotting::test_move_log_scale",
"tests/_core/test_plot.py::TestPlotting::test_multi_move",
"tests/_core/test_plot.py::TestPlotting::test_multi_move_with_pairing",
"tests/_core/test_plot.py::TestPlotting::test_move_with_range",
"tests/_core/test_plot.py::TestPlotting::test_on_axes",
"tests/_core/test_plot.py::TestPlotting::test_on_figure[True]",
"tests/_core/test_plot.py::TestPlotting::test_on_figure[False]",
"tests/_core/test_plot.py::TestPlotting::test_on_subfigure[True]",
"tests/_core/test_plot.py::TestPlotting::test_on_subfigure[False]",
"tests/_core/test_plot.py::TestPlotting::test_limits",
"tests/_core/test_plot.py::TestPlotting::test_labels_axis",
"tests/_core/test_plot.py::TestPlotting::test_labels_legend",
"tests/_core/test_plot.py::TestExceptions::test_semantic_scaling",
"tests/_core/test_plot.py::TestFacetInterface::test_unshared_spacing",
"tests/_core/test_plot.py::TestPairInterface::test_all_numeric[list]",
"tests/_core/test_plot.py::TestPairInterface::test_all_numeric[Index]",
"tests/_core/test_plot.py::TestPairInterface::test_single_dimension[x]",
"tests/_core/test_plot.py::TestPairInterface::test_single_dimension[y]",
"tests/_core/test_plot.py::TestPairInterface::test_non_cross",
"tests/_core/test_plot.py::TestPairInterface::test_list_of_vectors",
"tests/_core/test_plot.py::TestPairInterface::test_with_facets",
"tests/_core/test_plot.py::TestPairInterface::test_axis_sharing",
"tests/_core/test_plot.py::TestPairInterface::test_axis_sharing_with_facets",
"tests/_core/test_plot.py::TestPairInterface::test_x_wrapping",
"tests/_core/test_plot.py::TestPairInterface::test_y_wrapping",
"tests/_core/test_plot.py::TestPairInterface::test_non_cross_wrapping",
"tests/_core/test_plot.py::TestPairInterface::test_orient_inference",
"tests/_core/test_plot.py::TestPairInterface::test_computed_coordinate_orient_inference",
"tests/_core/test_plot.py::TestPairInterface::test_limits",
"tests/_core/test_plot.py::TestPairInterface::test_labels",
"tests/_core/test_plot.py::TestLabelVisibility::test_single_subplot",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_column[facet_kws0-pair_kws0]",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_column[facet_kws1-pair_kws1]",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_row[facet_kws0-pair_kws0]",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_row[facet_kws1-pair_kws1]",
"tests/_core/test_plot.py::TestLabelVisibility::test_1d_column_wrapped_non_cross",
"tests/_core/test_plot.py::TestLegend::test_single_layer_single_variable",
"tests/_core/test_plot.py::TestLegend::test_single_layer_common_variable",
"tests/_core/test_plot.py::TestLegend::test_single_layer_common_unnamed_variable",
"tests/_core/test_plot.py::TestLegend::test_single_layer_multi_variable",
"tests/_core/test_plot.py::TestLegend::test_multi_layer_single_variable",
"tests/_core/test_plot.py::TestLegend::test_multi_layer_multi_variable",
"tests/_core/test_plot.py::TestLegend::test_multi_layer_different_artists",
"tests/_core/test_plot.py::TestLegend::test_three_layers",
"tests/_core/test_plot.py::TestLegend::test_identity_scale_ignored",
"tests/_core/test_plot.py::TestLegend::test_suppression_in_add_method",
"tests/_core/test_plot.py::TestLegend::test_anonymous_title",
"tests/_core/test_plot.py::TestLegend::test_legendless_mark",
"tests/_core/test_plot.py::TestLegend::test_legend_has_no_offset",
"tests/_core/test_plot.py::TestLegend::test_layer_legend",
"tests/_core/test_plot.py::TestLegend::test_layer_legend_with_scale_legend",
"tests/_core/test_plot.py::TestLegend::test_layer_legend_title"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-68
|
1.0
|
{
"code": "diff --git b/seaborn/_core/scales.py a/seaborn/_core/scales.py\nindex 0ade15ea..1e7bef8a 100644\n--- b/seaborn/_core/scales.py\n+++ a/seaborn/_core/scales.py\n@@ -836,6 +836,9 @@ class Temporal(ContinuousBase):\n Copy of self with new label configuration.\n \n \"\"\"\n+ new = copy(self)\n+ new._label_params = {\"formatter\": formatter, \"concise\": concise}\n+ return new\n \n def _get_locators(self, locator, upto):\n \n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_core/scales.py b/seaborn/_core/scales.py\nindex 1e7bef8a..0ade15ea 100644\n--- a/seaborn/_core/scales.py\n+++ b/seaborn/_core/scales.py\n@@ -836,9 +836,6 @@ class Temporal(ContinuousBase):\n Copy of self with new label configuration.\n \n \"\"\"\n- new = copy(self)\n- new._label_params = {\"formatter\": formatter, \"concise\": concise}\n- return new\n \n def _get_locators(self, locator, upto):\n \n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_core/scales.py.\nHere is the description for the function:\n def label(\n self,\n formatter: Formatter | None = None, *,\n concise: bool = False,\n ) -> Temporal:\n \"\"\"\n Configure the appearance of tick labels for the scale's axis or legend.\n\n .. note::\n This API is under construction and will be enhanced over time.\n\n Parameters\n ----------\n formatter : :class:`matplotlib.ticker.Formatter` subclass\n Pre-configured formatter to use; other parameters will be ignored.\n concise : bool\n If True, use :class:`matplotlib.dates.ConciseDateFormatter` to make\n the tick labels as compact as possible.\n\n Returns\n -------\n scale\n Copy of self with new label configuration.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_core/test_plot.py::TestScaling::test_inference",
"tests/_core/test_scales.py::TestTemporal::test_coordinate_defaults",
"tests/_core/test_scales.py::TestTemporal::test_interval_defaults",
"tests/_core/test_scales.py::TestTemporal::test_interval_with_range",
"tests/_core/test_scales.py::TestTemporal::test_interval_with_norm",
"tests/_core/test_scales.py::TestTemporal::test_color_defaults",
"tests/_core/test_scales.py::TestTemporal::test_color_named_values",
"tests/_core/test_plot.py::TestScaling::test_mark_data_from_datetime",
"tests/_core/test_scales.py::TestTemporal::test_coordinate_axis",
"tests/_core/test_scales.py::TestTemporal::test_tick_locator",
"tests/_core/test_scales.py::TestTemporal::test_tick_upto",
"tests/_core/test_scales.py::TestTemporal::test_label_formatter",
"tests/_core/test_scales.py::TestTemporal::test_label_concise",
"tests/_core/test_plot.py::TestPlotting::test_limits",
"tests/_core/test_plot.py::TestExceptions::test_coordinate_scaling",
"tests/_core/test_plot.py::TestPairInterface::test_non_cross_wrapping"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-69
|
1.0
|
{
"code": "diff --git b/seaborn/_core/scales.py a/seaborn/_core/scales.py\nindex 95844f59..1e7bef8a 100644\n--- b/seaborn/_core/scales.py\n+++ a/seaborn/_core/scales.py\n@@ -800,6 +800,16 @@ class Temporal(ContinuousBase):\n Copy of self with new tick configuration.\n \n \"\"\"\n+ if locator is not None and not isinstance(locator, Locator):\n+ err = (\n+ f\"Tick locator must be an instance of {Locator!r}, \"\n+ f\"not {type(locator)!r}.\"\n+ )\n+ raise TypeError(err)\n+\n+ new = copy(self)\n+ new._tick_params = {\"locator\": locator, \"upto\": upto}\n+ return new\n \n def label(\n self,\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/_core/scales.py b/seaborn/_core/scales.py\nindex 1e7bef8a..95844f59 100644\n--- a/seaborn/_core/scales.py\n+++ b/seaborn/_core/scales.py\n@@ -800,16 +800,6 @@ class Temporal(ContinuousBase):\n Copy of self with new tick configuration.\n \n \"\"\"\n- if locator is not None and not isinstance(locator, Locator):\n- err = (\n- f\"Tick locator must be an instance of {Locator!r}, \"\n- f\"not {type(locator)!r}.\"\n- )\n- raise TypeError(err)\n-\n- new = copy(self)\n- new._tick_params = {\"locator\": locator, \"upto\": upto}\n- return new\n \n def label(\n self,\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/_core/scales.py.\nHere is the description for the function:\n def tick(\n self, locator: Locator | None = None, *,\n upto: int | None = None,\n ) -> Temporal:\n \"\"\"\n Configure the selection of ticks for the scale's axis or legend.\n\n .. note::\n This API is under construction and will be enhanced over time.\n\n Parameters\n ----------\n locator : :class:`matplotlib.ticker.Locator` subclass\n Pre-configured matplotlib locator; other parameters will not be used.\n upto : int\n Choose \"nice\" locations for ticks, but do not exceed this number.\n\n Returns\n -------\n scale\n Copy of self with new tick configuration.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/_core/test_plot.py::TestScaling::test_inference",
"tests/_core/test_scales.py::TestTemporal::test_coordinate_defaults",
"tests/_core/test_scales.py::TestTemporal::test_interval_defaults",
"tests/_core/test_scales.py::TestTemporal::test_interval_with_range",
"tests/_core/test_scales.py::TestTemporal::test_interval_with_norm",
"tests/_core/test_scales.py::TestTemporal::test_color_defaults",
"tests/_core/test_scales.py::TestTemporal::test_color_named_values",
"tests/_core/test_scales.py::TestTemporal::test_coordinate_axis",
"tests/_core/test_scales.py::TestTemporal::test_tick_locator",
"tests/_core/test_scales.py::TestTemporal::test_tick_upto",
"tests/_core/test_scales.py::TestTemporal::test_label_formatter",
"tests/_core/test_scales.py::TestTemporal::test_label_concise",
"tests/_core/test_plot.py::TestScaling::test_mark_data_from_datetime",
"tests/_core/test_plot.py::TestPlotting::test_limits",
"tests/_core/test_plot.py::TestExceptions::test_coordinate_scaling",
"tests/_core/test_plot.py::TestPairInterface::test_non_cross_wrapping"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-70
|
1.0
|
{
"code": "diff --git b/seaborn/utils.py a/seaborn/utils.py\nindex 35b92317..98720ba3 100644\n--- b/seaborn/utils.py\n+++ a/seaborn/utils.py\n@@ -42,6 +42,17 @@ def ci_to_errsize(cis, heights):\n format as argument for plt.bar\n \n \"\"\"\n+ cis = np.atleast_2d(cis).reshape(2, -1)\n+ heights = np.atleast_1d(heights)\n+ errsize = []\n+ for i, (low, high) in enumerate(np.transpose(cis)):\n+ h = heights[i]\n+ elow = h - low\n+ ehigh = high - h\n+ errsize.append([elow, ehigh])\n+\n+ errsize = np.asarray(errsize).T\n+ return errsize\n \n \n def _draw_figure(fig):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/utils.py b/seaborn/utils.py\nindex 98720ba3..35b92317 100644\n--- a/seaborn/utils.py\n+++ b/seaborn/utils.py\n@@ -42,17 +42,6 @@ def ci_to_errsize(cis, heights):\n format as argument for plt.bar\n \n \"\"\"\n- cis = np.atleast_2d(cis).reshape(2, -1)\n- heights = np.atleast_1d(heights)\n- errsize = []\n- for i, (low, high) in enumerate(np.transpose(cis)):\n- h = heights[i]\n- elow = h - low\n- ehigh = high - h\n- errsize.append([elow, ehigh])\n-\n- errsize = np.asarray(errsize).T\n- return errsize\n \n \n def _draw_figure(fig):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/utils.py.\nHere is the description for the function:\ndef ci_to_errsize(cis, heights):\n \"\"\"Convert intervals to error arguments relative to plot heights.\n\n Parameters\n ----------\n cis : 2 x n sequence\n sequence of confidence interval limits\n heights : n sequence\n sequence of plot heights\n\n Returns\n -------\n errsize : 2 x n array\n sequence of error size relative to height values in correct\n format as argument for plt.bar\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_utils.py::test_ci_to_errsize"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-71
|
1.0
|
{
"code": "diff --git b/seaborn/utils.py a/seaborn/utils.py\nindex 2be6f4a4..98720ba3 100644\n--- b/seaborn/utils.py\n+++ a/seaborn/utils.py\n@@ -298,6 +298,82 @@ def despine(fig=None, ax=None, top=True, right=True, left=False,\n None\n \n \"\"\"\n+ # Get references to the axes we want\n+ if fig is None and ax is None:\n+ axes = plt.gcf().axes\n+ elif fig is not None:\n+ axes = fig.axes\n+ elif ax is not None:\n+ axes = [ax]\n+\n+ for ax_i in axes:\n+ for side in [\"top\", \"right\", \"left\", \"bottom\"]:\n+ # Toggle the spine objects\n+ is_visible = not locals()[side]\n+ ax_i.spines[side].set_visible(is_visible)\n+ if offset is not None and is_visible:\n+ try:\n+ val = offset.get(side, 0)\n+ except AttributeError:\n+ val = offset\n+ ax_i.spines[side].set_position(('outward', val))\n+\n+ # Potentially move the ticks\n+ if left and not right:\n+ maj_on = any(\n+ t.tick1line.get_visible()\n+ for t in ax_i.yaxis.majorTicks\n+ )\n+ min_on = any(\n+ t.tick1line.get_visible()\n+ for t in ax_i.yaxis.minorTicks\n+ )\n+ ax_i.yaxis.set_ticks_position(\"right\")\n+ for t in ax_i.yaxis.majorTicks:\n+ t.tick2line.set_visible(maj_on)\n+ for t in ax_i.yaxis.minorTicks:\n+ t.tick2line.set_visible(min_on)\n+\n+ if bottom and not top:\n+ maj_on = any(\n+ t.tick1line.get_visible()\n+ for t in ax_i.xaxis.majorTicks\n+ )\n+ min_on = any(\n+ t.tick1line.get_visible()\n+ for t in ax_i.xaxis.minorTicks\n+ )\n+ ax_i.xaxis.set_ticks_position(\"top\")\n+ for t in ax_i.xaxis.majorTicks:\n+ t.tick2line.set_visible(maj_on)\n+ for t in ax_i.xaxis.minorTicks:\n+ t.tick2line.set_visible(min_on)\n+\n+ if trim:\n+ # clip off the parts of the spines that extend past major ticks\n+ xticks = np.asarray(ax_i.get_xticks())\n+ if xticks.size:\n+ firsttick = np.compress(xticks >= min(ax_i.get_xlim()),\n+ xticks)[0]\n+ lasttick = np.compress(xticks <= max(ax_i.get_xlim()),\n+ xticks)[-1]\n+ ax_i.spines['bottom'].set_bounds(firsttick, lasttick)\n+ ax_i.spines['top'].set_bounds(firsttick, lasttick)\n+ newticks = xticks.compress(xticks <= lasttick)\n+ newticks = newticks.compress(newticks >= firsttick)\n+ ax_i.set_xticks(newticks)\n+\n+ yticks = np.asarray(ax_i.get_yticks())\n+ if yticks.size:\n+ firsttick = np.compress(yticks >= min(ax_i.get_ylim()),\n+ yticks)[0]\n+ lasttick = np.compress(yticks <= max(ax_i.get_ylim()),\n+ yticks)[-1]\n+ ax_i.spines['left'].set_bounds(firsttick, lasttick)\n+ ax_i.spines['right'].set_bounds(firsttick, lasttick)\n+ newticks = yticks.compress(yticks <= lasttick)\n+ newticks = newticks.compress(newticks >= firsttick)\n+ ax_i.set_yticks(newticks)\n \n \n def move_legend(obj, loc, **kwargs):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/utils.py b/seaborn/utils.py\nindex 98720ba3..2be6f4a4 100644\n--- a/seaborn/utils.py\n+++ b/seaborn/utils.py\n@@ -298,82 +298,6 @@ def despine(fig=None, ax=None, top=True, right=True, left=False,\n None\n \n \"\"\"\n- # Get references to the axes we want\n- if fig is None and ax is None:\n- axes = plt.gcf().axes\n- elif fig is not None:\n- axes = fig.axes\n- elif ax is not None:\n- axes = [ax]\n-\n- for ax_i in axes:\n- for side in [\"top\", \"right\", \"left\", \"bottom\"]:\n- # Toggle the spine objects\n- is_visible = not locals()[side]\n- ax_i.spines[side].set_visible(is_visible)\n- if offset is not None and is_visible:\n- try:\n- val = offset.get(side, 0)\n- except AttributeError:\n- val = offset\n- ax_i.spines[side].set_position(('outward', val))\n-\n- # Potentially move the ticks\n- if left and not right:\n- maj_on = any(\n- t.tick1line.get_visible()\n- for t in ax_i.yaxis.majorTicks\n- )\n- min_on = any(\n- t.tick1line.get_visible()\n- for t in ax_i.yaxis.minorTicks\n- )\n- ax_i.yaxis.set_ticks_position(\"right\")\n- for t in ax_i.yaxis.majorTicks:\n- t.tick2line.set_visible(maj_on)\n- for t in ax_i.yaxis.minorTicks:\n- t.tick2line.set_visible(min_on)\n-\n- if bottom and not top:\n- maj_on = any(\n- t.tick1line.get_visible()\n- for t in ax_i.xaxis.majorTicks\n- )\n- min_on = any(\n- t.tick1line.get_visible()\n- for t in ax_i.xaxis.minorTicks\n- )\n- ax_i.xaxis.set_ticks_position(\"top\")\n- for t in ax_i.xaxis.majorTicks:\n- t.tick2line.set_visible(maj_on)\n- for t in ax_i.xaxis.minorTicks:\n- t.tick2line.set_visible(min_on)\n-\n- if trim:\n- # clip off the parts of the spines that extend past major ticks\n- xticks = np.asarray(ax_i.get_xticks())\n- if xticks.size:\n- firsttick = np.compress(xticks >= min(ax_i.get_xlim()),\n- xticks)[0]\n- lasttick = np.compress(xticks <= max(ax_i.get_xlim()),\n- xticks)[-1]\n- ax_i.spines['bottom'].set_bounds(firsttick, lasttick)\n- ax_i.spines['top'].set_bounds(firsttick, lasttick)\n- newticks = xticks.compress(xticks <= lasttick)\n- newticks = newticks.compress(newticks >= firsttick)\n- ax_i.set_xticks(newticks)\n-\n- yticks = np.asarray(ax_i.get_yticks())\n- if yticks.size:\n- firsttick = np.compress(yticks >= min(ax_i.get_ylim()),\n- yticks)[0]\n- lasttick = np.compress(yticks <= max(ax_i.get_ylim()),\n- yticks)[-1]\n- ax_i.spines['left'].set_bounds(firsttick, lasttick)\n- ax_i.spines['right'].set_bounds(firsttick, lasttick)\n- newticks = yticks.compress(yticks <= lasttick)\n- newticks = newticks.compress(newticks >= firsttick)\n- ax_i.set_yticks(newticks)\n \n \n def move_legend(obj, loc, **kwargs):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/utils.py.\nHere is the description for the function:\ndef despine(fig=None, ax=None, top=True, right=True, left=False,\n bottom=False, offset=None, trim=False):\n \"\"\"Remove the top and right spines from plot(s).\n\n fig : matplotlib figure, optional\n Figure to despine all axes of, defaults to the current figure.\n ax : matplotlib axes, optional\n Specific axes object to despine. Ignored if fig is provided.\n top, right, left, bottom : boolean, optional\n If True, remove that spine.\n offset : int or dict, optional\n Absolute distance, in points, spines should be moved away\n from the axes (negative values move spines inward). A single value\n applies to all spines; a dict can be used to set offset values per\n side.\n trim : bool, optional\n If True, limit spines to the smallest and largest major tick\n on each non-despined axis.\n\n Returns\n -------\n None\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs0]",
"tests/test_axisgrid.py::TestFacetGrid::test_self_data",
"tests/test_matrix.py::TestHeatmap::test_default_colors",
"tests/test_axisgrid.py::TestFacetGrid::test_self_figure",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_simple",
"tests/test_matrix.py::TestHeatmap::test_custom_vlim_colors",
"tests/test_utils.py::TestSpineUtils::test_despine",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs1]",
"tests/test_utils.py::TestSpineUtils::test_despine_specific_axes",
"tests/test_matrix.py::TestHeatmap::test_custom_center_colors",
"tests/test_utils.py::TestSpineUtils::test_despine_with_offset",
"tests/test_axisgrid.py::TestFacetGrid::test_self_axes",
"tests/test_utils.py::TestSpineUtils::test_despine_side_specific_offset",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_complex",
"tests/test_utils.py::TestSpineUtils::test_despine_with_offset_specific_axes",
"tests/test_utils.py::TestSpineUtils::test_despine_trim_spines",
"tests/test_utils.py::TestSpineUtils::test_despine_trim_inverted",
"tests/test_matrix.py::TestHeatmap::test_explicit_none_norm",
"tests/test_utils.py::TestSpineUtils::test_despine_trim_noticks",
"tests/test_utils.py::TestSpineUtils::test_despine_trim_categorical",
"tests/test_utils.py::TestSpineUtils::test_despine_moved_ticks",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs2]",
"tests/test_matrix.py::TestHeatmap::test_heatmap_annotation",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[series]",
"tests/test_matrix.py::TestHeatmap::test_heatmap_annotation_overwrite_kws",
"tests/test_matrix.py::TestHeatmap::test_heatmap_annotation_with_mask",
"tests/test_utils.py::test_move_legend_grid_object",
"tests/test_axisgrid.py::TestFacetGrid::test_axes_array_size",
"tests/test_matrix.py::TestHeatmap::test_heatmap_annotation_mesh_colors",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[numpy]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs3]",
"tests/test_matrix.py::TestHeatmap::test_heatmap_annotation_other_data",
"tests/test_axisgrid.py::TestFacetGrid::test_single_axes",
"tests/test_matrix.py::TestHeatmap::test_heatmap_annotation_with_limited_ticklabels",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[list]",
"tests/test_matrix.py::TestHeatmap::test_heatmap_cbar",
"tests/test_axisgrid.py::TestFacetGrid::test_col_wrap",
"tests/test_matrix.py::TestHeatmap::test_heatmap_axes",
"tests/test_matrix.py::TestHeatmap::test_heatmap_ticklabel_rotation",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_wide",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_hues",
"tests/test_matrix.py::TestHeatmap::test_heatmap_inner_lines",
"tests/test_matrix.py::TestHeatmap::test_square_aspect",
"tests/test_matrix.py::TestHeatmap::test_cbar_ticks",
"tests/test_base.py::TestVectorPlotter::test_attach_facets",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_sizes",
"tests/test_axisgrid.py::TestFacetGrid::test_normal_axes",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_basic",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_styles",
"tests/test_axisgrid.py::TestFacetGrid::test_wrapped_axes",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_hue",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_identity_facets",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_markers",
"tests/test_axisgrid.py::TestFacetGrid::test_axes_dict",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_weighted_estimator",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_facets",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_marker_linewidths",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_stringy_numerics",
"tests/test_axisgrid.py::TestFacetGrid::test_figure_size",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facets",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_mixed_facets",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_legend",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_empty[catplot]",
"tests/test_base.py::TestVectorPlotter::test_attach_shared_axes",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_unshared_axis_labels",
"tests/test_axisgrid.py::TestFacetGrid::test_figure_size_with_legend",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_hue_col_nolegend",
"tests/test_base.py::TestVectorPlotter::test_get_axes_facets",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_data",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_scatter_kws",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_truncate[True]",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_data_missing_level",
"tests/test_axisgrid.py::TestFacetGrid::test_get_boolean_legend_data",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_truncate[False]",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_tuples",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_data",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_sharey",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_options",
"tests/test_relational.py::TestRelationalPlotter::test_facet_variable_collision",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_kws",
"tests/test_axisgrid.py::TestFacetGrid::test_legendout_with_colwrap",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_scatter_unused_variables",
"tests/test_relational.py::TestRelationalPlotter::test_ax_kwarg_removal",
"tests/test_relational.py::TestRelationalPlotter::test_legend_has_no_offset",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_tight_layout",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue",
"tests/test_axisgrid.py::TestFacetGrid::test_gridspec_kws",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_style",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue_and_style",
"tests/test_axisgrid.py::TestFacetGrid::test_gridspec_kws_col_wrap",
"tests/test_axisgrid.py::TestFacetGrid::test_data_generator",
"tests/test_axisgrid.py::TestFacetGrid::test_map",
"tests/test_axisgrid.py::TestFacetGrid::test_map_dataframe",
"tests/test_axisgrid.py::TestFacetGrid::test_set",
"tests/test_axisgrid.py::TestFacetGrid::test_set_titles",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs0]",
"tests/test_axisgrid.py::TestFacetGrid::test_set_titles_margin_titles",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs1]",
"tests/test_axisgrid.py::TestFacetGrid::test_set_ticklabels",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs2]",
"tests/test_axisgrid.py::TestFacetGrid::test_set_axis_labels",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs3]",
"tests/test_axisgrid.py::TestFacetGrid::test_axis_lims",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs5]",
"tests/test_axisgrid.py::TestFacetGrid::test_data_orders",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs6]",
"tests/test_axisgrid.py::TestFacetGrid::test_palette",
"tests/test_axisgrid.py::TestFacetGrid::test_hue_kws",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs7]",
"tests/test_axisgrid.py::TestFacetGrid::test_dropna",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs8]",
"tests/test_axisgrid.py::TestFacetGrid::test_categorical_column_missing_categories",
"tests/test_axisgrid.py::TestFacetGrid::test_categorical_warning",
"tests/test_axisgrid.py::TestFacetGrid::test_refline",
"tests/test_axisgrid.py::TestFacetGrid::test_apply",
"tests/test_axisgrid.py::TestFacetGrid::test_pipe",
"tests/test_axisgrid.py::TestFacetGrid::test_tick_params",
"tests/test_axisgrid.py::TestFacetGrid::test_data_interchange",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_with_col_unique_bins",
"tests/test_axisgrid.py::TestPairGrid::test_self_data",
"tests/test_axisgrid.py::TestPairGrid::test_ignore_datelike_data",
"tests/test_axisgrid.py::TestPairGrid::test_self_figure",
"tests/test_axisgrid.py::TestPairGrid::test_self_axes",
"tests/test_axisgrid.py::TestPairGrid::test_default_axes",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics0]",
"tests/test_axisgrid.py::TestPairGrid::test_specific_square_axes[vars0]",
"tests/test_axisgrid.py::TestPairGrid::test_specific_square_axes[vars1]",
"tests/test_axisgrid.py::TestPairGrid::test_remove_hue_from_default",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics1]",
"tests/test_axisgrid.py::TestPairGrid::test_specific_nonsquare_axes[x_vars0-y_vars0]",
"tests/test_axisgrid.py::TestPairGrid::test_specific_nonsquare_axes[x_vars1-z]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs0]",
"tests/test_axisgrid.py::TestPairGrid::test_specific_nonsquare_axes[x_vars2-y_vars2]",
"tests/test_axisgrid.py::TestPairGrid::test_corner",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics3]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs1]",
"tests/test_axisgrid.py::TestPairGrid::test_size",
"tests/test_axisgrid.py::TestPairGrid::test_map",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs2]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics4]",
"tests/test_axisgrid.py::TestPairGrid::test_map_nonsquare",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs3]",
"tests/test_axisgrid.py::TestPairGrid::test_map_lower",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs4]",
"tests/test_axisgrid.py::TestPairGrid::test_map_upper",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics5]",
"tests/test_axisgrid.py::TestPairGrid::test_map_mixed_funcsig",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs5]",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs6]",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_rectangular",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs7]",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_color",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics6]",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_palette",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs8]",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_and_offdiag",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs9]",
"tests/test_axisgrid.py::TestPairGrid::test_diag_sharey",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs10]",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_matplotlib",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs11]",
"tests/test_axisgrid.py::TestPairGrid::test_palette",
"tests/test_axisgrid.py::TestPairGrid::test_hue_kws",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs12]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics8]",
"tests/test_axisgrid.py::TestPairGrid::test_hue_order",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs13]",
"tests/test_axisgrid.py::TestPairGrid::test_hue_order_missing_level",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs14]",
"tests/test_axisgrid.py::TestPairGrid::test_hue_in_map",
"tests/test_axisgrid.py::TestPairGrid::test_nondefault_index",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics9]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs15]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs0]",
"tests/test_axisgrid.py::TestPairGrid::test_dropna[scatterplot]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs0]",
"tests/test_axisgrid.py::TestPairGrid::test_dropna[scatter]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs1]",
"tests/test_axisgrid.py::TestPairGrid::test_histplot_legend",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics10]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs2]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs3]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg_hue",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs3]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics11]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs4]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_diag_kde",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs5]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_kde",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs6]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_hist",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs7]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_markers",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs8]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_column_multiindex",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs9]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs10]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs11]",
"tests/test_axisgrid.py::TestPairGrid::test_legend",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs0]",
"tests/test_axisgrid.py::TestPairGrid::test_tick_params",
"tests/test_axisgrid.py::TestPairGrid::test_data_interchange",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs1]",
"tests/test_axisgrid.py::TestJointGrid::test_margin_grid_from_lists",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs2]",
"tests/test_axisgrid.py::TestJointGrid::test_margin_grid_from_arrays",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs3]",
"tests/test_axisgrid.py::TestJointGrid::test_margin_grid_from_series",
"tests/test_axisgrid.py::TestJointGrid::test_margin_grid_from_dataframe",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs4]",
"tests/test_axisgrid.py::TestJointGrid::test_margin_grid_axis_labels",
"tests/test_axisgrid.py::TestJointGrid::test_dropna",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs5]",
"tests/test_axisgrid.py::TestJointGrid::test_axlims",
"tests/test_axisgrid.py::TestJointGrid::test_marginal_ticks",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs6]",
"tests/test_axisgrid.py::TestJointGrid::test_bivariate_plot",
"tests/test_axisgrid.py::TestJointGrid::test_univariate_plot",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs7]",
"tests/test_axisgrid.py::TestJointGrid::test_univariate_plot_distplot",
"tests/test_axisgrid.py::TestJointGrid::test_univariate_plot_matplotlib",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs8]",
"tests/test_axisgrid.py::TestJointGrid::test_plot",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs9]",
"tests/test_axisgrid.py::TestJointGrid::test_space",
"tests/test_axisgrid.py::TestJointGrid::test_hue[True]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs0]",
"tests/test_axisgrid.py::TestJointGrid::test_hue[False]",
"tests/test_axisgrid.py::TestJointGrid::test_refline",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs1]",
"tests/test_axisgrid.py::TestJointPlot::test_scatter",
"tests/test_axisgrid.py::TestJointPlot::test_scatter_hue",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs2]",
"tests/test_axisgrid.py::TestJointPlot::test_reg",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs0]",
"tests/test_axisgrid.py::TestJointPlot::test_resid",
"tests/test_distributions.py::TestDisPlot::test_facets[col]",
"tests/test_axisgrid.py::TestJointPlot::test_hist",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs1]",
"tests/test_axisgrid.py::TestJointPlot::test_hex",
"tests/test_distributions.py::TestDisPlot::test_facets[row]",
"tests/test_axisgrid.py::TestJointPlot::test_kde",
"tests/test_axisgrid.py::TestJointPlot::test_kde_hue",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[dodge]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs2]",
"tests/test_axisgrid.py::TestJointPlot::test_color",
"tests/test_axisgrid.py::TestJointPlot::test_palette",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[stack]",
"tests/test_axisgrid.py::TestJointPlot::test_hex_customise",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs3]",
"tests/test_axisgrid.py::TestJointPlot::test_leaky_dict",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[fill]",
"tests/test_axisgrid.py::TestJointPlot::test_distplot_kwarg_warning",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs4]",
"tests/test_axisgrid.py::TestJointPlot::test_ax_warning",
"tests/test_distributions.py::TestDisPlot::test_ax_warning",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_array_faceting[col]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_array_faceting[row]",
"tests/test_distributions.py::TestDisPlot::test_legend",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_empty",
"tests/test_distributions.py::TestDisPlot::test_bivariate_ecdf_error",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_bivariate_kde_norm",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs9]",
"tests/test_distributions.py::TestDisPlot::test_bivariate_hist_norm",
"tests/test_distributions.py::TestDisPlot::test_facetgrid_data",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs10]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics0]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics1]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs11]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics2]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs12]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics3]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics4]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs13]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics5]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics6]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics7]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs14]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics8]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs15]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics9]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics10]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs16]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics11]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs20]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestCatPlot::test_facet_organization",
"tests/test_categorical.py::TestCatPlot::test_plot_elements",
"tests/test_categorical.py::TestCatPlot::test_bad_plot_kind_error",
"tests/test_categorical.py::TestCatPlot::test_plot_colors",
"tests/test_categorical.py::TestCatPlot::test_ax_kwarg_removal",
"tests/test_categorical.py::TestCatPlot::test_share_xy",
"tests/test_categorical.py::TestCatPlot::test_facetgrid_data",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[col]",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[row]",
"tests/test_categorical.py::TestCatPlot::test_invalid_kind",
"tests/test_categorical.py::TestCatPlot::test_legend_with_auto",
"tests/test_categorical.py::TestCatPlot::test_weights_warning"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-72
|
1.0
|
{
"code": "diff --git b/seaborn/utils.py a/seaborn/utils.py\nindex ec986525..98720ba3 100644\n--- b/seaborn/utils.py\n+++ a/seaborn/utils.py\n@@ -270,6 +270,8 @@ def get_color_cycle():\n List of matplotlib colors in the current cycle, or dark gray if\n the current color cycle is empty.\n \"\"\"\n+ cycler = mpl.rcParams['axes.prop_cycle']\n+ return cycler.by_key()['color'] if 'color' in cycler.keys else [\".15\"]\n \n \n def despine(fig=None, ax=None, top=True, right=True, left=False,\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/utils.py b/seaborn/utils.py\nindex 98720ba3..ec986525 100644\n--- a/seaborn/utils.py\n+++ b/seaborn/utils.py\n@@ -270,8 +270,6 @@ def get_color_cycle():\n List of matplotlib colors in the current cycle, or dark gray if\n the current color cycle is empty.\n \"\"\"\n- cycler = mpl.rcParams['axes.prop_cycle']\n- return cycler.by_key()['color'] if 'color' in cycler.keys else [\".15\"]\n \n \n def despine(fig=None, ax=None, top=True, right=True, left=False,\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/utils.py.\nHere is the description for the function:\ndef get_color_cycle():\n \"\"\"Return the list of colors in the current matplotlib color cycle\n\n Parameters\n ----------\n None\n\n Returns\n -------\n colors : list\n List of matplotlib colors in the current cycle, or dark gray if\n the current color cycle is empty.\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_axisgrid.py::TestFacetGrid::test_self_data",
"tests/test_base.py::TestHueMapping::test_plotter_default_init",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs0]",
"tests/_core/test_properties.py::TestColor::test_nominal_default_palette",
"tests/test_palettes.py::TestColorPalettes::test_current_palette",
"tests/test_rcmod.py::TestAxesStyle::test_set_with_palette",
"tests/_marks/test_dot.py::TestDot::test_simple",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_simple",
"tests/_marks/test_line.py::TestPath::test_shared_colors_mapped",
"tests/test_palettes.py::TestColorPalettes::test_palette_context",
"tests/test_palettes.py::TestColorPalettes::test_big_palette_context",
"tests/_core/test_properties.py::TestColor::test_nominal_default_palette_large",
"tests/_marks/test_text.py::TestText::test_mapped_properties",
"tests/test_base.py::TestHueMapping::test_plotter_customization",
"tests/test_axisgrid.py::TestFacetGrid::test_self_figure",
"tests/_marks/test_dot.py::TestDot::test_filled_unfilled_mix",
"tests/test_palettes.py::TestColorPalettes::test_html_repr",
"tests/_marks/test_dot.py::TestDot::test_missing_coordinate_data",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs1]",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[color]",
"tests/test_axisgrid.py::TestFacetGrid::test_self_axes",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_complex",
"tests/test_rcmod.py::TestPalette::test_set_palette",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[fill]",
"tests/test_base.py::TestHueMapping::test_hue_map_categorical",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[marker]",
"tests/_marks/test_dot.py::TestDot::test_missing_semantic_data[pointsize]",
"tests/_marks/test_dot.py::TestDots::test_simple",
"tests/_marks/test_bar.py::TestBar::test_mapped_properties",
"tests/_marks/test_dot.py::TestDots::test_set_color",
"tests/_marks/test_line.py::TestPath::test_separate_colors_mapped",
"tests/test_axisgrid.py::TestFacetGrid::test_axes_array_size",
"tests/_marks/test_dot.py::TestDots::test_map_color",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[series]",
"tests/test_utils.py::test_move_legend_grid_object",
"tests/_core/test_scales.py::TestNominal::test_color_defaults",
"tests/_marks/test_dot.py::TestDots::test_fill",
"tests/test_base.py::TestHueMapping::test_saturation",
"tests/_core/test_scales.py::TestNominal::test_color_numeric_data",
"tests/_marks/test_dot.py::TestDots::test_pointsize",
"tests/_core/test_scales.py::TestNominal::test_color_numeric_with_order_subset",
"tests/test_utils.py::test_move_legend_with_labels",
"tests/test_axisgrid.py::TestFacetGrid::test_single_axes",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs2]",
"tests/_marks/test_dot.py::TestDots::test_stroke",
"tests/_marks/test_dot.py::TestDots::test_filled_unfilled_mix",
"tests/_marks/test_bar.py::TestBars::test_mapped_color_direct_alpha",
"tests/test_distributions.py::TestRugPlot::test_wide_vs_long_data",
"tests/test_axisgrid.py::TestFacetGrid::test_col_wrap",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs3]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[numpy]",
"tests/test_axisgrid.py::TestFacetGrid::test_normal_axes",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[list]",
"tests/_core/test_scales.py::TestBoolean::test_color_defaults",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_wide",
"tests/test_axisgrid.py::TestFacetGrid::test_wrapped_axes",
"tests/_marks/test_line.py::TestPaths::test_mapped_properties",
"tests/test_distributions.py::TestRugPlot::test_rug_colors",
"tests/test_axisgrid.py::TestFacetGrid::test_axes_dict",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_hues",
"tests/test_axisgrid.py::TestFacetGrid::test_figure_size",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_sizes",
"tests/test_base.py::TestVectorPlotter::test_iter_data_quantitites",
"tests/test_axisgrid.py::TestFacetGrid::test_figure_size_with_legend",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_styles",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_data",
"tests/test_base.py::TestVectorPlotter::test_iter_data_keys",
"tests/_marks/test_line.py::TestRange::test_mapped_color",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_weighted_estimator",
"tests/test_base.py::TestVectorPlotter::test_iter_data_values",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_data_missing_level",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_basic",
"tests/test_axisgrid.py::TestFacetGrid::test_get_boolean_legend_data",
"tests/test_base.py::TestVectorPlotter::test_iter_data_reverse",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_stringy_numerics",
"tests/_marks/test_line.py::TestDash::test_xy_data_grouped",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_hue",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_tuples",
"tests/test_base.py::TestVectorPlotter::test_iter_data_dropna",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_legend",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_markers",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_marker_linewidths",
"tests/_core/test_plot.py::TestPlotting::test_single_split_multi_layer",
"tests/_marks/test_line.py::TestDash::test_mapped_properties",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_options",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_wide_vs_long_data",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_unshared_axis_labels",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facets",
"tests/test_axisgrid.py::TestFacetGrid::test_legendout_with_colwrap",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_hue_col_nolegend",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_data",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_tight_layout",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_scatter_kws",
"tests/_core/test_plot.py::TestPlotting::test_one_grouping_variable[color]",
"tests/test_axisgrid.py::TestFacetGrid::test_subplot_kws",
"tests/test_relational.py::TestRelationalPlotter::test_facet_variable_collision",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_truncate[True]",
"tests/test_base.py::TestVectorPlotter::test_attach_facets",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_truncate[False]",
"tests/test_axisgrid.py::TestFacetGrid::test_gridspec_kws",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_scatter_unused_variables",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_identity_facets",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[layer]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_empty[catplot]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_sharey",
"tests/test_axisgrid.py::TestFacetGrid::test_gridspec_kws_col_wrap",
"tests/test_relational.py::TestRelationalPlotter::test_ax_kwarg_removal",
"tests/_core/test_plot.py::TestPlotting::test_two_grouping_variables",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_kws",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_facets",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[stack]",
"tests/test_relational.py::TestRelationalPlotter::test_legend_has_no_offset",
"tests/test_axisgrid.py::TestFacetGrid::test_data_generator",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_mixed_facets",
"tests/test_axisgrid.py::TestFacetGrid::test_map",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_redundant_hue_backcompat",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_colors[fill]",
"tests/test_relational.py::TestRelationalPlotter::test_lineplot_2d_dashes",
"tests/test_base.py::TestVectorPlotter::test_attach_shared_axes",
"tests/test_axisgrid.py::TestFacetGrid::test_map_dataframe",
"tests/test_base.py::TestVectorPlotter::test_get_axes_single",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue",
"tests/test_categorical.py::TestStripPlot::test_labels_long[x]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_stacking",
"tests/test_axisgrid.py::TestFacetGrid::test_set",
"tests/test_base.py::TestVectorPlotter::test_get_axes_facets",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_style",
"tests/test_axisgrid.py::TestFacetGrid::test_set_titles",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_hue_filling",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue_and_style",
"tests/test_categorical.py::TestStripPlot::test_labels_long[y]",
"tests/test_axisgrid.py::TestFacetGrid::test_set_titles_margin_titles",
"tests/test_axisgrid.py::TestFacetGrid::test_set_ticklabels",
"tests/test_base.py::TestVectorPlotter::test_var_order",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_default[stack]",
"tests/test_categorical.py::TestStripPlot::test_labels_wide",
"tests/test_axisgrid.py::TestFacetGrid::test_set_axis_labels",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_default[fill]",
"tests/test_axisgrid.py::TestFacetGrid::test_axis_lims",
"tests/test_axisgrid.py::TestFacetGrid::test_data_orders",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[layer]",
"tests/test_categorical.py::TestStripPlot::test_labels_hue_order",
"tests/test_axisgrid.py::TestFacetGrid::test_palette",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[stack]",
"tests/test_axisgrid.py::TestFacetGrid::test_hue_kws",
"tests/test_axisgrid.py::TestFacetGrid::test_dropna",
"tests/test_categorical.py::TestStripPlot::test_redundant_hue_legend",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_fill_nondefault[fill]",
"tests/test_axisgrid.py::TestFacetGrid::test_categorical_column_missing_categories",
"tests/test_axisgrid.py::TestFacetGrid::test_categorical_warning",
"tests/test_axisgrid.py::TestFacetGrid::test_refline",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_multiple_argument_check",
"tests/test_axisgrid.py::TestFacetGrid::test_apply",
"tests/test_axisgrid.py::TestFacetGrid::test_pipe",
"tests/test_categorical.py::TestStripPlot::test_wide[h-dataframe]",
"tests/test_axisgrid.py::TestFacetGrid::test_tick_params",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_common_norm",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_categorical",
"tests/test_utils.py::test_get_color_cycle[cycler0-result0]",
"tests/test_axisgrid.py::TestFacetGrid::test_data_interchange",
"tests/test_utils.py::test_get_color_cycle[cycler1-result1]",
"tests/test_utils.py::test_get_color_cycle[cycler2-result2]",
"tests/test_categorical.py::TestStripPlot::test_wide[h-dict]",
"tests/test_utils.py::test_get_color_cycle[cycler3-result3]",
"tests/test_utils.py::test_get_color_cycle[cycler4-result4]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_common_grid",
"tests/test_utils.py::test_get_color_cycle[cycler5-result5]",
"tests/test_utils.py::test_get_color_cycle[cycler6-result6]",
"tests/test_axisgrid.py::TestPairGrid::test_self_data",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_style_same",
"tests/_core/test_plot.py::TestPlotting::test_labels_legend",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_style_diff",
"tests/test_categorical.py::TestStripPlot::test_wide[v-dataframe]",
"tests/test_axisgrid.py::TestPairGrid::test_ignore_datelike_data",
"tests/test_relational.py::TestLinePlotter::test_legend_hue_and_size_same",
"tests/test_axisgrid.py::TestPairGrid::test_self_figure",
"tests/test_categorical.py::TestStripPlot::test_wide[v-dict]",
"tests/test_axisgrid.py::TestPairGrid::test_self_axes",
"tests/test_categorical.py::TestStripPlot::test_wide[y-dataframe]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_log_scale_with_hue",
"tests/test_axisgrid.py::TestPairGrid::test_default_axes",
"tests/test_categorical.py::TestStripPlot::test_wide[y-dict]",
"tests/test_relational.py::TestLinePlotter::test_legend_value_error",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_sticky_edges",
"tests/test_axisgrid.py::TestPairGrid::test_specific_square_axes[vars0]",
"tests/test_categorical.py::TestStripPlot::test_wide[x-dataframe]",
"tests/test_axisgrid.py::TestPairGrid::test_specific_square_axes[vars1]",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_var[hue]",
"tests/test_axisgrid.py::TestPairGrid::test_remove_hue_from_default",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_legend",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_var[size]",
"tests/test_categorical.py::TestStripPlot::test_wide[x-dict]",
"tests/test_axisgrid.py::TestPairGrid::test_specific_nonsquare_axes[x_vars0-y_vars0]",
"tests/test_axisgrid.py::TestPairGrid::test_specific_nonsquare_axes[x_vars1-z]",
"tests/test_axisgrid.py::TestPairGrid::test_specific_nonsquare_axes[x_vars2-y_vars2]",
"tests/test_distributions.py::TestKDEPlotBivariate::test_fill_artists",
"tests/test_categorical.py::TestStripPlot::test_positions[variables2-None]",
"tests/test_axisgrid.py::TestPairGrid::test_corner",
"tests/test_distributions.py::TestKDEPlotBivariate::test_common_norm",
"tests/test_categorical.py::TestStripPlot::test_positions[variables3-None]",
"tests/test_axisgrid.py::TestPairGrid::test_size",
"tests/test_categorical.py::TestStripPlot::test_positions[variables4-None]",
"tests/test_relational.py::TestLinePlotter::test_plot",
"tests/test_axisgrid.py::TestPairGrid::test_map",
"tests/test_distributions.py::TestKDEPlotBivariate::test_weights",
"tests/test_axisgrid.py::TestPairGrid::test_map_nonsquare",
"tests/test_axisgrid.py::TestPairGrid::test_map_lower",
"tests/test_distributions.py::TestKDEPlotBivariate::test_hue_ignores_cmap",
"tests/test_axisgrid.py::TestPairGrid::test_map_upper",
"tests/test_axisgrid.py::TestPairGrid::test_map_mixed_funcsig",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables0]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_axes",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_hue",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables1]",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_rectangular",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_color",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_palette",
"tests/test_relational.py::TestLinePlotter::test_legend_attributes_with_hue_and_style",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics0]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_wide_vs_long_data",
"tests/test_categorical.py::TestStripPlot::test_hue_categorical[a]",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_and_offdiag",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics1]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[layer-bars]",
"tests/test_categorical.py::TestStripPlot::test_hue_categorical[b]",
"tests/_core/test_plot.py::TestLegend::test_single_layer_single_variable",
"tests/test_axisgrid.py::TestPairGrid::test_diag_sharey",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics2]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[layer-step]",
"tests/test_categorical.py::TestStripPlot::test_hue_dodged[a]",
"tests/test_axisgrid.py::TestPairGrid::test_map_diag_matplotlib",
"tests/_core/test_plot.py::TestLegend::test_single_layer_common_variable",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[layer-poly]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics3]",
"tests/_core/test_plot.py::TestLegend::test_single_layer_common_unnamed_variable",
"tests/test_categorical.py::TestStripPlot::test_hue_dodged[b]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[dodge-bars]",
"tests/test_axisgrid.py::TestPairGrid::test_palette",
"tests/test_axisgrid.py::TestPairGrid::test_hue_kws",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[dodge-step]",
"tests/_core/test_plot.py::TestLegend::test_single_layer_multi_variable",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics4]",
"tests/test_categorical.py::TestStripPlot::test_single[x-b-a]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[dodge-poly]",
"tests/test_axisgrid.py::TestPairGrid::test_hue_order",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics5]",
"tests/_core/test_plot.py::TestLegend::test_multi_layer_single_variable",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[stack-bars]",
"tests/test_categorical.py::TestStripPlot::test_single[x-y-a]",
"tests/test_axisgrid.py::TestPairGrid::test_hue_order_missing_level",
"tests/_core/test_plot.py::TestLegend::test_multi_layer_multi_variable",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[stack-step]",
"tests/test_axisgrid.py::TestPairGrid::test_hue_in_map",
"tests/_core/test_plot.py::TestLegend::test_multi_layer_different_artists",
"tests/test_categorical.py::TestStripPlot::test_single[x-t-a]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[stack-poly]",
"tests/test_axisgrid.py::TestPairGrid::test_nondefault_index",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics6]",
"tests/_core/test_plot.py::TestLegend::test_three_layers",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[fill-bars]",
"tests/test_axisgrid.py::TestPairGrid::test_dropna[scatterplot]",
"tests/test_categorical.py::TestStripPlot::test_single[y-b-a]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[fill-step]",
"tests/_core/test_plot.py::TestLegend::test_suppression_in_add_method",
"tests/test_axisgrid.py::TestPairGrid::test_dropna[scatter]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill_colors[fill-poly]",
"tests/test_categorical.py::TestStripPlot::test_single[y-y-a]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics7]",
"tests/_core/test_plot.py::TestLegend::test_anonymous_title",
"tests/test_axisgrid.py::TestPairGrid::test_histplot_legend",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_stack",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot",
"tests/test_categorical.py::TestStripPlot::test_single[y-t-a]",
"tests/_core/test_plot.py::TestLegend::test_legendless_mark",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_fill",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_dodge",
"tests/_core/test_plot.py::TestLegend::test_layer_legend_with_scale_legend",
"tests/test_categorical.py::TestStripPlot::test_legend_categorical",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics8]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg_hue",
"tests/test_distributions.py::TestHistPlotUnivariate::test_hue_as_numpy_dodged",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_diag_kde",
"tests/test_categorical.py::TestStripPlot::test_legend_attributes",
"tests/test_distributions.py::TestHistPlotUnivariate::test_density_stat_common_norm",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_kde",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics9]",
"tests/test_categorical.py::TestStripPlot::test_legend_disabled",
"tests/test_distributions.py::TestHistPlotUnivariate::test_density_stat_unique_norm",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_hist",
"tests/test_categorical.py::TestStripPlot::test_palette_from_color_deprecation",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_common_norm[probability]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_markers",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_common_norm[proportion]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics10]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics11]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_unique_norm[probability]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_column_multiindex",
"tests/test_relational.py::TestLinePlotter::test_lineplot_smoke",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs0]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_probability_stat_unique_norm[proportion]",
"tests/test_axisgrid.py::TestPairGrid::test_corner_despine",
"tests/test_axisgrid.py::TestPairGrid::test_corner_set",
"tests/test_distributions.py::TestHistPlotUnivariate::test_common_bins",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs1]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_unique_bins",
"tests/test_axisgrid.py::TestPairGrid::test_legend",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs2]",
"tests/test_axisgrid.py::TestPairGrid::test_tick_params",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs3]",
"tests/test_axisgrid.py::TestPairGrid::test_data_interchange",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[count-layer]",
"tests/test_relational.py::TestScatterPlotter::test_legend_hue",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs4]",
"tests/test_relational.py::TestScatterPlotter::test_legend_hue_style_same",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[count-dodge]",
"tests/test_relational.py::TestScatterPlotter::test_legend_hue_style_different",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[density-layer]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs5]",
"tests/test_relational.py::TestScatterPlotter::test_legend_data_hue_size_same",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[density-dodge]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs6]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[probability-layer]",
"tests/test_relational.py::TestScatterPlotter::test_legend_attributes_hue",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs7]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_with_hue[probability-dodge]",
"tests/test_relational.py::TestScatterPlotter::test_legend_attributes_hue_and_style",
"tests/test_distributions.py::TestHistPlotUnivariate::test_kde_hue",
"tests/test_relational.py::TestScatterPlotter::test_legend_value_error",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs8]",
"tests/test_relational.py::TestScatterPlotter::test_plot",
"tests/test_distributions.py::TestHistPlotUnivariate::test_element_default",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_axes",
"tests/test_categorical.py::TestSwarmPlot::test_labels_long[x]",
"tests/test_axisgrid.py::TestJointGrid::test_hue[True]",
"tests/test_categorical.py::TestSwarmPlot::test_labels_long[y]",
"tests/test_axisgrid.py::TestJointGrid::test_hue[False]",
"tests/test_relational.py::TestScatterPlotter::test_hue_order",
"tests/test_categorical.py::TestSwarmPlot::test_labels_wide",
"tests/test_categorical.py::TestSwarmPlot::test_labels_hue_order",
"tests/test_axisgrid.py::TestJointPlot::test_scatter_hue",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics0]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_log_scale_dodge",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics1]",
"tests/test_categorical.py::TestSwarmPlot::test_redundant_hue_legend",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics2]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics3]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics4]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics5]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics6]",
"tests/test_axisgrid.py::TestJointPlot::test_kde_hue",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics7]",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_with_hue",
"tests/test_categorical.py::TestSwarmPlot::test_wide[h-dataframe]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics8]",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_with_hue_unique_bins",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics9]",
"tests/test_axisgrid.py::TestJointPlot::test_palette",
"tests/test_categorical.py::TestSwarmPlot::test_wide[h-dict]",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_with_col_unique_bins",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics10]",
"tests/test_categorical.py::TestSwarmPlot::test_wide[v-dataframe]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics11]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_smoke",
"tests/test_categorical.py::TestSwarmPlot::test_wide[v-dict]",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_common_norm",
"tests/test_categorical.py::TestSwarmPlot::test_wide[y-dataframe]",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_unique_norm",
"tests/test_categorical.py::TestSwarmPlot::test_wide[y-dict]",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_colors",
"tests/test_categorical.py::TestSwarmPlot::test_wide[x-dataframe]",
"tests/test_distributions.py::TestHistPlotBivariate::test_hue_color_limits",
"tests/test_categorical.py::TestSwarmPlot::test_wide[x-dict]",
"tests/test_distributions.py::TestECDFPlotUnivariate::test_hue",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables2-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables3-None]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs0]",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables4-None]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs3]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs6]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables0]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs7]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs9]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs10]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs11]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs12]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs13]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_categorical[a]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs14]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs15]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_categorical[b]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs0]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_dodged[a]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs1]",
"tests/test_categorical.py::TestSwarmPlot::test_hue_dodged[b]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs3]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-b-a]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs5]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-y-a]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs7]",
"tests/test_categorical.py::TestSwarmPlot::test_single[x-t-a]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs9]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-b-a]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs10]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs11]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-y-a]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs0]",
"tests/test_categorical.py::TestSwarmPlot::test_single[y-t-a]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs2]",
"tests/test_categorical.py::TestSwarmPlot::test_legend_categorical",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs3]",
"tests/test_categorical.py::TestSwarmPlot::test_legend_attributes",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs5]",
"tests/test_categorical.py::TestSwarmPlot::test_legend_disabled",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs6]",
"tests/test_categorical.py::TestSwarmPlot::test_palette_from_color_deprecation",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs9]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs1]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_facets[col]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_facets[row]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[dodge]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs3]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[stack]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[fill]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_ax_warning",
"tests/test_distributions.py::TestDisPlot::test_array_faceting[col]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_array_faceting[row]",
"tests/test_distributions.py::TestDisPlot::test_legend",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_empty",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_bivariate_ecdf_error",
"tests/test_distributions.py::TestDisPlot::test_bivariate_kde_norm",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_bivariate_hist_norm",
"tests/test_distributions.py::TestDisPlot::test_facetgrid_data",
"tests/test_categorical.py::TestBoxPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestBoxPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestBoxPlot::test_legend_attributes",
"tests/test_categorical.py::TestBoxPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBoxPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBoxPlot::test_labels_wide",
"tests/test_categorical.py::TestBoxPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBoxPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBoxPlot::test_wide_data[h]",
"tests/test_categorical.py::TestBoxPlot::test_wide_data[v]",
"tests/test_categorical.py::TestBoxPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestBoxPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestBoxPlot::test_hue_not_dodged",
"tests/test_categorical.py::TestBoxPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestBoxPlot::test_dodge_native_scale_log",
"tests/test_categorical.py::TestBoxPlot::test_wide_data_multicolored",
"tests/test_categorical.py::TestBoxPlot::test_wide_data_single_color",
"tests/test_categorical.py::TestBoxPlot::test_hue_colors",
"tests/test_categorical.py::TestBoxPlot::test_gap",
"tests/test_categorical.py::TestBoxPlot::test_prop_dicts",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestBoxenPlot::test_legend_attributes",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBoxenPlot::test_labels_wide",
"tests/test_categorical.py::TestBoxenPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBoxenPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[h]",
"tests/test_categorical.py::TestBoxenPlot::test_wide_data[v]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestBoxenPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestBoxenPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestBoxenPlot::test_hue_colors",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_legend_fill[True]",
"tests/test_categorical.py::TestViolinPlot::test_legend_fill[False]",
"tests/test_categorical.py::TestViolinPlot::test_legend_attributes",
"tests/test_categorical.py::TestViolinPlot::test_labels_long[x]",
"tests/test_categorical.py::TestViolinPlot::test_labels_long[y]",
"tests/test_categorical.py::TestViolinPlot::test_labels_wide",
"tests/test_categorical.py::TestViolinPlot::test_labels_hue_order",
"tests/test_categorical.py::TestViolinPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestViolinPlot::test_wide_data[h]",
"tests/test_categorical.py::TestViolinPlot::test_wide_data[v]",
"tests/test_categorical.py::TestViolinPlot::test_hue_grouped[x]",
"tests/test_categorical.py::TestViolinPlot::test_hue_grouped[y]",
"tests/test_categorical.py::TestViolinPlot::test_hue_not_dodged",
"tests/test_categorical.py::TestViolinPlot::test_dodge_native_scale",
"tests/test_categorical.py::TestViolinPlot::test_dodge_native_scale_log",
"tests/test_categorical.py::TestViolinPlot::test_hue_colors",
"tests/test_categorical.py::TestViolinPlot::test_split_multi",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_area",
"tests/test_categorical.py::TestViolinPlot::test_density_norm_count",
"tests/test_categorical.py::TestViolinPlot::test_common_norm",
"tests/test_categorical.py::TestViolinPlot::test_scale_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_scale_hue_deprecation",
"tests/test_categorical.py::TestViolinPlot::test_gap",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestBarPlot::test_labels_long[x]",
"tests/test_categorical.py::TestBarPlot::test_labels_long[y]",
"tests/test_categorical.py::TestBarPlot::test_labels_wide",
"tests/test_categorical.py::TestBarPlot::test_labels_hue_order",
"tests/test_categorical.py::TestBarPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestBarPlot::test_wide_df[x]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[y]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[h]",
"tests/test_categorical.py::TestBarPlot::test_wide_df[v]",
"tests/test_categorical.py::TestBarPlot::test_hue_redundant",
"tests/test_categorical.py::TestBarPlot::test_hue_matched",
"tests/test_categorical.py::TestBarPlot::test_hue_matched_by_name",
"tests/test_categorical.py::TestBarPlot::test_hue_dodged",
"tests/test_categorical.py::TestBarPlot::test_gap",
"tests/test_categorical.py::TestBarPlot::test_hue_undodged",
"tests/test_categorical.py::TestBarPlot::test_hue_order",
"tests/test_categorical.py::TestBarPlot::test_fill",
"tests/test_categorical.py::TestBarPlot::test_native_scale_dodged",
"tests/test_categorical.py::TestBarPlot::test_native_scale_log_transform_dodged",
"tests/test_categorical.py::TestBarPlot::test_saturation_palette",
"tests/test_categorical.py::TestBarPlot::test_legend_disabled",
"tests/test_categorical.py::TestBarPlot::test_legend_attributes",
"tests/test_categorical.py::TestBarPlot::test_legend_unfilled",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestPointPlot::test_labels_long[x]",
"tests/test_categorical.py::TestPointPlot::test_labels_long[y]",
"tests/test_categorical.py::TestPointPlot::test_labels_wide",
"tests/test_categorical.py::TestPointPlot::test_labels_hue_order",
"tests/test_categorical.py::TestPointPlot::test_redundant_hue_legend",
"tests/test_categorical.py::TestPointPlot::test_wide_df[x]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[y]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[h]",
"tests/test_categorical.py::TestPointPlot::test_wide_df[v]",
"tests/test_categorical.py::TestPointPlot::test_hue",
"tests/test_categorical.py::TestPointPlot::test_wide_data_is_joined",
"tests/test_categorical.py::TestPointPlot::test_markers_linestyles_mapped",
"tests/test_categorical.py::TestPointPlot::test_dodge_boolean",
"tests/test_categorical.py::TestPointPlot::test_dodge_float",
"tests/test_categorical.py::TestPointPlot::test_dodge_log_scale",
"tests/test_categorical.py::TestPointPlot::test_legend_contents",
"tests/test_categorical.py::TestPointPlot::test_legend_set_props",
"tests/test_categorical.py::TestPointPlot::test_legend_synced_props",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs20]",
"tests/test_categorical.py::TestPointPlot::test_legend_disabled",
"tests/test_categorical.py::TestCountPlot::test_wide_data",
"tests/test_categorical.py::TestCountPlot::test_hue_redundant",
"tests/test_categorical.py::TestCountPlot::test_hue_dodged",
"tests/test_categorical.py::TestCountPlot::test_legend_disabled",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestCatPlot::test_facet_organization",
"tests/test_categorical.py::TestCatPlot::test_plot_elements",
"tests/test_categorical.py::TestCatPlot::test_bad_plot_kind_error",
"tests/test_categorical.py::TestCatPlot::test_plot_colors",
"tests/test_categorical.py::TestCatPlot::test_ax_kwarg_removal",
"tests/test_categorical.py::TestCatPlot::test_share_xy",
"tests/test_categorical.py::TestCatPlot::test_facetgrid_data",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[col]",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[row]",
"tests/test_categorical.py::TestCatPlot::test_invalid_kind",
"tests/test_categorical.py::TestCatPlot::test_legend_with_auto",
"tests/test_categorical.py::TestCatPlot::test_weights_warning"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-73
|
1.0
|
{
"code": "diff --git b/seaborn/utils.py a/seaborn/utils.py\nindex 4c3933fc..98720ba3 100644\n--- b/seaborn/utils.py\n+++ a/seaborn/utils.py\n@@ -404,6 +404,75 @@ def move_legend(obj, loc, **kwargs):\n .. include:: ../docstrings/move_legend.rst\n \n \"\"\"\n+ # This is a somewhat hackish solution that will hopefully be obviated by\n+ # upstream improvements to matplotlib legends that make them easier to\n+ # modify after creation.\n+\n+ from seaborn.axisgrid import Grid # Avoid circular import\n+\n+ # Locate the legend object and a method to recreate the legend\n+ if isinstance(obj, Grid):\n+ old_legend = obj.legend\n+ legend_func = obj.figure.legend\n+ elif isinstance(obj, mpl.axes.Axes):\n+ old_legend = obj.legend_\n+ legend_func = obj.legend\n+ elif isinstance(obj, mpl.figure.Figure):\n+ if obj.legends:\n+ old_legend = obj.legends[-1]\n+ else:\n+ old_legend = None\n+ legend_func = obj.legend\n+ else:\n+ err = \"`obj` must be a seaborn Grid or matplotlib Axes or Figure instance.\"\n+ raise TypeError(err)\n+\n+ if old_legend is None:\n+ err = f\"{obj} has no legend attached.\"\n+ raise ValueError(err)\n+\n+ # Extract the components of the legend we need to reuse\n+ # Import here to avoid a circular import\n+ from seaborn._compat import get_legend_handles\n+ handles = get_legend_handles(old_legend)\n+ labels = [t.get_text() for t in old_legend.get_texts()]\n+\n+ # Handle the case where the user is trying to override the labels\n+ if (new_labels := kwargs.pop(\"labels\", None)) is not None:\n+ if len(new_labels) != len(labels):\n+ err = \"Length of new labels does not match existing legend.\"\n+ raise ValueError(err)\n+ labels = new_labels\n+\n+ # Extract legend properties that can be passed to the recreation method\n+ # (Vexingly, these don't all round-trip)\n+ legend_kws = inspect.signature(mpl.legend.Legend).parameters\n+ props = {k: v for k, v in old_legend.properties().items() if k in legend_kws}\n+\n+ # Delegate default bbox_to_anchor rules to matplotlib\n+ props.pop(\"bbox_to_anchor\")\n+\n+ # Try to propagate the existing title and font properties; respect new ones too\n+ title = props.pop(\"title\")\n+ if \"title\" in kwargs:\n+ title.set_text(kwargs.pop(\"title\"))\n+ title_kwargs = {k: v for k, v in kwargs.items() if k.startswith(\"title_\")}\n+ for key, val in title_kwargs.items():\n+ title.set(**{key[6:]: val})\n+ kwargs.pop(key)\n+\n+ # Try to respect the frame visibility\n+ kwargs.setdefault(\"frameon\", old_legend.legendPatch.get_visible())\n+\n+ # Remove the old legend and create the new one\n+ props.update(kwargs)\n+ old_legend.remove()\n+ new_legend = legend_func(handles, labels, loc=loc, **props)\n+ new_legend.set_title(title.get_text(), title.get_fontproperties())\n+\n+ # Let the Grid object continue to track the correct legend object\n+ if isinstance(obj, Grid):\n+ obj._legend = new_legend\n \n \n def _kde_support(data, bw, gridsize, cut, clip):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/utils.py b/seaborn/utils.py\nindex 98720ba3..4c3933fc 100644\n--- a/seaborn/utils.py\n+++ b/seaborn/utils.py\n@@ -404,75 +404,6 @@ def move_legend(obj, loc, **kwargs):\n .. include:: ../docstrings/move_legend.rst\n \n \"\"\"\n- # This is a somewhat hackish solution that will hopefully be obviated by\n- # upstream improvements to matplotlib legends that make them easier to\n- # modify after creation.\n-\n- from seaborn.axisgrid import Grid # Avoid circular import\n-\n- # Locate the legend object and a method to recreate the legend\n- if isinstance(obj, Grid):\n- old_legend = obj.legend\n- legend_func = obj.figure.legend\n- elif isinstance(obj, mpl.axes.Axes):\n- old_legend = obj.legend_\n- legend_func = obj.legend\n- elif isinstance(obj, mpl.figure.Figure):\n- if obj.legends:\n- old_legend = obj.legends[-1]\n- else:\n- old_legend = None\n- legend_func = obj.legend\n- else:\n- err = \"`obj` must be a seaborn Grid or matplotlib Axes or Figure instance.\"\n- raise TypeError(err)\n-\n- if old_legend is None:\n- err = f\"{obj} has no legend attached.\"\n- raise ValueError(err)\n-\n- # Extract the components of the legend we need to reuse\n- # Import here to avoid a circular import\n- from seaborn._compat import get_legend_handles\n- handles = get_legend_handles(old_legend)\n- labels = [t.get_text() for t in old_legend.get_texts()]\n-\n- # Handle the case where the user is trying to override the labels\n- if (new_labels := kwargs.pop(\"labels\", None)) is not None:\n- if len(new_labels) != len(labels):\n- err = \"Length of new labels does not match existing legend.\"\n- raise ValueError(err)\n- labels = new_labels\n-\n- # Extract legend properties that can be passed to the recreation method\n- # (Vexingly, these don't all round-trip)\n- legend_kws = inspect.signature(mpl.legend.Legend).parameters\n- props = {k: v for k, v in old_legend.properties().items() if k in legend_kws}\n-\n- # Delegate default bbox_to_anchor rules to matplotlib\n- props.pop(\"bbox_to_anchor\")\n-\n- # Try to propagate the existing title and font properties; respect new ones too\n- title = props.pop(\"title\")\n- if \"title\" in kwargs:\n- title.set_text(kwargs.pop(\"title\"))\n- title_kwargs = {k: v for k, v in kwargs.items() if k.startswith(\"title_\")}\n- for key, val in title_kwargs.items():\n- title.set(**{key[6:]: val})\n- kwargs.pop(key)\n-\n- # Try to respect the frame visibility\n- kwargs.setdefault(\"frameon\", old_legend.legendPatch.get_visible())\n-\n- # Remove the old legend and create the new one\n- props.update(kwargs)\n- old_legend.remove()\n- new_legend = legend_func(handles, labels, loc=loc, **props)\n- new_legend.set_title(title.get_text(), title.get_fontproperties())\n-\n- # Let the Grid object continue to track the correct legend object\n- if isinstance(obj, Grid):\n- obj._legend = new_legend\n \n \n def _kde_support(data, bw, gridsize, cut, clip):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/utils.py.\nHere is the description for the function:\ndef move_legend(obj, loc, **kwargs):\n \"\"\"\n Recreate a plot's legend at a new location.\n\n The name is a slight misnomer. Matplotlib legends do not expose public\n control over their position parameters. So this function creates a new legend,\n copying over the data from the original object, which is then removed.\n\n Parameters\n ----------\n obj : the object with the plot\n This argument can be either a seaborn or matplotlib object:\n\n - :class:`seaborn.FacetGrid` or :class:`seaborn.PairGrid`\n - :class:`matplotlib.axes.Axes` or :class:`matplotlib.figure.Figure`\n\n loc : str or int\n Location argument, as in :meth:`matplotlib.axes.Axes.legend`.\n\n kwargs\n Other keyword arguments are passed to :meth:`matplotlib.axes.Axes.legend`.\n\n Examples\n --------\n\n .. include:: ../docstrings/move_legend.rst\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_utils.py::test_move_legend_matplotlib_objects",
"tests/test_utils.py::test_move_legend_grid_object",
"tests/test_utils.py::test_move_legend_input_checks",
"tests/test_utils.py::test_move_legend_with_labels"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-74
|
1.0
|
{
"code": "diff --git b/seaborn/utils.py a/seaborn/utils.py\nindex 78f182f1..98720ba3 100644\n--- b/seaborn/utils.py\n+++ a/seaborn/utils.py\n@@ -254,6 +254,7 @@ def remove_na(vector):\n Vector of data with null values removed. May be a copy or a view.\n \n \"\"\"\n+ return vector[pd.notnull(vector)]\n \n \n def get_color_cycle():\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/utils.py b/seaborn/utils.py\nindex 98720ba3..78f182f1 100644\n--- a/seaborn/utils.py\n+++ b/seaborn/utils.py\n@@ -254,7 +254,6 @@ def remove_na(vector):\n Vector of data with null values removed. May be a copy or a view.\n \n \"\"\"\n- return vector[pd.notnull(vector)]\n \n \n def get_color_cycle():\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/utils.py.\nHere is the description for the function:\ndef remove_na(vector):\n \"\"\"Helper method for removing null values from data vectors.\n\n Parameters\n ----------\n vector : vector object\n Must implement boolean masking with [] subscript syntax.\n\n Returns\n -------\n clean_clean : same type as ``vector``\n Vector of data with null values removed. May be a copy or a view.\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_distributions.py::TestDistPlot::test_hist_bins",
"tests/test_base.py::TestHueMapping::test_hue_map_categorical",
"tests/test_distributions.py::TestDistPlot::test_elements",
"tests/test_base.py::TestHueMapping::test_hue_map_numeric",
"tests/test_distributions.py::TestDistPlot::test_distplot_with_nans",
"tests/test_base.py::TestSizeMapping::test_map_size_numeric",
"tests/test_base.py::TestSizeMapping::test_array_palette_deprecation",
"tests/test_base.py::TestVectorPlotter::test_iter_data_quantitites",
"tests/test_base.py::TestVectorPlotter::test_iter_data_keys",
"tests/test_base.py::TestVectorPlotter::test_iter_data_values",
"tests/test_categorical.py::TestStripPlot::test_positions[variables5-None]",
"tests/test_distributions.py::TestKDEPlotUnivariate::test_weight_norm",
"tests/test_categorical.py::TestStripPlot::test_positions_dodged[variables2]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[series]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[numpy]",
"tests/test_utils.py::test_remove_na",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[list]",
"tests/test_categorical.py::TestStripPlot::test_legend_numeric",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs4]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_legend",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs6]",
"tests/test_distributions.py::TestHistPlotUnivariate::test_weight_norm",
"tests/test_relational.py::TestRelationalPlotter::test_legend_has_no_offset",
"tests/test_categorical.py::TestSwarmPlot::test_positions[variables5-None]",
"tests/test_categorical.py::TestSwarmPlot::test_positions_dodged[variables2]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_full[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_full[size]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_brief[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_numerical_brief[size]",
"tests/test_relational.py::TestLinePlotter::test_legend_log_norm[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_log_norm[size]",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_numberic_brief[hue]",
"tests/test_relational.py::TestLinePlotter::test_legend_binary_numberic_brief[size]",
"tests/test_categorical.py::TestSwarmPlot::test_legend_numeric",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs6]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics3]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics7]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics8]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs9]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_smoke",
"tests/test_categorical.py::TestBoxenPlot::test_gap",
"tests/test_categorical.py::TestBoxenPlot::test_fill",
"tests/test_relational.py::TestScatterPlotter::test_legend_size_numeric_list",
"tests/test_relational.py::TestScatterPlotter::test_legend_size_numeric_dict",
"tests/test_relational.py::TestScatterPlotter::test_legend_numeric_hue_full",
"tests/test_relational.py::TestScatterPlotter::test_legend_numeric_hue_brief",
"tests/test_relational.py::TestScatterPlotter::test_legend_numeric_size_full",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs9]",
"tests/test_relational.py::TestScatterPlotter::test_legend_numeric_size_brief",
"tests/test_relational.py::TestScatterPlotter::test_size_norm_extrapolation",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics3]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics7]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics8]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_smoke",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBarPlot::test_hue_norm",
"tests/test_categorical.py::TestBarPlot::test_legend_numeric_auto",
"tests/test_categorical.py::TestBarPlot::test_legend_numeric_full",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs9]",
"tests/test_axisgrid.py::TestJointGrid::test_univariate_plot_distplot",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestCountPlot::test_legend_numeric_auto",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs10]"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-75
|
1.0
|
{
"code": "diff --git b/seaborn/utils.py a/seaborn/utils.py\nindex ff55ce41..98720ba3 100644\n--- b/seaborn/utils.py\n+++ a/seaborn/utils.py\n@@ -197,6 +197,7 @@ def saturate(color):\n saturated color code in RGB tuple representation\n \n \"\"\"\n+ return set_hls_values(color, s=1)\n \n \n def set_hls_values(color, h=None, l=None, s=None): # noqa\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/utils.py b/seaborn/utils.py\nindex 98720ba3..ff55ce41 100644\n--- a/seaborn/utils.py\n+++ b/seaborn/utils.py\n@@ -197,7 +197,6 @@ def saturate(color):\n saturated color code in RGB tuple representation\n \n \"\"\"\n- return set_hls_values(color, s=1)\n \n \n def set_hls_values(color, h=None, l=None, s=None): # noqa\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/utils.py.\nHere is the description for the function:\ndef saturate(color):\n \"\"\"Return a fully saturated color with the same hue.\n\n Parameters\n ----------\n color : matplotlib color\n hex, rgb-tuple, or html color name\n\n Returns\n -------\n new_color : rgb tuple\n saturated color code in RGB tuple representation\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_utils.py::test_saturate"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-76
|
1.0
|
{
"code": "diff --git b/seaborn/utils.py a/seaborn/utils.py\nindex e8054081..98720ba3 100644\n--- b/seaborn/utils.py\n+++ a/seaborn/utils.py\n@@ -216,6 +216,15 @@ def set_hls_values(color, h=None, l=None, s=None): # noqa\n new color code in RGB tuple representation\n \n \"\"\"\n+ # Get an RGB tuple representation\n+ rgb = to_rgb(color)\n+ vals = list(colorsys.rgb_to_hls(*rgb))\n+ for i, val in enumerate([h, l, s]):\n+ if val is not None:\n+ vals[i] = val\n+\n+ rgb = colorsys.hls_to_rgb(*vals)\n+ return rgb\n \n \n def axlabel(xlabel, ylabel, **kwargs):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/utils.py b/seaborn/utils.py\nindex 98720ba3..e8054081 100644\n--- a/seaborn/utils.py\n+++ b/seaborn/utils.py\n@@ -216,15 +216,6 @@ def set_hls_values(color, h=None, l=None, s=None): # noqa\n new color code in RGB tuple representation\n \n \"\"\"\n- # Get an RGB tuple representation\n- rgb = to_rgb(color)\n- vals = list(colorsys.rgb_to_hls(*rgb))\n- for i, val in enumerate([h, l, s]):\n- if val is not None:\n- vals[i] = val\n-\n- rgb = colorsys.hls_to_rgb(*vals)\n- return rgb\n \n \n def axlabel(xlabel, ylabel, **kwargs):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/utils.py.\nHere is the description for the function:\ndef set_hls_values(color, h=None, l=None, s=None): # noqa\n \"\"\"Independently manipulate the h, l, or s channels of a color.\n\n Parameters\n ----------\n color : matplotlib color\n hex, rgb-tuple, or html color name\n h, l, s : floats between 0 and 1, or None\n new values for each channel in hls space\n\n Returns\n -------\n new_color : rgb tuple\n new color code in RGB tuple representation\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_utils.py::test_saturate",
"tests/test_axisgrid.py::TestJointPlot::test_scatter",
"tests/test_axisgrid.py::TestJointPlot::test_scatter_hue",
"tests/test_axisgrid.py::TestJointPlot::test_reg",
"tests/test_axisgrid.py::TestJointPlot::test_resid",
"tests/test_axisgrid.py::TestJointPlot::test_hist",
"tests/test_axisgrid.py::TestJointPlot::test_hex",
"tests/test_axisgrid.py::TestJointPlot::test_kde",
"tests/test_axisgrid.py::TestJointPlot::test_kde_hue",
"tests/test_axisgrid.py::TestJointPlot::test_color",
"tests/test_axisgrid.py::TestJointPlot::test_palette",
"tests/test_axisgrid.py::TestJointPlot::test_hex_customise",
"tests/test_axisgrid.py::TestJointPlot::test_leaky_dict",
"tests/test_axisgrid.py::TestJointPlot::test_distplot_kwarg_warning",
"tests/test_axisgrid.py::TestJointPlot::test_ax_warning"
],
"PASS_TO_PASS": null
}
|
mwaskom__seaborn-77
|
1.0
|
{
"code": "diff --git b/seaborn/utils.py a/seaborn/utils.py\nindex 9593d7c2..98720ba3 100644\n--- b/seaborn/utils.py\n+++ a/seaborn/utils.py\n@@ -739,6 +739,12 @@ def to_utf8(obj):\n UTF-8-decoded string representation of ``obj``\n \n \"\"\"\n+ if isinstance(obj, str):\n+ return obj\n+ try:\n+ return obj.decode(encoding=\"utf-8\")\n+ except AttributeError: # obj is not bytes-like\n+ return str(obj)\n \n \n def _check_argument(param, options, value, prefix=False):\n",
"test": null
}
| null |
{
"code": "diff --git a/seaborn/utils.py b/seaborn/utils.py\nindex 98720ba3..9593d7c2 100644\n--- a/seaborn/utils.py\n+++ b/seaborn/utils.py\n@@ -739,12 +739,6 @@ def to_utf8(obj):\n UTF-8-decoded string representation of ``obj``\n \n \"\"\"\n- if isinstance(obj, str):\n- return obj\n- try:\n- return obj.decode(encoding=\"utf-8\")\n- except AttributeError: # obj is not bytes-like\n- return str(obj)\n \n \n def _check_argument(param, options, value, prefix=False):\n",
"test": null
}
| null |
mwaskom/seaborn
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
2024-07-22T07:32:48-04:00
| null | null |
{
"code": "I want to add a new function in file in seaborn/utils.py.\nHere is the description for the function:\ndef to_utf8(obj):\n \"\"\"Return a string representing a Python object.\n\n Strings (i.e. type ``str``) are returned unchanged.\n\n Byte strings (i.e. type ``bytes``) are returned as UTF-8-decoded strings.\n\n For other objects, the method ``__str__()`` is called, and the result is\n returned as a string.\n\n Parameters\n ----------\n obj : object\n Any Python object\n\n Returns\n -------\n s : str\n UTF-8-decoded string representation of ``obj``\n\n \"\"\"\n",
"test": null
}
|
b4e5f8d261d6d5524a00b7dd35e00a40e4855872
|
{
"FAIL_TO_PASS": [
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs0]",
"tests/test_axisgrid.py::TestFacetGrid::test_self_data",
"tests/test_utils.py::test_to_utf8[a-a0]",
"tests/test_matrix.py::TestHeatmap::test_df_multindex_input",
"tests/test_utils.py::test_to_utf8[abc-abc0]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_simple",
"tests/test_utils.py::test_to_utf8[a-a1]",
"tests/test_utils.py::test_to_utf8[abc-abc1]",
"tests/test_axisgrid.py::TestFacetGrid::test_self_figure",
"tests/test_utils.py::test_to_utf8[s4-abc]",
"tests/test_utils.py::test_to_utf8[s5-]",
"tests/test_utils.py::test_to_utf8[1-1]",
"tests/test_utils.py::test_to_utf8[0-0]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_complex",
"tests/test_utils.py::test_to_utf8[s8-[]]",
"tests/test_axisgrid.py::TestFacetGrid::test_self_axes",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs1]",
"tests/test_axisgrid.py::TestFacetGrid::test_axes_array_size",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[series]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs2]",
"tests/test_axisgrid.py::TestFacetGrid::test_single_axes",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[numpy]",
"tests/test_axisgrid.py::TestFacetGrid::test_col_wrap",
"tests/test_utils.py::test_move_legend_grid_object",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_vectors[list]",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_axis_labels[catplot-kwargs3]",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_wide",
"tests/test_axisgrid.py::TestFacetGrid::test_normal_axes",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_hues",
"tests/test_axisgrid.py::TestFacetGrid::test_wrapped_axes",
"tests/test_axisgrid.py::TestFacetGrid::test_axes_dict",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_sizes",
"tests/test_axisgrid.py::TestFacetGrid::test_figure_size",
"tests/test_base.py::TestVectorPlotter::test_attach_facets",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_styles",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_basic",
"tests/test_axisgrid.py::TestFacetGrid::test_figure_size_with_legend",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_weighted_estimator",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_hue",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_identity_facets",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_data",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_stringy_numerics",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_markers",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_facets",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_data_missing_level",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_marker_linewidths",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_legend",
"tests/test_axisgrid.py::TestFacetGrid::test_get_boolean_legend_data",
"tests/test_base.py::TestVectorPlotter::test_scale_transform_mixed_facets",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facets",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_unshared_axis_labels",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_tuples",
"tests/test_base.py::TestVectorPlotter::test_attach_shared_axes",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_hue_col_nolegend",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_options",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_scatter_kws",
"tests/test_base.py::TestVectorPlotter::test_get_axes_facets",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_data",
"tests/test_axisgrid.py::TestFacetGrid::test_legendout_with_colwrap",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_truncate[True]",
"tests/test_relational.py::TestRelationalPlotter::test_facet_variable_collision",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_truncate[False]",
"tests/test_axisgrid.py::TestFacetGrid::test_legend_tight_layout",
"tests/test_categorical.py::TestCategoricalPlotterNew::test_empty[catplot]",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_sharey",
"tests/test_relational.py::TestRelationalPlotter::test_relplot_scatter_unused_variables",
"tests/test_axisgrid.py::TestFacetGrid::test_subplot_kws",
"tests/test_regression.py::TestRegressionPlots::test_lmplot_facet_kws",
"tests/test_relational.py::TestRelationalPlotter::test_ax_kwarg_removal",
"tests/test_axisgrid.py::TestFacetGrid::test_gridspec_kws",
"tests/test_relational.py::TestRelationalPlotter::test_legend_has_no_offset",
"tests/test_axisgrid.py::TestFacetGrid::test_gridspec_kws_col_wrap",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue",
"tests/test_axisgrid.py::TestFacetGrid::test_data_generator",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_style",
"tests/test_axisgrid.py::TestFacetGrid::test_map",
"tests/test_relational.py::TestRelationalPlotter::test_legend_attributes_hue_and_style",
"tests/test_axisgrid.py::TestFacetGrid::test_map_dataframe",
"tests/test_axisgrid.py::TestFacetGrid::test_set",
"tests/test_axisgrid.py::TestFacetGrid::test_set_titles",
"tests/test_axisgrid.py::TestFacetGrid::test_set_titles_margin_titles",
"tests/test_axisgrid.py::TestFacetGrid::test_set_ticklabels",
"tests/test_axisgrid.py::TestFacetGrid::test_set_axis_labels",
"tests/test_axisgrid.py::TestFacetGrid::test_axis_lims",
"tests/test_axisgrid.py::TestFacetGrid::test_data_orders",
"tests/test_axisgrid.py::TestFacetGrid::test_palette",
"tests/test_axisgrid.py::TestFacetGrid::test_hue_kws",
"tests/test_axisgrid.py::TestFacetGrid::test_dropna",
"tests/test_axisgrid.py::TestFacetGrid::test_categorical_column_missing_categories",
"tests/test_axisgrid.py::TestFacetGrid::test_categorical_warning",
"tests/test_axisgrid.py::TestFacetGrid::test_refline",
"tests/test_axisgrid.py::TestFacetGrid::test_apply",
"tests/test_axisgrid.py::TestFacetGrid::test_pipe",
"tests/test_axisgrid.py::TestFacetGrid::test_tick_params",
"tests/test_axisgrid.py::TestFacetGrid::test_data_interchange",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestStripPlot::test_vs_catplot[kwargs8]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics0]",
"tests/test_distributions.py::TestHistPlotBivariate::test_mesh_with_col_unique_bins",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics1]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics2]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics3]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs0]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs2]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs3]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs4]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs7]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs9]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs10]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics9]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs11]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs12]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics10]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs13]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs14]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_histplot[kwargs15]",
"tests/test_relational.py::TestLinePlotter::test_lineplot_vs_relplot[long_semantics11]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs1]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs3]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs3]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs4]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs5]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs7]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs9]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs10]",
"tests/test_categorical.py::TestSwarmPlot::test_vs_catplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_kdeplot[kwargs11]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs3]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs7]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs8]",
"tests/test_distributions.py::TestDisPlot::test_versus_single_ecdfplot[kwargs9]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_with_rug[kwargs2]",
"tests/test_distributions.py::TestDisPlot::test_facets[col]",
"tests/test_distributions.py::TestDisPlot::test_facets[row]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs0]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[dodge]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs1]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[stack]",
"tests/test_distributions.py::TestDisPlot::test_facet_multiple[fill]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs2]",
"tests/test_axisgrid.py::TestPairGrid::test_histplot_legend",
"tests/test_distributions.py::TestDisPlot::test_ax_warning",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs3]",
"tests/test_distributions.py::TestDisPlot::test_array_faceting[col]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot",
"tests/test_distributions.py::TestDisPlot::test_array_faceting[row]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs4]",
"tests/test_distributions.py::TestDisPlot::test_legend",
"tests/test_distributions.py::TestDisPlot::test_empty",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs5]",
"tests/test_distributions.py::TestDisPlot::test_bivariate_ecdf_error",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs6]",
"tests/test_distributions.py::TestDisPlot::test_bivariate_kde_norm",
"tests/test_distributions.py::TestDisPlot::test_bivariate_hist_norm",
"tests/test_distributions.py::TestDisPlot::test_facetgrid_data",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs9]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics0]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_reg_hue",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs10]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics1]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics2]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs11]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics3]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics4]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs12]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics5]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics6]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs13]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics7]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics8]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs14]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics9]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics10]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs15]",
"tests/test_relational.py::TestScatterPlotter::test_scatterplot_vs_relplot[long_semantics11]",
"tests/test_categorical.py::TestBoxPlot::test_vs_catplot[kwargs16]",
"tests/test_axisgrid.py::TestPairGrid::test_pairplot_markers",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs1]",
"tests/test_axisgrid.py::TestPairGrid::test_legend",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestBoxenPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestViolinPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestBarPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs17]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs18]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs19]",
"tests/test_categorical.py::TestPointPlot::test_vs_catplot[kwargs20]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs0]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs1]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs2]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs3]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs4]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs5]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs6]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs7]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs8]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs9]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs10]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs11]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs12]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs13]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs14]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs15]",
"tests/test_categorical.py::TestCountPlot::test_vs_catplot[kwargs16]",
"tests/test_categorical.py::TestCatPlot::test_facet_organization",
"tests/test_categorical.py::TestCatPlot::test_plot_elements",
"tests/test_categorical.py::TestCatPlot::test_bad_plot_kind_error",
"tests/test_categorical.py::TestCatPlot::test_plot_colors",
"tests/test_categorical.py::TestCatPlot::test_ax_kwarg_removal",
"tests/test_categorical.py::TestCatPlot::test_share_xy",
"tests/test_categorical.py::TestCatPlot::test_facetgrid_data",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[col]",
"tests/test_categorical.py::TestCatPlot::test_array_faceter[row]",
"tests/test_categorical.py::TestCatPlot::test_invalid_kind",
"tests/test_categorical.py::TestCatPlot::test_legend_with_auto",
"tests/test_categorical.py::TestCatPlot::test_weights_warning"
],
"PASS_TO_PASS": null
}
|
scikit-learn__scikit-learn-0
|
1.0
|
{
"code": "diff --git b/sklearn/linear_model/_bayes.py a/sklearn/linear_model/_bayes.py\nindex 2df229969..b6527d4f2 100644\n--- b/sklearn/linear_model/_bayes.py\n+++ a/sklearn/linear_model/_bayes.py\n@@ -607,6 +607,7 @@ class ARDRegression(RegressorMixin, LinearModel):\n self.copy_X = copy_X\n self.verbose = verbose\n \n+ @_fit_context(prefer_skip_nested_validation=True)\n def fit(self, X, y):\n \"\"\"Fit the model according to the given training data and parameters.\n \n@@ -625,6 +626,114 @@ class ARDRegression(RegressorMixin, LinearModel):\n self : object\n Fitted estimator.\n \"\"\"\n+ X, y = validate_data(\n+ self,\n+ X,\n+ y,\n+ dtype=[np.float64, np.float32],\n+ force_writeable=True,\n+ y_numeric=True,\n+ ensure_min_samples=2,\n+ )\n+ dtype = X.dtype\n+\n+ n_samples, n_features = X.shape\n+ coef_ = np.zeros(n_features, dtype=dtype)\n+\n+ X, y, X_offset_, y_offset_, X_scale_ = _preprocess_data(\n+ X, y, fit_intercept=self.fit_intercept, copy=self.copy_X\n+ )\n+\n+ self.X_offset_ = X_offset_\n+ self.X_scale_ = X_scale_\n+\n+ # Launch the convergence loop\n+ keep_lambda = np.ones(n_features, dtype=bool)\n+\n+ lambda_1 = self.lambda_1\n+ lambda_2 = self.lambda_2\n+ alpha_1 = self.alpha_1\n+ alpha_2 = self.alpha_2\n+ verbose = self.verbose\n+\n+ # Initialization of the values of the parameters\n+ eps = np.finfo(np.float64).eps\n+ # Add `eps` in the denominator to omit division by zero if `np.var(y)`\n+ # is zero.\n+ # Explicitly set dtype to avoid unintended type promotion with numpy 2.\n+ alpha_ = np.asarray(1.0 / (np.var(y) + eps), dtype=dtype)\n+ lambda_ = np.ones(n_features, dtype=dtype)\n+\n+ self.scores_ = list()\n+ coef_old_ = None\n+\n+ def update_coeff(X, y, coef_, alpha_, keep_lambda, sigma_):\n+ coef_[keep_lambda] = alpha_ * np.linalg.multi_dot(\n+ [sigma_, X[:, keep_lambda].T, y]\n+ )\n+ return coef_\n+\n+ update_sigma = (\n+ self._update_sigma\n+ if n_samples >= n_features\n+ else self._update_sigma_woodbury\n+ )\n+ # Iterative procedure of ARDRegression\n+ for iter_ in range(self.max_iter):\n+ sigma_ = update_sigma(X, alpha_, lambda_, keep_lambda)\n+ coef_ = update_coeff(X, y, coef_, alpha_, keep_lambda, sigma_)\n+\n+ # Update alpha and lambda\n+ rmse_ = np.sum((y - np.dot(X, coef_)) ** 2)\n+ gamma_ = 1.0 - lambda_[keep_lambda] * np.diag(sigma_)\n+ lambda_[keep_lambda] = (gamma_ + 2.0 * lambda_1) / (\n+ (coef_[keep_lambda]) ** 2 + 2.0 * lambda_2\n+ )\n+ alpha_ = (n_samples - gamma_.sum() + 2.0 * alpha_1) / (\n+ rmse_ + 2.0 * alpha_2\n+ )\n+\n+ # Prune the weights with a precision over a threshold\n+ keep_lambda = lambda_ < self.threshold_lambda\n+ coef_[~keep_lambda] = 0\n+\n+ # Compute the objective function\n+ if self.compute_score:\n+ s = (lambda_1 * np.log(lambda_) - lambda_2 * lambda_).sum()\n+ s += alpha_1 * log(alpha_) - alpha_2 * alpha_\n+ s += 0.5 * (\n+ fast_logdet(sigma_)\n+ + n_samples * log(alpha_)\n+ + np.sum(np.log(lambda_))\n+ )\n+ s -= 0.5 * (alpha_ * rmse_ + (lambda_ * coef_**2).sum())\n+ self.scores_.append(s)\n+\n+ # Check for convergence\n+ if iter_ > 0 and np.sum(np.abs(coef_old_ - coef_)) < self.tol:\n+ if verbose:\n+ print(\"Converged after %s iterations\" % iter_)\n+ break\n+ coef_old_ = np.copy(coef_)\n+\n+ if not keep_lambda.any():\n+ break\n+\n+ self.n_iter_ = iter_ + 1\n+\n+ if keep_lambda.any():\n+ # update sigma and mu using updated params from the last iteration\n+ sigma_ = update_sigma(X, alpha_, lambda_, keep_lambda)\n+ coef_ = update_coeff(X, y, coef_, alpha_, keep_lambda, sigma_)\n+ else:\n+ sigma_ = np.array([]).reshape(0, 0)\n+\n+ self.coef_ = coef_\n+ self.alpha_ = alpha_\n+ self.sigma_ = sigma_\n+ self.lambda_ = lambda_\n+ self._set_intercept(X_offset_, y_offset_, X_scale_)\n+ return self\n \n def _update_sigma_woodbury(self, X, alpha_, lambda_, keep_lambda):\n # See slides as referenced in the docstring note\n",
"test": null
}
| null |
{
"code": "diff --git a/sklearn/linear_model/_bayes.py b/sklearn/linear_model/_bayes.py\nindex b6527d4f2..2df229969 100644\n--- a/sklearn/linear_model/_bayes.py\n+++ b/sklearn/linear_model/_bayes.py\n@@ -607,7 +607,6 @@ class ARDRegression(RegressorMixin, LinearModel):\n self.copy_X = copy_X\n self.verbose = verbose\n \n- @_fit_context(prefer_skip_nested_validation=True)\n def fit(self, X, y):\n \"\"\"Fit the model according to the given training data and parameters.\n \n@@ -626,114 +625,6 @@ class ARDRegression(RegressorMixin, LinearModel):\n self : object\n Fitted estimator.\n \"\"\"\n- X, y = validate_data(\n- self,\n- X,\n- y,\n- dtype=[np.float64, np.float32],\n- force_writeable=True,\n- y_numeric=True,\n- ensure_min_samples=2,\n- )\n- dtype = X.dtype\n-\n- n_samples, n_features = X.shape\n- coef_ = np.zeros(n_features, dtype=dtype)\n-\n- X, y, X_offset_, y_offset_, X_scale_ = _preprocess_data(\n- X, y, fit_intercept=self.fit_intercept, copy=self.copy_X\n- )\n-\n- self.X_offset_ = X_offset_\n- self.X_scale_ = X_scale_\n-\n- # Launch the convergence loop\n- keep_lambda = np.ones(n_features, dtype=bool)\n-\n- lambda_1 = self.lambda_1\n- lambda_2 = self.lambda_2\n- alpha_1 = self.alpha_1\n- alpha_2 = self.alpha_2\n- verbose = self.verbose\n-\n- # Initialization of the values of the parameters\n- eps = np.finfo(np.float64).eps\n- # Add `eps` in the denominator to omit division by zero if `np.var(y)`\n- # is zero.\n- # Explicitly set dtype to avoid unintended type promotion with numpy 2.\n- alpha_ = np.asarray(1.0 / (np.var(y) + eps), dtype=dtype)\n- lambda_ = np.ones(n_features, dtype=dtype)\n-\n- self.scores_ = list()\n- coef_old_ = None\n-\n- def update_coeff(X, y, coef_, alpha_, keep_lambda, sigma_):\n- coef_[keep_lambda] = alpha_ * np.linalg.multi_dot(\n- [sigma_, X[:, keep_lambda].T, y]\n- )\n- return coef_\n-\n- update_sigma = (\n- self._update_sigma\n- if n_samples >= n_features\n- else self._update_sigma_woodbury\n- )\n- # Iterative procedure of ARDRegression\n- for iter_ in range(self.max_iter):\n- sigma_ = update_sigma(X, alpha_, lambda_, keep_lambda)\n- coef_ = update_coeff(X, y, coef_, alpha_, keep_lambda, sigma_)\n-\n- # Update alpha and lambda\n- rmse_ = np.sum((y - np.dot(X, coef_)) ** 2)\n- gamma_ = 1.0 - lambda_[keep_lambda] * np.diag(sigma_)\n- lambda_[keep_lambda] = (gamma_ + 2.0 * lambda_1) / (\n- (coef_[keep_lambda]) ** 2 + 2.0 * lambda_2\n- )\n- alpha_ = (n_samples - gamma_.sum() + 2.0 * alpha_1) / (\n- rmse_ + 2.0 * alpha_2\n- )\n-\n- # Prune the weights with a precision over a threshold\n- keep_lambda = lambda_ < self.threshold_lambda\n- coef_[~keep_lambda] = 0\n-\n- # Compute the objective function\n- if self.compute_score:\n- s = (lambda_1 * np.log(lambda_) - lambda_2 * lambda_).sum()\n- s += alpha_1 * log(alpha_) - alpha_2 * alpha_\n- s += 0.5 * (\n- fast_logdet(sigma_)\n- + n_samples * log(alpha_)\n- + np.sum(np.log(lambda_))\n- )\n- s -= 0.5 * (alpha_ * rmse_ + (lambda_ * coef_**2).sum())\n- self.scores_.append(s)\n-\n- # Check for convergence\n- if iter_ > 0 and np.sum(np.abs(coef_old_ - coef_)) < self.tol:\n- if verbose:\n- print(\"Converged after %s iterations\" % iter_)\n- break\n- coef_old_ = np.copy(coef_)\n-\n- if not keep_lambda.any():\n- break\n-\n- self.n_iter_ = iter_ + 1\n-\n- if keep_lambda.any():\n- # update sigma and mu using updated params from the last iteration\n- sigma_ = update_sigma(X, alpha_, lambda_, keep_lambda)\n- coef_ = update_coeff(X, y, coef_, alpha_, keep_lambda, sigma_)\n- else:\n- sigma_ = np.array([]).reshape(0, 0)\n-\n- self.coef_ = coef_\n- self.alpha_ = alpha_\n- self.sigma_ = sigma_\n- self.lambda_ = lambda_\n- self._set_intercept(X_offset_, y_offset_, X_scale_)\n- return self\n \n def _update_sigma_woodbury(self, X, alpha_, lambda_, keep_lambda):\n # See slides as referenced in the docstring note\n",
"test": null
}
| null |
scikit-learn/scikit-learn
|
c71340fd74280408b84be7ca008e1205e10c7830
|
2024-09-17T18:25:43+02:00
| null | null |
{
"code": "I want to add a new function in file in sklearn/linear_model/_bayes.py.\nHere is the description for the function:\n def fit(self, X, y):\n \"\"\"Fit the model according to the given training data and parameters.\n\n Iterative procedure to maximize the evidence\n\n Parameters\n ----------\n X : array-like of shape (n_samples, n_features)\n Training vector, where `n_samples` is the number of samples and\n `n_features` is the number of features.\n y : array-like of shape (n_samples,)\n Target values (integers). Will be cast to X's dtype if necessary.\n\n Returns\n -------\n self : object\n Fitted estimator.\n \"\"\"\n",
"test": null
}
|
c71340fd74280408b84be7ca008e1205e10c7830
|
{
"FAIL_TO_PASS": [
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_fit_score_takes_y]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_estimators_overwrite_params]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_estimators_dtypes]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_estimators_fit_returns_self]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_estimators_fit_returns_self(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_complex_data]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_dtype_object]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_estimators_empty_data_messages]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_pipeline_consistency]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_estimators_nan_inf]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_estimator_sparse_array]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_estimator_sparse_matrix]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_estimators_pickle]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_estimators_pickle(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_f_contiguous_array_estimator]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_regressors_train]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_regressors_train(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_regressors_train(readonly_memmap=True,X_dtype=float32)]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_regressor_data_not_an_array]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_regressors_no_decision_function]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_supervised_y_2d]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_supervised_y_no_nan]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_regressors_int]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_non_transformer_estimators_n_iter]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_methods_sample_order_invariance]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_methods_subset_invariance]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_fit2d_1sample]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_fit2d_1feature]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_dict_unchanged]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_dont_overwrite_parameters]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_fit_idempotent]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_fit_check_is_fitted]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_n_features_in]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_fit1d]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_fit2d_predict1d]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_requires_y_none]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_estimators[estimator3]",
"sklearn/utils/tests/test_validation.py::test_check_is_fitted",
"sklearn/utils/tests/test_validation.py::test_check_is_fitted_with_attributes[single]",
"sklearn/utils/tests/test_validation.py::test_check_is_fitted_with_attributes[list]",
"sklearn/utils/tests/test_validation.py::test_check_is_fitted_with_attributes[tuple]",
"sklearn/linear_model/tests/test_common.py::test_balance_property[42-False-ARDRegression]",
"sklearn/linear_model/tests/test_bayes.py::test_prediction_bayesian_ridge_ard_with_constant_input",
"sklearn/linear_model/tests/test_bayes.py::test_std_bayesian_ridge_ard_with_constant_input",
"sklearn/linear_model/tests/test_bayes.py::test_update_of_sigma_in_ard",
"sklearn/linear_model/tests/test_bayes.py::test_toy_ard_object",
"sklearn/linear_model/tests/test_bayes.py::test_ard_accuracy_on_easy_problem[42-10-100]",
"sklearn/linear_model/tests/test_bayes.py::test_ard_accuracy_on_easy_problem[42-100-10]",
"sklearn/linear_model/tests/test_bayes.py::test_return_std[array]",
"sklearn/linear_model/tests/test_bayes.py::test_return_std[dataframe]",
"sklearn/linear_model/tests/test_bayes.py::test_dtype_match[ARDRegression-float32]",
"sklearn/linear_model/tests/test_bayes.py::test_dtype_match[ARDRegression-float64]",
"sklearn/linear_model/tests/test_bayes.py::test_dtype_correctness[ARDRegression]",
"sklearn/linear_model/_bayes.py::sklearn.linear_model._bayes.ARDRegression",
"sklearn/tests/test_common.py::test_check_n_features_in_after_fitting[ARDRegression(max_iter=5)]",
"sklearn/tests/test_common.py::test_pandas_column_name_consistency[ARDRegression(max_iter=5)]",
"sklearn/tests/test_common.py::test_check_param_validation[ARDRegression(max_iter=5)]",
"sklearn/tests/test_common.py::test_check_inplace_ensure_writeable[ARDRegression(max_iter=5)]"
],
"PASS_TO_PASS": null
}
|
scikit-learn__scikit-learn-1
|
1.0
|
{
"code": "diff --git b/sklearn/linear_model/_bayes.py a/sklearn/linear_model/_bayes.py\nindex f50c85533..b6527d4f2 100644\n--- b/sklearn/linear_model/_bayes.py\n+++ a/sklearn/linear_model/_bayes.py\n@@ -786,3 +786,12 @@ class ARDRegression(RegressorMixin, LinearModel):\n y_std : array-like of shape (n_samples,)\n Standard deviation of predictive distribution of query points.\n \"\"\"\n+ y_mean = self._decision_function(X)\n+ if return_std is False:\n+ return y_mean\n+ else:\n+ col_index = self.lambda_ < self.threshold_lambda\n+ X = _safe_indexing(X, indices=col_index, axis=1)\n+ sigmas_squared_data = (np.dot(X, self.sigma_) * X).sum(axis=1)\n+ y_std = np.sqrt(sigmas_squared_data + (1.0 / self.alpha_))\n+ return y_mean, y_std\n",
"test": null
}
| null |
{
"code": "diff --git a/sklearn/linear_model/_bayes.py b/sklearn/linear_model/_bayes.py\nindex b6527d4f2..f50c85533 100644\n--- a/sklearn/linear_model/_bayes.py\n+++ b/sklearn/linear_model/_bayes.py\n@@ -786,12 +786,3 @@ class ARDRegression(RegressorMixin, LinearModel):\n y_std : array-like of shape (n_samples,)\n Standard deviation of predictive distribution of query points.\n \"\"\"\n- y_mean = self._decision_function(X)\n- if return_std is False:\n- return y_mean\n- else:\n- col_index = self.lambda_ < self.threshold_lambda\n- X = _safe_indexing(X, indices=col_index, axis=1)\n- sigmas_squared_data = (np.dot(X, self.sigma_) * X).sum(axis=1)\n- y_std = np.sqrt(sigmas_squared_data + (1.0 / self.alpha_))\n- return y_mean, y_std\n",
"test": null
}
| null |
scikit-learn/scikit-learn
|
c71340fd74280408b84be7ca008e1205e10c7830
|
2024-09-17T18:25:43+02:00
| null | null |
{
"code": "I want to add a new function in file in sklearn/linear_model/_bayes.py.\nHere is the description for the function:\n def predict(self, X, return_std=False):\n \"\"\"Predict using the linear model.\n\n In addition to the mean of the predictive distribution, also its\n standard deviation can be returned.\n\n Parameters\n ----------\n X : {array-like, sparse matrix} of shape (n_samples, n_features)\n Samples.\n\n return_std : bool, default=False\n Whether to return the standard deviation of posterior prediction.\n\n Returns\n -------\n y_mean : array-like of shape (n_samples,)\n Mean of predictive distribution of query points.\n\n y_std : array-like of shape (n_samples,)\n Standard deviation of predictive distribution of query points.\n \"\"\"\n",
"test": null
}
|
c71340fd74280408b84be7ca008e1205e10c7830
|
{
"FAIL_TO_PASS": [
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_fit_score_takes_y]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_estimators_dtypes]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_dtype_object]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_pipeline_consistency]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_estimators_nan_inf]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_estimators_pickle]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_estimators_pickle(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_f_contiguous_array_estimator]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_regressors_train]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_regressors_train(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_regressors_train(readonly_memmap=True,X_dtype=float32)]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_regressor_data_not_an_array]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_supervised_y_2d]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_regressors_int]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_estimators_unfitted]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_methods_sample_order_invariance]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_methods_subset_invariance]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_dict_unchanged]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_fit_idempotent]",
"sklearn/tests/test_common.py::test_estimators[ARDRegression(max_iter=5)-check_fit2d_predict1d]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_estimators[estimator3]",
"sklearn/linear_model/tests/test_common.py::test_balance_property[42-False-ARDRegression]",
"sklearn/linear_model/tests/test_bayes.py::test_prediction_bayesian_ridge_ard_with_constant_input",
"sklearn/linear_model/tests/test_bayes.py::test_std_bayesian_ridge_ard_with_constant_input",
"sklearn/linear_model/tests/test_bayes.py::test_update_of_sigma_in_ard",
"sklearn/linear_model/tests/test_bayes.py::test_toy_ard_object",
"sklearn/linear_model/tests/test_bayes.py::test_return_std[array]",
"sklearn/linear_model/tests/test_bayes.py::test_return_std[dataframe]",
"sklearn/linear_model/tests/test_bayes.py::test_dtype_match[ARDRegression-float32]",
"sklearn/linear_model/tests/test_bayes.py::test_dtype_match[ARDRegression-float64]",
"sklearn/linear_model/_bayes.py::sklearn.linear_model._bayes.ARDRegression",
"sklearn/tests/test_common.py::test_check_n_features_in_after_fitting[ARDRegression(max_iter=5)]",
"sklearn/tests/test_common.py::test_pandas_column_name_consistency[ARDRegression(max_iter=5)]"
],
"PASS_TO_PASS": null
}
|
scikit-learn__scikit-learn-2
|
1.0
|
{
"code": "diff --git b/sklearn/ensemble/_weight_boosting.py a/sklearn/ensemble/_weight_boosting.py\nindex 4bbbc8073..290360622 100644\n--- b/sklearn/ensemble/_weight_boosting.py\n+++ a/sklearn/ensemble/_weight_boosting.py\n@@ -783,6 +783,33 @@ class AdaBoostClassifier(\n values closer to -1 or 1 mean more like the first or second\n class in ``classes_``, respectively.\n \"\"\"\n+ check_is_fitted(self)\n+ X = self._check_X(X)\n+\n+ n_classes = self.n_classes_\n+ classes = self.classes_[:, np.newaxis]\n+\n+ # TODO(1.6): Remove, because \"algorithm\" param will be deprecated in 1.6\n+ if self.algorithm == \"SAMME.R\":\n+ # The weights are all 1. for SAMME.R\n+ pred = sum(\n+ _samme_proba(estimator, n_classes, X) for estimator in self.estimators_\n+ )\n+ else: # self.algorithm == \"SAMME\"\n+ pred = sum(\n+ np.where(\n+ (estimator.predict(X) == classes).T,\n+ w,\n+ -1 / (n_classes - 1) * w,\n+ )\n+ for estimator, w in zip(self.estimators_, self.estimator_weights_)\n+ )\n+\n+ pred /= self.estimator_weights_.sum()\n+ if n_classes == 2:\n+ pred[:, 0] *= -1\n+ return pred.sum(axis=1)\n+ return pred\n \n def staged_decision_function(self, X):\n \"\"\"Compute decision function of ``X`` for each boosting iteration.\n",
"test": null
}
| null |
{
"code": "diff --git a/sklearn/ensemble/_weight_boosting.py b/sklearn/ensemble/_weight_boosting.py\nindex 290360622..4bbbc8073 100644\n--- a/sklearn/ensemble/_weight_boosting.py\n+++ b/sklearn/ensemble/_weight_boosting.py\n@@ -783,33 +783,6 @@ class AdaBoostClassifier(\n values closer to -1 or 1 mean more like the first or second\n class in ``classes_``, respectively.\n \"\"\"\n- check_is_fitted(self)\n- X = self._check_X(X)\n-\n- n_classes = self.n_classes_\n- classes = self.classes_[:, np.newaxis]\n-\n- # TODO(1.6): Remove, because \"algorithm\" param will be deprecated in 1.6\n- if self.algorithm == \"SAMME.R\":\n- # The weights are all 1. for SAMME.R\n- pred = sum(\n- _samme_proba(estimator, n_classes, X) for estimator in self.estimators_\n- )\n- else: # self.algorithm == \"SAMME\"\n- pred = sum(\n- np.where(\n- (estimator.predict(X) == classes).T,\n- w,\n- -1 / (n_classes - 1) * w,\n- )\n- for estimator, w in zip(self.estimators_, self.estimator_weights_)\n- )\n-\n- pred /= self.estimator_weights_.sum()\n- if n_classes == 2:\n- pred[:, 0] *= -1\n- return pred.sum(axis=1)\n- return pred\n \n def staged_decision_function(self, X):\n \"\"\"Compute decision function of ``X`` for each boosting iteration.\n",
"test": null
}
| null |
scikit-learn/scikit-learn
|
c71340fd74280408b84be7ca008e1205e10c7830
|
2024-09-17T18:25:43+02:00
| null | null |
{
"code": "I want to add a new function in file in sklearn/ensemble/_weight_boosting.py.\nHere is the description for the function:\n def decision_function(self, X):\n \"\"\"Compute the decision function of ``X``.\n\n Parameters\n ----------\n X : {array-like, sparse matrix} of shape (n_samples, n_features)\n The training input samples. Sparse matrix can be CSC, CSR, COO,\n DOK, or LIL. COO, DOK, and LIL are converted to CSR.\n\n Returns\n -------\n score : ndarray of shape of (n_samples, k)\n The decision function of the input samples. The order of\n outputs is the same as that of the :term:`classes_` attribute.\n Binary classification is a special cases with ``k == 1``,\n otherwise ``k==n_classes``. For binary classification,\n values closer to -1 or 1 mean more like the first or second\n class in ``classes_``, respectively.\n \"\"\"\n",
"test": null
}
|
c71340fd74280408b84be7ca008e1205e10c7830
|
{
"FAIL_TO_PASS": [
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_fit_score_takes_y]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_estimators_dtypes]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_sample_weights_invariance(kind=ones)]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_sample_weights_invariance(kind=zeros)]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_dtype_object]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_pipeline_consistency]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_estimators_nan_inf]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_estimator_sparse_array]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_estimator_sparse_matrix]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_estimators_pickle]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_estimators_pickle(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_f_contiguous_array_estimator]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_classifier_data_not_an_array]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_classifiers_one_label]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_classifiers_one_label_sample_weights]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_classifiers_classes]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_classifiers_train]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_classifiers_train(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_classifiers_train(readonly_memmap=True,X_dtype=float32)]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_supervised_y_2d]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_estimators_unfitted]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_decision_proba_consistency]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_methods_sample_order_invariance]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_methods_subset_invariance]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_dict_unchanged]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_fit_idempotent]",
"sklearn/tests/test_common.py::test_estimators[AdaBoostClassifier(n_estimators=5)-check_fit2d_predict1d]",
"sklearn/ensemble/tests/test_weight_boosting.py::test_classification_toy[SAMME]",
"sklearn/ensemble/tests/test_weight_boosting.py::test_classification_toy[SAMME.R]",
"sklearn/ensemble/tests/test_weight_boosting.py::test_iris",
"sklearn/ensemble/tests/test_weight_boosting.py::test_staged_predict[SAMME]",
"sklearn/ensemble/tests/test_weight_boosting.py::test_staged_predict[SAMME.R]",
"sklearn/ensemble/tests/test_weight_boosting.py::test_pickle",
"sklearn/ensemble/tests/test_weight_boosting.py::test_sparse_classification[csc_matrix-csc_matrix]",
"sklearn/ensemble/tests/test_weight_boosting.py::test_sparse_classification[csc_array-csc_array]",
"sklearn/ensemble/tests/test_weight_boosting.py::test_sparse_classification[csr_matrix-csr_matrix]",
"sklearn/ensemble/tests/test_weight_boosting.py::test_sparse_classification[csr_array-csr_array]",
"sklearn/ensemble/tests/test_weight_boosting.py::test_sparse_classification[lil_matrix-csr_matrix]",
"sklearn/ensemble/tests/test_weight_boosting.py::test_sparse_classification[lil_array-csr_array]",
"sklearn/ensemble/tests/test_weight_boosting.py::test_sparse_classification[coo_matrix-csr_matrix]",
"sklearn/ensemble/tests/test_weight_boosting.py::test_sparse_classification[coo_array-csr_array]",
"sklearn/ensemble/tests/test_weight_boosting.py::test_sparse_classification[dok_matrix-csr_matrix]",
"sklearn/ensemble/tests/test_weight_boosting.py::test_sparse_classification[dok_array-csr_array]",
"sklearn/ensemble/tests/test_weight_boosting.py::test_multidimensional_X",
"sklearn/ensemble/tests/test_weight_boosting.py::test_adaboost_consistent_predict[SAMME]",
"sklearn/ensemble/tests/test_weight_boosting.py::test_adaboost_consistent_predict[SAMME.R]",
"sklearn/ensemble/tests/test_weight_boosting.py::test_adaboost_decision_function[42-SAMME]",
"sklearn/ensemble/tests/test_weight_boosting.py::test_adaboost_decision_function[42-SAMME.R]",
"sklearn/ensemble/_weight_boosting.py::sklearn.ensemble._weight_boosting.AdaBoostClassifier",
"sklearn/tests/test_common.py::test_check_n_features_in_after_fitting[AdaBoostClassifier(n_estimators=5)]",
"sklearn/tests/test_common.py::test_pandas_column_name_consistency[AdaBoostClassifier(n_estimators=5)]"
],
"PASS_TO_PASS": null
}
|
scikit-learn__scikit-learn-3
|
1.0
|
{
"code": "diff --git b/sklearn/kernel_approximation.py a/sklearn/kernel_approximation.py\nindex 57824340d..92d906dde 100644\n--- b/sklearn/kernel_approximation.py\n+++ a/sklearn/kernel_approximation.py\n@@ -656,6 +656,7 @@ class AdditiveChi2Sampler(TransformerMixin, BaseEstimator):\n self.sample_steps = sample_steps\n self.sample_interval = sample_interval\n \n+ @_fit_context(prefer_skip_nested_validation=True)\n def fit(self, X, y=None):\n \"\"\"Only validates estimator's parameters.\n \n@@ -677,6 +678,15 @@ class AdditiveChi2Sampler(TransformerMixin, BaseEstimator):\n self : object\n Returns the transformer.\n \"\"\"\n+ X = validate_data(self, X, accept_sparse=\"csr\", ensure_non_negative=True)\n+\n+ if self.sample_interval is None and self.sample_steps not in (1, 2, 3):\n+ raise ValueError(\n+ \"If sample_steps is not in [1, 2, 3],\"\n+ \" you need to provide sample_interval\"\n+ )\n+\n+ return self\n \n def transform(self, X):\n \"\"\"Apply approximate feature map to X.\n",
"test": null
}
| null |
{
"code": "diff --git a/sklearn/kernel_approximation.py b/sklearn/kernel_approximation.py\nindex 92d906dde..57824340d 100644\n--- a/sklearn/kernel_approximation.py\n+++ b/sklearn/kernel_approximation.py\n@@ -656,7 +656,6 @@ class AdditiveChi2Sampler(TransformerMixin, BaseEstimator):\n self.sample_steps = sample_steps\n self.sample_interval = sample_interval\n \n- @_fit_context(prefer_skip_nested_validation=True)\n def fit(self, X, y=None):\n \"\"\"Only validates estimator's parameters.\n \n@@ -678,15 +677,6 @@ class AdditiveChi2Sampler(TransformerMixin, BaseEstimator):\n self : object\n Returns the transformer.\n \"\"\"\n- X = validate_data(self, X, accept_sparse=\"csr\", ensure_non_negative=True)\n-\n- if self.sample_interval is None and self.sample_steps not in (1, 2, 3):\n- raise ValueError(\n- \"If sample_steps is not in [1, 2, 3],\"\n- \" you need to provide sample_interval\"\n- )\n-\n- return self\n \n def transform(self, X):\n \"\"\"Apply approximate feature map to X.\n",
"test": null
}
| null |
scikit-learn/scikit-learn
|
c71340fd74280408b84be7ca008e1205e10c7830
|
2024-09-17T18:25:43+02:00
| null | null |
{
"code": "I want to add a new function in file in sklearn/kernel_approximation.py.\nHere is the description for the function:\n def fit(self, X, y=None):\n \"\"\"Only validates estimator's parameters.\n\n This method allows to: (i) validate the estimator's parameters and\n (ii) be consistent with the scikit-learn transformer API.\n\n Parameters\n ----------\n X : array-like, shape (n_samples, n_features)\n Training data, where `n_samples` is the number of samples\n and `n_features` is the number of features.\n\n y : array-like, shape (n_samples,) or (n_samples, n_outputs), \\\n default=None\n Target values (None for unsupervised transformations).\n\n Returns\n -------\n self : object\n Returns the transformer.\n \"\"\"\n",
"test": null
}
|
c71340fd74280408b84be7ca008e1205e10c7830
|
{
"FAIL_TO_PASS": [
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_fit_score_takes_y]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_estimators_overwrite_params]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_estimators_dtypes]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_estimators_fit_returns_self]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_estimators_fit_returns_self(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_complex_data]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_dtype_object]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_estimators_empty_data_messages]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_pipeline_consistency]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_estimators_nan_inf]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_estimator_sparse_array]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_estimator_sparse_matrix]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_estimators_pickle]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_estimators_pickle(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_f_contiguous_array_estimator]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_transformer_data_not_an_array]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_transformer_general]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_transformer_preserve_dtypes]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_transformer_general(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_methods_sample_order_invariance]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_methods_subset_invariance]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_fit2d_1sample]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_fit2d_1feature]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_dict_unchanged]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_dont_overwrite_parameters]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_fit_idempotent]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_fit_check_is_fitted]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_n_features_in]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_fit1d]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_fit2d_predict1d]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_fit_non_negative]",
"sklearn/tests/test_kernel_approximation.py::test_additive_chi2_sampler[csr_matrix]",
"sklearn/tests/test_kernel_approximation.py::test_additive_chi2_sampler[csr_array]",
"sklearn/tests/test_kernel_approximation.py::test_additive_chi2_sampler_sample_steps[1-fit]",
"sklearn/tests/test_kernel_approximation.py::test_additive_chi2_sampler_sample_steps[1-fit_transform]",
"sklearn/tests/test_kernel_approximation.py::test_additive_chi2_sampler_sample_steps[2-fit]",
"sklearn/tests/test_kernel_approximation.py::test_additive_chi2_sampler_sample_steps[2-fit_transform]",
"sklearn/tests/test_kernel_approximation.py::test_additive_chi2_sampler_sample_steps[3-fit]",
"sklearn/tests/test_kernel_approximation.py::test_additive_chi2_sampler_sample_steps[3-fit_transform]",
"sklearn/tests/test_kernel_approximation.py::test_additive_chi2_sampler_wrong_sample_steps[fit]",
"sklearn/tests/test_kernel_approximation.py::test_additive_chi2_sampler_wrong_sample_steps[fit_transform]",
"sklearn/tests/test_kernel_approximation.py::test_additive_chi2_sampler_exceptions",
"sklearn/tests/test_kernel_approximation.py::test_input_validation[csr_matrix]",
"sklearn/tests/test_kernel_approximation.py::test_input_validation[csr_array]",
"sklearn/tests/test_kernel_approximation.py::test_additivechi2sampler_get_feature_names_out",
"sklearn/kernel_approximation.py::sklearn.kernel_approximation.AdditiveChi2Sampler",
"sklearn/tests/test_common.py::test_check_n_features_in_after_fitting[AdditiveChi2Sampler()]",
"sklearn/tests/test_common.py::test_pandas_column_name_consistency[AdditiveChi2Sampler()]",
"sklearn/tests/test_common.py::test_transformers_get_feature_names_out[AdditiveChi2Sampler()]",
"sklearn/tests/test_common.py::test_check_param_validation[AdditiveChi2Sampler()]",
"sklearn/tests/test_common.py::test_set_output_transform[AdditiveChi2Sampler()]",
"sklearn/tests/test_common.py::test_set_output_transform_configured[check_set_output_transform_pandas-AdditiveChi2Sampler()]",
"sklearn/tests/test_common.py::test_set_output_transform_configured[check_global_output_transform_pandas-AdditiveChi2Sampler()]"
],
"PASS_TO_PASS": null
}
|
scikit-learn__scikit-learn-4
|
1.0
|
{
"code": "diff --git b/sklearn/kernel_approximation.py a/sklearn/kernel_approximation.py\nindex b150d94d3..92d906dde 100644\n--- b/sklearn/kernel_approximation.py\n+++ a/sklearn/kernel_approximation.py\n@@ -704,6 +704,35 @@ class AdditiveChi2Sampler(TransformerMixin, BaseEstimator):\n Whether the return value is an array or sparse matrix depends on\n the type of the input X.\n \"\"\"\n+ X = validate_data(\n+ self, X, accept_sparse=\"csr\", reset=False, ensure_non_negative=True\n+ )\n+ sparse = sp.issparse(X)\n+\n+ if self.sample_interval is None:\n+ # See figure 2 c) of \"Efficient additive kernels via explicit feature maps\" # noqa\n+ # <http://www.robots.ox.ac.uk/~vedaldi/assets/pubs/vedaldi11efficient.pdf>\n+ # A. Vedaldi and A. Zisserman, Pattern Analysis and Machine Intelligence, # noqa\n+ # 2011\n+ if self.sample_steps == 1:\n+ sample_interval = 0.8\n+ elif self.sample_steps == 2:\n+ sample_interval = 0.5\n+ elif self.sample_steps == 3:\n+ sample_interval = 0.4\n+ else:\n+ raise ValueError(\n+ \"If sample_steps is not in [1, 2, 3],\"\n+ \" you need to provide sample_interval\"\n+ )\n+ else:\n+ sample_interval = self.sample_interval\n+\n+ # zeroth component\n+ # 1/cosh = sech\n+ # cosh(0) = 1.0\n+ transf = self._transform_sparse if sparse else self._transform_dense\n+ return transf(X, self.sample_steps, sample_interval)\n \n def get_feature_names_out(self, input_features=None):\n \"\"\"Get output feature names for transformation.\n",
"test": null
}
| null |
{
"code": "diff --git a/sklearn/kernel_approximation.py b/sklearn/kernel_approximation.py\nindex 92d906dde..b150d94d3 100644\n--- a/sklearn/kernel_approximation.py\n+++ b/sklearn/kernel_approximation.py\n@@ -704,35 +704,6 @@ class AdditiveChi2Sampler(TransformerMixin, BaseEstimator):\n Whether the return value is an array or sparse matrix depends on\n the type of the input X.\n \"\"\"\n- X = validate_data(\n- self, X, accept_sparse=\"csr\", reset=False, ensure_non_negative=True\n- )\n- sparse = sp.issparse(X)\n-\n- if self.sample_interval is None:\n- # See figure 2 c) of \"Efficient additive kernels via explicit feature maps\" # noqa\n- # <http://www.robots.ox.ac.uk/~vedaldi/assets/pubs/vedaldi11efficient.pdf>\n- # A. Vedaldi and A. Zisserman, Pattern Analysis and Machine Intelligence, # noqa\n- # 2011\n- if self.sample_steps == 1:\n- sample_interval = 0.8\n- elif self.sample_steps == 2:\n- sample_interval = 0.5\n- elif self.sample_steps == 3:\n- sample_interval = 0.4\n- else:\n- raise ValueError(\n- \"If sample_steps is not in [1, 2, 3],\"\n- \" you need to provide sample_interval\"\n- )\n- else:\n- sample_interval = self.sample_interval\n-\n- # zeroth component\n- # 1/cosh = sech\n- # cosh(0) = 1.0\n- transf = self._transform_sparse if sparse else self._transform_dense\n- return transf(X, self.sample_steps, sample_interval)\n \n def get_feature_names_out(self, input_features=None):\n \"\"\"Get output feature names for transformation.\n",
"test": null
}
| null |
scikit-learn/scikit-learn
|
c71340fd74280408b84be7ca008e1205e10c7830
|
2024-09-17T18:25:43+02:00
| null | null |
{
"code": "I want to add a new function in file in sklearn/kernel_approximation.py.\nHere is the description for the function:\n def transform(self, X):\n \"\"\"Apply approximate feature map to X.\n\n Parameters\n ----------\n X : {array-like, sparse matrix}, shape (n_samples, n_features)\n Training data, where `n_samples` is the number of samples\n and `n_features` is the number of features.\n\n Returns\n -------\n X_new : {ndarray, sparse matrix}, \\\n shape = (n_samples, n_features * (2*sample_steps - 1))\n Whether the return value is an array or sparse matrix depends on\n the type of the input X.\n \"\"\"\n",
"test": null
}
|
c71340fd74280408b84be7ca008e1205e10c7830
|
{
"FAIL_TO_PASS": [
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_fit_score_takes_y]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_estimators_dtypes]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_dtype_object]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_pipeline_consistency]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_estimators_nan_inf]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_estimators_pickle]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_estimators_pickle(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_f_contiguous_array_estimator]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_transformer_data_not_an_array]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_transformer_general]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_transformer_preserve_dtypes]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_transformer_general(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_transformers_unfitted_stateless]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_methods_sample_order_invariance]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_methods_subset_invariance]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_dict_unchanged]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_fit_idempotent]",
"sklearn/tests/test_common.py::test_estimators[AdditiveChi2Sampler()-check_fit2d_predict1d]",
"sklearn/tests/test_kernel_approximation.py::test_additive_chi2_sampler[csr_matrix]",
"sklearn/tests/test_kernel_approximation.py::test_additive_chi2_sampler[csr_array]",
"sklearn/tests/test_kernel_approximation.py::test_additive_chi2_sampler_sample_steps[1-fit_transform]",
"sklearn/tests/test_kernel_approximation.py::test_additive_chi2_sampler_sample_steps[1-transform]",
"sklearn/tests/test_kernel_approximation.py::test_additive_chi2_sampler_sample_steps[2-fit_transform]",
"sklearn/tests/test_kernel_approximation.py::test_additive_chi2_sampler_sample_steps[2-transform]",
"sklearn/tests/test_kernel_approximation.py::test_additive_chi2_sampler_sample_steps[3-fit_transform]",
"sklearn/tests/test_kernel_approximation.py::test_additive_chi2_sampler_sample_steps[3-transform]",
"sklearn/tests/test_kernel_approximation.py::test_additive_chi2_sampler_wrong_sample_steps[transform]",
"sklearn/tests/test_kernel_approximation.py::test_additive_chi2_sampler_exceptions",
"sklearn/tests/test_kernel_approximation.py::test_input_validation[csr_matrix]",
"sklearn/tests/test_kernel_approximation.py::test_input_validation[csr_array]",
"sklearn/kernel_approximation.py::sklearn.kernel_approximation.AdditiveChi2Sampler",
"sklearn/tests/test_common.py::test_check_n_features_in_after_fitting[AdditiveChi2Sampler()]",
"sklearn/tests/test_common.py::test_pandas_column_name_consistency[AdditiveChi2Sampler()]",
"sklearn/tests/test_common.py::test_transformers_get_feature_names_out[AdditiveChi2Sampler()]",
"sklearn/tests/test_common.py::test_set_output_transform[AdditiveChi2Sampler()]",
"sklearn/tests/test_common.py::test_set_output_transform_configured[check_set_output_transform_pandas-AdditiveChi2Sampler()]",
"sklearn/tests/test_common.py::test_set_output_transform_configured[check_global_output_transform_pandas-AdditiveChi2Sampler()]"
],
"PASS_TO_PASS": null
}
|
scikit-learn__scikit-learn-5
|
1.0
|
{
"code": "diff --git b/sklearn/cluster/_affinity_propagation.py a/sklearn/cluster/_affinity_propagation.py\nindex 080462fce..33bbcb77f 100644\n--- b/sklearn/cluster/_affinity_propagation.py\n+++ a/sklearn/cluster/_affinity_propagation.py\n@@ -483,6 +483,7 @@ class AffinityPropagation(ClusterMixin, BaseEstimator):\n tags.input_tags.pairwise = self.affinity == \"precomputed\"\n return tags\n \n+ @_fit_context(prefer_skip_nested_validation=True)\n def fit(self, X, y=None):\n \"\"\"Fit the clustering from features, or affinity matrix.\n \n@@ -502,6 +503,46 @@ class AffinityPropagation(ClusterMixin, BaseEstimator):\n self\n Returns the instance itself.\n \"\"\"\n+ if self.affinity == \"precomputed\":\n+ X = validate_data(self, X, copy=self.copy, force_writeable=True)\n+ self.affinity_matrix_ = X\n+ else: # self.affinity == \"euclidean\"\n+ X = validate_data(self, X, accept_sparse=\"csr\")\n+ self.affinity_matrix_ = -euclidean_distances(X, squared=True)\n+\n+ if self.affinity_matrix_.shape[0] != self.affinity_matrix_.shape[1]:\n+ raise ValueError(\n+ \"The matrix of similarities must be a square array. \"\n+ f\"Got {self.affinity_matrix_.shape} instead.\"\n+ )\n+\n+ if self.preference is None:\n+ preference = np.median(self.affinity_matrix_)\n+ else:\n+ preference = self.preference\n+ preference = np.asarray(preference)\n+\n+ random_state = check_random_state(self.random_state)\n+\n+ (\n+ self.cluster_centers_indices_,\n+ self.labels_,\n+ self.n_iter_,\n+ ) = _affinity_propagation(\n+ self.affinity_matrix_,\n+ max_iter=self.max_iter,\n+ convergence_iter=self.convergence_iter,\n+ preference=preference,\n+ damping=self.damping,\n+ verbose=self.verbose,\n+ return_n_iter=True,\n+ random_state=random_state,\n+ )\n+\n+ if self.affinity != \"precomputed\":\n+ self.cluster_centers_ = X[self.cluster_centers_indices_].copy()\n+\n+ return self\n \n def predict(self, X):\n \"\"\"Predict the closest cluster each sample in X belongs to.\n",
"test": null
}
| null |
{
"code": "diff --git a/sklearn/cluster/_affinity_propagation.py b/sklearn/cluster/_affinity_propagation.py\nindex 33bbcb77f..080462fce 100644\n--- a/sklearn/cluster/_affinity_propagation.py\n+++ b/sklearn/cluster/_affinity_propagation.py\n@@ -483,7 +483,6 @@ class AffinityPropagation(ClusterMixin, BaseEstimator):\n tags.input_tags.pairwise = self.affinity == \"precomputed\"\n return tags\n \n- @_fit_context(prefer_skip_nested_validation=True)\n def fit(self, X, y=None):\n \"\"\"Fit the clustering from features, or affinity matrix.\n \n@@ -503,46 +502,6 @@ class AffinityPropagation(ClusterMixin, BaseEstimator):\n self\n Returns the instance itself.\n \"\"\"\n- if self.affinity == \"precomputed\":\n- X = validate_data(self, X, copy=self.copy, force_writeable=True)\n- self.affinity_matrix_ = X\n- else: # self.affinity == \"euclidean\"\n- X = validate_data(self, X, accept_sparse=\"csr\")\n- self.affinity_matrix_ = -euclidean_distances(X, squared=True)\n-\n- if self.affinity_matrix_.shape[0] != self.affinity_matrix_.shape[1]:\n- raise ValueError(\n- \"The matrix of similarities must be a square array. \"\n- f\"Got {self.affinity_matrix_.shape} instead.\"\n- )\n-\n- if self.preference is None:\n- preference = np.median(self.affinity_matrix_)\n- else:\n- preference = self.preference\n- preference = np.asarray(preference)\n-\n- random_state = check_random_state(self.random_state)\n-\n- (\n- self.cluster_centers_indices_,\n- self.labels_,\n- self.n_iter_,\n- ) = _affinity_propagation(\n- self.affinity_matrix_,\n- max_iter=self.max_iter,\n- convergence_iter=self.convergence_iter,\n- preference=preference,\n- damping=self.damping,\n- verbose=self.verbose,\n- return_n_iter=True,\n- random_state=random_state,\n- )\n-\n- if self.affinity != \"precomputed\":\n- self.cluster_centers_ = X[self.cluster_centers_indices_].copy()\n-\n- return self\n \n def predict(self, X):\n \"\"\"Predict the closest cluster each sample in X belongs to.\n",
"test": null
}
| null |
scikit-learn/scikit-learn
|
c71340fd74280408b84be7ca008e1205e10c7830
|
2024-09-17T18:25:43+02:00
| null | null |
{
"code": "I want to add a new function in file in sklearn/cluster/_affinity_propagation.py.\nHere is the description for the function:\n def fit(self, X, y=None):\n \"\"\"Fit the clustering from features, or affinity matrix.\n\n Parameters\n ----------\n X : {array-like, sparse matrix} of shape (n_samples, n_features), or \\\n array-like of shape (n_samples, n_samples)\n Training instances to cluster, or similarities / affinities between\n instances if ``affinity='precomputed'``. If a sparse feature matrix\n is provided, it will be converted into a sparse ``csr_matrix``.\n\n y : Ignored\n Not used, present here for API consistency by convention.\n\n Returns\n -------\n self\n Returns the instance itself.\n \"\"\"\n",
"test": null
}
|
c71340fd74280408b84be7ca008e1205e10c7830
|
{
"FAIL_TO_PASS": [
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_fit_score_takes_y]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_estimators_overwrite_params]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_estimators_dtypes]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_estimators_fit_returns_self]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_estimators_fit_returns_self(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_complex_data]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_dtype_object]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_estimators_empty_data_messages]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_pipeline_consistency]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_estimators_nan_inf]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_estimator_sparse_array]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_estimator_sparse_matrix]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_estimators_pickle]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_estimators_pickle(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_f_contiguous_array_estimator]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_clustering]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_clustering(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_non_transformer_estimators_n_iter]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_methods_sample_order_invariance]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_methods_subset_invariance]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_fit2d_1sample]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_fit2d_1feature]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_dict_unchanged]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_dont_overwrite_parameters]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_fit_idempotent]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_fit_check_is_fitted]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_n_features_in]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_fit1d]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_fit2d_predict1d]",
"sklearn/tests/test_public_functions.py::test_class_wrapper_param_validation[sklearn.cluster.affinity_propagation-sklearn.cluster.AffinityPropagation]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation[float64-42]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_precomputed",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_no_copy",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_affinity_shape",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_precomputed_with_sparse_input[csr_matrix]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_precomputed_with_sparse_input[csr_array]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_predict[float64-42]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_predict_error",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_fit_non_convergence[float64]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_equal_mutual_similarities[float64]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_predict_non_convergence[float64]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_non_convergence_regressiontest[float64]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_random_state",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_convergence_warning_dense_sparse[float64-csr_matrix]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_convergence_warning_dense_sparse[float64-csr_array]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_convergence_warning_dense_sparse[float64-array]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_correct_clusters[float64]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_sparse_input_for_predict[csr_matrix]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_sparse_input_for_predict[csr_array]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_sparse_input_for_fit_predict[csr_matrix]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_sparse_input_for_fit_predict[csr_array]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_equal_points",
"sklearn/cluster/_affinity_propagation.py::sklearn.cluster._affinity_propagation.AffinityPropagation",
"sklearn/cluster/_affinity_propagation.py::sklearn.cluster._affinity_propagation.affinity_propagation",
"sklearn/tests/test_common.py::test_check_n_features_in_after_fitting[AffinityPropagation(max_iter=5)]",
"sklearn/tests/test_common.py::test_pandas_column_name_consistency[AffinityPropagation(max_iter=5)]",
"sklearn/tests/test_common.py::test_check_param_validation[AffinityPropagation(max_iter=5)]",
"sklearn/tests/test_common.py::test_check_inplace_ensure_writeable[AffinityPropagation(max_iter=5)]"
],
"PASS_TO_PASS": null
}
|
scikit-learn__scikit-learn-6
|
1.0
|
{
"code": "diff --git b/sklearn/cluster/_affinity_propagation.py a/sklearn/cluster/_affinity_propagation.py\nindex 2b377d697..33bbcb77f 100644\n--- b/sklearn/cluster/_affinity_propagation.py\n+++ a/sklearn/cluster/_affinity_propagation.py\n@@ -558,6 +558,26 @@ class AffinityPropagation(ClusterMixin, BaseEstimator):\n labels : ndarray of shape (n_samples,)\n Cluster labels.\n \"\"\"\n+ check_is_fitted(self)\n+ X = validate_data(self, X, reset=False, accept_sparse=\"csr\")\n+ if not hasattr(self, \"cluster_centers_\"):\n+ raise ValueError(\n+ \"Predict method is not supported when affinity='precomputed'.\"\n+ )\n+\n+ if self.cluster_centers_.shape[0] > 0:\n+ with config_context(assume_finite=True):\n+ return pairwise_distances_argmin(X, self.cluster_centers_)\n+ else:\n+ warnings.warn(\n+ (\n+ \"This model does not have any cluster centers \"\n+ \"because affinity propagation did not converge. \"\n+ \"Labeling every sample as '-1'.\"\n+ ),\n+ ConvergenceWarning,\n+ )\n+ return np.array([-1] * X.shape[0])\n \n def fit_predict(self, X, y=None):\n \"\"\"Fit clustering from features/affinity matrix; return cluster labels.\n",
"test": null
}
| null |
{
"code": "diff --git a/sklearn/cluster/_affinity_propagation.py b/sklearn/cluster/_affinity_propagation.py\nindex 33bbcb77f..2b377d697 100644\n--- a/sklearn/cluster/_affinity_propagation.py\n+++ b/sklearn/cluster/_affinity_propagation.py\n@@ -558,26 +558,6 @@ class AffinityPropagation(ClusterMixin, BaseEstimator):\n labels : ndarray of shape (n_samples,)\n Cluster labels.\n \"\"\"\n- check_is_fitted(self)\n- X = validate_data(self, X, reset=False, accept_sparse=\"csr\")\n- if not hasattr(self, \"cluster_centers_\"):\n- raise ValueError(\n- \"Predict method is not supported when affinity='precomputed'.\"\n- )\n-\n- if self.cluster_centers_.shape[0] > 0:\n- with config_context(assume_finite=True):\n- return pairwise_distances_argmin(X, self.cluster_centers_)\n- else:\n- warnings.warn(\n- (\n- \"This model does not have any cluster centers \"\n- \"because affinity propagation did not converge. \"\n- \"Labeling every sample as '-1'.\"\n- ),\n- ConvergenceWarning,\n- )\n- return np.array([-1] * X.shape[0])\n \n def fit_predict(self, X, y=None):\n \"\"\"Fit clustering from features/affinity matrix; return cluster labels.\n",
"test": null
}
| null |
scikit-learn/scikit-learn
|
c71340fd74280408b84be7ca008e1205e10c7830
|
2024-09-17T18:25:43+02:00
| null | null |
{
"code": "I want to add a new function in file in sklearn/cluster/_affinity_propagation.py.\nHere is the description for the function:\n def predict(self, X):\n \"\"\"Predict the closest cluster each sample in X belongs to.\n\n Parameters\n ----------\n X : {array-like, sparse matrix} of shape (n_samples, n_features)\n New data to predict. If a sparse matrix is provided, it will be\n converted into a sparse ``csr_matrix``.\n\n Returns\n -------\n labels : ndarray of shape (n_samples,)\n Cluster labels.\n \"\"\"\n",
"test": null
}
|
c71340fd74280408b84be7ca008e1205e10c7830
|
{
"FAIL_TO_PASS": [
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_estimators_dtypes]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_dtype_object]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_estimators_nan_inf]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_estimator_sparse_array]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_estimator_sparse_matrix]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_estimators_pickle]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_estimators_pickle(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_f_contiguous_array_estimator]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_methods_sample_order_invariance]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_methods_subset_invariance]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_dict_unchanged]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_fit_idempotent]",
"sklearn/tests/test_common.py::test_estimators[AffinityPropagation(max_iter=5)-check_fit2d_predict1d]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_predict[float64-42]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_predict_error",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_predict_non_convergence[float64]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_convergence_warning_dense_sparse[float64-csr_matrix]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_convergence_warning_dense_sparse[float64-csr_array]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_affinity_propagation_convergence_warning_dense_sparse[float64-array]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_sparse_input_for_predict[csr_matrix]",
"sklearn/cluster/tests/test_affinity_propagation.py::test_sparse_input_for_predict[csr_array]",
"sklearn/cluster/_affinity_propagation.py::sklearn.cluster._affinity_propagation.AffinityPropagation",
"sklearn/tests/test_common.py::test_check_n_features_in_after_fitting[AffinityPropagation(max_iter=5)]",
"sklearn/tests/test_common.py::test_pandas_column_name_consistency[AffinityPropagation(max_iter=5)]"
],
"PASS_TO_PASS": null
}
|
scikit-learn__scikit-learn-7
|
1.0
|
{
"code": "diff --git b/sklearn/ensemble/_bagging.py a/sklearn/ensemble/_bagging.py\nindex 84ba62938..7c630e2f3 100644\n--- b/sklearn/ensemble/_bagging.py\n+++ a/sklearn/ensemble/_bagging.py\n@@ -989,6 +989,43 @@ class BaggingClassifier(ClassifierMixin, BaseBagging):\n The class log-probabilities of the input samples. The order of the\n classes corresponds to that in the attribute :term:`classes_`.\n \"\"\"\n+ check_is_fitted(self)\n+ if hasattr(self.estimator_, \"predict_log_proba\"):\n+ # Check data\n+ X = validate_data(\n+ self,\n+ X,\n+ accept_sparse=[\"csr\", \"csc\"],\n+ dtype=None,\n+ ensure_all_finite=False,\n+ reset=False,\n+ )\n+\n+ # Parallel loop\n+ n_jobs, _, starts = _partition_estimators(self.n_estimators, self.n_jobs)\n+\n+ all_log_proba = Parallel(n_jobs=n_jobs, verbose=self.verbose)(\n+ delayed(_parallel_predict_log_proba)(\n+ self.estimators_[starts[i] : starts[i + 1]],\n+ self.estimators_features_[starts[i] : starts[i + 1]],\n+ X,\n+ self.n_classes_,\n+ )\n+ for i in range(n_jobs)\n+ )\n+\n+ # Reduce\n+ log_proba = all_log_proba[0]\n+\n+ for j in range(1, len(all_log_proba)):\n+ log_proba = np.logaddexp(log_proba, all_log_proba[j])\n+\n+ log_proba -= np.log(self.n_estimators)\n+\n+ else:\n+ log_proba = np.log(self.predict_proba(X))\n+\n+ return log_proba\n \n @available_if(_estimator_has(\"decision_function\"))\n def decision_function(self, X):\n",
"test": null
}
| null |
{
"code": "diff --git a/sklearn/ensemble/_bagging.py b/sklearn/ensemble/_bagging.py\nindex 7c630e2f3..84ba62938 100644\n--- a/sklearn/ensemble/_bagging.py\n+++ b/sklearn/ensemble/_bagging.py\n@@ -989,43 +989,6 @@ class BaggingClassifier(ClassifierMixin, BaseBagging):\n The class log-probabilities of the input samples. The order of the\n classes corresponds to that in the attribute :term:`classes_`.\n \"\"\"\n- check_is_fitted(self)\n- if hasattr(self.estimator_, \"predict_log_proba\"):\n- # Check data\n- X = validate_data(\n- self,\n- X,\n- accept_sparse=[\"csr\", \"csc\"],\n- dtype=None,\n- ensure_all_finite=False,\n- reset=False,\n- )\n-\n- # Parallel loop\n- n_jobs, _, starts = _partition_estimators(self.n_estimators, self.n_jobs)\n-\n- all_log_proba = Parallel(n_jobs=n_jobs, verbose=self.verbose)(\n- delayed(_parallel_predict_log_proba)(\n- self.estimators_[starts[i] : starts[i + 1]],\n- self.estimators_features_[starts[i] : starts[i + 1]],\n- X,\n- self.n_classes_,\n- )\n- for i in range(n_jobs)\n- )\n-\n- # Reduce\n- log_proba = all_log_proba[0]\n-\n- for j in range(1, len(all_log_proba)):\n- log_proba = np.logaddexp(log_proba, all_log_proba[j])\n-\n- log_proba -= np.log(self.n_estimators)\n-\n- else:\n- log_proba = np.log(self.predict_proba(X))\n-\n- return log_proba\n \n @available_if(_estimator_has(\"decision_function\"))\n def decision_function(self, X):\n",
"test": null
}
| null |
scikit-learn/scikit-learn
|
c71340fd74280408b84be7ca008e1205e10c7830
|
2024-09-17T18:25:43+02:00
| null | null |
{
"code": "I want to add a new function in file in sklearn/ensemble/_bagging.py.\nHere is the description for the function:\n def predict_log_proba(self, X):\n \"\"\"Predict class log-probabilities for X.\n\n The predicted class log-probabilities of an input sample is computed as\n the log of the mean predicted class probabilities of the base\n estimators in the ensemble.\n\n Parameters\n ----------\n X : {array-like, sparse matrix} of shape (n_samples, n_features)\n The training input samples. Sparse matrices are accepted only if\n they are supported by the base estimator.\n\n Returns\n -------\n p : ndarray of shape (n_samples, n_classes)\n The class log-probabilities of the input samples. The order of the\n classes corresponds to that in the attribute :term:`classes_`.\n \"\"\"\n",
"test": null
}
|
c71340fd74280408b84be7ca008e1205e10c7830
|
{
"FAIL_TO_PASS": [
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_classifiers_train]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_classifiers_train(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_classifiers_train(readonly_memmap=True,X_dtype=float32)]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_estimators_unfitted]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_matrix-params2-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_matrix-params6-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_matrix-params10-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_matrix-params14-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_array-params18-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_array-params22-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_array-params26-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_array-params30-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_matrix-params34-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_matrix-params38-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_matrix-params42-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_matrix-params46-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_array-params50-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_array-params54-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_array-params58-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_array-params62-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_probability",
"sklearn/ensemble/tests/test_bagging.py::test_bagging_classifier_with_missing_inputs",
"sklearn/tests/test_common.py::test_pandas_column_name_consistency[BaggingClassifier(n_estimators=5)]",
"sklearn/tests/test_common.py::test_pandas_column_name_consistency[BaggingClassifier(n_estimators=5,oob_score=True)]"
],
"PASS_TO_PASS": null
}
|
scikit-learn__scikit-learn-8
|
1.0
|
{
"code": "diff --git b/sklearn/ensemble/_bagging.py a/sklearn/ensemble/_bagging.py\nindex 1a6f5e1fd..7c630e2f3 100644\n--- b/sklearn/ensemble/_bagging.py\n+++ a/sklearn/ensemble/_bagging.py\n@@ -939,6 +939,36 @@ class BaggingClassifier(ClassifierMixin, BaseBagging):\n The class probabilities of the input samples. The order of the\n classes corresponds to that in the attribute :term:`classes_`.\n \"\"\"\n+ check_is_fitted(self)\n+ # Check data\n+ X = validate_data(\n+ self,\n+ X,\n+ accept_sparse=[\"csr\", \"csc\"],\n+ dtype=None,\n+ ensure_all_finite=False,\n+ reset=False,\n+ )\n+\n+ # Parallel loop\n+ n_jobs, _, starts = _partition_estimators(self.n_estimators, self.n_jobs)\n+\n+ all_proba = Parallel(\n+ n_jobs=n_jobs, verbose=self.verbose, **self._parallel_args()\n+ )(\n+ delayed(_parallel_predict_proba)(\n+ self.estimators_[starts[i] : starts[i + 1]],\n+ self.estimators_features_[starts[i] : starts[i + 1]],\n+ X,\n+ self.n_classes_,\n+ )\n+ for i in range(n_jobs)\n+ )\n+\n+ # Reduce\n+ proba = sum(all_proba) / self.n_estimators\n+\n+ return proba\n \n def predict_log_proba(self, X):\n \"\"\"Predict class log-probabilities for X.\n",
"test": null
}
| null |
{
"code": "diff --git a/sklearn/ensemble/_bagging.py b/sklearn/ensemble/_bagging.py\nindex 7c630e2f3..1a6f5e1fd 100644\n--- a/sklearn/ensemble/_bagging.py\n+++ b/sklearn/ensemble/_bagging.py\n@@ -939,36 +939,6 @@ class BaggingClassifier(ClassifierMixin, BaseBagging):\n The class probabilities of the input samples. The order of the\n classes corresponds to that in the attribute :term:`classes_`.\n \"\"\"\n- check_is_fitted(self)\n- # Check data\n- X = validate_data(\n- self,\n- X,\n- accept_sparse=[\"csr\", \"csc\"],\n- dtype=None,\n- ensure_all_finite=False,\n- reset=False,\n- )\n-\n- # Parallel loop\n- n_jobs, _, starts = _partition_estimators(self.n_estimators, self.n_jobs)\n-\n- all_proba = Parallel(\n- n_jobs=n_jobs, verbose=self.verbose, **self._parallel_args()\n- )(\n- delayed(_parallel_predict_proba)(\n- self.estimators_[starts[i] : starts[i + 1]],\n- self.estimators_features_[starts[i] : starts[i + 1]],\n- X,\n- self.n_classes_,\n- )\n- for i in range(n_jobs)\n- )\n-\n- # Reduce\n- proba = sum(all_proba) / self.n_estimators\n-\n- return proba\n \n def predict_log_proba(self, X):\n \"\"\"Predict class log-probabilities for X.\n",
"test": null
}
| null |
scikit-learn/scikit-learn
|
c71340fd74280408b84be7ca008e1205e10c7830
|
2024-09-17T18:25:43+02:00
| null | null |
{
"code": "I want to add a new function in file in sklearn/ensemble/_bagging.py.\nHere is the description for the function:\n def predict_proba(self, X):\n \"\"\"Predict class probabilities for X.\n\n The predicted class probabilities of an input sample is computed as\n the mean predicted class probabilities of the base estimators in the\n ensemble. If base estimators do not implement a ``predict_proba``\n method, then it resorts to voting and the predicted class probabilities\n of an input sample represents the proportion of estimators predicting\n each class.\n\n Parameters\n ----------\n X : {array-like, sparse matrix} of shape (n_samples, n_features)\n The training input samples. Sparse matrices are accepted only if\n they are supported by the base estimator.\n\n Returns\n -------\n p : ndarray of shape (n_samples, n_classes)\n The class probabilities of the input samples. The order of the\n classes corresponds to that in the attribute :term:`classes_`.\n \"\"\"\n",
"test": null
}
|
c71340fd74280408b84be7ca008e1205e10c7830
|
{
"FAIL_TO_PASS": [
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_fit_score_takes_y]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_estimators_dtypes]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_sample_weights_invariance(kind=ones)]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_sample_weights_invariance(kind=zeros)]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_dtype_object]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_pipeline_consistency]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_estimator_sparse_array]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_estimator_sparse_matrix]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_estimators_pickle]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_estimators_pickle(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_f_contiguous_array_estimator]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_classifier_data_not_an_array]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_classifiers_one_label]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_classifiers_one_label_sample_weights]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_classifiers_classes]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_classifiers_train]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_classifiers_train(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_classifiers_train(readonly_memmap=True,X_dtype=float32)]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_supervised_y_2d]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_estimators_unfitted]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_methods_sample_order_invariance]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_methods_subset_invariance]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_dict_unchanged]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_fit_idempotent]",
"sklearn/tests/test_common.py::test_estimators[BaggingClassifier(n_estimators=5)-check_fit2d_predict1d]",
"sklearn/ensemble/tests/test_bagging.py::test_classification",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_matrix-params0-predict]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_matrix-params1-predict_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_matrix-params2-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_matrix-params4-predict]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_matrix-params5-predict_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_matrix-params6-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_matrix-params8-predict]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_matrix-params9-predict_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_matrix-params10-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_matrix-params12-predict]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_matrix-params13-predict_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_matrix-params14-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_array-params16-predict]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_array-params17-predict_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_array-params18-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_array-params20-predict]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_array-params21-predict_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_array-params22-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_array-params24-predict]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_array-params25-predict_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_array-params26-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_array-params28-predict]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_array-params29-predict_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csr_array-params30-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_matrix-params32-predict]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_matrix-params33-predict_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_matrix-params34-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_matrix-params36-predict]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_matrix-params37-predict_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_matrix-params38-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_matrix-params40-predict]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_matrix-params41-predict_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_matrix-params42-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_matrix-params44-predict]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_matrix-params45-predict_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_matrix-params46-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_array-params48-predict]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_array-params49-predict_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_array-params50-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_array-params52-predict]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_array-params53-predict_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_array-params54-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_array-params56-predict]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_array-params57-predict_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_array-params58-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_array-params60-predict]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_array-params61-predict_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_sparse_classification[csc_array-params62-predict_log_proba]",
"sklearn/ensemble/tests/test_bagging.py::test_probability",
"sklearn/ensemble/tests/test_bagging.py::test_oob_score_classification",
"sklearn/ensemble/tests/test_bagging.py::test_parallel_classification",
"sklearn/ensemble/tests/test_bagging.py::test_bagging_sample_weight_unsupported_but_passed",
"sklearn/ensemble/tests/test_bagging.py::test_warm_start_equal_n_estimators",
"sklearn/ensemble/tests/test_bagging.py::test_warm_start_equivalence",
"sklearn/ensemble/tests/test_bagging.py::test_bagging_classifier_with_missing_inputs",
"sklearn/tree/_classes.py::sklearn.tree._classes.ExtraTreeClassifier",
"sklearn/ensemble/_bagging.py::sklearn.ensemble._bagging.BaggingClassifier",
"sklearn/tests/test_common.py::test_check_n_features_in_after_fitting[BaggingClassifier(n_estimators=5)]",
"sklearn/tests/test_common.py::test_pandas_column_name_consistency[BaggingClassifier(n_estimators=5)]",
"sklearn/tests/test_common.py::test_pandas_column_name_consistency[BaggingClassifier(n_estimators=5,oob_score=True)]"
],
"PASS_TO_PASS": null
}
|
scikit-learn__scikit-learn-9
|
1.0
|
{
"code": "diff --git b/sklearn/linear_model/_bayes.py a/sklearn/linear_model/_bayes.py\nindex c5ee61003..b6527d4f2 100644\n--- b/sklearn/linear_model/_bayes.py\n+++ a/sklearn/linear_model/_bayes.py\n@@ -213,6 +213,7 @@ class BayesianRidge(RegressorMixin, LinearModel):\n self.copy_X = copy_X\n self.verbose = verbose\n \n+ @_fit_context(prefer_skip_nested_validation=True)\n def fit(self, X, y, sample_weight=None):\n \"\"\"Fit the model.\n \n@@ -234,6 +235,115 @@ class BayesianRidge(RegressorMixin, LinearModel):\n self : object\n Returns the instance itself.\n \"\"\"\n+ X, y = validate_data(\n+ self,\n+ X,\n+ y,\n+ dtype=[np.float64, np.float32],\n+ force_writeable=True,\n+ y_numeric=True,\n+ )\n+ dtype = X.dtype\n+\n+ if sample_weight is not None:\n+ sample_weight = _check_sample_weight(sample_weight, X, dtype=dtype)\n+\n+ X, y, X_offset_, y_offset_, X_scale_ = _preprocess_data(\n+ X,\n+ y,\n+ fit_intercept=self.fit_intercept,\n+ copy=self.copy_X,\n+ sample_weight=sample_weight,\n+ )\n+\n+ if sample_weight is not None:\n+ # Sample weight can be implemented via a simple rescaling.\n+ X, y, _ = _rescale_data(X, y, sample_weight)\n+\n+ self.X_offset_ = X_offset_\n+ self.X_scale_ = X_scale_\n+ n_samples, n_features = X.shape\n+\n+ # Initialization of the values of the parameters\n+ eps = np.finfo(np.float64).eps\n+ # Add `eps` in the denominator to omit division by zero if `np.var(y)`\n+ # is zero\n+ alpha_ = self.alpha_init\n+ lambda_ = self.lambda_init\n+ if alpha_ is None:\n+ alpha_ = 1.0 / (np.var(y) + eps)\n+ if lambda_ is None:\n+ lambda_ = 1.0\n+\n+ # Avoid unintended type promotion to float64 with numpy 2\n+ alpha_ = np.asarray(alpha_, dtype=dtype)\n+ lambda_ = np.asarray(lambda_, dtype=dtype)\n+\n+ verbose = self.verbose\n+ lambda_1 = self.lambda_1\n+ lambda_2 = self.lambda_2\n+ alpha_1 = self.alpha_1\n+ alpha_2 = self.alpha_2\n+\n+ self.scores_ = list()\n+ coef_old_ = None\n+\n+ XT_y = np.dot(X.T, y)\n+ U, S, Vh = linalg.svd(X, full_matrices=False)\n+ eigen_vals_ = S**2\n+\n+ # Convergence loop of the bayesian ridge regression\n+ for iter_ in range(self.max_iter):\n+ # update posterior mean coef_ based on alpha_ and lambda_ and\n+ # compute corresponding rmse\n+ coef_, rmse_ = self._update_coef_(\n+ X, y, n_samples, n_features, XT_y, U, Vh, eigen_vals_, alpha_, lambda_\n+ )\n+ if self.compute_score:\n+ # compute the log marginal likelihood\n+ s = self._log_marginal_likelihood(\n+ n_samples, n_features, eigen_vals_, alpha_, lambda_, coef_, rmse_\n+ )\n+ self.scores_.append(s)\n+\n+ # Update alpha and lambda according to (MacKay, 1992)\n+ gamma_ = np.sum((alpha_ * eigen_vals_) / (lambda_ + alpha_ * eigen_vals_))\n+ lambda_ = (gamma_ + 2 * lambda_1) / (np.sum(coef_**2) + 2 * lambda_2)\n+ alpha_ = (n_samples - gamma_ + 2 * alpha_1) / (rmse_ + 2 * alpha_2)\n+\n+ # Check for convergence\n+ if iter_ != 0 and np.sum(np.abs(coef_old_ - coef_)) < self.tol:\n+ if verbose:\n+ print(\"Convergence after \", str(iter_), \" iterations\")\n+ break\n+ coef_old_ = np.copy(coef_)\n+\n+ self.n_iter_ = iter_ + 1\n+\n+ # return regularization parameters and corresponding posterior mean,\n+ # log marginal likelihood and posterior covariance\n+ self.alpha_ = alpha_\n+ self.lambda_ = lambda_\n+ self.coef_, rmse_ = self._update_coef_(\n+ X, y, n_samples, n_features, XT_y, U, Vh, eigen_vals_, alpha_, lambda_\n+ )\n+ if self.compute_score:\n+ # compute the log marginal likelihood\n+ s = self._log_marginal_likelihood(\n+ n_samples, n_features, eigen_vals_, alpha_, lambda_, coef_, rmse_\n+ )\n+ self.scores_.append(s)\n+ self.scores_ = np.array(self.scores_)\n+\n+ # posterior covariance is given by 1/alpha_ * scaled_sigma_\n+ scaled_sigma_ = np.dot(\n+ Vh.T, Vh / (eigen_vals_ + lambda_ / alpha_)[:, np.newaxis]\n+ )\n+ self.sigma_ = (1.0 / alpha_) * scaled_sigma_\n+\n+ self._set_intercept(X_offset_, y_offset_, X_scale_)\n+\n+ return self\n \n def predict(self, X, return_std=False):\n \"\"\"Predict using the linear model.\n",
"test": null
}
| null |
{
"code": "diff --git a/sklearn/linear_model/_bayes.py b/sklearn/linear_model/_bayes.py\nindex b6527d4f2..c5ee61003 100644\n--- a/sklearn/linear_model/_bayes.py\n+++ b/sklearn/linear_model/_bayes.py\n@@ -213,7 +213,6 @@ class BayesianRidge(RegressorMixin, LinearModel):\n self.copy_X = copy_X\n self.verbose = verbose\n \n- @_fit_context(prefer_skip_nested_validation=True)\n def fit(self, X, y, sample_weight=None):\n \"\"\"Fit the model.\n \n@@ -235,115 +234,6 @@ class BayesianRidge(RegressorMixin, LinearModel):\n self : object\n Returns the instance itself.\n \"\"\"\n- X, y = validate_data(\n- self,\n- X,\n- y,\n- dtype=[np.float64, np.float32],\n- force_writeable=True,\n- y_numeric=True,\n- )\n- dtype = X.dtype\n-\n- if sample_weight is not None:\n- sample_weight = _check_sample_weight(sample_weight, X, dtype=dtype)\n-\n- X, y, X_offset_, y_offset_, X_scale_ = _preprocess_data(\n- X,\n- y,\n- fit_intercept=self.fit_intercept,\n- copy=self.copy_X,\n- sample_weight=sample_weight,\n- )\n-\n- if sample_weight is not None:\n- # Sample weight can be implemented via a simple rescaling.\n- X, y, _ = _rescale_data(X, y, sample_weight)\n-\n- self.X_offset_ = X_offset_\n- self.X_scale_ = X_scale_\n- n_samples, n_features = X.shape\n-\n- # Initialization of the values of the parameters\n- eps = np.finfo(np.float64).eps\n- # Add `eps` in the denominator to omit division by zero if `np.var(y)`\n- # is zero\n- alpha_ = self.alpha_init\n- lambda_ = self.lambda_init\n- if alpha_ is None:\n- alpha_ = 1.0 / (np.var(y) + eps)\n- if lambda_ is None:\n- lambda_ = 1.0\n-\n- # Avoid unintended type promotion to float64 with numpy 2\n- alpha_ = np.asarray(alpha_, dtype=dtype)\n- lambda_ = np.asarray(lambda_, dtype=dtype)\n-\n- verbose = self.verbose\n- lambda_1 = self.lambda_1\n- lambda_2 = self.lambda_2\n- alpha_1 = self.alpha_1\n- alpha_2 = self.alpha_2\n-\n- self.scores_ = list()\n- coef_old_ = None\n-\n- XT_y = np.dot(X.T, y)\n- U, S, Vh = linalg.svd(X, full_matrices=False)\n- eigen_vals_ = S**2\n-\n- # Convergence loop of the bayesian ridge regression\n- for iter_ in range(self.max_iter):\n- # update posterior mean coef_ based on alpha_ and lambda_ and\n- # compute corresponding rmse\n- coef_, rmse_ = self._update_coef_(\n- X, y, n_samples, n_features, XT_y, U, Vh, eigen_vals_, alpha_, lambda_\n- )\n- if self.compute_score:\n- # compute the log marginal likelihood\n- s = self._log_marginal_likelihood(\n- n_samples, n_features, eigen_vals_, alpha_, lambda_, coef_, rmse_\n- )\n- self.scores_.append(s)\n-\n- # Update alpha and lambda according to (MacKay, 1992)\n- gamma_ = np.sum((alpha_ * eigen_vals_) / (lambda_ + alpha_ * eigen_vals_))\n- lambda_ = (gamma_ + 2 * lambda_1) / (np.sum(coef_**2) + 2 * lambda_2)\n- alpha_ = (n_samples - gamma_ + 2 * alpha_1) / (rmse_ + 2 * alpha_2)\n-\n- # Check for convergence\n- if iter_ != 0 and np.sum(np.abs(coef_old_ - coef_)) < self.tol:\n- if verbose:\n- print(\"Convergence after \", str(iter_), \" iterations\")\n- break\n- coef_old_ = np.copy(coef_)\n-\n- self.n_iter_ = iter_ + 1\n-\n- # return regularization parameters and corresponding posterior mean,\n- # log marginal likelihood and posterior covariance\n- self.alpha_ = alpha_\n- self.lambda_ = lambda_\n- self.coef_, rmse_ = self._update_coef_(\n- X, y, n_samples, n_features, XT_y, U, Vh, eigen_vals_, alpha_, lambda_\n- )\n- if self.compute_score:\n- # compute the log marginal likelihood\n- s = self._log_marginal_likelihood(\n- n_samples, n_features, eigen_vals_, alpha_, lambda_, coef_, rmse_\n- )\n- self.scores_.append(s)\n- self.scores_ = np.array(self.scores_)\n-\n- # posterior covariance is given by 1/alpha_ * scaled_sigma_\n- scaled_sigma_ = np.dot(\n- Vh.T, Vh / (eigen_vals_ + lambda_ / alpha_)[:, np.newaxis]\n- )\n- self.sigma_ = (1.0 / alpha_) * scaled_sigma_\n-\n- self._set_intercept(X_offset_, y_offset_, X_scale_)\n-\n- return self\n \n def predict(self, X, return_std=False):\n \"\"\"Predict using the linear model.\n",
"test": null
}
| null |
scikit-learn/scikit-learn
|
c71340fd74280408b84be7ca008e1205e10c7830
|
2024-09-17T18:25:43+02:00
| null | null |
{
"code": "I want to add a new function in file in sklearn/linear_model/_bayes.py.\nHere is the description for the function:\n def fit(self, X, y, sample_weight=None):\n \"\"\"Fit the model.\n\n Parameters\n ----------\n X : ndarray of shape (n_samples, n_features)\n Training data.\n y : ndarray of shape (n_samples,)\n Target values. Will be cast to X's dtype if necessary.\n\n sample_weight : ndarray of shape (n_samples,), default=None\n Individual weights for each sample.\n\n .. versionadded:: 0.20\n parameter *sample_weight* support to BayesianRidge.\n\n Returns\n -------\n self : object\n Returns the instance itself.\n \"\"\"\n",
"test": null
}
|
c71340fd74280408b84be7ca008e1205e10c7830
|
{
"FAIL_TO_PASS": [
"sklearn/impute/tests/test_impute.py::test_imputation_shape[csr_matrix-mean]",
"sklearn/impute/tests/test_impute.py::test_imputation_shape[csr_matrix-median]",
"sklearn/impute/tests/test_impute.py::test_imputation_shape[csr_matrix-most_frequent]",
"sklearn/impute/tests/test_impute.py::test_imputation_shape[csr_matrix-constant]",
"sklearn/impute/tests/test_impute.py::test_imputation_shape[csr_array-mean]",
"sklearn/impute/tests/test_impute.py::test_imputation_shape[csr_array-median]",
"sklearn/impute/tests/test_impute.py::test_imputation_shape[csr_array-most_frequent]",
"sklearn/impute/tests/test_impute.py::test_imputation_shape[csr_array-constant]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_zero_iters",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_verbose",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_imputation_order[random]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_imputation_order[roman]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_imputation_order[ascending]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_imputation_order[descending]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_imputation_order[arabic]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_estimators[None]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_estimators[estimator2]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_clip",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_clip_truncnorm",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_truncated_normal_posterior",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_missing_at_transform[mean]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_missing_at_transform[median]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_missing_at_transform[most_frequent]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_transform_stochasticity",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_no_missing",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_rank_one",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_transform_recovery[3]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_transform_recovery[5]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_additive_matrix",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_early_stopping",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_catch_warning",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_min_max_array_like[scalars]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_min_max_array_like[None-default]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_min_max_array_like[inf]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_min_max_array_like[lists]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_min_max_array_like[lists-with-inf]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_min_max_array_like_imputation[None-vs-inf]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_min_max_array_like_imputation[Scalar-vs-vector]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_skip_non_missing[False]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_dont_set_random_state[None-None]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_dont_set_random_state[None-1]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_dont_set_random_state[None-rs_imputer2]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_dont_set_random_state[1-None]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_dont_set_random_state[1-1]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_dont_set_random_state[1-rs_imputer2]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_dont_set_random_state[rs_estimator2-None]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_dont_set_random_state[rs_estimator2-1]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_dont_set_random_state[rs_estimator2-rs_imputer2]",
"sklearn/impute/tests/test_impute.py::test_imputer_without_indicator[IterativeImputer]",
"sklearn/impute/tests/test_impute.py::test_imputation_order[ascending-idx_order0]",
"sklearn/impute/tests/test_impute.py::test_imputation_order[descending-idx_order1]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_fit_score_takes_y]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_estimators_overwrite_params]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_estimators_dtypes]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_sample_weights_pandas_series]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_sample_weights_not_an_array]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_sample_weights_list]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_sample_weights_shape]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_sample_weights_not_overwritten]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_sample_weights_invariance(kind=ones)]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_sample_weights_invariance(kind=zeros)]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_estimators_fit_returns_self]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_estimators_fit_returns_self(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_complex_data]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_dtype_object]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_estimators_empty_data_messages]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_pipeline_consistency]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_estimators_nan_inf]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_estimator_sparse_array]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_estimator_sparse_matrix]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_estimators_pickle]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_estimators_pickle(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_f_contiguous_array_estimator]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_regressors_train]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_regressors_train(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_regressors_train(readonly_memmap=True,X_dtype=float32)]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_regressor_data_not_an_array]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_regressors_no_decision_function]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_supervised_y_2d]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_supervised_y_no_nan]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_regressors_int]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_non_transformer_estimators_n_iter]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_methods_sample_order_invariance]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_methods_subset_invariance]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_fit2d_1sample]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_fit2d_1feature]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_dict_unchanged]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_dont_overwrite_parameters]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_fit_idempotent]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_fit_check_is_fitted]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_n_features_in]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_fit1d]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_fit2d_predict1d]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_requires_y_none]",
"sklearn/impute/tests/test_common.py::test_imputers_add_indicator[IterativeImputer-nan]",
"sklearn/impute/tests/test_common.py::test_imputers_add_indicator[IterativeImputer--1]",
"sklearn/impute/tests/test_common.py::test_imputers_add_indicator[IterativeImputer-0]",
"sklearn/impute/tests/test_common.py::test_imputers_pandas_na_integer_array_support[True-IterativeImputer]",
"sklearn/impute/tests/test_common.py::test_imputers_pandas_na_integer_array_support[False-IterativeImputer]",
"sklearn/impute/tests/test_common.py::test_imputers_feature_names_out_pandas[True-IterativeImputer]",
"sklearn/impute/tests/test_common.py::test_imputers_feature_names_out_pandas[False-IterativeImputer]",
"sklearn/impute/tests/test_common.py::test_imputation_adds_missing_indicator_if_add_indicator_is_true[nan-IterativeImputer]",
"sklearn/impute/tests/test_common.py::test_imputation_adds_missing_indicator_if_add_indicator_is_true[1-IterativeImputer]",
"sklearn/linear_model/tests/test_common.py::test_balance_property[42-False-BayesianRidge]",
"sklearn/linear_model/tests/test_common.py::test_balance_property[42-True-BayesianRidge]",
"sklearn/linear_model/tests/test_bayes.py::test_bayesian_ridge_scores",
"sklearn/linear_model/tests/test_bayes.py::test_bayesian_ridge_score_values",
"sklearn/linear_model/tests/test_bayes.py::test_bayesian_ridge_parameter",
"sklearn/linear_model/tests/test_bayes.py::test_bayesian_sample_weights",
"sklearn/linear_model/tests/test_bayes.py::test_toy_bayesian_ridge_object",
"sklearn/linear_model/tests/test_bayes.py::test_bayesian_initial_params",
"sklearn/linear_model/tests/test_bayes.py::test_prediction_bayesian_ridge_ard_with_constant_input",
"sklearn/linear_model/tests/test_bayes.py::test_std_bayesian_ridge_ard_with_constant_input",
"sklearn/linear_model/tests/test_bayes.py::test_return_std[array]",
"sklearn/linear_model/tests/test_bayes.py::test_return_std[dataframe]",
"sklearn/linear_model/tests/test_bayes.py::test_dtype_match[BayesianRidge-float32]",
"sklearn/linear_model/tests/test_bayes.py::test_dtype_match[BayesianRidge-float64]",
"sklearn/linear_model/tests/test_bayes.py::test_dtype_correctness[BayesianRidge]",
"sklearn/linear_model/_bayes.py::sklearn.linear_model._bayes.BayesianRidge",
"sklearn/impute/_iterative.py::sklearn.impute._iterative.IterativeImputer",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_fit_score_takes_y]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_estimators_overwrite_params]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_estimators_dtypes]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_estimators_fit_returns_self]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_estimators_fit_returns_self(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_dtype_object]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_pipeline_consistency]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_estimators_pickle]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_estimators_pickle(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_f_contiguous_array_estimator]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_transformer_data_not_an_array]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_transformer_general]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_transformer_preserve_dtypes]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_transformer_general(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_transformer_n_iter]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_methods_sample_order_invariance]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_methods_subset_invariance]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_fit2d_1sample]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_dict_unchanged]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_dont_overwrite_parameters]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_fit_idempotent]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_fit_check_is_fitted]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_n_features_in]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_fit2d_predict1d]",
"sklearn/tests/test_common.py::test_check_n_features_in_after_fitting[BayesianRidge(max_iter=5)]",
"sklearn/tests/test_common.py::test_check_n_features_in_after_fitting[IterativeImputer()]",
"sklearn/tests/test_common.py::test_pandas_column_name_consistency[BayesianRidge(max_iter=5)]",
"sklearn/tests/test_common.py::test_pandas_column_name_consistency[IterativeImputer()]",
"sklearn/tests/test_common.py::test_transformers_get_feature_names_out[IterativeImputer()]",
"sklearn/tests/test_common.py::test_check_param_validation[BayesianRidge(max_iter=5)]",
"sklearn/tests/test_common.py::test_set_output_transform[IterativeImputer()]",
"sklearn/tests/test_common.py::test_set_output_transform_configured[check_set_output_transform_pandas-IterativeImputer()]",
"sklearn/tests/test_common.py::test_set_output_transform_configured[check_global_output_transform_pandas-IterativeImputer()]",
"sklearn/tests/test_common.py::test_check_inplace_ensure_writeable[BayesianRidge(max_iter=5)]"
],
"PASS_TO_PASS": null
}
|
scikit-learn__scikit-learn-10
|
1.0
|
{
"code": "diff --git b/sklearn/linear_model/_bayes.py a/sklearn/linear_model/_bayes.py\nindex 475588ca0..b6527d4f2 100644\n--- b/sklearn/linear_model/_bayes.py\n+++ a/sklearn/linear_model/_bayes.py\n@@ -367,6 +367,13 @@ class BayesianRidge(RegressorMixin, LinearModel):\n y_std : array-like of shape (n_samples,)\n Standard deviation of predictive distribution of query points.\n \"\"\"\n+ y_mean = self._decision_function(X)\n+ if not return_std:\n+ return y_mean\n+ else:\n+ sigmas_squared_data = (np.dot(X, self.sigma_) * X).sum(axis=1)\n+ y_std = np.sqrt(sigmas_squared_data + (1.0 / self.alpha_))\n+ return y_mean, y_std\n \n def _update_coef_(\n self, X, y, n_samples, n_features, XT_y, U, Vh, eigen_vals_, alpha_, lambda_\n",
"test": null
}
| null |
{
"code": "diff --git a/sklearn/linear_model/_bayes.py b/sklearn/linear_model/_bayes.py\nindex b6527d4f2..475588ca0 100644\n--- a/sklearn/linear_model/_bayes.py\n+++ b/sklearn/linear_model/_bayes.py\n@@ -367,13 +367,6 @@ class BayesianRidge(RegressorMixin, LinearModel):\n y_std : array-like of shape (n_samples,)\n Standard deviation of predictive distribution of query points.\n \"\"\"\n- y_mean = self._decision_function(X)\n- if not return_std:\n- return y_mean\n- else:\n- sigmas_squared_data = (np.dot(X, self.sigma_) * X).sum(axis=1)\n- y_std = np.sqrt(sigmas_squared_data + (1.0 / self.alpha_))\n- return y_mean, y_std\n \n def _update_coef_(\n self, X, y, n_samples, n_features, XT_y, U, Vh, eigen_vals_, alpha_, lambda_\n",
"test": null
}
| null |
scikit-learn/scikit-learn
|
c71340fd74280408b84be7ca008e1205e10c7830
|
2024-09-17T18:25:43+02:00
| null | null |
{
"code": "I want to add a new function in file in sklearn/linear_model/_bayes.py.\nHere is the description for the function:\n def predict(self, X, return_std=False):\n \"\"\"Predict using the linear model.\n\n In addition to the mean of the predictive distribution, also its\n standard deviation can be returned.\n\n Parameters\n ----------\n X : {array-like, sparse matrix} of shape (n_samples, n_features)\n Samples.\n\n return_std : bool, default=False\n Whether to return the standard deviation of posterior prediction.\n\n Returns\n -------\n y_mean : array-like of shape (n_samples,)\n Mean of predictive distribution of query points.\n\n y_std : array-like of shape (n_samples,)\n Standard deviation of predictive distribution of query points.\n \"\"\"\n",
"test": null
}
|
c71340fd74280408b84be7ca008e1205e10c7830
|
{
"FAIL_TO_PASS": [
"sklearn/impute/tests/test_impute.py::test_imputation_shape[csr_matrix-mean]",
"sklearn/impute/tests/test_impute.py::test_imputation_shape[csr_matrix-median]",
"sklearn/impute/tests/test_impute.py::test_imputation_shape[csr_matrix-most_frequent]",
"sklearn/impute/tests/test_impute.py::test_imputation_shape[csr_matrix-constant]",
"sklearn/impute/tests/test_impute.py::test_imputation_shape[csr_array-mean]",
"sklearn/impute/tests/test_impute.py::test_imputation_shape[csr_array-median]",
"sklearn/impute/tests/test_impute.py::test_imputation_shape[csr_array-most_frequent]",
"sklearn/impute/tests/test_impute.py::test_imputation_shape[csr_array-constant]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_zero_iters",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_verbose",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_imputation_order[random]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_imputation_order[roman]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_imputation_order[ascending]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_imputation_order[descending]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_imputation_order[arabic]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_estimators[None]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_estimators[estimator2]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_clip",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_clip_truncnorm",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_truncated_normal_posterior",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_missing_at_transform[mean]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_missing_at_transform[median]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_missing_at_transform[most_frequent]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_transform_stochasticity",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_rank_one",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_transform_recovery[3]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_transform_recovery[5]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_additive_matrix",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_early_stopping",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_catch_warning",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_min_max_array_like_imputation[None-vs-inf]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_min_max_array_like_imputation[Scalar-vs-vector]",
"sklearn/impute/tests/test_impute.py::test_iterative_imputer_skip_non_missing[False]",
"sklearn/impute/tests/test_impute.py::test_imputation_order[ascending-idx_order0]",
"sklearn/impute/tests/test_impute.py::test_imputation_order[descending-idx_order1]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_fit_score_takes_y]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_estimators_dtypes]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_sample_weights_invariance(kind=ones)]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_sample_weights_invariance(kind=zeros)]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_dtype_object]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_pipeline_consistency]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_estimators_nan_inf]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_estimators_pickle]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_estimators_pickle(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_f_contiguous_array_estimator]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_regressors_train]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_regressors_train(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_regressors_train(readonly_memmap=True,X_dtype=float32)]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_regressor_data_not_an_array]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_supervised_y_2d]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_regressors_int]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_estimators_unfitted]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_methods_sample_order_invariance]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_methods_subset_invariance]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_dict_unchanged]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_fit_idempotent]",
"sklearn/tests/test_common.py::test_estimators[BayesianRidge(max_iter=5)-check_fit2d_predict1d]",
"sklearn/impute/tests/test_common.py::test_imputers_add_indicator[IterativeImputer-nan]",
"sklearn/impute/tests/test_common.py::test_imputers_add_indicator[IterativeImputer--1]",
"sklearn/impute/tests/test_common.py::test_imputers_add_indicator[IterativeImputer-0]",
"sklearn/impute/tests/test_common.py::test_imputers_pandas_na_integer_array_support[True-IterativeImputer]",
"sklearn/impute/tests/test_common.py::test_imputers_pandas_na_integer_array_support[False-IterativeImputer]",
"sklearn/impute/tests/test_common.py::test_imputers_feature_names_out_pandas[True-IterativeImputer]",
"sklearn/impute/tests/test_common.py::test_imputers_feature_names_out_pandas[False-IterativeImputer]",
"sklearn/impute/tests/test_common.py::test_imputation_adds_missing_indicator_if_add_indicator_is_true[nan-IterativeImputer]",
"sklearn/impute/tests/test_common.py::test_imputation_adds_missing_indicator_if_add_indicator_is_true[1-IterativeImputer]",
"sklearn/linear_model/tests/test_common.py::test_balance_property[42-False-BayesianRidge]",
"sklearn/linear_model/tests/test_common.py::test_balance_property[42-True-BayesianRidge]",
"sklearn/linear_model/tests/test_bayes.py::test_toy_bayesian_ridge_object",
"sklearn/linear_model/tests/test_bayes.py::test_bayesian_initial_params",
"sklearn/linear_model/tests/test_bayes.py::test_prediction_bayesian_ridge_ard_with_constant_input",
"sklearn/linear_model/tests/test_bayes.py::test_std_bayesian_ridge_ard_with_constant_input",
"sklearn/linear_model/tests/test_bayes.py::test_return_std[array]",
"sklearn/linear_model/tests/test_bayes.py::test_return_std[dataframe]",
"sklearn/linear_model/tests/test_bayes.py::test_dtype_match[BayesianRidge-float32]",
"sklearn/linear_model/tests/test_bayes.py::test_dtype_match[BayesianRidge-float64]",
"sklearn/linear_model/_bayes.py::sklearn.linear_model._bayes.BayesianRidge",
"sklearn/impute/_iterative.py::sklearn.impute._iterative.IterativeImputer",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_estimators_pickle]",
"sklearn/tests/test_common.py::test_estimators[IterativeImputer()-check_estimators_pickle(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_check_n_features_in_after_fitting[BayesianRidge(max_iter=5)]",
"sklearn/tests/test_common.py::test_pandas_column_name_consistency[BayesianRidge(max_iter=5)]"
],
"PASS_TO_PASS": null
}
|
scikit-learn__scikit-learn-11
|
1.0
|
{
"code": "diff --git b/sklearn/neural_network/_rbm.py a/sklearn/neural_network/_rbm.py\nindex 9e29bd3d7..49848e9f9 100644\n--- b/sklearn/neural_network/_rbm.py\n+++ a/sklearn/neural_network/_rbm.py\n@@ -382,6 +382,7 @@ class BernoulliRBM(ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstima\n # log(expit(x)) = log(1 / (1 + exp(-x)) = -np.logaddexp(0, -x)\n return -v.shape[1] * np.logaddexp(0, -(fe_ - fe))\n \n+ @_fit_context(prefer_skip_nested_validation=True)\n def fit(self, X, y=None):\n \"\"\"Fit the model to the data X.\n \n@@ -398,6 +399,44 @@ class BernoulliRBM(ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstima\n self : BernoulliRBM\n The fitted model.\n \"\"\"\n+ X = validate_data(self, X, accept_sparse=\"csr\", dtype=(np.float64, np.float32))\n+ n_samples = X.shape[0]\n+ rng = check_random_state(self.random_state)\n+\n+ self.components_ = np.asarray(\n+ rng.normal(0, 0.01, (self.n_components, X.shape[1])),\n+ order=\"F\",\n+ dtype=X.dtype,\n+ )\n+ self._n_features_out = self.components_.shape[0]\n+ self.intercept_hidden_ = np.zeros(self.n_components, dtype=X.dtype)\n+ self.intercept_visible_ = np.zeros(X.shape[1], dtype=X.dtype)\n+ self.h_samples_ = np.zeros((self.batch_size, self.n_components), dtype=X.dtype)\n+\n+ n_batches = int(np.ceil(float(n_samples) / self.batch_size))\n+ batch_slices = list(\n+ gen_even_slices(n_batches * self.batch_size, n_batches, n_samples=n_samples)\n+ )\n+ verbose = self.verbose\n+ begin = time.time()\n+ for iteration in range(1, self.n_iter + 1):\n+ for batch_slice in batch_slices:\n+ self._fit(X[batch_slice], rng)\n+\n+ if verbose:\n+ end = time.time()\n+ print(\n+ \"[%s] Iteration %d, pseudo-likelihood = %.2f, time = %.2fs\"\n+ % (\n+ type(self).__name__,\n+ iteration,\n+ self.score_samples(X).mean(),\n+ end - begin,\n+ )\n+ )\n+ begin = end\n+\n+ return self\n \n def __sklearn_tags__(self):\n tags = super().__sklearn_tags__()\n",
"test": null
}
| null |
{
"code": "diff --git a/sklearn/neural_network/_rbm.py b/sklearn/neural_network/_rbm.py\nindex 49848e9f9..9e29bd3d7 100644\n--- a/sklearn/neural_network/_rbm.py\n+++ b/sklearn/neural_network/_rbm.py\n@@ -382,7 +382,6 @@ class BernoulliRBM(ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstima\n # log(expit(x)) = log(1 / (1 + exp(-x)) = -np.logaddexp(0, -x)\n return -v.shape[1] * np.logaddexp(0, -(fe_ - fe))\n \n- @_fit_context(prefer_skip_nested_validation=True)\n def fit(self, X, y=None):\n \"\"\"Fit the model to the data X.\n \n@@ -399,44 +398,6 @@ class BernoulliRBM(ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstima\n self : BernoulliRBM\n The fitted model.\n \"\"\"\n- X = validate_data(self, X, accept_sparse=\"csr\", dtype=(np.float64, np.float32))\n- n_samples = X.shape[0]\n- rng = check_random_state(self.random_state)\n-\n- self.components_ = np.asarray(\n- rng.normal(0, 0.01, (self.n_components, X.shape[1])),\n- order=\"F\",\n- dtype=X.dtype,\n- )\n- self._n_features_out = self.components_.shape[0]\n- self.intercept_hidden_ = np.zeros(self.n_components, dtype=X.dtype)\n- self.intercept_visible_ = np.zeros(X.shape[1], dtype=X.dtype)\n- self.h_samples_ = np.zeros((self.batch_size, self.n_components), dtype=X.dtype)\n-\n- n_batches = int(np.ceil(float(n_samples) / self.batch_size))\n- batch_slices = list(\n- gen_even_slices(n_batches * self.batch_size, n_batches, n_samples=n_samples)\n- )\n- verbose = self.verbose\n- begin = time.time()\n- for iteration in range(1, self.n_iter + 1):\n- for batch_slice in batch_slices:\n- self._fit(X[batch_slice], rng)\n-\n- if verbose:\n- end = time.time()\n- print(\n- \"[%s] Iteration %d, pseudo-likelihood = %.2f, time = %.2fs\"\n- % (\n- type(self).__name__,\n- iteration,\n- self.score_samples(X).mean(),\n- end - begin,\n- )\n- )\n- begin = end\n-\n- return self\n \n def __sklearn_tags__(self):\n tags = super().__sklearn_tags__()\n",
"test": null
}
| null |
scikit-learn/scikit-learn
|
c71340fd74280408b84be7ca008e1205e10c7830
|
2024-09-17T18:25:43+02:00
| null | null |
{
"code": "I want to add a new function in file in sklearn/neural_network/_rbm.py.\nHere is the description for the function:\n def fit(self, X, y=None):\n \"\"\"Fit the model to the data X.\n\n Parameters\n ----------\n X : {array-like, sparse matrix} of shape (n_samples, n_features)\n Training data.\n\n y : array-like of shape (n_samples,) or (n_samples, n_outputs), default=None\n Target values (None for unsupervised transformations).\n\n Returns\n -------\n self : BernoulliRBM\n The fitted model.\n \"\"\"\n",
"test": null
}
|
c71340fd74280408b84be7ca008e1205e10c7830
|
{
"FAIL_TO_PASS": [
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_fit_score_takes_y]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_estimators_overwrite_params]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_estimators_dtypes]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_estimators_fit_returns_self]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_estimators_fit_returns_self(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_complex_data]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_dtype_object]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_estimators_empty_data_messages]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_pipeline_consistency]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_estimators_nan_inf]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_estimator_sparse_array]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_estimator_sparse_matrix]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_estimators_pickle]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_estimators_pickle(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_f_contiguous_array_estimator]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_transformer_data_not_an_array]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_transformer_general]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_transformer_preserve_dtypes]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_transformer_general(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_fit2d_1sample]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_fit2d_1feature]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_components=1,n_iter=5)-check_dict_unchanged]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_dont_overwrite_parameters]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_fit_idempotent]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_fit_check_is_fitted]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_n_features_in]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_fit1d]",
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_fit2d_predict1d]",
"sklearn/neural_network/tests/test_rbm.py::test_fit",
"sklearn/neural_network/tests/test_rbm.py::test_transform",
"sklearn/neural_network/tests/test_rbm.py::test_small_sparse[csr_matrix]",
"sklearn/neural_network/tests/test_rbm.py::test_small_sparse[csr_array]",
"sklearn/neural_network/tests/test_rbm.py::test_sample_hiddens",
"sklearn/neural_network/tests/test_rbm.py::test_fit_gibbs[csc_matrix]",
"sklearn/neural_network/tests/test_rbm.py::test_fit_gibbs[csc_array]",
"sklearn/neural_network/tests/test_rbm.py::test_gibbs_smoke",
"sklearn/neural_network/tests/test_rbm.py::test_score_samples[lil_matrix]",
"sklearn/neural_network/tests/test_rbm.py::test_score_samples[lil_array]",
"sklearn/neural_network/tests/test_rbm.py::test_rbm_verbose",
"sklearn/neural_network/tests/test_rbm.py::test_sparse_and_verbose[csc_matrix]",
"sklearn/neural_network/tests/test_rbm.py::test_sparse_and_verbose[csc_array]",
"sklearn/neural_network/tests/test_rbm.py::test_transformer_dtypes_casting[float32-float32]",
"sklearn/neural_network/tests/test_rbm.py::test_transformer_dtypes_casting[float64-float64]",
"sklearn/neural_network/tests/test_rbm.py::test_transformer_dtypes_casting[int-float64]",
"sklearn/neural_network/tests/test_rbm.py::test_convergence_dtype_consistency",
"sklearn/neural_network/tests/test_rbm.py::test_feature_names_out[fit]",
"sklearn/neural_network/_rbm.py::sklearn.neural_network._rbm.BernoulliRBM",
"sklearn/tests/test_common.py::test_check_n_features_in_after_fitting[BernoulliRBM(n_iter=5)]",
"sklearn/tests/test_common.py::test_pandas_column_name_consistency[BernoulliRBM(n_iter=5)]",
"sklearn/tests/test_common.py::test_transformers_get_feature_names_out[BernoulliRBM(n_iter=5)]",
"sklearn/tests/test_common.py::test_check_param_validation[BernoulliRBM(n_iter=5)]",
"sklearn/tests/test_common.py::test_set_output_transform[BernoulliRBM(n_iter=5)]",
"sklearn/tests/test_common.py::test_set_output_transform_configured[check_set_output_transform_pandas-BernoulliRBM(n_iter=5)]",
"sklearn/tests/test_common.py::test_set_output_transform_configured[check_global_output_transform_pandas-BernoulliRBM(n_iter=5)]"
],
"PASS_TO_PASS": null
}
|
scikit-learn__scikit-learn-12
|
1.0
|
{
"code": "diff --git b/sklearn/neural_network/_rbm.py a/sklearn/neural_network/_rbm.py\nindex 2f53aedb8..49848e9f9 100644\n--- b/sklearn/neural_network/_rbm.py\n+++ a/sklearn/neural_network/_rbm.py\n@@ -269,6 +269,7 @@ class BernoulliRBM(ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstima\n \n return v_\n \n+ @_fit_context(prefer_skip_nested_validation=True)\n def partial_fit(self, X, y=None):\n \"\"\"Fit the model to the partial segment of the data X.\n \n@@ -285,6 +286,30 @@ class BernoulliRBM(ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstima\n self : BernoulliRBM\n The fitted model.\n \"\"\"\n+ first_pass = not hasattr(self, \"components_\")\n+ X = validate_data(\n+ self, X, accept_sparse=\"csr\", dtype=np.float64, reset=first_pass\n+ )\n+ if not hasattr(self, \"random_state_\"):\n+ self.random_state_ = check_random_state(self.random_state)\n+ if not hasattr(self, \"components_\"):\n+ self.components_ = np.asarray(\n+ self.random_state_.normal(0, 0.01, (self.n_components, X.shape[1])),\n+ order=\"F\",\n+ )\n+ self._n_features_out = self.components_.shape[0]\n+ if not hasattr(self, \"intercept_hidden_\"):\n+ self.intercept_hidden_ = np.zeros(\n+ self.n_components,\n+ )\n+ if not hasattr(self, \"intercept_visible_\"):\n+ self.intercept_visible_ = np.zeros(\n+ X.shape[1],\n+ )\n+ if not hasattr(self, \"h_samples_\"):\n+ self.h_samples_ = np.zeros((self.batch_size, self.n_components))\n+\n+ self._fit(X, self.random_state_)\n \n def _fit(self, v_pos, rng):\n \"\"\"Inner fit for one mini-batch.\n",
"test": null
}
| null |
{
"code": "diff --git a/sklearn/neural_network/_rbm.py b/sklearn/neural_network/_rbm.py\nindex 49848e9f9..2f53aedb8 100644\n--- a/sklearn/neural_network/_rbm.py\n+++ b/sklearn/neural_network/_rbm.py\n@@ -269,7 +269,6 @@ class BernoulliRBM(ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstima\n \n return v_\n \n- @_fit_context(prefer_skip_nested_validation=True)\n def partial_fit(self, X, y=None):\n \"\"\"Fit the model to the partial segment of the data X.\n \n@@ -286,30 +285,6 @@ class BernoulliRBM(ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstima\n self : BernoulliRBM\n The fitted model.\n \"\"\"\n- first_pass = not hasattr(self, \"components_\")\n- X = validate_data(\n- self, X, accept_sparse=\"csr\", dtype=np.float64, reset=first_pass\n- )\n- if not hasattr(self, \"random_state_\"):\n- self.random_state_ = check_random_state(self.random_state)\n- if not hasattr(self, \"components_\"):\n- self.components_ = np.asarray(\n- self.random_state_.normal(0, 0.01, (self.n_components, X.shape[1])),\n- order=\"F\",\n- )\n- self._n_features_out = self.components_.shape[0]\n- if not hasattr(self, \"intercept_hidden_\"):\n- self.intercept_hidden_ = np.zeros(\n- self.n_components,\n- )\n- if not hasattr(self, \"intercept_visible_\"):\n- self.intercept_visible_ = np.zeros(\n- X.shape[1],\n- )\n- if not hasattr(self, \"h_samples_\"):\n- self.h_samples_ = np.zeros((self.batch_size, self.n_components))\n-\n- self._fit(X, self.random_state_)\n \n def _fit(self, v_pos, rng):\n \"\"\"Inner fit for one mini-batch.\n",
"test": null
}
| null |
scikit-learn/scikit-learn
|
c71340fd74280408b84be7ca008e1205e10c7830
|
2024-09-17T18:25:43+02:00
| null | null |
{
"code": "I want to add a new function in file in sklearn/neural_network/_rbm.py.\nHere is the description for the function:\n def partial_fit(self, X, y=None):\n \"\"\"Fit the model to the partial segment of the data X.\n\n Parameters\n ----------\n X : ndarray of shape (n_samples, n_features)\n Training data.\n\n y : array-like of shape (n_samples,) or (n_samples, n_outputs), default=None\n Target values (None for unsupervised transformations).\n\n Returns\n -------\n self : BernoulliRBM\n The fitted model.\n \"\"\"\n",
"test": null
}
|
c71340fd74280408b84be7ca008e1205e10c7830
|
{
"FAIL_TO_PASS": [
"sklearn/tests/test_common.py::test_estimators[BernoulliRBM(n_iter=5)-check_fit_score_takes_y]",
"sklearn/neural_network/tests/test_rbm.py::test_partial_fit",
"sklearn/neural_network/tests/test_rbm.py::test_small_sparse_partial_fit[csc_matrix]",
"sklearn/neural_network/tests/test_rbm.py::test_small_sparse_partial_fit[csc_array]",
"sklearn/neural_network/tests/test_rbm.py::test_small_sparse_partial_fit[csr_matrix]",
"sklearn/neural_network/tests/test_rbm.py::test_small_sparse_partial_fit[csr_array]",
"sklearn/neural_network/tests/test_rbm.py::test_feature_names_out[partial_fit]",
"sklearn/tests/test_common.py::test_check_n_features_in_after_fitting[BernoulliRBM(n_iter=5)]",
"sklearn/tests/test_common.py::test_pandas_column_name_consistency[BernoulliRBM(n_iter=5)]",
"sklearn/tests/test_common.py::test_check_param_validation[BernoulliRBM(n_iter=5)]"
],
"PASS_TO_PASS": null
}
|
scikit-learn__scikit-learn-13
|
1.0
|
{
"code": "diff --git b/sklearn/neural_network/_rbm.py a/sklearn/neural_network/_rbm.py\nindex 4d1bb5988..49848e9f9 100644\n--- b/sklearn/neural_network/_rbm.py\n+++ a/sklearn/neural_network/_rbm.py\n@@ -360,6 +360,27 @@ class BernoulliRBM(ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstima\n free energy on X, then on a randomly corrupted version of X, and\n returns the log of the logistic function of the difference.\n \"\"\"\n+ check_is_fitted(self)\n+\n+ v = validate_data(self, X, accept_sparse=\"csr\", reset=False)\n+ rng = check_random_state(self.random_state)\n+\n+ # Randomly corrupt one feature in each sample in v.\n+ ind = (np.arange(v.shape[0]), rng.randint(0, v.shape[1], v.shape[0]))\n+ if sp.issparse(v):\n+ data = -2 * v[ind] + 1\n+ if isinstance(data, np.matrix): # v is a sparse matrix\n+ v_ = v + sp.csr_matrix((data.A.ravel(), ind), shape=v.shape)\n+ else: # v is a sparse array\n+ v_ = v + sp.csr_array((data.ravel(), ind), shape=v.shape)\n+ else:\n+ v_ = v.copy()\n+ v_[ind] = 1 - v_[ind]\n+\n+ fe = self._free_energy(v)\n+ fe_ = self._free_energy(v_)\n+ # log(expit(x)) = log(1 / (1 + exp(-x)) = -np.logaddexp(0, -x)\n+ return -v.shape[1] * np.logaddexp(0, -(fe_ - fe))\n \n @_fit_context(prefer_skip_nested_validation=True)\n def fit(self, X, y=None):\n",
"test": null
}
| null |
{
"code": "diff --git a/sklearn/neural_network/_rbm.py b/sklearn/neural_network/_rbm.py\nindex 49848e9f9..4d1bb5988 100644\n--- a/sklearn/neural_network/_rbm.py\n+++ b/sklearn/neural_network/_rbm.py\n@@ -360,27 +360,6 @@ class BernoulliRBM(ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstima\n free energy on X, then on a randomly corrupted version of X, and\n returns the log of the logistic function of the difference.\n \"\"\"\n- check_is_fitted(self)\n-\n- v = validate_data(self, X, accept_sparse=\"csr\", reset=False)\n- rng = check_random_state(self.random_state)\n-\n- # Randomly corrupt one feature in each sample in v.\n- ind = (np.arange(v.shape[0]), rng.randint(0, v.shape[1], v.shape[0]))\n- if sp.issparse(v):\n- data = -2 * v[ind] + 1\n- if isinstance(data, np.matrix): # v is a sparse matrix\n- v_ = v + sp.csr_matrix((data.A.ravel(), ind), shape=v.shape)\n- else: # v is a sparse array\n- v_ = v + sp.csr_array((data.ravel(), ind), shape=v.shape)\n- else:\n- v_ = v.copy()\n- v_[ind] = 1 - v_[ind]\n-\n- fe = self._free_energy(v)\n- fe_ = self._free_energy(v_)\n- # log(expit(x)) = log(1 / (1 + exp(-x)) = -np.logaddexp(0, -x)\n- return -v.shape[1] * np.logaddexp(0, -(fe_ - fe))\n \n @_fit_context(prefer_skip_nested_validation=True)\n def fit(self, X, y=None):\n",
"test": null
}
| null |
scikit-learn/scikit-learn
|
c71340fd74280408b84be7ca008e1205e10c7830
|
2024-09-17T18:25:43+02:00
| null | null |
{
"code": "I want to add a new function in file in sklearn/neural_network/_rbm.py.\nHere is the description for the function:\n def score_samples(self, X):\n \"\"\"Compute the pseudo-likelihood of X.\n\n Parameters\n ----------\n X : {array-like, sparse matrix} of shape (n_samples, n_features)\n Values of the visible layer. Must be all-boolean (not checked).\n\n Returns\n -------\n pseudo_likelihood : ndarray of shape (n_samples,)\n Value of the pseudo-likelihood (proxy for likelihood).\n\n Notes\n -----\n This method is not deterministic: it computes a quantity called the\n free energy on X, then on a randomly corrupted version of X, and\n returns the log of the logistic function of the difference.\n \"\"\"\n",
"test": null
}
|
c71340fd74280408b84be7ca008e1205e10c7830
|
{
"FAIL_TO_PASS": [
"sklearn/neural_network/tests/test_rbm.py::test_fit",
"sklearn/neural_network/tests/test_rbm.py::test_partial_fit",
"sklearn/neural_network/tests/test_rbm.py::test_small_sparse_partial_fit[csc_matrix]",
"sklearn/neural_network/tests/test_rbm.py::test_small_sparse_partial_fit[csc_array]",
"sklearn/neural_network/tests/test_rbm.py::test_small_sparse_partial_fit[csr_matrix]",
"sklearn/neural_network/tests/test_rbm.py::test_small_sparse_partial_fit[csr_array]",
"sklearn/neural_network/tests/test_rbm.py::test_score_samples[lil_matrix]",
"sklearn/neural_network/tests/test_rbm.py::test_score_samples[lil_array]",
"sklearn/neural_network/tests/test_rbm.py::test_rbm_verbose",
"sklearn/neural_network/tests/test_rbm.py::test_sparse_and_verbose[csc_matrix]",
"sklearn/neural_network/tests/test_rbm.py::test_sparse_and_verbose[csc_array]",
"sklearn/tests/test_common.py::test_pandas_column_name_consistency[BernoulliRBM(n_iter=5)]"
],
"PASS_TO_PASS": null
}
|
scikit-learn__scikit-learn-14
|
1.0
|
{
"code": "diff --git b/sklearn/cluster/_bisect_k_means.py a/sklearn/cluster/_bisect_k_means.py\nindex 44a9451a8..83ac46829 100644\n--- b/sklearn/cluster/_bisect_k_means.py\n+++ a/sklearn/cluster/_bisect_k_means.py\n@@ -356,6 +356,7 @@ class BisectingKMeans(_BaseKMeans):\n \n cluster_to_bisect.split(best_labels, best_centers, scores)\n \n+ @_fit_context(prefer_skip_nested_validation=True)\n def fit(self, X, y=None, sample_weight=None):\n \"\"\"Compute bisecting k-means clustering.\n \n@@ -382,6 +383,72 @@ class BisectingKMeans(_BaseKMeans):\n self\n Fitted estimator.\n \"\"\"\n+ X = validate_data(\n+ self,\n+ X,\n+ accept_sparse=\"csr\",\n+ dtype=[np.float64, np.float32],\n+ order=\"C\",\n+ copy=self.copy_x,\n+ accept_large_sparse=False,\n+ )\n+\n+ self._check_params_vs_input(X)\n+\n+ self._random_state = check_random_state(self.random_state)\n+ sample_weight = _check_sample_weight(sample_weight, X, dtype=X.dtype)\n+ self._n_threads = _openmp_effective_n_threads()\n+\n+ if self.algorithm == \"lloyd\" or self.n_clusters == 1:\n+ self._kmeans_single = _kmeans_single_lloyd\n+ self._check_mkl_vcomp(X, X.shape[0])\n+ else:\n+ self._kmeans_single = _kmeans_single_elkan\n+\n+ # Subtract of mean of X for more accurate distance computations\n+ if not sp.issparse(X):\n+ self._X_mean = X.mean(axis=0)\n+ X -= self._X_mean\n+\n+ # Initialize the hierarchical clusters tree\n+ self._bisecting_tree = _BisectingTree(\n+ indices=np.arange(X.shape[0]),\n+ center=X.mean(axis=0),\n+ score=0,\n+ )\n+\n+ x_squared_norms = row_norms(X, squared=True)\n+\n+ for _ in range(self.n_clusters - 1):\n+ # Chose cluster to bisect\n+ cluster_to_bisect = self._bisecting_tree.get_cluster_to_bisect()\n+\n+ # Split this cluster into 2 subclusters\n+ self._bisect(X, x_squared_norms, sample_weight, cluster_to_bisect)\n+\n+ # Aggregate final labels and centers from the bisecting tree\n+ self.labels_ = np.full(X.shape[0], -1, dtype=np.int32)\n+ self.cluster_centers_ = np.empty((self.n_clusters, X.shape[1]), dtype=X.dtype)\n+\n+ for i, cluster_node in enumerate(self._bisecting_tree.iter_leaves()):\n+ self.labels_[cluster_node.indices] = i\n+ self.cluster_centers_[i] = cluster_node.center\n+ cluster_node.label = i # label final clusters for future prediction\n+ cluster_node.indices = None # release memory\n+\n+ # Restore original data\n+ if not sp.issparse(X):\n+ X += self._X_mean\n+ self.cluster_centers_ += self._X_mean\n+\n+ _inertia = _inertia_sparse if sp.issparse(X) else _inertia_dense\n+ self.inertia_ = _inertia(\n+ X, sample_weight, self.cluster_centers_, self.labels_, self._n_threads\n+ )\n+\n+ self._n_features_out = self.cluster_centers_.shape[0]\n+\n+ return self\n \n def predict(self, X):\n \"\"\"Predict which cluster each sample in X belongs to.\n",
"test": null
}
| null |
{
"code": "diff --git a/sklearn/cluster/_bisect_k_means.py b/sklearn/cluster/_bisect_k_means.py\nindex 83ac46829..44a9451a8 100644\n--- a/sklearn/cluster/_bisect_k_means.py\n+++ b/sklearn/cluster/_bisect_k_means.py\n@@ -356,7 +356,6 @@ class BisectingKMeans(_BaseKMeans):\n \n cluster_to_bisect.split(best_labels, best_centers, scores)\n \n- @_fit_context(prefer_skip_nested_validation=True)\n def fit(self, X, y=None, sample_weight=None):\n \"\"\"Compute bisecting k-means clustering.\n \n@@ -383,72 +382,6 @@ class BisectingKMeans(_BaseKMeans):\n self\n Fitted estimator.\n \"\"\"\n- X = validate_data(\n- self,\n- X,\n- accept_sparse=\"csr\",\n- dtype=[np.float64, np.float32],\n- order=\"C\",\n- copy=self.copy_x,\n- accept_large_sparse=False,\n- )\n-\n- self._check_params_vs_input(X)\n-\n- self._random_state = check_random_state(self.random_state)\n- sample_weight = _check_sample_weight(sample_weight, X, dtype=X.dtype)\n- self._n_threads = _openmp_effective_n_threads()\n-\n- if self.algorithm == \"lloyd\" or self.n_clusters == 1:\n- self._kmeans_single = _kmeans_single_lloyd\n- self._check_mkl_vcomp(X, X.shape[0])\n- else:\n- self._kmeans_single = _kmeans_single_elkan\n-\n- # Subtract of mean of X for more accurate distance computations\n- if not sp.issparse(X):\n- self._X_mean = X.mean(axis=0)\n- X -= self._X_mean\n-\n- # Initialize the hierarchical clusters tree\n- self._bisecting_tree = _BisectingTree(\n- indices=np.arange(X.shape[0]),\n- center=X.mean(axis=0),\n- score=0,\n- )\n-\n- x_squared_norms = row_norms(X, squared=True)\n-\n- for _ in range(self.n_clusters - 1):\n- # Chose cluster to bisect\n- cluster_to_bisect = self._bisecting_tree.get_cluster_to_bisect()\n-\n- # Split this cluster into 2 subclusters\n- self._bisect(X, x_squared_norms, sample_weight, cluster_to_bisect)\n-\n- # Aggregate final labels and centers from the bisecting tree\n- self.labels_ = np.full(X.shape[0], -1, dtype=np.int32)\n- self.cluster_centers_ = np.empty((self.n_clusters, X.shape[1]), dtype=X.dtype)\n-\n- for i, cluster_node in enumerate(self._bisecting_tree.iter_leaves()):\n- self.labels_[cluster_node.indices] = i\n- self.cluster_centers_[i] = cluster_node.center\n- cluster_node.label = i # label final clusters for future prediction\n- cluster_node.indices = None # release memory\n-\n- # Restore original data\n- if not sp.issparse(X):\n- X += self._X_mean\n- self.cluster_centers_ += self._X_mean\n-\n- _inertia = _inertia_sparse if sp.issparse(X) else _inertia_dense\n- self.inertia_ = _inertia(\n- X, sample_weight, self.cluster_centers_, self.labels_, self._n_threads\n- )\n-\n- self._n_features_out = self.cluster_centers_.shape[0]\n-\n- return self\n \n def predict(self, X):\n \"\"\"Predict which cluster each sample in X belongs to.\n",
"test": null
}
| null |
scikit-learn/scikit-learn
|
c71340fd74280408b84be7ca008e1205e10c7830
|
2024-09-17T18:25:43+02:00
| null | null |
{
"code": "I want to add a new function in file in sklearn/cluster/_bisect_k_means.py.\nHere is the description for the function:\n def fit(self, X, y=None, sample_weight=None):\n \"\"\"Compute bisecting k-means clustering.\n\n Parameters\n ----------\n X : {array-like, sparse matrix} of shape (n_samples, n_features)\n\n Training instances to cluster.\n\n .. note:: The data will be converted to C ordering,\n which will cause a memory copy\n if the given data is not C-contiguous.\n\n y : Ignored\n Not used, present here for API consistency by convention.\n\n sample_weight : array-like of shape (n_samples,), default=None\n The weights for each observation in X. If None, all observations\n are assigned equal weight. `sample_weight` is not used during\n initialization if `init` is a callable.\n\n Returns\n -------\n self\n Fitted estimator.\n \"\"\"\n",
"test": null
}
|
c71340fd74280408b84be7ca008e1205e10c7830
|
{
"FAIL_TO_PASS": [
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_fit_score_takes_y]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_estimators_overwrite_params]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_estimators_dtypes]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_sample_weights_pandas_series]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_sample_weights_not_an_array]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_sample_weights_list]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_sample_weights_shape]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_sample_weights_not_overwritten]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_estimators_fit_returns_self]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_estimators_fit_returns_self(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_complex_data]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_dtype_object]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_estimators_empty_data_messages]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_pipeline_consistency]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_estimators_nan_inf]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_estimator_sparse_array]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_estimator_sparse_matrix]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_estimators_pickle]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_estimators_pickle(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_f_contiguous_array_estimator]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_transformer_data_not_an_array]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_transformer_general]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_transformer_preserve_dtypes]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_transformer_general(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_clustering]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_clustering(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_methods_sample_order_invariance]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_methods_subset_invariance]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_fit2d_1sample]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_fit2d_1feature]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=1,n_init=2)-check_dict_unchanged]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_dont_overwrite_parameters]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_fit_idempotent]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_fit_check_is_fitted]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_n_features_in]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_fit1d]",
"sklearn/tests/test_common.py::test_estimators[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)-check_fit2d_predict1d]",
"sklearn/cluster/tests/test_bisect_k_means.py::test_three_clusters[k-means++-biggest_inertia]",
"sklearn/cluster/tests/test_bisect_k_means.py::test_three_clusters[k-means++-largest_cluster]",
"sklearn/cluster/tests/test_bisect_k_means.py::test_three_clusters[random-biggest_inertia]",
"sklearn/cluster/tests/test_bisect_k_means.py::test_three_clusters[random-largest_cluster]",
"sklearn/cluster/tests/test_bisect_k_means.py::test_sparse[csr_matrix]",
"sklearn/cluster/tests/test_bisect_k_means.py::test_sparse[csr_array]",
"sklearn/cluster/tests/test_bisect_k_means.py::test_n_clusters[4]",
"sklearn/cluster/tests/test_bisect_k_means.py::test_n_clusters[5]",
"sklearn/cluster/tests/test_bisect_k_means.py::test_one_cluster",
"sklearn/cluster/tests/test_bisect_k_means.py::test_fit_predict[csr_matrix]",
"sklearn/cluster/tests/test_bisect_k_means.py::test_fit_predict[csr_array]",
"sklearn/cluster/tests/test_bisect_k_means.py::test_fit_predict[None]",
"sklearn/cluster/tests/test_bisect_k_means.py::test_dtype_preserved[float64-csr_matrix]",
"sklearn/cluster/tests/test_bisect_k_means.py::test_dtype_preserved[float64-csr_array]",
"sklearn/cluster/tests/test_bisect_k_means.py::test_dtype_preserved[float64-None]",
"sklearn/cluster/tests/test_bisect_k_means.py::test_float32_float64_equivalence[csr_matrix]",
"sklearn/cluster/tests/test_bisect_k_means.py::test_float32_float64_equivalence[csr_array]",
"sklearn/cluster/tests/test_bisect_k_means.py::test_float32_float64_equivalence[None]",
"sklearn/cluster/tests/test_bisect_k_means.py::test_no_crash_on_empty_bisections[lloyd]",
"sklearn/cluster/tests/test_bisect_k_means.py::test_no_crash_on_empty_bisections[elkan]",
"sklearn/cluster/tests/test_bisect_k_means.py::test_one_feature",
"sklearn/cluster/_bisect_k_means.py::sklearn.cluster._bisect_k_means.BisectingKMeans",
"sklearn/tests/test_common.py::test_check_n_features_in_after_fitting[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)]",
"sklearn/tests/test_common.py::test_pandas_column_name_consistency[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)]",
"sklearn/tests/test_common.py::test_transformers_get_feature_names_out[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)]",
"sklearn/tests/test_common.py::test_check_param_validation[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)]",
"sklearn/tests/test_common.py::test_set_output_transform[BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)]",
"sklearn/tests/test_common.py::test_set_output_transform_configured[check_set_output_transform_pandas-BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)]",
"sklearn/tests/test_common.py::test_set_output_transform_configured[check_global_output_transform_pandas-BisectingKMeans(max_iter=5,n_clusters=2,n_init=2)]"
],
"PASS_TO_PASS": null
}
|
scikit-learn__scikit-learn-15
|
1.0
|
{
"code": "diff --git b/sklearn/calibration.py a/sklearn/calibration.py\nindex e08464533..8b053f538 100644\n--- b/sklearn/calibration.py\n+++ a/sklearn/calibration.py\n@@ -289,6 +289,10 @@ class CalibratedClassifierCV(ClassifierMixin, MetaEstimatorMixin, BaseEstimator)\n \n return estimator\n \n+ @_fit_context(\n+ # CalibratedClassifierCV.estimator is not validated yet\n+ prefer_skip_nested_validation=False\n+ )\n def fit(self, X, y, sample_weight=None, **fit_params):\n \"\"\"Fit the calibrated model.\n \n@@ -312,6 +316,156 @@ class CalibratedClassifierCV(ClassifierMixin, MetaEstimatorMixin, BaseEstimator)\n self : object\n Returns an instance of self.\n \"\"\"\n+ check_classification_targets(y)\n+ X, y = indexable(X, y)\n+ if sample_weight is not None:\n+ sample_weight = _check_sample_weight(sample_weight, X)\n+\n+ estimator = self._get_estimator()\n+\n+ self.calibrated_classifiers_ = []\n+ if self.cv == \"prefit\":\n+ # `classes_` should be consistent with that of estimator\n+ check_is_fitted(self.estimator, attributes=[\"classes_\"])\n+ self.classes_ = self.estimator.classes_\n+\n+ predictions, _ = _get_response_values(\n+ estimator,\n+ X,\n+ response_method=[\"decision_function\", \"predict_proba\"],\n+ )\n+ if predictions.ndim == 1:\n+ # Reshape binary output from `(n_samples,)` to `(n_samples, 1)`\n+ predictions = predictions.reshape(-1, 1)\n+\n+ calibrated_classifier = _fit_calibrator(\n+ estimator,\n+ predictions,\n+ y,\n+ self.classes_,\n+ self.method,\n+ sample_weight,\n+ )\n+ self.calibrated_classifiers_.append(calibrated_classifier)\n+ else:\n+ # Set `classes_` using all `y`\n+ label_encoder_ = LabelEncoder().fit(y)\n+ self.classes_ = label_encoder_.classes_\n+\n+ if _routing_enabled():\n+ routed_params = process_routing(\n+ self,\n+ \"fit\",\n+ sample_weight=sample_weight,\n+ **fit_params,\n+ )\n+ else:\n+ # sample_weight checks\n+ fit_parameters = signature(estimator.fit).parameters\n+ supports_sw = \"sample_weight\" in fit_parameters\n+ if sample_weight is not None and not supports_sw:\n+ estimator_name = type(estimator).__name__\n+ warnings.warn(\n+ f\"Since {estimator_name} does not appear to accept\"\n+ \" sample_weight, sample weights will only be used for the\"\n+ \" calibration itself. This can be caused by a limitation of\"\n+ \" the current scikit-learn API. See the following issue for\"\n+ \" more details:\"\n+ \" https://github.com/scikit-learn/scikit-learn/issues/21134.\"\n+ \" Be warned that the result of the calibration is likely to be\"\n+ \" incorrect.\"\n+ )\n+ routed_params = Bunch()\n+ routed_params.splitter = Bunch(split={}) # no routing for splitter\n+ routed_params.estimator = Bunch(fit=fit_params)\n+ if sample_weight is not None and supports_sw:\n+ routed_params.estimator.fit[\"sample_weight\"] = sample_weight\n+\n+ # Check that each cross-validation fold can have at least one\n+ # example per class\n+ if isinstance(self.cv, int):\n+ n_folds = self.cv\n+ elif hasattr(self.cv, \"n_splits\"):\n+ n_folds = self.cv.n_splits\n+ else:\n+ n_folds = None\n+ if n_folds and np.any(np.unique(y, return_counts=True)[1] < n_folds):\n+ raise ValueError(\n+ f\"Requesting {n_folds}-fold \"\n+ \"cross-validation but provided less than \"\n+ f\"{n_folds} examples for at least one class.\"\n+ )\n+ if isinstance(self.cv, LeaveOneOut):\n+ raise ValueError(\n+ \"LeaveOneOut cross-validation does not allow\"\n+ \"all classes to be present in test splits. \"\n+ \"Please use a cross-validation generator that allows \"\n+ \"all classes to appear in every test and train split.\"\n+ )\n+ cv = check_cv(self.cv, y, classifier=True)\n+\n+ if self.ensemble:\n+ parallel = Parallel(n_jobs=self.n_jobs)\n+ self.calibrated_classifiers_ = parallel(\n+ delayed(_fit_classifier_calibrator_pair)(\n+ clone(estimator),\n+ X,\n+ y,\n+ train=train,\n+ test=test,\n+ method=self.method,\n+ classes=self.classes_,\n+ sample_weight=sample_weight,\n+ fit_params=routed_params.estimator.fit,\n+ )\n+ for train, test in cv.split(X, y, **routed_params.splitter.split)\n+ )\n+ else:\n+ this_estimator = clone(estimator)\n+ method_name = _check_response_method(\n+ this_estimator,\n+ [\"decision_function\", \"predict_proba\"],\n+ ).__name__\n+ predictions = cross_val_predict(\n+ estimator=this_estimator,\n+ X=X,\n+ y=y,\n+ cv=cv,\n+ method=method_name,\n+ n_jobs=self.n_jobs,\n+ params=routed_params.estimator.fit,\n+ )\n+ if len(self.classes_) == 2:\n+ # Ensure shape (n_samples, 1) in the binary case\n+ if method_name == \"predict_proba\":\n+ # Select the probability column of the postive class\n+ predictions = _process_predict_proba(\n+ y_pred=predictions,\n+ target_type=\"binary\",\n+ classes=self.classes_,\n+ pos_label=self.classes_[1],\n+ )\n+ predictions = predictions.reshape(-1, 1)\n+\n+ this_estimator.fit(X, y, **routed_params.estimator.fit)\n+ # Note: Here we don't pass on fit_params because the supported\n+ # calibrators don't support fit_params anyway\n+ calibrated_classifier = _fit_calibrator(\n+ this_estimator,\n+ predictions,\n+ y,\n+ self.classes_,\n+ self.method,\n+ sample_weight,\n+ )\n+ self.calibrated_classifiers_.append(calibrated_classifier)\n+\n+ first_clf = self.calibrated_classifiers_[0].estimator\n+ if hasattr(first_clf, \"n_features_in_\"):\n+ self.n_features_in_ = first_clf.n_features_in_\n+ if hasattr(first_clf, \"feature_names_in_\"):\n+ self.feature_names_in_ = first_clf.feature_names_in_\n+ return self\n \n def predict_proba(self, X):\n \"\"\"Calibrated probabilities of classification.\n",
"test": null
}
| null |
{
"code": "diff --git a/sklearn/calibration.py b/sklearn/calibration.py\nindex 8b053f538..e08464533 100644\n--- a/sklearn/calibration.py\n+++ b/sklearn/calibration.py\n@@ -289,10 +289,6 @@ class CalibratedClassifierCV(ClassifierMixin, MetaEstimatorMixin, BaseEstimator)\n \n return estimator\n \n- @_fit_context(\n- # CalibratedClassifierCV.estimator is not validated yet\n- prefer_skip_nested_validation=False\n- )\n def fit(self, X, y, sample_weight=None, **fit_params):\n \"\"\"Fit the calibrated model.\n \n@@ -316,156 +312,6 @@ class CalibratedClassifierCV(ClassifierMixin, MetaEstimatorMixin, BaseEstimator)\n self : object\n Returns an instance of self.\n \"\"\"\n- check_classification_targets(y)\n- X, y = indexable(X, y)\n- if sample_weight is not None:\n- sample_weight = _check_sample_weight(sample_weight, X)\n-\n- estimator = self._get_estimator()\n-\n- self.calibrated_classifiers_ = []\n- if self.cv == \"prefit\":\n- # `classes_` should be consistent with that of estimator\n- check_is_fitted(self.estimator, attributes=[\"classes_\"])\n- self.classes_ = self.estimator.classes_\n-\n- predictions, _ = _get_response_values(\n- estimator,\n- X,\n- response_method=[\"decision_function\", \"predict_proba\"],\n- )\n- if predictions.ndim == 1:\n- # Reshape binary output from `(n_samples,)` to `(n_samples, 1)`\n- predictions = predictions.reshape(-1, 1)\n-\n- calibrated_classifier = _fit_calibrator(\n- estimator,\n- predictions,\n- y,\n- self.classes_,\n- self.method,\n- sample_weight,\n- )\n- self.calibrated_classifiers_.append(calibrated_classifier)\n- else:\n- # Set `classes_` using all `y`\n- label_encoder_ = LabelEncoder().fit(y)\n- self.classes_ = label_encoder_.classes_\n-\n- if _routing_enabled():\n- routed_params = process_routing(\n- self,\n- \"fit\",\n- sample_weight=sample_weight,\n- **fit_params,\n- )\n- else:\n- # sample_weight checks\n- fit_parameters = signature(estimator.fit).parameters\n- supports_sw = \"sample_weight\" in fit_parameters\n- if sample_weight is not None and not supports_sw:\n- estimator_name = type(estimator).__name__\n- warnings.warn(\n- f\"Since {estimator_name} does not appear to accept\"\n- \" sample_weight, sample weights will only be used for the\"\n- \" calibration itself. This can be caused by a limitation of\"\n- \" the current scikit-learn API. See the following issue for\"\n- \" more details:\"\n- \" https://github.com/scikit-learn/scikit-learn/issues/21134.\"\n- \" Be warned that the result of the calibration is likely to be\"\n- \" incorrect.\"\n- )\n- routed_params = Bunch()\n- routed_params.splitter = Bunch(split={}) # no routing for splitter\n- routed_params.estimator = Bunch(fit=fit_params)\n- if sample_weight is not None and supports_sw:\n- routed_params.estimator.fit[\"sample_weight\"] = sample_weight\n-\n- # Check that each cross-validation fold can have at least one\n- # example per class\n- if isinstance(self.cv, int):\n- n_folds = self.cv\n- elif hasattr(self.cv, \"n_splits\"):\n- n_folds = self.cv.n_splits\n- else:\n- n_folds = None\n- if n_folds and np.any(np.unique(y, return_counts=True)[1] < n_folds):\n- raise ValueError(\n- f\"Requesting {n_folds}-fold \"\n- \"cross-validation but provided less than \"\n- f\"{n_folds} examples for at least one class.\"\n- )\n- if isinstance(self.cv, LeaveOneOut):\n- raise ValueError(\n- \"LeaveOneOut cross-validation does not allow\"\n- \"all classes to be present in test splits. \"\n- \"Please use a cross-validation generator that allows \"\n- \"all classes to appear in every test and train split.\"\n- )\n- cv = check_cv(self.cv, y, classifier=True)\n-\n- if self.ensemble:\n- parallel = Parallel(n_jobs=self.n_jobs)\n- self.calibrated_classifiers_ = parallel(\n- delayed(_fit_classifier_calibrator_pair)(\n- clone(estimator),\n- X,\n- y,\n- train=train,\n- test=test,\n- method=self.method,\n- classes=self.classes_,\n- sample_weight=sample_weight,\n- fit_params=routed_params.estimator.fit,\n- )\n- for train, test in cv.split(X, y, **routed_params.splitter.split)\n- )\n- else:\n- this_estimator = clone(estimator)\n- method_name = _check_response_method(\n- this_estimator,\n- [\"decision_function\", \"predict_proba\"],\n- ).__name__\n- predictions = cross_val_predict(\n- estimator=this_estimator,\n- X=X,\n- y=y,\n- cv=cv,\n- method=method_name,\n- n_jobs=self.n_jobs,\n- params=routed_params.estimator.fit,\n- )\n- if len(self.classes_) == 2:\n- # Ensure shape (n_samples, 1) in the binary case\n- if method_name == \"predict_proba\":\n- # Select the probability column of the postive class\n- predictions = _process_predict_proba(\n- y_pred=predictions,\n- target_type=\"binary\",\n- classes=self.classes_,\n- pos_label=self.classes_[1],\n- )\n- predictions = predictions.reshape(-1, 1)\n-\n- this_estimator.fit(X, y, **routed_params.estimator.fit)\n- # Note: Here we don't pass on fit_params because the supported\n- # calibrators don't support fit_params anyway\n- calibrated_classifier = _fit_calibrator(\n- this_estimator,\n- predictions,\n- y,\n- self.classes_,\n- self.method,\n- sample_weight,\n- )\n- self.calibrated_classifiers_.append(calibrated_classifier)\n-\n- first_clf = self.calibrated_classifiers_[0].estimator\n- if hasattr(first_clf, \"n_features_in_\"):\n- self.n_features_in_ = first_clf.n_features_in_\n- if hasattr(first_clf, \"feature_names_in_\"):\n- self.feature_names_in_ = first_clf.feature_names_in_\n- return self\n \n def predict_proba(self, X):\n \"\"\"Calibrated probabilities of classification.\n",
"test": null
}
| null |
scikit-learn/scikit-learn
|
c71340fd74280408b84be7ca008e1205e10c7830
|
2024-09-17T18:25:43+02:00
| null | null |
{
"code": "I want to add a new function in file in sklearn/calibration.py.\nHere is the description for the function:\n def fit(self, X, y, sample_weight=None, **fit_params):\n \"\"\"Fit the calibrated model.\n\n Parameters\n ----------\n X : array-like of shape (n_samples, n_features)\n Training data.\n\n y : array-like of shape (n_samples,)\n Target values.\n\n sample_weight : array-like of shape (n_samples,), default=None\n Sample weights. If None, then samples are equally weighted.\n\n **fit_params : dict\n Parameters to pass to the `fit` method of the underlying\n classifier.\n\n Returns\n -------\n self : object\n Returns an instance of self.\n \"\"\"\n",
"test": null
}
|
c71340fd74280408b84be7ca008e1205e10c7830
|
{
"FAIL_TO_PASS": [
"sklearn/tests/test_metaestimators_metadata_routing.py::test_error_on_missing_requests_for_sub_estimator[CalibratedClassifierCV]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_fit_score_takes_y]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_estimators_overwrite_params]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_estimators_dtypes]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_sample_weights_pandas_series]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_sample_weights_not_an_array]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_sample_weights_list]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_sample_weights_shape]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_sample_weights_not_overwritten]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_sample_weights_invariance(kind=ones)]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_sample_weights_invariance(kind=zeros)]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_estimators_fit_returns_self]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_estimators_fit_returns_self(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_complex_data]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_dtype_object]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_estimators_empty_data_messages]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_pipeline_consistency]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_estimators_nan_inf]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_estimator_sparse_array]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_estimator_sparse_matrix]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_estimators_pickle]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_estimators_pickle(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_f_contiguous_array_estimator]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_classifier_data_not_an_array]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_classifiers_one_label]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_classifiers_one_label_sample_weights]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_classifiers_classes]",
"sklearn/tests/test_metaestimators_metadata_routing.py::test_setting_request_on_sub_estimator_removes_error[CalibratedClassifierCV]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_classifiers_train]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_classifiers_train(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_classifiers_train(readonly_memmap=True,X_dtype=float32)]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_classifiers_regression_target]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_supervised_y_no_nan]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_supervised_y_2d]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_methods_sample_order_invariance]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_methods_subset_invariance]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_fit2d_1sample]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_fit2d_1feature]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_dict_unchanged]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_dont_overwrite_parameters]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_fit_idempotent]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_fit_check_is_fitted]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_n_features_in]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_fit1d]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_fit2d_predict1d]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_requires_y_none]",
"sklearn/tests/test_calibration.py::test_calibration[True-sigmoid-csr_matrix]",
"sklearn/tests/test_calibration.py::test_calibration[True-sigmoid-csr_array]",
"sklearn/tests/test_calibration.py::test_calibration[True-isotonic-csr_matrix]",
"sklearn/tests/test_calibration.py::test_calibration[True-isotonic-csr_array]",
"sklearn/tests/test_calibration.py::test_calibration[False-sigmoid-csr_matrix]",
"sklearn/tests/test_calibration.py::test_calibration[False-sigmoid-csr_array]",
"sklearn/tests/test_calibration.py::test_calibration[False-isotonic-csr_matrix]",
"sklearn/tests/test_calibration.py::test_calibration[False-isotonic-csr_array]",
"sklearn/tests/test_calibration.py::test_calibration_default_estimator",
"sklearn/tests/test_calibration.py::test_calibration_cv_splitter[True]",
"sklearn/tests/test_calibration.py::test_calibration_cv_splitter[False]",
"sklearn/tests/test_calibration.py::test_calibration_cv_nfold",
"sklearn/tests/test_calibration.py::test_sample_weight[True-sigmoid]",
"sklearn/tests/test_calibration.py::test_sample_weight[True-isotonic]",
"sklearn/tests/test_calibration.py::test_sample_weight[False-sigmoid]",
"sklearn/tests/test_calibration.py::test_sample_weight[False-isotonic]",
"sklearn/tests/test_calibration.py::test_parallel_execution[True-sigmoid]",
"sklearn/tests/test_calibration.py::test_parallel_execution[True-isotonic]",
"sklearn/tests/test_calibration.py::test_parallel_execution[False-sigmoid]",
"sklearn/tests/test_calibration.py::test_parallel_execution[False-isotonic]",
"sklearn/tests/test_calibration.py::test_calibration_multiclass[0-True-sigmoid]",
"sklearn/tests/test_calibration.py::test_calibration_multiclass[0-True-isotonic]",
"sklearn/tests/test_calibration.py::test_calibration_multiclass[0-False-sigmoid]",
"sklearn/tests/test_calibration.py::test_calibration_multiclass[0-False-isotonic]",
"sklearn/tests/test_calibration.py::test_calibration_multiclass[1-True-sigmoid]",
"sklearn/tests/test_calibration.py::test_calibration_multiclass[1-True-isotonic]",
"sklearn/tests/test_calibration.py::test_calibration_multiclass[1-False-sigmoid]",
"sklearn/tests/test_calibration.py::test_calibration_multiclass[1-False-isotonic]",
"sklearn/tests/test_calibration.py::test_calibration_prefit[csr_matrix]",
"sklearn/tests/test_calibration.py::test_calibration_prefit[csr_array]",
"sklearn/tests/test_calibration.py::test_calibration_ensemble_false[sigmoid]",
"sklearn/tests/test_calibration.py::test_calibration_ensemble_false[isotonic]",
"sklearn/tests/test_calibration.py::test_calibration_nan_imputer[True]",
"sklearn/tests/test_calibration.py::test_calibration_nan_imputer[False]",
"sklearn/tests/test_calibration.py::test_calibration_prob_sum[True]",
"sklearn/tests/test_calibration.py::test_calibration_prob_sum[False]",
"sklearn/tests/test_calibration.py::test_calibration_less_classes[True]",
"sklearn/tests/test_calibration.py::test_calibration_less_classes[False]",
"sklearn/tests/test_calibration.py::test_calibration_accepts_ndarray[X0]",
"sklearn/tests/test_calibration.py::test_calibration_accepts_ndarray[X1]",
"sklearn/tests/test_calibration.py::test_calibration_dict_pipeline",
"sklearn/tests/test_calibration.py::test_calibration_attributes[clf0-2]",
"sklearn/tests/test_calibration.py::test_calibration_attributes[clf1-prefit]",
"sklearn/tests/test_calibration.py::test_calibration_inconsistent_prefit_n_features_in",
"sklearn/tests/test_calibration.py::test_calibration_votingclassifier",
"sklearn/tests/test_calibration.py::test_calibrated_classifier_cv_double_sample_weights_equivalence[True-sigmoid]",
"sklearn/tests/test_calibration.py::test_calibrated_classifier_cv_double_sample_weights_equivalence[True-isotonic]",
"sklearn/tests/test_calibration.py::test_calibrated_classifier_cv_double_sample_weights_equivalence[False-sigmoid]",
"sklearn/tests/test_calibration.py::test_calibrated_classifier_cv_double_sample_weights_equivalence[False-isotonic]",
"sklearn/tests/test_calibration.py::test_calibration_with_fit_params[list]",
"sklearn/tests/test_calibration.py::test_calibration_with_fit_params[array]",
"sklearn/tests/test_calibration.py::test_calibration_with_sample_weight_estimator[sample_weight0]",
"sklearn/tests/test_calibration.py::test_calibration_with_sample_weight_estimator[sample_weight1]",
"sklearn/tests/test_calibration.py::test_calibration_without_sample_weight_estimator",
"sklearn/tests/test_calibration.py::test_calibration_with_non_sample_aligned_fit_param",
"sklearn/tests/test_calibration.py::test_calibrated_classifier_cv_works_with_large_confidence_scores[42]",
"sklearn/tests/test_calibration.py::test_float32_predict_proba",
"sklearn/tests/test_calibration.py::test_error_less_class_samples_than_folds",
"sklearn/tests/test_metaestimators.py::test_meta_estimators_delegate_data_validation[CalibratedClassifierCV]",
"sklearn/calibration.py::sklearn.calibration.CalibratedClassifierCV",
"sklearn/tests/test_metaestimators_metadata_routing.py::test_non_consuming_estimator_works[CalibratedClassifierCV]",
"sklearn/tests/test_common.py::test_check_n_features_in_after_fitting[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))]",
"sklearn/tests/test_common.py::test_pandas_column_name_consistency[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))]",
"sklearn/tests/test_common.py::test_check_param_validation[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))]"
],
"PASS_TO_PASS": null
}
|
scikit-learn__scikit-learn-16
|
1.0
|
{
"code": "diff --git b/sklearn/calibration.py a/sklearn/calibration.py\nindex 54d104feb..8b053f538 100644\n--- b/sklearn/calibration.py\n+++ a/sklearn/calibration.py\n@@ -483,6 +483,17 @@ class CalibratedClassifierCV(ClassifierMixin, MetaEstimatorMixin, BaseEstimator)\n C : ndarray of shape (n_samples, n_classes)\n The predicted probas.\n \"\"\"\n+ check_is_fitted(self)\n+ # Compute the arithmetic mean of the predictions of the calibrated\n+ # classifiers\n+ mean_proba = np.zeros((_num_samples(X), len(self.classes_)))\n+ for calibrated_classifier in self.calibrated_classifiers_:\n+ proba = calibrated_classifier.predict_proba(X)\n+ mean_proba += proba\n+\n+ mean_proba /= len(self.calibrated_classifiers_)\n+\n+ return mean_proba\n \n def predict(self, X):\n \"\"\"Predict the target of new samples.\n",
"test": null
}
| null |
{
"code": "diff --git a/sklearn/calibration.py b/sklearn/calibration.py\nindex 8b053f538..54d104feb 100644\n--- a/sklearn/calibration.py\n+++ b/sklearn/calibration.py\n@@ -483,17 +483,6 @@ class CalibratedClassifierCV(ClassifierMixin, MetaEstimatorMixin, BaseEstimator)\n C : ndarray of shape (n_samples, n_classes)\n The predicted probas.\n \"\"\"\n- check_is_fitted(self)\n- # Compute the arithmetic mean of the predictions of the calibrated\n- # classifiers\n- mean_proba = np.zeros((_num_samples(X), len(self.classes_)))\n- for calibrated_classifier in self.calibrated_classifiers_:\n- proba = calibrated_classifier.predict_proba(X)\n- mean_proba += proba\n-\n- mean_proba /= len(self.calibrated_classifiers_)\n-\n- return mean_proba\n \n def predict(self, X):\n \"\"\"Predict the target of new samples.\n",
"test": null
}
| null |
scikit-learn/scikit-learn
|
c71340fd74280408b84be7ca008e1205e10c7830
|
2024-09-17T18:25:43+02:00
| null | null |
{
"code": "I want to add a new function in file in sklearn/calibration.py.\nHere is the description for the function:\n def predict_proba(self, X):\n \"\"\"Calibrated probabilities of classification.\n\n This function returns calibrated probabilities of classification\n according to each class on an array of test vectors X.\n\n Parameters\n ----------\n X : array-like of shape (n_samples, n_features)\n The samples, as accepted by `estimator.predict_proba`.\n\n Returns\n -------\n C : ndarray of shape (n_samples, n_classes)\n The predicted probas.\n \"\"\"\n",
"test": null
}
|
c71340fd74280408b84be7ca008e1205e10c7830
|
{
"FAIL_TO_PASS": [
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_fit_score_takes_y]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_estimators_dtypes]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_sample_weights_invariance(kind=ones)]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_sample_weights_invariance(kind=zeros)]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_dtype_object]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_pipeline_consistency]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_estimators_nan_inf]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_estimator_sparse_array]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_estimator_sparse_matrix]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_estimators_pickle]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_estimators_pickle(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_f_contiguous_array_estimator]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_classifier_data_not_an_array]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_classifiers_one_label_sample_weights]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_classifiers_classes]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_classifiers_train]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_classifiers_train(readonly_memmap=True)]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_classifiers_train(readonly_memmap=True,X_dtype=float32)]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_supervised_y_2d]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_estimators_unfitted]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_methods_sample_order_invariance]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_methods_subset_invariance]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_dict_unchanged]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_fit_idempotent]",
"sklearn/tests/test_common.py::test_estimators[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))-check_fit2d_predict1d]",
"sklearn/tests/test_calibration.py::test_calibration[True-sigmoid-csr_matrix]",
"sklearn/tests/test_calibration.py::test_calibration[True-sigmoid-csr_array]",
"sklearn/tests/test_calibration.py::test_calibration[True-isotonic-csr_matrix]",
"sklearn/tests/test_calibration.py::test_calibration[True-isotonic-csr_array]",
"sklearn/tests/test_calibration.py::test_calibration[False-sigmoid-csr_matrix]",
"sklearn/tests/test_calibration.py::test_calibration[False-sigmoid-csr_array]",
"sklearn/tests/test_calibration.py::test_calibration[False-isotonic-csr_matrix]",
"sklearn/tests/test_calibration.py::test_calibration[False-isotonic-csr_array]",
"sklearn/tests/test_calibration.py::test_sample_weight[True-sigmoid]",
"sklearn/tests/test_calibration.py::test_sample_weight[True-isotonic]",
"sklearn/tests/test_calibration.py::test_sample_weight[False-sigmoid]",
"sklearn/tests/test_calibration.py::test_sample_weight[False-isotonic]",
"sklearn/tests/test_calibration.py::test_parallel_execution[True-sigmoid]",
"sklearn/tests/test_calibration.py::test_parallel_execution[True-isotonic]",
"sklearn/tests/test_calibration.py::test_parallel_execution[False-sigmoid]",
"sklearn/tests/test_calibration.py::test_parallel_execution[False-isotonic]",
"sklearn/tests/test_calibration.py::test_calibration_multiclass[0-True-sigmoid]",
"sklearn/tests/test_calibration.py::test_calibration_multiclass[0-True-isotonic]",
"sklearn/tests/test_calibration.py::test_calibration_multiclass[0-False-sigmoid]",
"sklearn/tests/test_calibration.py::test_calibration_multiclass[0-False-isotonic]",
"sklearn/tests/test_calibration.py::test_calibration_multiclass[1-True-sigmoid]",
"sklearn/tests/test_calibration.py::test_calibration_multiclass[1-True-isotonic]",
"sklearn/tests/test_calibration.py::test_calibration_multiclass[1-False-sigmoid]",
"sklearn/tests/test_calibration.py::test_calibration_multiclass[1-False-isotonic]",
"sklearn/tests/test_calibration.py::test_calibration_prefit[csr_matrix]",
"sklearn/tests/test_calibration.py::test_calibration_prefit[csr_array]",
"sklearn/tests/test_calibration.py::test_calibration_ensemble_false[sigmoid]",
"sklearn/tests/test_calibration.py::test_calibration_ensemble_false[isotonic]",
"sklearn/tests/test_calibration.py::test_calibration_nan_imputer[True]",
"sklearn/tests/test_calibration.py::test_calibration_nan_imputer[False]",
"sklearn/tests/test_calibration.py::test_calibration_prob_sum[True]",
"sklearn/tests/test_calibration.py::test_calibration_prob_sum[False]",
"sklearn/tests/test_calibration.py::test_calibration_dict_pipeline",
"sklearn/tests/test_calibration.py::test_calibrated_classifier_cv_double_sample_weights_equivalence[True-sigmoid]",
"sklearn/tests/test_calibration.py::test_calibrated_classifier_cv_double_sample_weights_equivalence[True-isotonic]",
"sklearn/tests/test_calibration.py::test_calibrated_classifier_cv_double_sample_weights_equivalence[False-sigmoid]",
"sklearn/tests/test_calibration.py::test_calibrated_classifier_cv_double_sample_weights_equivalence[False-isotonic]",
"sklearn/calibration.py::sklearn.calibration.CalibratedClassifierCV",
"sklearn/tests/test_common.py::test_check_n_features_in_after_fitting[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))]",
"sklearn/tests/test_common.py::test_pandas_column_name_consistency[CalibratedClassifierCV(cv=3,estimator=LogisticRegression(C=1))]"
],
"PASS_TO_PASS": null
}
|
scikit-learn__scikit-learn-17
|
1.0
|
{
"code": "diff --git b/sklearn/calibration.py a/sklearn/calibration.py\nindex 31ca23c40..8b053f538 100644\n--- b/sklearn/calibration.py\n+++ a/sklearn/calibration.py\n@@ -1144,6 +1144,31 @@ class CalibrationDisplay(_BinaryClassifierCurveDisplayMixin):\n display : :class:`~sklearn.calibration.CalibrationDisplay`\n Object that stores computed values.\n \"\"\"\n+ self.ax_, self.figure_, name = self._validate_plot_params(ax=ax, name=name)\n+\n+ info_pos_label = (\n+ f\"(Positive class: {self.pos_label})\" if self.pos_label is not None else \"\"\n+ )\n+\n+ line_kwargs = {\"marker\": \"s\", \"linestyle\": \"-\"}\n+ if name is not None:\n+ line_kwargs[\"label\"] = name\n+ line_kwargs.update(**kwargs)\n+\n+ ref_line_label = \"Perfectly calibrated\"\n+ existing_ref_line = ref_line_label in self.ax_.get_legend_handles_labels()[1]\n+ if ref_line and not existing_ref_line:\n+ self.ax_.plot([0, 1], [0, 1], \"k:\", label=ref_line_label)\n+ self.line_ = self.ax_.plot(self.prob_pred, self.prob_true, **line_kwargs)[0]\n+\n+ # We always have to show the legend for at least the reference line\n+ self.ax_.legend(loc=\"lower right\")\n+\n+ xlabel = f\"Mean predicted probability {info_pos_label}\"\n+ ylabel = f\"Fraction of positives {info_pos_label}\"\n+ self.ax_.set(xlabel=xlabel, ylabel=ylabel)\n+\n+ return self\n \n @classmethod\n def from_estimator(\n",
"test": null
}
| null |
{
"code": "diff --git a/sklearn/calibration.py b/sklearn/calibration.py\nindex 8b053f538..31ca23c40 100644\n--- a/sklearn/calibration.py\n+++ b/sklearn/calibration.py\n@@ -1144,31 +1144,6 @@ class CalibrationDisplay(_BinaryClassifierCurveDisplayMixin):\n display : :class:`~sklearn.calibration.CalibrationDisplay`\n Object that stores computed values.\n \"\"\"\n- self.ax_, self.figure_, name = self._validate_plot_params(ax=ax, name=name)\n-\n- info_pos_label = (\n- f\"(Positive class: {self.pos_label})\" if self.pos_label is not None else \"\"\n- )\n-\n- line_kwargs = {\"marker\": \"s\", \"linestyle\": \"-\"}\n- if name is not None:\n- line_kwargs[\"label\"] = name\n- line_kwargs.update(**kwargs)\n-\n- ref_line_label = \"Perfectly calibrated\"\n- existing_ref_line = ref_line_label in self.ax_.get_legend_handles_labels()[1]\n- if ref_line and not existing_ref_line:\n- self.ax_.plot([0, 1], [0, 1], \"k:\", label=ref_line_label)\n- self.line_ = self.ax_.plot(self.prob_pred, self.prob_true, **line_kwargs)[0]\n-\n- # We always have to show the legend for at least the reference line\n- self.ax_.legend(loc=\"lower right\")\n-\n- xlabel = f\"Mean predicted probability {info_pos_label}\"\n- ylabel = f\"Fraction of positives {info_pos_label}\"\n- self.ax_.set(xlabel=xlabel, ylabel=ylabel)\n-\n- return self\n \n @classmethod\n def from_estimator(\n",
"test": null
}
| null |
scikit-learn/scikit-learn
|
c71340fd74280408b84be7ca008e1205e10c7830
|
2024-09-17T18:25:43+02:00
| null | null |
{
"code": "I want to add a new function in file in sklearn/calibration.py.\nHere is the description for the function:\n def plot(self, *, ax=None, name=None, ref_line=True, **kwargs):\n \"\"\"Plot visualization.\n\n Extra keyword arguments will be passed to\n :func:`matplotlib.pyplot.plot`.\n\n Parameters\n ----------\n ax : Matplotlib Axes, default=None\n Axes object to plot on. If `None`, a new figure and axes is\n created.\n\n name : str, default=None\n Name for labeling curve. If `None`, use `estimator_name` if\n not `None`, otherwise no labeling is shown.\n\n ref_line : bool, default=True\n If `True`, plots a reference line representing a perfectly\n calibrated classifier.\n\n **kwargs : dict\n Keyword arguments to be passed to :func:`matplotlib.pyplot.plot`.\n\n Returns\n -------\n display : :class:`~sklearn.calibration.CalibrationDisplay`\n Object that stores computed values.\n \"\"\"\n",
"test": null
}
|
c71340fd74280408b84be7ca008e1205e10c7830
|
{
"FAIL_TO_PASS": [
"sklearn/metrics/_plot/tests/test_common_curve_display.py::test_classifier_display_curve_named_constructor_return_type[from_predictions-CalibrationDisplay]",
"sklearn/metrics/_plot/tests/test_common_curve_display.py::test_classifier_display_curve_named_constructor_return_type[from_estimator-CalibrationDisplay]",
"sklearn/calibration.py::sklearn.calibration.CalibrationDisplay",
"sklearn/calibration.py::sklearn.calibration.CalibrationDisplay.from_estimator",
"sklearn/calibration.py::sklearn.calibration.CalibrationDisplay.from_predictions",
"sklearn/tests/test_calibration.py::test_calibration_display_compute[uniform-5]",
"sklearn/tests/test_calibration.py::test_calibration_display_compute[uniform-10]",
"sklearn/tests/test_calibration.py::test_calibration_display_compute[quantile-5]",
"sklearn/tests/test_calibration.py::test_calibration_display_compute[quantile-10]",
"sklearn/tests/test_calibration.py::test_plot_calibration_curve_pipeline",
"sklearn/tests/test_calibration.py::test_calibration_display_default_labels[None-_line1]",
"sklearn/tests/test_calibration.py::test_calibration_display_default_labels[my_est-my_est]",
"sklearn/tests/test_calibration.py::test_calibration_display_label_class_plot",
"sklearn/tests/test_calibration.py::test_calibration_display_name_multiple_calls[from_estimator]",
"sklearn/tests/test_calibration.py::test_calibration_display_name_multiple_calls[from_predictions]",
"sklearn/tests/test_calibration.py::test_calibration_display_ref_line",
"sklearn/tests/test_calibration.py::test_calibration_display_pos_label[None-1]",
"sklearn/tests/test_calibration.py::test_calibration_display_pos_label[0-0]",
"sklearn/tests/test_calibration.py::test_calibration_display_pos_label[1-1]"
],
"PASS_TO_PASS": null
}
|
scikit-learn__scikit-learn-18
|
1.0
|
{
"code": "diff --git b/sklearn/utils/_mocking.py a/sklearn/utils/_mocking.py\nindex f3964dd33..5e9973f37 100644\n--- b/sklearn/utils/_mocking.py\n+++ a/sklearn/utils/_mocking.py\n@@ -295,6 +295,18 @@ class CheckingClassifier(ClassifierMixin, BaseEstimator):\n else (n_samples, n_classes)\n Confidence score.\n \"\"\"\n+ if (\n+ self.methods_to_check == \"all\"\n+ or \"decision_function\" in self.methods_to_check\n+ ):\n+ X, y = self._check_X_y(X)\n+ rng = check_random_state(self.random_state)\n+ if len(self.classes_) == 2:\n+ # for binary classifier, the confidence score is related to\n+ # classes_[1] and therefore should be null.\n+ return rng.randn(_num_samples(X))\n+ else:\n+ return rng.randn(_num_samples(X), len(self.classes_))\n \n def score(self, X=None, Y=None):\n \"\"\"Fake score.\n",
"test": null
}
| null |
{
"code": "diff --git a/sklearn/utils/_mocking.py b/sklearn/utils/_mocking.py\nindex 5e9973f37..f3964dd33 100644\n--- a/sklearn/utils/_mocking.py\n+++ b/sklearn/utils/_mocking.py\n@@ -295,18 +295,6 @@ class CheckingClassifier(ClassifierMixin, BaseEstimator):\n else (n_samples, n_classes)\n Confidence score.\n \"\"\"\n- if (\n- self.methods_to_check == \"all\"\n- or \"decision_function\" in self.methods_to_check\n- ):\n- X, y = self._check_X_y(X)\n- rng = check_random_state(self.random_state)\n- if len(self.classes_) == 2:\n- # for binary classifier, the confidence score is related to\n- # classes_[1] and therefore should be null.\n- return rng.randn(_num_samples(X))\n- else:\n- return rng.randn(_num_samples(X), len(self.classes_))\n \n def score(self, X=None, Y=None):\n \"\"\"Fake score.\n",
"test": null
}
| null |
scikit-learn/scikit-learn
|
c71340fd74280408b84be7ca008e1205e10c7830
|
2024-09-17T18:25:43+02:00
| null | null |
{
"code": "I want to add a new function in file in sklearn/utils/_mocking.py.\nHere is the description for the function:\n def decision_function(self, X):\n \"\"\"Confidence score.\n\n Parameters\n ----------\n X : array-like of shape (n_samples, n_features)\n The input data.\n\n Returns\n -------\n decision : ndarray of shape (n_samples,) if n_classes == 2\\\n else (n_samples, n_classes)\n Confidence score.\n \"\"\"\n",
"test": null
}
|
c71340fd74280408b84be7ca008e1205e10c7830
|
{
"FAIL_TO_PASS": [
"sklearn/tests/test_multiclass.py::test_ecoc_delegate_sparse_base_estimator[csc_matrix]",
"sklearn/tests/test_multiclass.py::test_ecoc_delegate_sparse_base_estimator[csc_array]",
"sklearn/utils/tests/test_mocking.py::test_check_X_on_predict_success[decision_function]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier[list]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier[array]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier[sparse]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier[dataframe]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier_methods_to_check[decision_function-methods_to_check0]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier_methods_to_check[decision_function-methods_to_check1]",
"sklearn/tests/test_calibration.py::test_calibration_with_fit_params[list]",
"sklearn/tests/test_calibration.py::test_calibration_with_fit_params[array]",
"sklearn/tests/test_calibration.py::test_calibration_with_sample_weight_estimator[sample_weight0]",
"sklearn/tests/test_calibration.py::test_calibration_with_sample_weight_estimator[sample_weight1]",
"sklearn/tests/test_calibration.py::test_calibration_without_sample_weight_estimator"
],
"PASS_TO_PASS": null
}
|
scikit-learn__scikit-learn-19
|
1.0
|
{
"code": "diff --git b/sklearn/utils/_mocking.py a/sklearn/utils/_mocking.py\nindex eb39c9f09..5e9973f37 100644\n--- b/sklearn/utils/_mocking.py\n+++ a/sklearn/utils/_mocking.py\n@@ -215,6 +215,29 @@ class CheckingClassifier(ClassifierMixin, BaseEstimator):\n -------\n self\n \"\"\"\n+ assert _num_samples(X) == _num_samples(y)\n+ if self.methods_to_check == \"all\" or \"fit\" in self.methods_to_check:\n+ X, y = self._check_X_y(X, y, should_be_fitted=False)\n+ self.n_features_in_ = np.shape(X)[1]\n+ self.classes_ = np.unique(check_array(y, ensure_2d=False, allow_nd=True))\n+ if self.expected_fit_params:\n+ missing = set(self.expected_fit_params) - set(fit_params)\n+ if missing:\n+ raise AssertionError(\n+ f\"Expected fit parameter(s) {list(missing)} not seen.\"\n+ )\n+ for key, value in fit_params.items():\n+ if _num_samples(value) != _num_samples(X):\n+ raise AssertionError(\n+ f\"Fit parameter {key} has length {_num_samples(value)}\"\n+ f\"; expected {_num_samples(X)}.\"\n+ )\n+ if self.expected_sample_weight:\n+ if sample_weight is None:\n+ raise AssertionError(\"Expected sample_weight to be passed\")\n+ _check_sample_weight(sample_weight, X)\n+\n+ return self\n \n def predict(self, X):\n \"\"\"Predict the first class seen in `classes_`.\n",
"test": null
}
| null |
{
"code": "diff --git a/sklearn/utils/_mocking.py b/sklearn/utils/_mocking.py\nindex 5e9973f37..eb39c9f09 100644\n--- a/sklearn/utils/_mocking.py\n+++ b/sklearn/utils/_mocking.py\n@@ -215,29 +215,6 @@ class CheckingClassifier(ClassifierMixin, BaseEstimator):\n -------\n self\n \"\"\"\n- assert _num_samples(X) == _num_samples(y)\n- if self.methods_to_check == \"all\" or \"fit\" in self.methods_to_check:\n- X, y = self._check_X_y(X, y, should_be_fitted=False)\n- self.n_features_in_ = np.shape(X)[1]\n- self.classes_ = np.unique(check_array(y, ensure_2d=False, allow_nd=True))\n- if self.expected_fit_params:\n- missing = set(self.expected_fit_params) - set(fit_params)\n- if missing:\n- raise AssertionError(\n- f\"Expected fit parameter(s) {list(missing)} not seen.\"\n- )\n- for key, value in fit_params.items():\n- if _num_samples(value) != _num_samples(X):\n- raise AssertionError(\n- f\"Fit parameter {key} has length {_num_samples(value)}\"\n- f\"; expected {_num_samples(X)}.\"\n- )\n- if self.expected_sample_weight:\n- if sample_weight is None:\n- raise AssertionError(\"Expected sample_weight to be passed\")\n- _check_sample_weight(sample_weight, X)\n-\n- return self\n \n def predict(self, X):\n \"\"\"Predict the first class seen in `classes_`.\n",
"test": null
}
| null |
scikit-learn/scikit-learn
|
c71340fd74280408b84be7ca008e1205e10c7830
|
2024-09-17T18:25:43+02:00
| null | null |
{
"code": "I want to add a new function in file in sklearn/utils/_mocking.py.\nHere is the description for the function:\n def fit(self, X, y, sample_weight=None, **fit_params):\n \"\"\"Fit classifier.\n\n Parameters\n ----------\n X : array-like of shape (n_samples, n_features)\n Training vector, where `n_samples` is the number of samples and\n `n_features` is the number of features.\n\n y : array-like of shape (n_samples, n_outputs) or (n_samples,), \\\n default=None\n Target relative to X for classification or regression;\n None for unsupervised learning.\n\n sample_weight : array-like of shape (n_samples,), default=None\n Sample weights. If None, then samples are equally weighted.\n\n **fit_params : dict of string -> object\n Parameters passed to the ``fit`` method of the estimator\n\n Returns\n -------\n self\n \"\"\"\n",
"test": null
}
|
c71340fd74280408b84be7ca008e1205e10c7830
|
{
"FAIL_TO_PASS": [
"sklearn/model_selection/tests/test_validation.py::test_cross_val_score[coo_matrix]",
"sklearn/model_selection/tests/test_search.py::test_SearchCV_with_fit_params[GridSearchCV]",
"sklearn/model_selection/tests/test_validation.py::test_cross_val_score[coo_array]",
"sklearn/model_selection/tests/test_search.py::test_SearchCV_with_fit_params[RandomizedSearchCV]",
"sklearn/model_selection/tests/test_search.py::test_gridsearch_nd",
"sklearn/model_selection/tests/test_search.py::test_X_as_list",
"sklearn/model_selection/tests/test_search.py::test_y_as_list",
"sklearn/model_selection/tests/test_search.py::test_pandas_input",
"sklearn/model_selection/tests/test_validation.py::test_cross_val_score_pandas",
"sklearn/model_selection/tests/test_validation.py::test_permutation_test_score_params",
"sklearn/model_selection/tests/test_classification_threshold.py::test_fit_and_score_over_thresholds_fit_params[list]",
"sklearn/model_selection/tests/test_classification_threshold.py::test_fit_and_score_over_thresholds_fit_params[array]",
"sklearn/model_selection/tests/test_validation.py::test_cross_val_predict_input_types[coo_matrix]",
"sklearn/model_selection/tests/test_validation.py::test_cross_val_predict_input_types[coo_array]",
"sklearn/model_selection/tests/test_validation.py::test_cross_val_predict_pandas",
"sklearn/model_selection/tests/test_validation.py::test_learning_curve_params",
"sklearn/tests/test_multiclass.py::test_ecoc_delegate_sparse_base_estimator[csc_matrix]",
"sklearn/model_selection/tests/test_validation.py::test_validation_curve_params",
"sklearn/tests/test_multiclass.py::test_ecoc_delegate_sparse_base_estimator[csc_array]",
"sklearn/ensemble/tests/test_stacking.py::test_stacking_classifier_sample_weight_fit_param",
"sklearn/utils/tests/test_mocking.py::test_check_on_fit_success[kwargs0]",
"sklearn/utils/tests/test_mocking.py::test_check_on_fit_success[kwargs1]",
"sklearn/utils/tests/test_mocking.py::test_check_on_fit_success[kwargs2]",
"sklearn/utils/tests/test_mocking.py::test_check_on_fit_success[kwargs3]",
"sklearn/model_selection/tests/test_validation.py::test_permutation_test_score_pandas",
"sklearn/utils/tests/test_mocking.py::test_check_X_on_predict_success[predict]",
"sklearn/utils/tests/test_mocking.py::test_check_X_on_predict_success[predict_proba]",
"sklearn/utils/tests/test_mocking.py::test_check_X_on_predict_success[decision_function]",
"sklearn/utils/tests/test_mocking.py::test_check_X_on_predict_success[score]",
"sklearn/utils/tests/test_mocking.py::test_check_X_on_predict_fail[predict]",
"sklearn/utils/tests/test_mocking.py::test_check_X_on_predict_fail[predict_proba]",
"sklearn/utils/tests/test_mocking.py::test_check_X_on_predict_fail[decision_function]",
"sklearn/utils/tests/test_mocking.py::test_check_X_on_predict_fail[score]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier[list]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier[array]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier[sparse]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier[dataframe]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier_with_params[csr_matrix]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier_with_params[csr_array]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier_fit_params",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier_missing_fit_params",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier_methods_to_check[predict-methods_to_check0]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier_methods_to_check[predict-methods_to_check1]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier_methods_to_check[predict_proba-methods_to_check0]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier_methods_to_check[predict_proba-methods_to_check1]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier_methods_to_check[decision_function-methods_to_check0]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier_methods_to_check[decision_function-methods_to_check1]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier_methods_to_check[score-methods_to_check0]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier_methods_to_check[score-methods_to_check1]",
"sklearn/utils/_mocking.py::sklearn.utils._mocking.CheckingClassifier",
"sklearn/tests/test_calibration.py::test_calibration_with_fit_params[list]",
"sklearn/tests/test_calibration.py::test_calibration_with_fit_params[array]",
"sklearn/tests/test_calibration.py::test_calibration_with_sample_weight_estimator[sample_weight0]",
"sklearn/tests/test_calibration.py::test_calibration_with_sample_weight_estimator[sample_weight1]",
"sklearn/tests/test_calibration.py::test_calibration_without_sample_weight_estimator",
"sklearn/model_selection/tests/test_classification_threshold.py::test_tuned_threshold_classifier_fit_params[list]",
"sklearn/model_selection/tests/test_classification_threshold.py::test_tuned_threshold_classifier_fit_params[array]"
],
"PASS_TO_PASS": null
}
|
scikit-learn__scikit-learn-20
|
1.0
|
{
"code": "diff --git b/sklearn/utils/_mocking.py a/sklearn/utils/_mocking.py\nindex 65add68cc..5e9973f37 100644\n--- b/sklearn/utils/_mocking.py\n+++ a/sklearn/utils/_mocking.py\n@@ -273,6 +273,13 @@ class CheckingClassifier(ClassifierMixin, BaseEstimator):\n proba : ndarray of shape (n_samples, n_classes)\n The probabilities for each sample and class.\n \"\"\"\n+ if self.methods_to_check == \"all\" or \"predict_proba\" in self.methods_to_check:\n+ X, y = self._check_X_y(X)\n+ rng = check_random_state(self.random_state)\n+ proba = rng.randn(_num_samples(X), len(self.classes_))\n+ proba = np.abs(proba, out=proba)\n+ proba /= np.sum(proba, axis=1)[:, np.newaxis]\n+ return proba\n \n def decision_function(self, X):\n \"\"\"Confidence score.\n",
"test": null
}
| null |
{
"code": "diff --git a/sklearn/utils/_mocking.py b/sklearn/utils/_mocking.py\nindex 5e9973f37..65add68cc 100644\n--- a/sklearn/utils/_mocking.py\n+++ b/sklearn/utils/_mocking.py\n@@ -273,13 +273,6 @@ class CheckingClassifier(ClassifierMixin, BaseEstimator):\n proba : ndarray of shape (n_samples, n_classes)\n The probabilities for each sample and class.\n \"\"\"\n- if self.methods_to_check == \"all\" or \"predict_proba\" in self.methods_to_check:\n- X, y = self._check_X_y(X)\n- rng = check_random_state(self.random_state)\n- proba = rng.randn(_num_samples(X), len(self.classes_))\n- proba = np.abs(proba, out=proba)\n- proba /= np.sum(proba, axis=1)[:, np.newaxis]\n- return proba\n \n def decision_function(self, X):\n \"\"\"Confidence score.\n",
"test": null
}
| null |
scikit-learn/scikit-learn
|
c71340fd74280408b84be7ca008e1205e10c7830
|
2024-09-17T18:25:43+02:00
| null | null |
{
"code": "I want to add a new function in file in sklearn/utils/_mocking.py.\nHere is the description for the function:\n def predict_proba(self, X):\n \"\"\"Predict probabilities for each class.\n\n Here, the dummy classifier will provide a probability of 1 for the\n first class of `classes_` and 0 otherwise.\n\n Parameters\n ----------\n X : array-like of shape (n_samples, n_features)\n The input data.\n\n Returns\n -------\n proba : ndarray of shape (n_samples, n_classes)\n The probabilities for each sample and class.\n \"\"\"\n",
"test": null
}
|
c71340fd74280408b84be7ca008e1205e10c7830
|
{
"FAIL_TO_PASS": [
"sklearn/model_selection/tests/test_classification_threshold.py::test_fit_and_score_over_thresholds_fit_params[list]",
"sklearn/model_selection/tests/test_classification_threshold.py::test_fit_and_score_over_thresholds_fit_params[array]",
"sklearn/ensemble/tests/test_stacking.py::test_stacking_classifier_sample_weight_fit_param",
"sklearn/utils/tests/test_mocking.py::test_check_X_on_predict_success[predict_proba]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier[list]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier[array]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier[sparse]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier[dataframe]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier_methods_to_check[predict_proba-methods_to_check0]",
"sklearn/model_selection/tests/test_classification_threshold.py::test_tuned_threshold_classifier_fit_params[list]",
"sklearn/model_selection/tests/test_classification_threshold.py::test_tuned_threshold_classifier_fit_params[array]"
],
"PASS_TO_PASS": null
}
|
scikit-learn__scikit-learn-21
|
1.0
|
{
"code": "diff --git b/sklearn/utils/_mocking.py a/sklearn/utils/_mocking.py\nindex 61e8e2ca1..5e9973f37 100644\n--- b/sklearn/utils/_mocking.py\n+++ a/sklearn/utils/_mocking.py\n@@ -327,6 +327,13 @@ class CheckingClassifier(ClassifierMixin, BaseEstimator):\n Either 0 or 1 depending of `foo_param` (i.e. `foo_param > 1 =>\n score=1` otherwise `score=0`).\n \"\"\"\n+ if self.methods_to_check == \"all\" or \"score\" in self.methods_to_check:\n+ self._check_X_y(X, Y)\n+ if self.foo_param > 1:\n+ score = 1.0\n+ else:\n+ score = 0.0\n+ return score\n \n def __sklearn_tags__(self):\n tags = super().__sklearn_tags__()\n",
"test": null
}
| null |
{
"code": "diff --git a/sklearn/utils/_mocking.py b/sklearn/utils/_mocking.py\nindex 5e9973f37..61e8e2ca1 100644\n--- a/sklearn/utils/_mocking.py\n+++ b/sklearn/utils/_mocking.py\n@@ -327,13 +327,6 @@ class CheckingClassifier(ClassifierMixin, BaseEstimator):\n Either 0 or 1 depending of `foo_param` (i.e. `foo_param > 1 =>\n score=1` otherwise `score=0`).\n \"\"\"\n- if self.methods_to_check == \"all\" or \"score\" in self.methods_to_check:\n- self._check_X_y(X, Y)\n- if self.foo_param > 1:\n- score = 1.0\n- else:\n- score = 0.0\n- return score\n \n def __sklearn_tags__(self):\n tags = super().__sklearn_tags__()\n",
"test": null
}
| null |
scikit-learn/scikit-learn
|
c71340fd74280408b84be7ca008e1205e10c7830
|
2024-09-17T18:25:43+02:00
| null | null |
{
"code": "I want to add a new function in file in sklearn/utils/_mocking.py.\nHere is the description for the function:\n def score(self, X=None, Y=None):\n \"\"\"Fake score.\n\n Parameters\n ----------\n X : array-like of shape (n_samples, n_features)\n Input data, where `n_samples` is the number of samples and\n `n_features` is the number of features.\n\n Y : array-like of shape (n_samples, n_output) or (n_samples,)\n Target relative to X for classification or regression;\n None for unsupervised learning.\n\n Returns\n -------\n score : float\n Either 0 or 1 depending of `foo_param` (i.e. `foo_param > 1 =>\n score=1` otherwise `score=0`).\n \"\"\"\n",
"test": null
}
|
c71340fd74280408b84be7ca008e1205e10c7830
|
{
"FAIL_TO_PASS": [
"sklearn/model_selection/tests/test_search.py::test_SearchCV_with_fit_params[GridSearchCV]",
"sklearn/model_selection/tests/test_search.py::test_SearchCV_with_fit_params[RandomizedSearchCV]",
"sklearn/model_selection/tests/test_search.py::test_gridsearch_nd",
"sklearn/model_selection/tests/test_search.py::test_X_as_list",
"sklearn/model_selection/tests/test_search.py::test_y_as_list",
"sklearn/model_selection/tests/test_search.py::test_pandas_input",
"sklearn/model_selection/tests/test_validation.py::test_permutation_test_score_params",
"sklearn/model_selection/tests/test_validation.py::test_learning_curve_params",
"sklearn/model_selection/tests/test_validation.py::test_validation_curve_params",
"sklearn/model_selection/tests/test_validation.py::test_permutation_test_score_pandas",
"sklearn/utils/tests/test_mocking.py::test_check_X_on_predict_success[score]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier[list]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier[array]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier[sparse]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier[dataframe]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier_methods_to_check[score-methods_to_check0]",
"sklearn/utils/tests/test_mocking.py::test_checking_classifier_methods_to_check[score-methods_to_check1]"
],
"PASS_TO_PASS": null
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.