diff --git "a/mwaskom__seaborn-3010/docstore.json" "b/mwaskom__seaborn-3010/docstore.json" new file mode 100644--- /dev/null +++ "b/mwaskom__seaborn-3010/docstore.json" @@ -0,0 +1 @@ +{"docstore/metadata": {"/tmp/repos/swe-bench_mwaskom__seaborn/ci/cache_test_datasets.py__": {"doc_hash": "b1cf26d2358b8dd4cd31ae36a44d621232172f1fa1bc07ce9bdc751e19437e3a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/ci/check_gallery.py__": {"doc_hash": "727a48bfda8575acdaa751c14d64f10294541ae429e659bf17ad1b731871e225"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/gallery_generator.py___INDEX_TEMPLATE._": {"doc_hash": "6b925918effd33be7e4b773bf199f7816236363b0651e2bc4bd3b217508d26ed"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/gallery_generator.py_create_thumbnail_indent.return.s_replace_n_n_N_": {"doc_hash": "0d58ab3999231196a794fea97a9aaf335eed2c363e39e442ce532ada48c7d886"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/gallery_generator.py_ExampleGenerator_ExampleGenerator.components.return._join_refs_": {"doc_hash": "08e3680d45899265649d118b0aac027802b860699ba359c1c3e421643ef4af52"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/gallery_generator.py_ExampleGenerator.extract_docstring_ExampleGenerator.extract_docstring.self.end_line.erow_1_start_row": {"doc_hash": "7bbe6551443352d6687c5835bf83afab0ce6a6f7da3a8f6929a8704354b81816"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/gallery_generator.py_ExampleGenerator.exec_file_ExampleGenerator.exec_file.create_thumbnail_pngfile_": {"doc_hash": "f3696520b3e8802a0b65aa93d2229358653b15f8bfa526de63ffb86caa26c73d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/gallery_generator.py_ExampleGenerator.toctree_entry_ExampleGenerator.contents_entry.return._raw_html_n_n_": {"doc_hash": "86a04923b9b06e55cdb0b6accfffb3d68d460b9f7244589a8e86eded1dd936eb"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/gallery_generator.py_main_": {"doc_hash": "293496aa50d5f88c4573adb8ee20b454850c1cc10d55a16382aa3fbafe058bf2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/extract_examples.py__Turn_the_examples_sect_": {"doc_hash": "6b966244e33336e8b16e44dcc90aa4f83cc6bd6d0b7a38429e7b4e7f8ae79c6e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/generate_logos.py_np_poisson_disc_sample.return.samples": {"doc_hash": "00228a43437b72959cf26dd3a4ec42c01d968c31166154082988f9b5a4ae8390"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/generate_logos.py_logo_logo._Add_scatterplot_in_top_": {"doc_hash": "6b1d03ff9b745302276d045a11b7093dfbeb30d987b1da21af605c7da79d5485"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/generate_logos.py_logo.if_scatter__logo.if_scatter_.u_set_visible_False_": {"doc_hash": "9f4b8f612f914dca47cfda05dd4c791b371763cbba9c29f7fccd0458dcab87ab"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/generate_logos.py_savefig_": {"doc_hash": "bd5224fcbbb17576c633138b2236bfc57a9adc9e2a2d2f8f6ef305cfd9da7329"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/nb_to_doc.py__usr_bin_env_python_pop_recursive.return.current_pop_nested_1_d": {"doc_hash": "ac0616f149f8f21669b827a6a66f854ac09768097536b5ad950c03a2d5b8da11"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/nb_to_doc.py_strip_output_strip_output.return.nb": {"doc_hash": "81b1db23b2545b3688a2fcf794ddea1c869c7a45a545c416fb349d30144a84fe"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/nb_to_doc.py_if___name_____main____": {"doc_hash": "2104c58f9bf3d43643326c886b7bed6281bbe5e36223919f18f9aa509082bc0c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/set_nb_kernels.py__Recursively_set_the_ke_": {"doc_hash": "87dc7721b43d9ff67151cf00f7e3d8d44a780102c4d7c0d625c7917cb190da80"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/anscombes_quartet.py___": {"doc_hash": "b37d52b520e23c05fa9a5dca710c113ce720cd57b517ff059098fb94b3bc941f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/different_scatter_variables.py___": {"doc_hash": "f2ef0d5024515083dedcb76762b4beaf2fd6120e9cf5c40bebf18e10e66d4014"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/errorband_lineplots.py__": {"doc_hash": "6597d598cd7412a8b428689733e53c0f0792041e1589c2ae86059baef3de9af3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/faceted_histogram.py__": {"doc_hash": "99e9cddac19153dbc65387ea26848b2e40735cd49b846f77d3a461688386e814"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/faceted_lineplot.py___": {"doc_hash": "34b66f54c417925334d2c37bddd465877a49692aca36557ac005d775500b8b65"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/grouped_barplot.py___": {"doc_hash": "ab80bc9becbdd1d694d9d84cc0f7408cfa244553b75bc925d56ba79a4f46fd63"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/grouped_boxplot.py___": {"doc_hash": "bf8342b2031c8d710c5aa806cae2e1eb4374b5ee0faacc2fb6db19e5cb47a6c7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/grouped_violinplots.py___": {"doc_hash": "b6ba385351f1c80699523c3c2e5ff58d8802b39574b74597033dcda1e0bd3b4b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/heat_scatter.py___": {"doc_hash": "1187cc591304edf3b74db90a71e868ed57a5e5440639ec404b9db8109f1c8b32"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/hexbin_marginals.py__": {"doc_hash": "ae612946f6cf6b1ac014b4e809b76aa7a333c5685626ced92480869b0155953c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/histogram_stacked.py___": {"doc_hash": "30cb047251e7fb356a4c2581a3b76715997829e14399102b18f8810112b8b748"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/horizontal_boxplot.py___": {"doc_hash": "2cf73380934eef1cd7194111e4afde85b3622c0dd26b81dee83ab2ddc4517b49"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/jitter_stripplot.py___": {"doc_hash": "f9bd1037c2c02b1d2cde3768165b2a9aec243762442f9186e55022743a90f28e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/joint_histogram.py___": {"doc_hash": "4bfb101ab7b0669b437ad50f32d69636a5b75444b0653be180adbc4644cd1890"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/joint_kde.py__": {"doc_hash": "5ca5b6748886f6619de0d318c471936da9b58f8932e06884a3cb12d31f07855d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/kde_ridgeplot.py___": {"doc_hash": "b6ed5a09df8905a6001bd6ad14c7e0d74558d40ab7ba9e196ff4388275eea8d0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/large_distributions.py___": {"doc_hash": "4e06b20e39f522f624e8fef7f8bbfd2a89e9bf301aaed1788184f2c99ac25424"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/layered_bivariate_plot.py___": {"doc_hash": "ff9e4eb9512c7d3071b1b1288f96727395de83df6abb9d3e32bdad4a149c2594"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/logistic_regression.py___": {"doc_hash": "0e861e1ed30149449f2a35aafdff7bb6f819563396e696a018b529df613219fe"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/many_facets.py___": {"doc_hash": "62d9bd856961e3d5c912781bb0e68964020dc1edc122b7860bca651538250fe4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/many_pairwise_correlations.py___": {"doc_hash": "678a18eebe56762bf4349d625938c681b3f8b58b227a4588957e636acd496fad"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/marginal_ticks.py___": {"doc_hash": "1d0ae23dc82ca295af55797d1c0038e5562e0c87dc0b489353f35995db556c3c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/multiple_bivariate_kde.py___": {"doc_hash": "3adab8eb013b9c2a4140983eaec4073478720b763a5cb771041201989e891a35"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/multiple_conditional_kde.py___": {"doc_hash": "1539aedf412a7ec0c3e51d5b7b63e99ffe8780a79a732f5ad6019030c0f3433e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/multiple_ecdf.py___": {"doc_hash": "0ee8115530fef1390f119aaf56d73b104c165880ed00d26bf386351a46ecfc8f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/multiple_regression.py___": {"doc_hash": "95ef50b09ea3483346f1241f090e35bc6f895428a5b871da4a05123516948042"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/pair_grid_with_kde.py__": {"doc_hash": "578a57151ac896834f097f5cb0c4f8cc025b8a1fea5c880266311c86b2c47553"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/paired_pointplots.py___": {"doc_hash": "a9d2abb78ed74724068ceca9ef31d85447675eddf66913315dbb0fac94fbcac3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/pairgrid_dotplot.py___": {"doc_hash": "becb78643ea6129ad367607feed125553aadf269889779cbec9aad59f7ff3826"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/palette_choices.py___": {"doc_hash": "e40a164cf1ed11ecacac4253972b373bf57c983bc082f8a7158008678d9021cc"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/palette_generation.py___": {"doc_hash": "4f7033c120745b84d4abddff4d16da2e933c69d9e266564a443fac6c6e72f126"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/part_whole_bars.py___": {"doc_hash": "36d02250c4c400b6c50bd44642b8500a1db597de426728b065bc7b5221770840"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/pointplot_anova.py___": {"doc_hash": "bd45662375cee85525fdcfda56bed1c4532aff4d1ac512d11f5eab3a18e02e39"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/radial_facets.py___": {"doc_hash": "5a8ce95c4af895c6c3785ab0a7a234049cec2d983c9c939193f6f7a680860479"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/regression_marginals.py__": {"doc_hash": "d64abdcf410adb6b6bb9e1aa67d25fd4e542546e7affa7ff22a040634a10b00a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/residplot.py___": {"doc_hash": "cea1cb746d954134a5477310428c72d82442a6962d985c1cff4b2ca8692ba2e6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/scatter_bubbles.py___": {"doc_hash": "f8e0f5b1693b076f3402a5fbbcb83f361fbf0addbf97a04c8f602b89e945ee18"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/scatterplot_categorical.py__": {"doc_hash": "0763d64e5db3a3be8d40cc9e13dac312d2ba651ba3d39e2c20c9192ebef7b3d1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/scatterplot_matrix.py__": {"doc_hash": "bea382b831f9835b1d0e17d4cb6dd64cdcabe1efcf4753fdffb0110fa9033a56"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/scatterplot_sizes.py___": {"doc_hash": "f371b3b35ee8349523eaa637ed3953449426baca47a187169ee844bbe2050a20"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/simple_violinplots.py___": {"doc_hash": "595fc05d77204e6739be5ce4156a428a0608f03f1e323a64cb95b92885f1d5a6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/smooth_bivariate_kde.py___": {"doc_hash": "10f8f29af6cc93216238b81a4bc04c3ff1c862f70c4d2c4387036fe82e915503"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/spreadsheet_heatmap.py___": {"doc_hash": "72c6d7c5b9f39325143beaf9dc34e24ac1a6be8bd2a41f81906525fb9b2ade8b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/structured_heatmap.py___": {"doc_hash": "8b2ea469621c34d2e185af1bd09f7afffe41073fbded94df3f046b590e5d2d3c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/three_variable_histogram.py__": {"doc_hash": "d5c9f4b3b497510ec469033c65db2dea3a7db54923fe3690450c2ffe8bfb6d71"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/timeseries_facets.py___": {"doc_hash": "87f54423aeb24d07021ba35ad606ebfafa24a1eebfc8ef38b351ee2720b9fd99"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/wide_data_lineplot.py___": {"doc_hash": "d69a4de2df4aabc1d6d2ba7a4b6fa9e71d71912300de4d832df577048a9f3468"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/wide_form_violinplot.py___": {"doc_hash": "1c16e72eebf268dbf599a8b19aac45fce6cd3e3f12a0213f2de79565ccd1de04"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/__init__.py__Import_seaborn_objects_": {"doc_hash": "7c385a22a41b64ee064ee9581a6fcc7058d40f42d210508268c6f6a60c307581"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_compat.py_np_MarkerStyle.return.mpl_markers_MarkerStyle_m": {"doc_hash": "a37f0f50cd4d7acc09d7e40abe47ec1e2d23989345e8816b72fc0aa97ab6a6f1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_compat.py_norm_from_scale_norm_from_scale.if_norm_is_None_.else_._TODO_more_helpful_error": {"doc_hash": "7e6257083fbff184e95e1f63ef4ad266dce6d42c0f2fe0a9f028b021bf42a34f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_compat.py_norm_from_scale.ScaledNorm_norm_from_scale.return.new_norm": {"doc_hash": "c174ee6356a759fb204a93c4fe6811a485e5b20f18fb978fbf828a10ca2e84ee"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_compat.py_scale_factory_scale_factory.return.scale": {"doc_hash": "7d90d5ac0c28ef354d0106a4b2ba2ebd26a777f63efc276f6e6332a5d3730f6d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/data.py___PlotData.__contains__.return.key_in_self_frame": {"doc_hash": "b51715ff8698f5f5c80b4edb9e4cbe854a0f711af653943640666eea2883069d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/data.py_PlotData.join_PlotData.join.return.new": {"doc_hash": "7ce60a25b55600d72bca9a0bc3fed929ab82003f07ccfe660ae12db1377aaa1b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/data.py_PlotData._assign_variables_PlotData._assign_variables.if_isinstance_source_data.else_.index._": {"doc_hash": "41bca71eaef326486ab0b3dd553e340ccf2d85f4f1fae73e432de16ae9957a29"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/data.py_PlotData._assign_variables.for_key_val_in_variables_": {"doc_hash": "30c9eaf4ce529eb90e47273899fa0168ce6e2424599f9f21a7f9724a54e15607"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/groupby.py__Simplified_split_apply_GroupBy.__init__.self.order.order": {"doc_hash": "7a405c6ef9b8aa74ed856718d7e735c5170b9d0711f13ec8d7e89c4a286074bc"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/groupby.py_GroupBy._get_groups_GroupBy._reorder_columns.return.res_reindex_columns_pd_In": {"doc_hash": "3bfc4457969b95201e9d85d10e8e7f67f9ea632cc5e5a3d99539981a41fa519f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/groupby.py_GroupBy.agg_GroupBy.agg.return.res": {"doc_hash": "0b3167e3ef47abc496225633c2c82c8c23c001e6d25b29dd5dd5de19e2573ad7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/groupby.py_GroupBy.apply_": {"doc_hash": "1f69050ad1f28945ed127305474b6708129f136d8a50303a9e03bff6a9633f79"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/moves.py_Dodge_Dodge.__call__.return.out": {"doc_hash": "b1de1556aa22cdcc7dd6f827f7026d9ba253d1233552c98d60690c1600ec40ea"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/moves.py_Stack_Stack.__call__.return.GroupBy_groupers_apply_d": {"doc_hash": "77df448686fc97e71a133d43b17093217d1ab08b02ec46ca16007407334a824b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot._resolve_positionals_Plot._resolve_positionals.return.data_variables": {"doc_hash": "5fe4358c6e5b0678549f8db1e6b6d608345ef97330fba4807431adb068485a43"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.on_Plot.on.return.new": {"doc_hash": "02c4f5f3845e82cc440bbb36d073859eef9c3ed86911599e647c40921545b0ec"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.add_Plot.add.return.new": {"doc_hash": "bd66097c27391594bbf6abee3f5df1505f4ba759f81766647cf319f5b1477a7c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.pair_Plot.pair.return.new": {"doc_hash": "4da6681d03565a6e4257b389252fe32385805db4e7e2d512e68f3251977f476a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.facet_Plot.facet.return.new": {"doc_hash": "22fecf9198094246a6c705cd92418575b4f18af6a046c7b224daf132c819a203"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot._TODO_def_twin__Plot.scale.return.new": {"doc_hash": "cc13711d06a894325cf162c081b5a539640dd38b55afbf29803fdc34d56e011a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py__The_plot_compilati_Plotter._TODO_what_else_is_usefu": {"doc_hash": "e31af6f6ea0f38d78afcd3da3907b6e641a4f4c8ba548b7cf2566a4c1210fb99"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._repr_png__Plotter._repr_png_.return.data_metadata": {"doc_hash": "3d3d143d8048aa63bc82777f7fdcec02c76c1fa3d1afa1182f1acc19f22ec644"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._setup_figure_Plotter._setup_figure._Figure_annotation": {"doc_hash": "2342d86893a861e66fbee81f33268c05b9f7e76f4377e11e6ba298392a7b909b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._plot_layer_Plotter._plot_layer.if_layer_legend_.self__update_legend_conte": {"doc_hash": "d16c2f9bac6ec2e9b4d406d730a25fe94dd2ed88a0134a616dae83fbd0dd3c69"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._scale_coords_Plotter._scale_coords.return.out_df": {"doc_hash": "413e8609aaad3013863c46c1024bcda5f1fcb02b136824b3901c4dae7a87f875"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._unscale_coords_Plotter._unscale_coords.return.out_df": {"doc_hash": "fa205e222419d140956dcf1dc2189c31203c4a215bd3ce590e347cecaddd23a4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._generate_pairings_Plotter._generate_pairings.for_x_y_in_iter_axes_.yield_subplots_out_df_s": {"doc_hash": "3be25ce13944cebb142b9a684aa5792cc072222cc69dcd59290ada80ad7883a8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._get_subplot_index_Plotter._filter_subplot_data.return.df_keep_rows_": {"doc_hash": "7e1c4b9569a2e982e726ba13f3309c037fd6f7e0baea182b328816e6bdbd75de"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._setup_split_generator_Plotter._setup_split_generator.return.split_generator": {"doc_hash": "088276ba939f9098099d6aab854ba708f02d8d7f1d9d7aaf92680653076b8c39"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._update_legend_contents_Plotter._update_legend_contents.self__legend_contents_ext": {"doc_hash": "d3f0c12b122250ffd6e03ccc8fca31c8cac8d839796669720322d80fc6758ad5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_from___future___import_an_MarkerPattern.Union_": {"doc_hash": "55c75f4713f978ffbfb4187ab8020a8d07e05f123ed6201e34258e6b87f9708f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py___Property.__init__.self.variable.variable": {"doc_hash": "777641043a4dcb6f96658d7fa6bb536c2d1f43887ee5d71c86ba9df20ca9bd2c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Property.default_scale_Property.default_scale.if_var_type_numeric_.else_.return.Nominal_": {"doc_hash": "49d8b6c6d2deea6173c72fd2a16416eecbb3226e057ab769f4cf9470c770c3f9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Property.infer_scale_Property.infer_scale.if_isinstance_arg_str_.else_.raise_TypeError_msg_": {"doc_hash": "a022c979ec0a49519db70546d91fb7bf95ed1dcda68997397d32ee21a07887ff"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Property.get_mapping_Property._check_dict_entries.if_missing_.raise_ValueError_err_": {"doc_hash": "9f5d0f1e45d879aa5256d67ec6d9aeb24653b7dabb3313aec528147916881dd3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Property._check_list_length_Coordinate.normed.False": {"doc_hash": "1d3d725a986afe5edd2e7bc374fa61f877637028b7b57f42b15bef6af9405c18"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_None_6_IntervalProperty.infer_scale.if_isinstance_arg_list_.else_.return.Continuous_arg_": {"doc_hash": "67b3d4ee228b0aad7c40363005a79ce6b8ad4ee991a907d3fdebea569413c0d9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_IntervalProperty.get_mapping_IntervalProperty.get_mapping.return.mapping": {"doc_hash": "72817bc2764473a6d0d01396b65df4fd22175c60d838a5ea9cb8c8cfb4e7927b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_IntervalProperty._get_categorical_mapping_IntervalProperty._get_categorical_mapping.return.mapping": {"doc_hash": "2c9ae5499141997a6dbadc13d1f7578aad802e7078627b6df84f2388d94d8557"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_None_9_ObjectProperty.infer_scale.return.Nominal_arg_": {"doc_hash": "8c4d2f12b3fd428d3fdf487f9b936e231503b43e2c9c5688156c1e2dc4b69a11"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_ObjectProperty.get_mapping_ObjectProperty.get_mapping.return.mapping": {"doc_hash": "a4f1e0143ed6848c222788a45c70185cb535729541e877a06b9531306006d1e9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Marker_Marker._default_values.return.markers": {"doc_hash": "99a809e258266767114a1b4dfb2dda2fc7b47afd70c46ec3110ae765eeb17d8d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_LineStyle_LineStyle._default_values.return._self__get_dash_pattern_x": {"doc_hash": "cdc7502d9af6dd623dd151b3c18ad088477153c2241bdff89e77d2e241d5035a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_LineStyle._get_dash_pattern_LineStyle._get_dash_pattern.return.offset_dashes": {"doc_hash": "647da3de70ae3eed584e745eb66a98274c925a93378e35850fac93c356604aaf"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_None_12_Color._standardize_color_sequence.if_needs_alpha_.else_.return.to_rgba_array_colors_": {"doc_hash": "fc545164588aa6a81b41641abe13f9edf401f02c2257427dea87cc4bf0554fac"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Color.infer_scale_Color.infer_scale.if_arg_in_QUAL_PALETTES_.else_.return.Nominal_arg_": {"doc_hash": "aa4f4064db664c39eba6ab16d2fd50cafbfd0a2ebfbccd2fed59d9bdc784b2a8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Color._get_categorical_mapping_Color._get_categorical_mapping.return.mapping": {"doc_hash": "5c2428867bba14a72145afaf24874b6b1d83540beb310b62c0228def405babb1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Color.get_mapping_Color.get_mapping.return._mapping": {"doc_hash": "5c850379cb9e6c3a3523febed46a86bdf07c67180c37361d41c87b3e11970520"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_None_15_Fill.infer_scale.return.Nominal_arg_": {"doc_hash": "d09c4e833ac324b8d7cc75200932addf5409b1b003e8a9da60a0f5b21f1c5560"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Fill.get_mapping_Fill.get_mapping.return.mapping": {"doc_hash": "0ac83050af5febf1e0bc657a14c7f28998ccc17e4f4be202de9553b00e00434d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_None_18_": {"doc_hash": "b5586fc5c17d106d86ee5f29a96f3a6275be2740c0837392ea419288e649ebc6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/rules.py_from___future___import_an_VarType.__eq__.return.self_data_other": {"doc_hash": "509861986cfa6f95ed19cb5a53333bae682b8e3d5ca350aaff5300f4aae5d21d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/rules.py_variable_type_variable_type.return.VarType_categorical_": {"doc_hash": "8593177098de243899ebbdb54d96b3e84f58d9bae62d9b3dfbeb18eab64b7276"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/rules.py_categorical_order_": {"doc_hash": "bf6c03cc652d65128d0eecc11ad21dba7d4e91fc2614d13cf43298c01e89b6c0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_from___future___import_an_if_TYPE_CHECKING_.Pipeline.Sequence_Optional_Callabl": {"doc_hash": "064bdb2fc3c1b0b16a9bc6b1ea0cbd65befb98afeb172c2d3626f274605448ba"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_PseudoAxis.update_units_PseudoAxis.update_units.if_self_converter_is_not_._self_set_default_interv": {"doc_hash": "240c71faac59bc6c4ee640352c420b6bb6bb5c57c47ff85b93f51958a1ba18ce"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_PseudoAxis.convert_units_PseudoAxis.get_majorticklocs.return.self_major_locator_": {"doc_hash": "b626d06f1e28ab8910a6f1bc68f35710af076b25fc5cf5d9b3f205e8c7ea7446"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py__make_log_transforms__make_log_transforms.return.log_exp": {"doc_hash": "8a718f15b9959aa7d0b8436308d56b63fc08741c44ddf9b38abd6401bff29184"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py__make_symlog_transforms__make_symlog_transforms.return.symlog_symexp": {"doc_hash": "895d09bc03e6559f9ff463ff68a17d43db2bd11caef0ea49fddd4baa2e7b33a9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py__make_sqrt_transforms_": {"doc_hash": "ddd07b576195e8a7ed3adbe7c31dc02a54f3f5cece474cc37db00b33b530879e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/subplots.py_from___future___import_an_Subplots.__init__.self__determine_axis_shar": {"doc_hash": "6e3c7f6c36953671e1d94b107fc636b80be961916b282e80b09d269db3e7a54d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/subplots.py_Subplots._check_dimension_uniqueness_Subplots._check_dimension_uniqueness.if_err_is_not_None_._TODO_what_err_class_De": {"doc_hash": "9aa9b9391264074e2a69e9824155937a68ca2789101a4b29e212945fb146a3e6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/subplots.py_Subplots._determine_grid_dimensions_Subplots._determine_grid_dimensions.self.n_subplots.self_subplot_spec_ncols_": {"doc_hash": "7367bdb8ab645f6df02c821200cc4613cccc25d386b75773eb7cf2a62db708dd"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/subplots.py_Subplots._handle_wrapping_Subplots._handle_wrapping.self.wrap_dim.wrap_dim": {"doc_hash": "dbcc1fc3d9ee9bd32fc9d2c1d8353ef13bb3c8beee0c326dbdbdc6fd30519071"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/subplots.py_Subplots._determine_axis_sharing_Subplots._determine_axis_sharing.for_axis_in_xy_.if_key_not_in_self_subplo.self_subplot_spec_key_": {"doc_hash": "1430801a897cf0f87c86022631b3217f540159a0ff10705350b862039697584e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/subplots.py_Subplots.init_figure_Subplots.init_figure.self._subplot_list._": {"doc_hash": "98c48ce6622c71d233a34e9a33693e9ad2192b4907f6caf8febb178ef3f7ebc8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/subplots.py_Subplots.init_figure.for_i_j_ax_in_iter_ax_": {"doc_hash": "2dc8aa8b1fbc1cbb6cab219f2139059e8dfa3a1f6f9956408ea45982020fbea2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/typing.py_from___future___import_an_": {"doc_hash": "93184f277482778bd29b65704912c9ab17f16405cd23b94d61b2e44389f4847f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_decorators.py_from_inspect_import_signa_": {"doc_hash": "f5cc8c34bab3a409046d5e224420df9ee77024d54381677de541c3a763038129"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_docstrings.py_re_DocstringComponents.__init__.self.entries.entries": {"doc_hash": "d69732697de2501b249f20e4894082982c845c3f4819f92a584949a569ac23cf"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_docstrings.py_DocstringComponents.__getattr___DocstringComponents.__getattr__.if_attr_in_self_entries_.else_.try_.except_AttributeError_as_.if___debug___.else_.pass": {"doc_hash": "a6105cb10af559043f9ba57b00aa8c38334ab2166b18bdac464dfda1cdfac56c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_docstrings.py_DocstringComponents.from_nested_components_DocstringComponents.from_function_params.return.cls_comp_dict_": {"doc_hash": "5fa763b9f5c516b28ac2563aa9504b1a67897e384b9377de4d4c956caf3c3e13"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_docstrings.py__TODO_is_vector_the_be__core_returns.dict_": {"doc_hash": "f2c1295f70faeb4fb470742b6c892a407cee5a848422fd3b3e5885dda0ebabb1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_docstrings.py__seealso_blurbs_": {"doc_hash": "2f7213fdb4626a8efa27362b2ce148fb6ab08050e67993a754c0e71459e3d818"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/area.py_Area_Area._standardize_coordinate_parameters.return.data_rename_columns_bas": {"doc_hash": "a12a4b2d9e1f23843060b11426420d54629916b8b464edb1d13e0586ca74821a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/base.py_from___future___import_an_Mappable.default.return.mpl_rcParams_get_self__rc": {"doc_hash": "d57be88aa11a312ace218c55f1134137c629ce0291be6ad40517e24387fb6157"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/base.py__TODO_where_is_the_right_Mark._TODO_make_this_method_p": {"doc_hash": "6554d83d56ce5db133fce5fc521734f5ea52b919980ced2a6219cd46a6f320a3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/base.py_Mark._resolve_Mark._resolve.return.default": {"doc_hash": "92705afd5fae647c2a83dfc50e02b10e3fda284f5cbedf70cc21e7e4f94c7dc3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/base.py_Mark._infer_orient_resolve_properties.return.props": {"doc_hash": "2e7dac3c4396114f90846f995d8fc179d80324f3d988a1784e0b313826d99fe8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_warnings__check_argument": {"doc_hash": "480d25c5ff1aaac1adbd65abebe468a4abd5268d5b7dd7b3ea7d0e7275f6698c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_HueMapping_HueMapping.__init__.if_data_isna_all_.else_.self.cmap.cmap": {"doc_hash": "ab057183e9f6c430803c54717d48ffae7148e01e81745d2d6ed7de0cfb3f28ca"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_HueMapping.numeric_mapping_HueMapping.numeric_mapping.return.levels_lookup_table_nor": {"doc_hash": "2e79b1a13ee7147554888351fc8fab742c7f271415e233d9fa3c34e8ec1b2f4b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_SizeMapping_SizeMapping._lookup_single.return.value": {"doc_hash": "f224859394777f2abb6c09f9b91f50619d8e7af2ea6475bfc804f7bbf29c237a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_SizeMapping.categorical_mapping_SizeMapping.categorical_mapping.return.levels_lookup_table": {"doc_hash": "6a6fc74b0ddc23aca6a504547737cba4e66b2df438d06f83aa248e6dc63217f4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_SizeMapping.numeric_mapping_SizeMapping.numeric_mapping.return.levels_lookup_table_nor": {"doc_hash": "81d0d157b3ac88b58932607821f433cddf558987134ed6a6747c2ef285597e74"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_StyleMapping_StyleMapping._lookup_single.return.value": {"doc_hash": "b8e9d7a273271481be24acb5557bc313966cef3fef86d644ba072bfc2727e884"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_StyleMapping._map_attributes_StyleMapping._map_attributes.return.lookup_table": {"doc_hash": "49ee94e72a8f6b6baeab8ef46ea2975a7424c7fbaf7c84a59c23e18ea1d8373b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py___VectorPlotter.has_xy_data.return.bool_x_y_set_sel": {"doc_hash": "7acf12f76f7c81e8b1037ea174d78acfd717f53f4df26604f2d87534b6217cee"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter.var_levels_VectorPlotter.var_levels.return.self__var_levels": {"doc_hash": "d1f4904fa464e6466f347e271282dbcae6252701fd32cdfbe85dcf2a013ce769"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter.assign_variables_VectorPlotter.assign_variables.return.self": {"doc_hash": "a4bb4feef7b3ab1ced7250483f22f29c7eb1402fefadf53584235f6967fd84a5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._assign_variables_wideform_VectorPlotter._assign_variables_wideform.flat.not_any_": {"doc_hash": "616e7b22bbfc55430529d734e40ad277386cb9a9b3e949a54a8d2899005a7452"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._assign_variables_wideform.if_empty__VectorPlotter._assign_variables_wideform.return.plot_data_variables": {"doc_hash": "a379f24cda8e144d19ac1a98b90cce25539acb6b852d90b89af5922d8f63e547"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._assign_variables_longform_VectorPlotter._assign_variables_longform.return.plot_data_variables": {"doc_hash": "a461413c5f5c9c578b8e0afca27d9e2b3a2fa561f8ce1b9c6558c40f02f28e80"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter.iter_data_VectorPlotter.iter_data.None_4.for_axis_in_x_y_.if_self_var_types_axis_.None_1.levels_axis_np_log10_l": {"doc_hash": "67445cd4a069dea9ab6024450c01646c95768ad3bba4f0b3982e36507635db3a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter.iter_data.if_grouping_vars__VectorPlotter.iter_data.if_grouping_vars_.else_.yield_data_copy_": {"doc_hash": "b5e8aa1b1732ed1392dde8232338884b9e96c06db94e30279e83d9dc986bf208"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter.comp_data_VectorPlotter.comp_data.return.self__comp_data": {"doc_hash": "919622f7e0118ec3a5205811aad66be805379313950f8bb39b21c89f8eb3ca80"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._get_axes_VectorPlotter._get_axes.if_row_is_not_None_and_co.else_.return.self_ax": {"doc_hash": "7fb1bd4e12047871a5559a25942cad03986749260f3c9c6043991e8e810c9a88"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._attach_VectorPlotter._attach.self.converters._": {"doc_hash": "f2fed3256f6480a89c6544c77bd7db81ec953494ad5176bf7d6753ef6d5d1c84"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._attach.None_3_VectorPlotter._attach._TODO_Add_axes_labels": {"doc_hash": "0579c1af09f0fcef5de323ec3d005d5a2a3ba06455c11bad516e6b5fd2f0f4b1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._log_scaled_VectorPlotter._log_scaled.return.any_log_scaled_": {"doc_hash": "3f91dddcb6c967cd8f76822fea4fd4a3d3e7a15c8ce38fdab137e37788023fd7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._add_axis_labels_VectorPlotter._add_axis_labels.if_not_ax_get_ylabel_.ax_set_ylabel_self_variab": {"doc_hash": "b3395275b966054c8a2af8d4a511948df9ced4cf9f9e3142918a5c8265fcddb9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._XXX_If_the_scale__meth_VectorPlotter.scale_datetime.raise_NotImplementedError": {"doc_hash": "ad223a1e65a81012a525a10f84e4f423d3036d9039608a1e634640dd34940a04"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter.scale_categorical_VectorPlotter.scale_categorical.return.self": {"doc_hash": "1bb39ff9a07d1069533e5081deb5c631bdce205bd11743777b1ea0c0503f1f37"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VariableType_VariableType.__eq__.return.self_data_other": {"doc_hash": "f6431e6f9af3d6b28fa85ab8f90f9ec1e31a9b9a384f610d102283cee0f7fb4b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_variable_type_variable_type.return.VariableType_categorical": {"doc_hash": "d893472547753a2125720c39d629b53d71686034ac7ee51807daa2b399d3dcbc"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_infer_orient_infer_orient.if_x_is_None_.else_.return._v_": {"doc_hash": "e631736618097d539c8bdbb21cf72cd9d8f0d47511e473db2ed3e57c9ad3fc05"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_unique_dashes_unique_dashes.return.dashes_n_": {"doc_hash": "cd49e2a08f0f33309b2c4e6330da2a47693bbf8f9804f8ce0f1660d5ca225e1c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_unique_markers_unique_markers.return.markers_n_": {"doc_hash": "56d6e18299461f8798e27c440b91e64b0b83088a2f54f65517cb7efc8c75bc1a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_categorical_order_": {"doc_hash": "794d5cb73c4362d6f4743c2a9693e1ad06a9a9dee9b8c991dd62e0cc18f58f27"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py__Statistical_transforma__check_argument": {"doc_hash": "183390c42c4e5a7eb574d45710d2bd93de40ccd46a980cb594b5281a62ba3a0a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_KDE_KDE.__init__.self.support.None": {"doc_hash": "c3d005e758f219b6605b3a74f34d5566a70974781014f35600a1ca0277c0b556"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_KDE._define_support_grid_KDE._define_support_univariate.return.grid": {"doc_hash": "3b568bb5d633d9bf01d211f0cd0a8f0a7dba3c9b949b2c729ba2bad04712a7d6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_KDE._define_support_bivariate_KDE._define_support_bivariate.return.grid1_grid2": {"doc_hash": "2f758911f3f6191cfbb10dd1d50f1177b2d389d0da8e1679d15586f65cd005c1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_KDE.define_support_KDE._fit.return.kde": {"doc_hash": "0e642e2c74d06504e2c4e753f5e1d7df7636b93673d2c280d0c972033d40e420"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_KDE._eval_univariate_KDE._eval_univariate.return.density_support": {"doc_hash": "6cb2ae6fafd4abdcd92b981202c2c1d0764c1f68b282daa781b523a53f20342d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_KDE._eval_bivariate_KDE.__call__.if_x2_is_None_.else_.return.self__eval_bivariate_x1_": {"doc_hash": "94817ac52eaa7a3e0a223a66b0c97bdde5f1d9d6615687c6c73e77617b3b3e21"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_Histogram_Histogram.__init__.self.bin_kws.None": {"doc_hash": "0423e54f2ab95feb280ee1e0f2412cb8d4bbafd9ecd9e74b409434216c2d5827"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_Histogram._define_bin_edges_Histogram._define_bin_edges.return.bin_edges": {"doc_hash": "b33fae55ecf895cfe596f8c165dedbf68eab889805b6937cabab87596686ba0e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_Histogram.define_bin_params_Histogram.define_bin_params.return.bin_kws": {"doc_hash": "e09c8b4da53b137a151cf6eb2523cc3b80da1f886b321de360f5185a5b01a7b0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_Histogram._eval_bivariate_Histogram._eval_bivariate.return.hist_bin_edges": {"doc_hash": "ba25eae2f692ae955190fe166133fcdb39cd67641703c92fc4ad253616c9a59e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_Histogram._eval_univariate_Histogram.__call__.if_x2_is_None_.else_.return.self__eval_bivariate_x1_": {"doc_hash": "3730f8aaa51e77ea130ebff9868d0e55c0db3a582feb99183f194112caf0ebbb"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_ECDF_ECDF.__call__.if_x2_is_None_.else_.return.self__eval_bivariate_x1_": {"doc_hash": "d03930ef559a3cd5761bcbb0a989d59cee16c099e0db83cb1292a5719e8e5f9e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_EstimateAggregator_EstimateAggregator.__init__.self.boot_kws.boot_kws": {"doc_hash": "3a2feb604a07bdb5d8824e1014583621b7ba2d58ca7b7de5c82d2dbbb8922506"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_EstimateAggregator.__call___EstimateAggregator.__call__.return.pd_Series_var_estimate_": {"doc_hash": "528d84292f536d91dc554c00a7260cee1158be699ebb16612f64b2a67064d523"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py__percentile_interval_": {"doc_hash": "8a400f95f978aaf3db79a671b59b268dc25bfa432be24c98127b4fd48e56651b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/aggregation.py_from___future___import_an_Agg.__call__.return.res": {"doc_hash": "09b1ea447306840cfe30a5e99c2cf14812572b375a7f332bae824e92b3bc3ecd"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/base.py__Base_module_for_statis_": {"doc_hash": "425f11b3484357221751b598dff88fa4508e25f22f1a09735463cdad24689a10"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/regression.py_from___future___import_an_": {"doc_hash": "53cf8344865ba6ebef2ce8bb543b326fe03f967d7a39ba06c7f53b591d62d8c4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_testing.py_np_assert_artists_equal.for_a1_a2_in_zip_list1_.for_key_in_USE_PROPS_.if_key_paths_.else_.assert_v1_v2": {"doc_hash": "47ef52435a6a918862d1a985fd9588c80e18459d5a747c1c87db95f7e005614e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_testing.py_assert_legends_equal_": {"doc_hash": "836a075b47f391a7aada651c5f6862acb8a12f9402ca2fbff8322b65591e941d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/algorithms.py__Algorithms_to_support__bootstrap.return.np_array_boot_dist_": {"doc_hash": "ec56d469d28853530a06d285167ec470e4d36a3483b6c3d24361cb00b779805c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/algorithms.py__structured_bootstrap__structured_bootstrap.return.np_array_boot_dist_": {"doc_hash": "045a31e086f4facf56829653f23ed3ccbe73f285da07157a782bc9efcb1678b0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/algorithms.py__handle_random_seed_": {"doc_hash": "11d023103971f4d9c78f0f7c517c32686da082950c294bfbb6b40eac14bc792f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_from___future___import_an__param_docs.DocstringComponents_from_": {"doc_hash": "dfcfcf4a0093d39fc657ea602bdb579c71baeca5fa5fefb64f59e36ea27dd7a0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_Grid.add_legend_Grid.add_legend.return.self": {"doc_hash": "2bfbc358d01dd93e6d48a8ba1ae6fe897ee53f9e3d576ec2ab866122722c4fd6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_Grid._update_legend_data_Grid._update_legend_data.ax.legend_.None": {"doc_hash": "b13fee02d767cb01b448b7586a4ade600ea4026ac16e0184bad54c4f4240cafe"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py__facet_docs__facet_docs.dict_": {"doc_hash": "59623d06db18b7cc8fb4839b96a88054cf3bc780637384676613c6256773c648"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid_FacetGrid.__init__.if_sharey_in_True_row_.for_ax_in_self__not_left_.ax_yaxis_label_set_visibl": {"doc_hash": "1354cc412646d9de92dec1f86fbd4cbbcf236face94d5228097eda228a641eec"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid.__init__.__doc___FacetGrid.__init__.__doc__.dedent_": {"doc_hash": "5288c77247a9f7ba72dc9a5dc7bd398178cd3ee143934207cd94befb10c6f079"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid.facet_data_FacetGrid.facet_data.for_i_row_j_col_.yield_i_j_k_data_ijk": {"doc_hash": "dcb268d6a65dc2e7e4958d1d7c67f6d146ae1d23a928f7584f5e21a676dbe858"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid.map_FacetGrid.map.return.self": {"doc_hash": "5c31ca41c602fce84021b040468a09e1ea2241ddbfdefa06ff3cc14dbdb77e7a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid.map_dataframe_FacetGrid.map_dataframe.return.self": {"doc_hash": "7dd8abfa6aa18f203585e1bf3ba456e2d6d43853da958dc66671d0a08eadbfa5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid._facet_color_FacetGrid._facet_plot.self__update_legend_data_": {"doc_hash": "436cdbb2a48fe437917decfa7f02eae8f8be6f8a563f480f0bd7df6ad8429fa3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid._finalize_grid_FacetGrid.set_ylabels.return.self": {"doc_hash": "1c87ab303390cf0150342dc2070ade9e03fafaa1cbf43438d7cf06cba566f082"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid.set_xticklabels_FacetGrid.set_yticklabels.return.self": {"doc_hash": "80aa9fcaa7022781bcb08c94885b49934dd07f472ddac592612142a3b7838346"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid.set_titles_FacetGrid.set_titles.return.self": {"doc_hash": "5ba18624b78144856155fb9390bda3b2588d562fe2ef8130bb4b8063c49882ef"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid._Properties_that__FacetGrid._Private_properti": {"doc_hash": "998c6cdca906ca2cfbaae635a6063f37d2a4f005ecd3ee9632b81d5694ff42d3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid._inner_axes_FacetGrid._inner_axes.if_self__col_wrap_is_None.else_.return.np_array_axes_object_fl": {"doc_hash": "b564b059fe3490b202ffbf21ee82c3bc032a72df45e7f27769cf365d1b44cac4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid._left_axes_FacetGrid._not_left_axes.if_self__col_wrap_is_None.else_.return.np_array_axes_object_fl": {"doc_hash": "e581cef9737fcbfc8681746eb8e3056cb994d847f2d684f213cd50ebb6f7f691"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid._bottom_axes_FacetGrid._bottom_axes.if_self__col_wrap_is_None.else_.return.np_array_axes_object_fl": {"doc_hash": "7a0dd3c8367b7956e9db039b67ac6caa275a33346255f5740c77828b78d1237b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid._not_bottom_axes_FacetGrid._not_bottom_axes.if_self__col_wrap_is_None.else_.return.np_array_axes_object_fl": {"doc_hash": "211b370597b0ccafcf9cb6071a7f9721aec910f921308097490880b8ee15357e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid_PairGrid._Subplot_grid_for_plott": {"doc_hash": "3ec042982ba9ce3c40186eb02e488c00934d20e64ab7ef5ee66b7982baa71ddf"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid.__init___PairGrid.__init__.self_tight_layout_pad_lay": {"doc_hash": "3a96141f8b0857c489ecf5bc77dc18039ac925c23e8ca0a95759b84f12a6e8cb"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid.map_PairGrid.map.return.self": {"doc_hash": "997f7859af8b018ff27a7bee32fcb47a9a57c4b48896ba431fb50f820d08e67d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid.map_lower_PairGrid.map_lower.return.self": {"doc_hash": "b5de20c5f6e22411e92e95f3812d393e4aaa7c046258403af54a8c1dbf7d5d3a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid.map_upper_PairGrid.map_upper.return.self": {"doc_hash": "694758f7c7c411a91151306b942c3663af0b12cd24ef9c5d09b3802982adb1a6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid.map_offdiag_PairGrid.map_offdiag.return.self": {"doc_hash": "07cdfebf145c9f0e7b010c96462a11c02ae1a78c0c44305edae503aa1a7ba66b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid.map_diag_PairGrid.map_diag.return.self": {"doc_hash": "9ee5164812093e52651dc3309524ba55a081279a44b09a1e7b15bd95fbd11c90"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid._map_diag_iter_hue_PairGrid._map_diag_iter_hue.return.self": {"doc_hash": "0c035b76f52bfb6805cb80608085bf1d6eb57b671f26e8bf6cb2414957a5e74a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid._map_bivariate_PairGrid._map_bivariate.if_hue_in_signature_fun.self.hue_names.list_self__legend_data_": {"doc_hash": "7a262214e78787ce13ea65f7679fc725b19ec8e73e33d445188037bdf0314bab"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid._plot_bivariate_PairGrid._plot_bivariate.self__update_legend_data_": {"doc_hash": "3fd426ef8ddfeff22f42bdcfa807b126a0061c23cef33ca067323f0da12fce04"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid._plot_bivariate_iter_hue_PairGrid._plot_bivariate_iter_hue.self__update_legend_data_": {"doc_hash": "65aa75c33af0bbebd74359834a5a25e3838812077f50edf1617cf61988702f12"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid._add_axis_labels_PairGrid._find_numeric_cols.return.numeric_cols": {"doc_hash": "2adc383ea9d896c81cd3efa054cc30762a4929619abe533e2dcbdaa907c81357"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_JointGrid_JointGrid.__init__.f_subplots_adjust_hspace_": {"doc_hash": "153b816596bbe5ed55e431b8a6ce59e005ba623be96171e130b8af946cf3a372"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_JointGrid._inject_kwargs_JointGrid.plot.return.self": {"doc_hash": "abbfc7b3675124954aff763709091171cb8a34d08301db187a28e2ff6ec25573"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_JointGrid.plot_joint_JointGrid.plot_joint.return.self": {"doc_hash": "a2627efa551b3aaa564345076be14ab7c4d382525a2d8c41bdc14f1df7941c4f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_JointGrid.plot_marginals_JointGrid.plot_marginals.return.self": {"doc_hash": "d977bdcc44d555d6ba64042cf481bd761e367c0dcc239247ae2e3c131305ca1d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_JointGrid.refline_JointGrid.refline.return.self": {"doc_hash": "69bcdb8af5a0e17c98239f310dfe2645a6eabd7293e4247c7ea223252205dd67"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_JointGrid.set_axis_labels_JointGrid.set_axis_labels.return.self": {"doc_hash": "938797bb18ab8ad28138df2b8dbae524963fc30ec6a183bac0d7bc0edd50bf3e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_JointGrid.__init__.__doc___JointGrid.__init__.__doc__._": {"doc_hash": "29a82f2c70d52780d6f7786405758a908451539bd0ad308d1c790ae32a6d68f3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_pairplot_pairplot._Plot_pairwise_relation": {"doc_hash": "b5f16c87d31a6488c24297bf780c135338fb15853478da0cee22f0b2d384e915"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_pairplot._Avoid_circular_import_pairplot.if_diag_kind_is_not_None_.else_.plotter.grid_map": {"doc_hash": "9effc77336df280b1107d15df722697a80f2dc728605d61f384831b925f1aa05"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_pairplot.if_kind_scatter__pairplot.return.grid": {"doc_hash": "7b27cccf5e0f14e25b4d0cc4297517df32922a5d49d27cfbcadd4dc50113b6a6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_jointplot_jointplot._Plot_the_data_using_the": {"doc_hash": "caa03c4a54553dc04cbdea7b0f7509534a58bf832041db2e743988a22af89e21"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_jointplot.if_kind_startswith_scatt_jointplot.return.grid": {"doc_hash": "bf19781bef6125b66771703d9396b8d0843f1aee12be5be97a84fa3d5ae7e169"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_jointplot.__doc___": {"doc_hash": "2991a00b898a715dca8e707e9017427eb7f36edff8b99ad8193359600128257a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_from_textwrap_import_dede___all__._": {"doc_hash": "02317ac89ba65696e2f883686f2d26145c11cf11a65f0145c8627cd97db9ea76"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__Subclassing__Relational__CategoricalPlotterNew.__init__.self_var_levels_self_cat_": {"doc_hash": "39b3347a887f74c6b4d196510ad9c456ed2e4654493b75efa5c8917d94125dcd"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotterNew._hue_backcompat__CategoricalPlotterNew._hue_backcompat.return.palette_hue_order": {"doc_hash": "13c83ba342fad5b4dcf651d3f7c8616d25c5f028373bac6c82da2d32df0e8c22"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotterNew._palette_without_hue_backcompat__CategoricalPlotterNew._palette_without_hue_backcompat.return.hue_order": {"doc_hash": "fb6516e2ead547ff2ffbb1f2e22c15cdd7ae8978e3c1c4c666fe6958b7dfc073"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotterNew.cat_axis__CategoricalPlotterNew._get_gray.return._lum_lum_lum_": {"doc_hash": "c623da3f72c09e5a7673b30eba9a8e58bc1a23130f0a9bffd2aeae2246e36e64"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotterNew._adjust_cat_axis__CategoricalPlotterNew._adjust_cat_axis.if_axis_x_.else_.ax_set_ylim_n_5_5_": {"doc_hash": "c29c2a57d56397887c97176f6bbc2831be840a52a2f1df7a7fd32162943a7d3f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotterNew._native_width__CategoricalPlotterNew._with_no_observations": {"doc_hash": "c2ffabefb7aeafc62fbfd1b401078147e753ad06d9b27c7cab6485c254d22ca2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotterNew.plot_strips__CategoricalPlotterNew.plot_strips.if_show_legend_.if_handles_.ax_legend_title_self_lege": {"doc_hash": "583b47164fee56b0f1b83af85582b6b2bb66c030d4cca135fb2b97f25fee8c68"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotterNew.plot_swarms__CategoricalFacetPlotter.semantics._CategoricalPlotterNew_se": {"doc_hash": "52e64f417aed398972907d888f7751c7bbdec8d574af1d644c9ef859d9d3b4db"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotter__CategoricalPlotter.establish_variables.self.plot_units.plot_units": {"doc_hash": "fb913a426de63d072a97042dec2e45bff65f1e131dd3a4e51ec94e26a35e965a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotter._group_longform__CategoricalPlotter._group_longform.return.out_data_label": {"doc_hash": "8b6da6dce71826ecc1a8e8a14bbf39e4e77fecf1f21dc9834caf7461175a7945"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotter.establish_colors__CategoricalPlotter.establish_colors.self.gray.gray": {"doc_hash": "9122ae853e5ce243eaab1ff21907c40343eda3ae2daf08bc9f2cf0e430760bfe"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotter.hue_offsets__CategoricalPlotter.nested_width.return.width": {"doc_hash": "aeea99b0e9eff85d3509f7d252821fc43eaf183a01a7b7ac5280d8514e79300b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotter.annotate_axes__CategoricalPlotter.add_legend_data.ax_add_patch_rect_": {"doc_hash": "91437b3178bed1e71eff61c0dc21cdc94dc145f4d7fa1aad01959b89b4f05270"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__BoxPlotter__BoxPlotter.__init__.self.linewidth.linewidth": {"doc_hash": "eb587a1bdb518a8ff256e0cf31b878505a0b561d3c20d1f8f73b1823a354abd2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__BoxPlotter.draw_boxplot__BoxPlotter.draw_boxplot.for_i_group_data_in_enum.if_self_plot_hues_is_None.else_.for_j_hue_level_in_enume._Add_legend_data_but_ju": {"doc_hash": "b6918f43983bd6b70a4ccf2be6c85b389c6c627caca0837e59c3f09273676a63"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__BoxPlotter.restyle_boxplot__BoxPlotter.plot.if_self_orient_h_.ax_invert_yaxis_": {"doc_hash": "76d8889704cbebf88c0f28f2ce84ab9b7f0a065792d9bcc74f03acda2d3bc6c8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter__ViolinPlotter.__init__.self.linewidth.linewidth": {"doc_hash": "116413f480ffdd69c2d17be2a920134eb3a9a0222d7c0ec534a63bdcf913f707"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.estimate_densities__ViolinPlotter.estimate_densities._Scale_the_height_of_the": {"doc_hash": "d2758938d015dc5383d26aab503d21f2986725d4690a7a6c003f82caf4742968"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.estimate_densities._For_a_violinplot_the_de__ViolinPlotter.estimate_densities.self.density.density": {"doc_hash": "6f9aab8e89e7681cc8e6b423a7fd281d02dac1f56fbdd001db39e4a0db21a952"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.fit_kde__ViolinPlotter.kde_support.return.np_linspace_support_min_": {"doc_hash": "8e0afbaa2ece2ec6e838210d08dfb0e5426be7abec5d9e194f1a8484411cac9f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.scale_area__ViolinPlotter.scale_width.if_self_hue_names_is_None.else_.for_group_in_density_.for_d_in_group_.d_d_max_": {"doc_hash": "8e97e9069627bffcfac7a9542863202a3c6b05825f1ed3f6feccffd41271250c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.scale_count__ViolinPlotter.dwidth.if_self_hue_names_is_None.else_.return.self_width_2_len_sel": {"doc_hash": "43fd983e9db0888d29781eafd6d5b25617eaedc1a4263d72ab241c80ddf951d0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.draw_violins__ViolinPlotter.draw_violins.for_i_group_data_in_enum.if_self_plot_hues_is_None.else_.for_j_hue_level_in_enume.if_self_split_.else_.if_self_inner_startswith_.None_2.self_draw_points_ax_viol": {"doc_hash": "f82b3e4dba7df47121f2bbe6c9a34fa6fa26de3beb2b6aa81be8980bf719e226"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.draw_single_observation__ViolinPlotter.draw_single_observation.if_self_orient_v_.else_.ax_plot_at_quant_at_qua": {"doc_hash": "8e4e1363d52e61aaa3194ce9ab21356310317345afaf644f11969a88f8495a49"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.draw_box_lines__ViolinPlotter.draw_box_lines.if_self_orient_v_.else_.ax_scatter_q50_center_": {"doc_hash": "b43635f6e48fe853aafc792cbd9de7103384b02e7f8128bb0a9fa59af72c509d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.draw_quartiles__ViolinPlotter.draw_quartiles.None_2": {"doc_hash": "1c20526086f23bd925531e6a9374e406253236f6488145360f9844c5b82ed9e1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.draw_points__ViolinPlotter.draw_stick_lines.for_val_in_data_.self_draw_to_density_ax_": {"doc_hash": "b7bd58b3e5fbf57883b67f51250eb1ba8d4f504f6bb101bac18e1b04cebf6086"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.draw_to_density__ViolinPlotter.plot.if_self_orient_h_.ax_invert_yaxis_": {"doc_hash": "94c81c3838ce3799786319db81e45e72c4aedf6d94c71651b7db48e9f50cd042"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalStatPlotter__CategoricalStatPlotter.estimate_statistic.self.confint.np_array_confint_": {"doc_hash": "9882b12089b89669bfe8c7d6e9c40c0d4b1f7d7da5cfc9b20b55dc779a06e4d4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalStatPlotter.draw_confints__CategoricalStatPlotter.draw_confints.for_at_ci_low_ci_high_.if_self_orient_v_.else_.if_capsize_is_not_None_.ax_plot_ci_high_ci_high": {"doc_hash": "12fd4c41fb4b8d238e0fbf7e15d02a1f66b8352d959e0b38548e49b1e93f51a3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__BarPlotter__BarPlotter.__init__.self.capsize.capsize": {"doc_hash": "5c695ab7d067c948864e04bfc34fc26d1a42cab3ad2e9483bc4ab0a8d0af3f37"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__BarPlotter.draw_bars__BarPlotter.plot.if_self_orient_h_.ax_invert_yaxis_": {"doc_hash": "f6aff52a59a0496f0920d21a158ea41a116284368ca720e03bd7cf80198210aa"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__PointPlotter__PointPlotter.hue_offsets.return.offset": {"doc_hash": "20803cc5777114c288f29e7e9e83a393123141f606328ba7716479a7ceec8740"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__PointPlotter.draw_points__PointPlotter.plot.if_self_orient_h_.ax_invert_yaxis_": {"doc_hash": "cfdbd8471ee57bc89e9ae3a32234ac9813750a51020609dcb5292a72b55fc957"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CountPlotter__LVPlotter.__init__.self_establish_colors_col": {"doc_hash": "f438f760d8774c93a1cd9afb19713db268ca52a073ccbfc288cab099d7c312b7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__LVPlotter._lv_box_ends__LVPlotter._lv_box_ends.return.box_ends_k": {"doc_hash": "0c53884a0a21b72bba7845abf67052076951c0fd71f328798522c6569687ec28"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__LVPlotter._lv_outliers__LVPlotter._lv_outliers.return.np_concatenate_lower_out": {"doc_hash": "7840b88e9a187ad7042bfa73ddfb4bbdcae1dbc6d8048f7a34e89de5113c318c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__LVPlotter._width_functions__LVPlotter._width_functions.return.width_functions_width_fun": {"doc_hash": "99e207880074572670e038eeab3e3a5c0da8435b6147a5585ed24f7f3fc75093"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__LVPlotter.draw_letter_value_plot__categorical_docs_update_": {"doc_hash": "3845a7c8844210a9f0cff8775c1a489fbc9d8726658551c3234b5bfd00403b50"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_boxplot_boxplot.return.ax": {"doc_hash": "c331931bce818ac2a3269665a4f763b255c2f79f6efe5f7836455cafd24f15ba"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_boxplot.__doc___boxplot.__doc__.dedent_": {"doc_hash": "18f2117ad1363820346f7706e27451cd3aa8c5a2e3be6ceb81fec4012af3edcb"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_violinplot_violinplot.return.ax": {"doc_hash": "5d8e5512d8c1ae29e64d2a57252c5f9668b085d0bbdf0e5d2d154723a7aca434"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_boxenplot.__doc___boxenplot.__doc__.dedent_": {"doc_hash": "0662c795aaf24b8dad1214b5101fb9d4f253620b4925f3c0403c232ff8d3b2b7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_stripplot_stripplot.return.ax": {"doc_hash": "f33658337d4129b82dd415b4c11f1576cbef5a0c117e576e5eb75a1f7a2e5a5a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_stripplot.__doc___stripplot.__doc__.dedent_": {"doc_hash": "88f9aa4be40b3c47231b856a9040e298551ecd16c16fc8d8bb707b1219d5eb07"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_swarmplot_swarmplot.return.ax": {"doc_hash": "2ce428d41e12313b350c7f0177ec0761268e87bd3e3a19e7594a6ee455326833"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_swarmplot.__doc___swarmplot.__doc__.dedent_": {"doc_hash": "dd219dcefd38241979f578e6499eb43be138e70a2b8bedf9a717a5832b72e522"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_barplot_barplot.return.ax": {"doc_hash": "86d7f2fbf887e70e07ff4874caf2aeb787618a1a3deef598e62051309f11cec7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_barplot.__doc___barplot.__doc__.dedent_": {"doc_hash": "c5a89b410375586ea1f2a83f35ece100bde59fda2673127f59ac701fd0726ddc"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_pointplot_pointplot.return.ax": {"doc_hash": "75d6eba710b904173b7c3a11eac6a50f9f5cb67fb10a03854ba74336bbd81875"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_pointplot.__doc___pointplot.__doc__.dedent_": {"doc_hash": "2021ea95c82a08281de8c70127a4a4077c73cc1dd234858e88691f3b1af451d9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_countplot_countplot.return.ax": {"doc_hash": "737802e3a81a11aac52ab277d9b65bad511fa8765e793fc9fe74ad1990c5c0f6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_countplot.__doc___countplot.__doc__.dedent_": {"doc_hash": "457e664ed4324d5c60d478ce675a8fdbba2c0f47bd7fb8420fb9244657ca8661"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_catplot_catplot.refactored_kinds._strip_swarm_": {"doc_hash": "4c6c20a08bd4e2a1be3f7f8400a37c62c6f8820f48a7b9bdd0086ebd6e1698ee"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_catplot.if_kind_in_refactored_kin_catplot.if_kind_in_refactored_kin.return.g": {"doc_hash": "611bff7ca0a4bfad038a3f5c5788248063f59d462deffc78cc02c108c16986d9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_catplot._Don_t_allow_usage_of_fo_catplot.facet_kws._if_facet_kws_is_None_e": {"doc_hash": "9cc6ef8c2605ab8b29e5ca22629e63de4e5b7459fbabb1ef50d4cd726b19fe1d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_catplot.facet_kws_update__catplot.return.g": {"doc_hash": "b50157e83e420124593370c24bf30eafe25ddb50fc065e436fadae30610862ae"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_catplot.__doc___catplot.__doc__.dedent_": {"doc_hash": "9db789d5cc972cfb68601e7aefce0671abbb057a8949abe5ebd7b589278a6e48"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_Beeswarm_Beeswarm.__call__.None_4.else_.points_set_offsets_np_c__": {"doc_hash": "6d360397a3f39c9817978561b137793fc35680ca15b398f99db7979799a1159e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_Beeswarm.beeswarm_Beeswarm.beeswarm.return.swarm": {"doc_hash": "770647b29c67cbb0bc88be6dd73c74d8986e2e171121f5257e504abf116c5232"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_Beeswarm.could_overlap_Beeswarm.could_overlap.return.np_array_neighbors_1_": {"doc_hash": "0ea26935246633e493b528a87e7aee0e54c0f5d780077441a8e45c9cb1cc5821"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_Beeswarm.position_candidates_Beeswarm.position_candidates.return.np_array_candidates_": {"doc_hash": "27dba10f3e8168247f5af8a4d6ae8b322e064e69c4dd551c418c96fb2d6dbcd0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_Beeswarm.first_non_overlapping_candidate_Beeswarm.first_non_overlapping_candidate.raise_RuntimeError_": {"doc_hash": "c8d5ecdf0086073c084b0a8eb8688697a0857c6be04c3807bbeedcafa1b8960e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_Beeswarm.add_gutters_": {"doc_hash": "77dc5f73db15c7983c904c2d39ce2b8d196b0232ae683e8f13f58b8f86d692db"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/cm.py_from_matplotlib_import_co__crest_lut": {"doc_hash": "476e6d8f3943eb4a80d5f2144c93dcf08fb388b4669bf7cda45a5a31dc074cb9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/colors/__init__.py__": {"doc_hash": "78571d3701ab15fc2c405e36fd43d1af1c161de76ba9b7f2e2662a9b2e792575"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/colors/crayons.py_crayons_": {"doc_hash": "c4bceb289509913dade10caf46d08650066cd0c8902af779679f84fa338ad893"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/colors/xkcd_rgb.py_xkcd_rgb_": {"doc_hash": "8c2d74cd571b3d2f4d35fa9894a50037e3baa639fbbe9794f5017e6119c07d77"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__Plotting_functions_for__param_docs.DocstringComponents_from_": {"doc_hash": "cb7fe1a9c4407d09566ad83fe25e0b23f60470a2d8893ce9e93093fa9ee4e168"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_None_4__DistributionPlotter.has_xy_data.return.bool_x_y_set_sel": {"doc_hash": "affa1b396857bb3d363deb9d2fba5661eefa82e3767a9053e9215b34fd5b7013"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter._add_legend__DistributionPlotter._add_legend.if_isinstance_ax_obj_mpl.else_i_e_a_FacetGrid.ax_obj_add_legend_": {"doc_hash": "29bf481ef0c4c98232f60790384787274ab2310dd6e220e3237a681748edc6f1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter._artist_kws__DistributionPlotter._artist_kws.return.kws": {"doc_hash": "93d27c4de3587b81bb6ebd20b43015265982f5a8e03225b44f1262a944da190e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter._quantile_to_level__DistributionPlotter._default_discrete.return.discrete": {"doc_hash": "7e9042d456c3ecf5df2b96ada47470a7028b47a757c9e90a317df94ae54ff909"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter._resolve_multiple__DistributionPlotter._resolve_multiple.return.curves_baselines": {"doc_hash": "d0160ea6453e39d1845a7e26f22433b48c0742148e589bd526ef0954578d8ba6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.___DistributionPlotter.None_5": {"doc_hash": "ef32d924e3064d34e4cbf48eac0d726668c850f7ca5e4117e519e62bd7eedc06"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_univariate_histogram__DistributionPlotter.plot_univariate_histogram._First_pass_through_the_": {"doc_hash": "18bad70220a8e823d15eb260535c2489523af74aaae443ff8435f078d8a66ff5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_univariate_histogram.for_sub_vars_sub_data_in__DistributionPlotter.plot_univariate_histogram._Go_back_through_the_dat": {"doc_hash": "217341d4900518edd7ee4b68d1ac2a5c81b0dd5bcf081c49135bb8934f5c94d0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_univariate_histogram.for_sub_vars___in_self_i__DistributionPlotter.plot_univariate_histogram.for_sub_vars___in_self_i.if_kde_.if_sticky_y_is_not_None_.line_sticky_edges_y_": {"doc_hash": "da31557036a9d0343204b6343f0513acdb6a39ab08ab6b86339e4090740410b3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_univariate_histogram.if_element_bars_and___DistributionPlotter.plot_univariate_histogram.if_hue_in_self_variable.self__add_legend_": {"doc_hash": "520b8723d203cf583b4b57d89f070233fcde0ed8b843ac1e10a096e8e7e6cb49"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_bivariate_histogram__DistributionPlotter.plot_bivariate_histogram._Loop_over_data_sub": {"doc_hash": "33574f4c232ee1f8be5c80cb4078a0265543ab4d4853a239c9e4c2a746d44d55"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_bivariate_histogram.for_sub_vars_sub_data_in__DistributionPlotter.plot_bivariate_histogram.self__add_axis_labels_ax_": {"doc_hash": "ddd7747a20031d8e4e2f2b456937a0490b32731e41f4315b639005a2b25fa97f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_bivariate_histogram.if_hue_in_self_variable__DistributionPlotter.plot_bivariate_histogram.if_hue_in_self_variable.self__add_legend_": {"doc_hash": "44ca1be9df80219286c37115245554e71f782dc5492f4fa714bc9d288ec6e9ab"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_univariate_density__DistributionPlotter.plot_univariate_density.if_hue_in_self_variable.self__add_legend_": {"doc_hash": "e9e73c9a0e17a2b3e68ba83828a1eafa5ca64dc58f6983e70bac0d05f71efb3d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_bivariate_density__DistributionPlotter.plot_bivariate_density._Define_the_coloring_of_": {"doc_hash": "7efff3a69c3bfe98f5659c6cf18db092610f24c4e0261f452a9939889b66d5fa"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_bivariate_density.if_hue_in_self_variable__DistributionPlotter.plot_bivariate_density.None_8.self__add_legend_": {"doc_hash": "37e2e43092bcb377d918133c2918d1a2033029a8d9c14f181f279bd5e4aa0fae"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_univariate_ecdf__DistributionPlotter.plot_univariate_ecdf.if_hue_in_self_variable.self__add_legend_": {"doc_hash": "be026bb0347b508026a928a70a186bd9dd11b959d2101ac2c4447c6bbae9e3d9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_rug__DistributionPlotter.plot_rug.for_sub_vars_sub_data_i.None_4.self__add_legend_": {"doc_hash": "6ecade4c764122405b2b9c9921c18cb3d68a68d76fd3aae8fe4f4380c142ff74"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter._plot_single_rug__DistributionFacetPlotter.semantics._DistributionPlotter_sema": {"doc_hash": "e46284ad40426449b883f8e1803dcd085e129f983e922799d8e99e36955ce42a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_None_7_histplot.return.ax": {"doc_hash": "dd9321a5b00b74bfefb55dac46cd1c27f1935656651b5bb7167c69a044b31409"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_histplot.__doc___histplot.__doc__._": {"doc_hash": "f66a663e5eea2afe9cc79476b96d0da8186181051ece1af42b2376c8fe8aa5a5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_kdeplot_kdeplot.shade.kwargs_pop_shade_None_": {"doc_hash": "b077e4884ce245edd082d5760adfad3b4abb75533065b91185b2a6a725f2a9a4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_kdeplot.if_shade_is_not_None__kdeplot.return.ax": {"doc_hash": "0db13d6682511d581c68eec3983b9d4e2c50e2d72dbc75fe0c106278bf47f733"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_kdeplot.__doc___kdeplot.__doc__._": {"doc_hash": "f11044f6c10d55437fd96e5e8922c7a358dfe37f761d154a9d813d5c43aebc76"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_ecdfplot_ecdfplot.return.ax": {"doc_hash": "c0872e8bf7458d56c74860e8c13c809e72dce2801eb29c5756de05f01192aa2d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_ecdfplot.__doc___ecdfplot.__doc__._": {"doc_hash": "191e279c94611b9536afd4f2b959b810b26a88538bb156f03041036b3f4b5058"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_rugplot_rugplot.return.ax": {"doc_hash": "8cc0ee06c3deeaba8371e1353522c9330e35e76e8ba8d1be09b751e27ad007da"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_rugplot.__doc___rugplot.__doc__._": {"doc_hash": "7ebd19bc197d0150e831fa7f7af7b90fc4736a79f2944a81bfc0caf9e85b4069"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_displot_displot._Draw_the_plots": {"doc_hash": "4af0e05886c558436ebb504a4154926fe4af494da88859b0fc7e9830093434c4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_displot.if_kind_hist__displot._Note_that_the_legend_is": {"doc_hash": "9f32ba595c958c804515158794ed1334232cdc183acb28dcd38624fd6071f5cb"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_displot.g_set_axis_labels__displot.return.g": {"doc_hash": "37e1cd64b7ef50b0b5dcb77bb81aae550cd116f2130757feb9bf82a269d669e7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_displot.__doc___displot.__doc__._": {"doc_hash": "f9080129931d79cd7047476a6c6b1d1357b365049548a087d86a1cc0e9450c34"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_None_10__freedman_diaconis_bins.if_h_0_.else_.return.int_np_ceil_a_max_a_": {"doc_hash": "15fc26229b6cc8a55bb4da734d5713133742c580c817f0e5628c3e922699892e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_distplot_distplot.if_label_is_not_None_.if_hist_.elif_fit_.fit_kws_label_label": {"doc_hash": "b4dbf6eeea07dfbf2b647462051af01d6579541d9be95bdfa51b4692fc949920"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_distplot.if_hist__": {"doc_hash": "283cfdb8c0edfa8292f132d0f05e61b402be44755e8d8d895f922bf1c96d8957"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/appdirs.py__usr_bin_env_python3_if_sys_platform_startswit.else_.system.sys_platform": {"doc_hash": "eda5dcdde888cd2e231953d054e58e9975dcfd2a63173c3af1403e170cc00164"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/appdirs.py_user_cache_dir_user_cache_dir.return.path": {"doc_hash": "7f5c04d6395921ef06d5340ef2f80c5acbd557834b93259bf60e6754f36585ac"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/appdirs.py__internal_support_st__get_win_folder_from_registry.return.dir": {"doc_hash": "44c237c2129c07fc1810abfc9414914ff24218a88f7b89919296b8bb7b87ff33"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/appdirs.py__get_win_folder_with_pywin32__get_win_folder_with_pywin32.return.dir": {"doc_hash": "8ecb2b6b601d7616a6a52110a720b0a54037adf64966b3e89495f0c4a9376786"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/appdirs.py__get_win_folder_with_ctypes__get_win_folder_with_ctypes.return.buf_value": {"doc_hash": "99175e5fc24a8599ee0ba6c03808bd13b4f5873bc7596f73d39f87438b24627d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_inspect_Parameter.namedtuple_Parameter_": {"doc_hash": "90131c840c88932a3e9251ddd62c56b0e3793309eb47dea393fa4bafbf8eee84"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString_NumpyDocString._read_sections.while_not_self__doc_eof_.if_name_startswith_.else_.yield_name_self__strip_d": {"doc_hash": "19a1b603c11714c11e09ea7e3a797fc7eb47bc9e68551dee7bd85f0436d960e3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._parse_param_list_NumpyDocString._parse_param_list.return.params": {"doc_hash": "2834f98f28894ca5f0b3486fbbed01b95ea39020f72a9c6476a914f25685aafa"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._See_also_supports_the_f_NumpyDocString.empty_description._": {"doc_hash": "609e22c87b6cb2082f8abdd9eb5eda3e6d3eb353682921a8892f9363bde9ea21"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._parse_see_also_NumpyDocString._parse_see_also.return.items": {"doc_hash": "3e08617b2c07d78c01fee3367a92638d4380508ff0f37b4debff2b127265b50e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._parse_index_NumpyDocString._parse_index.return.out": {"doc_hash": "a52b10c96a12cfc3129b980a82bddece039c3c55c707079478574d431c8526fb"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._parse_summary_NumpyDocString._parse_summary.if_not_self__is_at_sectio.self_Extended_Summary_": {"doc_hash": "6a5cacde548b365028394bf68c99682ea37f7b5aa80d13898052cfb7dc0f786a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._parse_NumpyDocString._parse.for_section_content_in.if_section_in_Parameter.else_.self_section_content": {"doc_hash": "4f793fd7983a87272c1cb528f2597adcf9ceb8286e06bba16ef652df177eb77b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._error_location_NumpyDocString._str_section.return.out": {"doc_hash": "5f95494bbf81fbbd7e60df67e98926f0204636897a01b57cd463036148e7331d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._str_see_also_NumpyDocString._str_see_also.return.out": {"doc_hash": "7de44e3620358c9f87eccd2f4aa011514cfc151209aefaca641e4f238c8bc2d2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._str_index_header.return.text_n_style_len_t": {"doc_hash": "de6b7b5407c918c80a48aac20c2488465d1d152a950909b217baca14c8749050"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_FunctionDoc_FunctionDoc.__str__.return.out": {"doc_hash": "fbf90e0fed4738874760c402c1d70df7c152229638b1c85631c28e9a8f6bd282"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_ClassDoc_ClassDoc._is_show_member.return.True": {"doc_hash": "f5fcd226ff14e72fd43f956e0e378961307a8f98b581c4865de7efbc50e7ac50"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_operator_rgb_to_lch.return.luv_to_lch_xyz_to_luv_rgb": {"doc_hash": "c1c7369b15aeb3515e73649260155d8908907e8a07d5541f4e90bfbd0a135a30"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_max_chroma_max_chroma.return.result": {"doc_hash": "6e4117de9d3428d7ba282f8d72358b90fa9f99431e637746eb3d30ac90d60dfe"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py__hrad_extremum__hrad_extremum.return.result": {"doc_hash": "4bda1f19e213c0678ac313b8c1c4557db0fcac6b8e5bfde0d27ea8a134f6a242"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_max_chroma_pastel_to_linear.if_c_0_04045_.else_.return._c_12_92_": {"doc_hash": "11436e619193f83ba351a636d4856db4e523c42ba678a344870f3a8ce0682158"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_rgb_prepare_rgb_prepare.return.ret": {"doc_hash": "368677f447328b0ae362266eddf71b07eb324dfa7cf1ee98ced740820befb578"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_hex_to_rgb_rgb_to_xyz.return.list_map_lambda_row_dot_": {"doc_hash": "7d2ea49f428467b1091cc67ba6f686cd78df7fb8669adf0cb86f8c81307eaa12"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_xyz_to_luv_xyz_to_luv.return._L_U_V_": {"doc_hash": "10b5084ce15e4e3b547a21790a8c5c5bf7be9f4e1a96328f933ff0f3591ed416"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_luv_to_xyz_luv_to_xyz.return._X_Y_Z_": {"doc_hash": "79aefce82bef26d0c9b1d8d94161f01f8a6bcf3c85de1e6a0f25c8f07a1c37d5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_luv_to_lch_": {"doc_hash": "cf77d37948097d1f05c7d05ba7c913231da8589eee48fe8cb6c85fdd1b058d98"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/kde.py_np_gaussian_kde._Representation_of_a_ke": {"doc_hash": "89b54927e8cd99334a60e7aa3c68eedac5874d912103ef47c77223c874987d59"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/kde.py_gaussian_kde.__init___gaussian_kde.__init__.self_set_bandwidth_bw_met": {"doc_hash": "2621d8e9a6c431b7da0b31151f60f43ee4e5b6d6cea78f82c2362b100cffd1fe"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/kde.py_gaussian_kde.evaluate_gaussian_kde.evaluate.return.result": {"doc_hash": "41c52968def2383d9fea799933d19a2114f6a415dc1fd69d497bd18ebd568541"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/kde.py_gaussian_kde.__call___gaussian_kde.covariance_factor.__doc__._Computes_the_coefficie": {"doc_hash": "f3ce07cd1588e9fd147a8c1ed8c3f7b2577c1ce2796118b17755aff7e3414571"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/kde.py_gaussian_kde.set_bandwidth_gaussian_kde.set_bandwidth.self__compute_covariance_": {"doc_hash": "548727404d53c7493f2ea89ce9f5cff44abc5b7a5c95272546713bfe3e822a9d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/kde.py_gaussian_kde._compute_covariance_gaussian_kde._compute_covariance.self._norm_factor.sqrt_linalg_det_2_pi_self": {"doc_hash": "6f6af0231e023ccfa9b82b0ff082420d916b1d1427aff3a4d964d87733a6be00"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/kde.py_gaussian_kde.pdf_": {"doc_hash": "fd4b102048433641efd80dd93db925639f372c6f5ba46ebad2ed58509a8b469d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py_collections_InfinityType.__neg__.return.NegativeInfinity": {"doc_hash": "60228f1ac63d4940b4ceb66fb4834be9891365dcb82f2c07cba0275e5973aff6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py_Infinity_NegativeInfinityType.__neg__.return.Infinity": {"doc_hash": "7f030e131408a6d5dfa96753d78037ef62d459a793a83d2524bfb7901a68d4e7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py_NegativeInfinity_InvalidVersion._": {"doc_hash": "63f88fc3d11e08b28365fa8ad6cbeb36a982753b2a4976d9a8d4b33196eae5a3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py__BaseVersion__BaseVersion.__ne__.return.self__key_other__key": {"doc_hash": "5f0b603a1a56726a738b7530ec05a329683043d26243f0052bf9e322de64ee96"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py__Deliberately_not_anchor_VERSION_PATTERN.r_": {"doc_hash": "44df0c4f462c6ea2ec451e2dc910ae60a10378441ffe32620efd434a48a99156"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py_Version_Version.__repr__.return.f_Version_self_": {"doc_hash": "02d067bb916515deed301d5df1181a64d3dca3c6c3076865a1b7e1be71f0e706"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py_Version.__str___Version.__str__.return._join_parts_": {"doc_hash": "e2f92667e9c22b8422c68cde73aa02830f0698251e7eaaf08d54399ccf9245a1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py_Version.epoch_Version.micro.return.self_release_2_if_len_se": {"doc_hash": "b4d468b58df32b301aad8102248eda3dff1ccfc30be76c130d218e24bb70b114"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py__parse_letter_version__parse_local_version.return.None": {"doc_hash": "68e98d7a3b797fa9d76da2d5f0d00858d964322715e0e85d178bed0b2ba02104"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py__cmpkey_": {"doc_hash": "969578cf6605d5f43e32e8445daa0e932f9f59079fd3d5857759764a919f7bff"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__Functions_to_visualize__convert_colors.try_.except_ValueError_.return._list_map_to_rgb_l_for": {"doc_hash": "21c3b50dbc2addee616350ff3a7e9c236c0bfd10b8b05d7020fabe4c69371f9d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__matrix_mask__matrix_mask.return.mask": {"doc_hash": "745e0943616433e8c0d12d4b1bf4491815373dc021c53bb3690ebe08a89d7fed"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__HeatMapper__HeatMapper.__init__.self.cbar_kws._if_cbar_kws_is_None_el": {"doc_hash": "10c006fc814f79a021480f9b21e32f4b6f02e20dd1a7ad1cc725480d2b936f8b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__HeatMapper._determine_cmap_params__HeatMapper._determine_cmap_params.if_center_is_not_None_.if_over_set_.self_cmap_set_over_over_": {"doc_hash": "c0d8bfb44a33dbb0c09e1dc887a753b762d4406363f3d52ef8f68089793ffa7b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__HeatMapper._annotate_heatmap__HeatMapper._annotate_heatmap.for_x_y_m_color_val_i.if_m_is_not_np_ma_masked_.ax_text_x_y_annotation_": {"doc_hash": "1123ea47143e9ca6fdda7157a570a3415a957adf7e7c0498a7b887b66307c202"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__HeatMapper._skip_ticks__HeatMapper._skip_ticks.return.ticks_labels": {"doc_hash": "4a9b2ec6e0bdcac1e38251b979e437debc0b5e3e743f5ec8eee2040064f41202"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__HeatMapper._auto_ticks__HeatMapper._auto_ticks.return.ticks_labels": {"doc_hash": "1ee5f67db1e0e193b588f8039882cd9102ceec6efed4f2096f832dc3ca76673f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__HeatMapper.plot_heatmap": {"doc_hash": "9c339230258e7e82fb0c83f30cd85ed78daa3f86d58f39657479bf1ed540d2ff"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_heatmap._Plot_rectangular_data__heatmap._Plot_rectangular_data_": {"doc_hash": "ebca9bcc2db5101a40a2969399c5b74921dd73a75d08ea1ec1ca7a3d291c0815"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_heatmap._Initialize_the_plotter__heatmap.return.ax": {"doc_hash": "912d8fb4614e148b55f30003eb378051c9dcdf483f7aa6b9023c91bef175be48"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__DendrogramPlotter__DendrogramPlotter._calculate_linkage_scipy.return.linkage": {"doc_hash": "cfc65748d0bf20199aedfb1941dc971d3c9412ea9b614ec2a9532b647704bc33"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__DendrogramPlotter._calculate_linkage_fastcluster__DendrogramPlotter._calculate_linkage_fastcluster.if_euclidean_or_self_meth.else_.return.linkage": {"doc_hash": "60da44f792beee373fce5051e97fcf99a6d92f0aeb7694988c11bb16291d3e11"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__DendrogramPlotter.calculated_linkage__DendrogramPlotter.reordered_ind.return.self_dendrogram_leaves_": {"doc_hash": "c9aeccff8177d30cd970af68e95df99ddbd42cc90ad9483df5461d3503d3ecd9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__DendrogramPlotter.plot__DendrogramPlotter.plot.return.self": {"doc_hash": "15d71682b2549adbf6df1c88e26b6f88f49bd69efeae0ce1358089b6f519892f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_dendrogram_dendrogram.return.plotter_plot_ax_ax_tree_": {"doc_hash": "c92918304593734cb9a5521d3e637ce935d1dc6ed5b1a1dccc73b88687cb4c6d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid_ClusterGrid.__init__.self.dendrogram_col.None": {"doc_hash": "84944d55608cb8353c2aa68cae66212fb97febc2a62398a5506083c0a19a0351"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid._preprocess_colors_ClusterGrid._preprocess_colors.return.colors_labels": {"doc_hash": "af68c273f7b4797ca3343f191fd3c558e8a24ff62aed79a27d18c8f844b85bf1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.format_data_ClusterGrid.format_data.return.data2d": {"doc_hash": "c4001852b6e7808079d659c1c8523d36c13d2a359fa3e45b80d72c6df22ee9ea"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.z_score_ClusterGrid.z_score.None_1.else_.return.z_scored_T": {"doc_hash": "8904f492c57a6356410b2066ea36d1a3c36af3bb0c16d7ea0df9f6d9daf03ba3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.standard_scale_ClusterGrid.standard_scale.None_1.else_.return.standardized_T": {"doc_hash": "ad7f1630dff84903f8a0f9e20ab1d1439cb2984947fd17d85cddd84d7e78ea4c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.dim_ratios_ClusterGrid.dim_ratios.return.ratios": {"doc_hash": "0c2f58a5bbf4f9a4005e7c7017af618a0a5bc9f6dabd9347ab6613c250d08564"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.color_list_to_matrix_and_cmap_ClusterGrid.color_list_to_matrix_and_cmap.return.matrix_cmap": {"doc_hash": "860246348bac7f30201a0754945698215282d990e9532357337a84052f224fee"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.plot_dendrograms_ClusterGrid.plot_dendrograms.despine_ax_self_ax_col_de": {"doc_hash": "12a378cff095d6dbda8aa81cc7fcd89ccfecfd45e82aaff595cf598e4896c72d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.plot_colors_ClusterGrid.plot_colors.if_self_col_colors_is_not.else_.despine_self_ax_col_color": {"doc_hash": "f7d4cf9b285d81a9cffb409db98812c33d06e40ddcd9a629b92f69e9639e3e56"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.plot_matrix_ClusterGrid.plot_matrix.if_self_ax_cbar_is_None_.else_.self_ax_cbar_set_position": {"doc_hash": "d4ec237aaec5f94b0e890998f6b37c499c009cac8dc4b376f714d2f69c586267"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.plot_ClusterGrid.plot.return.self": {"doc_hash": "b639b408c33079c7fa28eddeddc17e342335555ac039d343c66a53d5f053d0e8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_clustermap_clustermap._": {"doc_hash": "4e9a4b058706d624c3bad416a25bef9d130f931449530ffba8f6f9ada5c522a9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_clustermap.if__no_scipy__": {"doc_hash": "f01af1c1944b2a6bc5be26bd81a453ef98e09ae6378fa6e6e6cce5c1eeac874c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/miscplot.py_np_palplot.ax_yaxis_set_major_locato": {"doc_hash": "093e640641bec63e3a88c76b822f90ecf380a9e16efe5da32e33df0900cb62a4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/miscplot.py_dogplot_": {"doc_hash": "f5bc398413adb25b4954ac14177a9598d18203da403403e680a99de36a5b622e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/objects.py___": {"doc_hash": "d7c960ebed23e1e1a58abea7fb89d24ce43ec49f510f2a657f18dd5f099e2a68"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_colorsys_SEABORN_PALETTES.dict_": {"doc_hash": "0899fc484cd91ddf7be289ceee86bb834e1ecc4f16713e703af4a17ca20458c8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_MPL_QUAL_PALS_QUAL_PALETTES.list_QUAL_PALETTE_SIZES_k": {"doc_hash": "94e47166fbcebef86d7f7f493f95fe4302981ef2b88fdc42468bf9a471b0ba85"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py__ColorPalette__ColorPalette.as_hex.return._ColorPalette_hex_": {"doc_hash": "3720efc641d442e4efd84caa3f14a48afea9b41f4f162dadbae4970ae9d655b4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py__ColorPalette._repr_html___ColorPalette._repr_html_.return.html": {"doc_hash": "ef944550a086cab6df18bf55b14a53c44f7f2a7713c6b2cedf75d1f0c2e20d3d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_color_palette_color_palette._Return_a_list_of_color": {"doc_hash": "58acf45132ba2a65d8acc3d562b92860ed69894cb1fbd51d3414675ab9229bed"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_color_palette.if_palette_is_None__color_palette.return.palette": {"doc_hash": "068e937b80d8ac9995793d14a81e97c6f1673e28c9f7b3f31411bc83ba43ffcb"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_hls_palette_hls_palette.None_1.else_.return._ColorPalette_palette_": {"doc_hash": "3764090c3e6d6d58baa667e8afc6524d20b02c4d847a5aa2103d7b77100207bd"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_husl_palette_husl_palette.None_1.else_.return._ColorPalette_palette_": {"doc_hash": "6a54bcc615c894160a3d8dfa38467ccfb3f155ead0f124265280647a6ccf01de"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_mpl_palette__color_to_rgb.return.mpl_colors_to_rgb_color_": {"doc_hash": "cf696ddd9e2d0aaef6c44d6b8027a2e7cd8a51bb5b746da5b413b41968aaea31"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_dark_palette_dark_palette.return.blend_palette_colors_n_c": {"doc_hash": "70ebb20e6e5666e7a6314526b01876780f82f105d2252b496f1d88ab054abe77"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_light_palette_light_palette.return.blend_palette_colors_n_c": {"doc_hash": "acff3f0a2d97966f1a82d92682d8719f0f3731e80477d6e7515805b8d31cdf04"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_diverging_palette_diverging_palette.return.pal": {"doc_hash": "ffdcff1ffa902600ee9c8742ec7543e95524f2dc33324dab3ed640d176e925c6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_blend_palette_blend_palette.return.pal": {"doc_hash": "1c90bfdb88fa854beae98ed3d68deb4d44cd778bb1c2c49d787ebdc6acd40b59"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_xkcd_palette_xkcd_palette.return.color_palette_palette_le": {"doc_hash": "eba62fbdddd3146e9eb7ed202b31282617ebd0fbf46b45ebdb29cfd7973c57af"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_crayon_palette_crayon_palette.return.color_palette_palette_le": {"doc_hash": "b0d1ef1e7db0c9b73b64abcf35c520a7c397e56f6b1e9ea1b5a237272de6b360"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_cubehelix_palette_cubehelix_palette._Make_a_sequential_pale": {"doc_hash": "3feaf89664288cf8c67c28c805a365885f443796346d03b456b5d031ef4d490b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_cubehelix_palette.get_color_function_cubehelix_palette.get_color_function.return.color": {"doc_hash": "b9ae18f31489fe76290ba206c992c7394083b7d554d8dd3b3977eee343e33fb3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_cubehelix_palette.cdict_cubehelix_palette.if_as_cmap_.else_.return._ColorPalette_pal_": {"doc_hash": "35b4a3a39ce7ad65d90693b043bba054034cb66efe1e79f606fcb7d4aca1ebd4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py__parse_cubehelix_args__parse_cubehelix_args.return.args_kwargs": {"doc_hash": "712f9a2abbcc2f89c287df7330a645923440afafe99404cc7eb524779ce46063"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_set_color_codes_": {"doc_hash": "ec0b8947d0fb7d5e86d4543bb6abbb058cc43f2faafa545862045879a8441065"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py__Control_plot_style_and__context_keys._": {"doc_hash": "49be2e507b170d46073b2951314a33830f3c6f5db1ff78dc2cfb6f80323be132"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py_set_theme_set_theme.if_rc_is_not_None_.mpl_rcParams_update_rc_": {"doc_hash": "8751d437c4a56329a5480c6a0a9f9b95834ca9df64ff854296aa21974d465e90"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py_axes_style.if_style_is_None__axes_style.return.style_object": {"doc_hash": "32bb9892c589ea2418279ee8c22d193a85fdf88efb6acb3f67332e3d3b33caec"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py_set_style_set_style.mpl_rcParams_update_style": {"doc_hash": "f6c5a5b556c25954b9f86aa049d0722dec95bb5d02322f885385e3a262122f10"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py_plotting_context_plotting_context.return.context_object": {"doc_hash": "099d9abf7e2f238d1626f61533d24fd5f0b33cb40337e278705575599da57dcc"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py_set_context_set_context.mpl_rcParams_update_conte": {"doc_hash": "b84972d986af1e1766d4341548cd0d146af831c4fe3882bc85205c8f814ed03a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py__RCAesthetics__PlottingContext._set.staticmethod_set_context_": {"doc_hash": "b5798119cd9801dbd90f79922a962e727911abe71bcdb03a7f43e90a8f8287bf"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py_set_palette_": {"doc_hash": "43fe872629624b182faa55a2230fb11f9a2eb9db7a514c226544f4b805bd7352"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__Plotting_functions_for___all__._lmplot_regplot_re": {"doc_hash": "ef6f2f314cc8e762ba2cd498a2c6b12e2db8b1b0b3f87a7d6759ff4e0fd76fc2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__LinearPlotter__LinearPlotter.establish_variables.for_var_val_in_kws_items.setattr_self_var_vector": {"doc_hash": "7eb8af73ab7a8ebcae8e7e866e6eb6d36c25375329d269c0913e93fb5cd7b319"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__LinearPlotter.dropna__LinearPlotter.plot.raise_NotImplementedError": {"doc_hash": "73078beb8c0e7ec2c7309cb6012bba1b978b0f87be20def078741ef235e057a0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter__RegressionPlotter.scatter_data.return.x_y": {"doc_hash": "6f51508589f2bda85e1d87ef8ca58f735551a3a062a3d03ebc96525e32efe7a7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.estimate_data__RegressionPlotter.estimate_data.return.vals_points_cis": {"doc_hash": "412ac858ec03602c8c0ce47d600d8c0b146db9706577e129dfb1d811774d15b7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.fit_regression__RegressionPlotter.fit_regression.return.grid_yhat_err_bands": {"doc_hash": "27bc3aea635e6e25625261fe5195fb8c3d0cb44d66f2dd09f50ddeff6b6fdc6e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.fit_fast__RegressionPlotter.fit_fast.return.yhat_yhat_boots": {"doc_hash": "35d46703c886b2aee2695c67aabd720cface975d7ea2e33fd8fe93dfec06f7bb"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.fit_poly__RegressionPlotter.fit_poly.return.yhat_yhat_boots": {"doc_hash": "536e973b5088e1ccce62edf9a2b9b8a8c50c9821c099d21702d59351867b7c67"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.fit_statsmodels__RegressionPlotter.fit_statsmodels.return.yhat_yhat_boots": {"doc_hash": "ccba36f6ab72335bbd3b8e1b51e8fb10a8f2f5996b853a6681df9fbfa0a423c6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.fit_lowess__RegressionPlotter.fit_logx.return.yhat_yhat_boots": {"doc_hash": "82f2b92e352c50d87461d75500aba0884b85f29ff6ba17bc3db790f1f3a6d2b8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.bin_predictor__RegressionPlotter.regress_out.return.np_asarray_a_prime_a_me": {"doc_hash": "5bda82f0d2e839fa6f3c85def7dbdaa4fe7d0865589831d65f431541cd7c27b5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.plot__RegressionPlotter.plot.if_hasattr_self_y_name_.ax_set_ylabel_self_y_name": {"doc_hash": "49134c32e37f006cca262d6b1279d24b80139d15124e417125c2b4eeed5cd4f5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.scatterplot__RegressionPlotter.scatterplot.if_self_x_estimator_is_No.else_.ax_scatter_xs_ys_kws_": {"doc_hash": "dca5686edcc1a5331acae27c0d4f89aff5da335b50406909a5d618d5a85b9ab1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.lineplot__RegressionPlotter.lineplot.if_err_bands_is_not_None_.ax_fill_between_grid_er": {"doc_hash": "e32227a4ce08dfac6752b067ca13e222d26a1d297ad7903bf08ba9259a5e2e8e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__regression_docs__regression_docs.dict_": {"doc_hash": "04398a6d5cdad1af6107933ba47cadf577c0fd348b2d49aa4ab18b06b6c7b459"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py_lmplot.__doc___lmplot.__doc__.dedent_": {"doc_hash": "058fa8e6d450b011f86651971977d94fa488be51c8191b77c90fd7c9b8b8b1ef"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py_regplot_regplot.return.ax": {"doc_hash": "89d2691c3a3e5ffe29e17b07fc2d223722c505b2870f1f85248d461f87058d2e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py_regplot.__doc___regplot.__doc__.dedent_": {"doc_hash": "8f28b5319221c178f272cc571157876ed2a0b79837bcd2add22f2b6abed51596"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py_residplot_": {"doc_hash": "8f1597cfc7737ce908d53261e6fe912dacb251e3171e11f87df883e0de35c006"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_warnings__relational_narrative.DocstringComponents_dict_": {"doc_hash": "aa5fe3e0dfa7495ba2e32462bb612eaf6b94a18c1198f7a70f4d62bde7996ae7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__relational_docs__relational_docs.dict_": {"doc_hash": "d598759d98e33fc0dc12ba7bba886923586558536b00d767d28b0429fd4340e9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__param_docs__RelationalPlotter.add_legend_data.brief_size.self__size_map_map_type_": {"doc_hash": "71d9d8a55997068623dabf859f9fe8192c9edb534d58e5a8b689201a8fddd176"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__RelationalPlotter.add_legend_data.if_brief_size___RelationalPlotter.add_legend_data.self.legend_order.legend_order": {"doc_hash": "e196a01ebd72fdb63a21584245017caf3253c85822e7bba5661945e8b23a3668"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__LinePlotter__LinePlotter.__init__.self.legend.legend": {"doc_hash": "d1e54568bcc7e6d36e583147a093d8d454857ce9d899edb9d99cb84228ec9b59"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__LinePlotter.plot__LinePlotter.plot.grouping_vars._hue_size_style_": {"doc_hash": "efe8960edab8fe0a49c254fb6bc095b9b69f6ded46c48f8c593c15f9eae65cd4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__LinePlotter.plot.for_sub_vars_sub_data_in__LinePlotter.plot.if_self_legend_.if_handles_.adjust_legend_subtitles_l": {"doc_hash": "066236d5677ae83d10515596916c89f125ec411153a78e4e39209847a6bb1339"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__ScatterPlotter__ScatterPlotter.__init__.self.legend.legend": {"doc_hash": "ed0668368d9c7cce3c6a8e3c1b89feae50b0afa96a2639d27565d97896028986"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__ScatterPlotter.plot__ScatterPlotter.plot.if_self_legend_.if_handles_.adjust_legend_subtitles_l": {"doc_hash": "f09626399d6c53c516858d3ddc3b97fcd2ffa01e6872a4333e7ad9811ba0567f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_lineplot_lineplot.return.ax": {"doc_hash": "508b8a6fa1182047f31e1ca0258bf710026c0697dcb9fb9b32a260f19a525aac"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_lineplot.__doc___lineplot.__doc__._": {"doc_hash": "0a2c6d6f5f29be8582ae98d3f585c9d5ae3b04424aedf96680ee93b1ca4696f8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_scatterplot_scatterplot.return.ax": {"doc_hash": "326ad07a7eccba83cc81ee0d84cf8f3b9b21e10a61b147cc225262d4c2fc44cb"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_scatterplot.__doc___scatterplot.__doc__._": {"doc_hash": "3829525aadc08a42b46108de97361d8c9a75dd159ec83688754027f4dc18188a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_relplot_relplot.plot_kws_update_plot_vari": {"doc_hash": "4b732f42edbf526479e8299ae5d9624be722d890b23a3593e8a5a144c49c8c1f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_relplot._Pass_the_row_col_variab_relplot.return.g": {"doc_hash": "be56177bf89b6ceb9a6350dc2207dcc6155c4a6265c1e4025c994c8c4365924c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_relplot.__doc___": {"doc_hash": "fcb760e91c4644726f735c9f8fb41a06d709a0bfaa64f29c970ad7986bb933dd"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__Utility_functions_mos___all__._desaturate_saturate_": {"doc_hash": "e339bc11fb15b135ad96affe29b054beafd35a394e3f023f119e692d68d08792"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_ci_to_errsize_ci_to_errsize.return.errsize": {"doc_hash": "cca5839ffebf242afbc43b4868e5d3311b4f7da268de19bfae620ff4fc4549bd"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__normal_quantile_func__draw_figure.if_fig_stale_.try_.except_AttributeError_.pass": {"doc_hash": "48c2e13b29e1c45548fac8e00c921f6753e9b22cd7c2e3b6276a9aeba8cec984"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__default_color__default_color.return.color": {"doc_hash": "93e11b830649f9a5033efc781e5fa04cb4e8476726b918c76b4aba213d01e0c7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_desaturate_desaturate.return.new_color": {"doc_hash": "89d0fb11af876a4da96488ab06d8ec0d24007104477ce708ae8ab49e34cb2b76"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_saturate_set_hls_values.return.rgb": {"doc_hash": "3821ce9a75cd4c4f537395dfef60916e35b66769ff8ac15adcfc1f7990d4fecf"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_axlabel_get_color_cycle.return.cycler_by_key_color_": {"doc_hash": "a33d2797b7a3caa25afeb56a8e6f3c99dee4342aa91bd2b203450079933e396a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_despine_despine.if_fig_is_None_and_ax_is_.elif_ax_is_not_None_.axes._ax_": {"doc_hash": "8cc04f722779190dd8f59855fa674bee268d0e122be1259c9ebeaf4cfaba59ae"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_despine.for_ax_i_in_axes__despine.for_ax_i_in_axes_.if_trim_.if_yticks_size_.ax_i_set_yticks_newticks_": {"doc_hash": "84faf0fd993e4f5f16a48c40de87867abeb78f2ac4caeca1c93740f4646c4841"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_move_legend_move_legend.None_4.obj._legend.new_legend": {"doc_hash": "86b2fc0c35b654cd432d9f2493f82f0f4e693ad09df3d740fb094698e688c2d3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__kde_support_get_dataset_names.return.datasets": {"doc_hash": "b229f8dc662c819a67ccea386b9527773e1325e86ff8e1944e84673f5f7b7d6b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_get_data_home_get_data_home.return.data_home": {"doc_hash": "0869e2ac73c1e2dd3d36452647a013be0b03e3551cd6e13168cce43f41f510e8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_axis_ticklabels_overlap_axes_ticklabels_overlap.return._axis_ticklabels_overlap_": {"doc_hash": "6922ad436859d3e044a52745bbb17af4510b99b91873cc59da6d716c9ac98c80"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_locator_to_legend_entries_locator_to_legend_entries.return.raw_levels_formatted_lev": {"doc_hash": "f51c71d632dc4fb13e9b1ac2d8351aba87b3dcc86d4be1a45068f47fbfea754a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_relative_luminance_relative_luminance.try_.except_ValueError_.return.lum": {"doc_hash": "1c9c6da5d8f78013a3fbf7abb91a47efafa893eb7c7b6a7baac65dbb3b4ed688"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_to_utf8_to_utf8.try_.except_AttributeError_.return.str_obj_": {"doc_hash": "90b320e03d170837f052b65fc005fcf1c21554c7a29ac29e4d04ca74051d48a7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__normalize_kwargs__check_argument.if_value_not_in_options_.raise_ValueError_": {"doc_hash": "52bb29ce6b952605cfeab6626bbf732b3fa5510438c4dae05eba5bb87ef93ea3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__assign_default_kwargs__assign_default_kwargs.return.kws": {"doc_hash": "74fa3b08ffb4a28692789b41a429bd7df2cb6950d103225f892d13620eadac13"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_adjust_legend_subtitles_adjust_legend_subtitles.for_hpack_in_hpackers_.if_not_all_artist_get_vis.for_text_in_text_area_get.if_font_size_is_not_None_.text_set_size_font_size_": {"doc_hash": "b15ed8a1b45143c28e786ed538e1594aaec6d5ea72ac05327316a07b0591ceec"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_np__show_cmap.ax_pcolormesh_x_cmap_cma": {"doc_hash": "339aac10368e1bee818b3fa829c37896270d416ef36ff17ac73505d8436c251d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_colorbrewer_palette_choose_colorbrewer_palette.if_as_cmap_.cmap._init_mutable_colormap_": {"doc_hash": "cbd4202ea54bbf1271a0b8cf60c44c48178ee6825d3b43c41ce934d4684ba66e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_colorbrewer_palette.None_2_choose_colorbrewer_palette.return.pal": {"doc_hash": "82bd81468ec4c098ba8dc5d25ef489f4341b4215460802aa83ffd2281764b0a3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_dark_palette_choose_dark_palette.return.pal": {"doc_hash": "7f02f7044caa5263f04219bc3a40f799092082ea95f5e1aac21deeb072086a75"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_light_palette_choose_light_palette.return.pal": {"doc_hash": "6b21971cbc01f2e27b3168109cc37386ddb19cf02914b9d0343f8bc279ebd976"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_diverging_palette_choose_diverging_palette.if_as_cmap_.cmap._init_mutable_colormap_": {"doc_hash": "f07c354b606fb46f320eb563c2325d631f004a5236a4ddd3687d854f6dff89db"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_diverging_palette.choose_diverging_palette_choose_diverging_palette.return.pal": {"doc_hash": "6ea1ebd56071c06bcdd149dacc248ae05125db15d2bb7a54ebedf9adc07c3c63"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_cubehelix_palette_choose_cubehelix_palette.if_as_cmap_.cmap._init_mutable_colormap_": {"doc_hash": "cba0c50e87ba33c93e99bc21fb50754bba994e7e537ed1fb87b8fb5ae69319b5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_cubehelix_palette.choose_cubehelix_": {"doc_hash": "9cc14e10c7685222635027bad23e78a962f0c9384a59c89c4c35281982c8a882"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_functools_TestPlotData.test_named_and_given_vectors.assert_p_ids_size_i": {"doc_hash": "4037bbf387ec316e51ecf14fa792321584a6b4ec0d26040a304845432112fab9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_index_as_variable_TestPlotData.test_multiindex_as_variables.None_2": {"doc_hash": "810c4eceff8acf1ebd2042cc154d9112c530ebe402a898f15cdfa516dfd51273"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_int_as_variable_key_TestPlotData.test_dict_as_data.for_key_val_in_long_vari.assert_vector_equal_p_fra": {"doc_hash": "4dfecc5e958a41894515d3386f2197f7dcd8a651a269d218673de0a42f65e4c6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_vectors_various_types_TestPlotData.test_vectors_various_types.for_key_val_in_long_vari.if_vector_type_series.else_.assert_array_equal_p_fram": {"doc_hash": "ce06eafddbc311f1ce6e3b204df26c3ce047fb04a8a4c90bc29cf7ef1376d849"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_none_as_variable_value_TestPlotData.test_empty_data_input.if_not_isinstance_arg_pd.assert_not_p_names": {"doc_hash": "923f1efcf09c8ef8b0915ecbc5efea8a6e089378f6f5e6da8053644677b269a2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_index_alignment_series_to_dataframe_TestPlotData.test_index_alignment_series_to_dataframe.None_1": {"doc_hash": "e832b4198ca254bfd4b6e271b44fab9e6ca27d275f81cd5b58bab3f5c041aa49"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_index_alignment_between_series_TestPlotData.test_index_alignment_between_series.None_1": {"doc_hash": "f467830309c54e406a7f62b66f16a02fb8c3b3522b3a1d282f1a141293ef160e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_key_not_in_data_raises_TestPlotData.test_join_remove_variable.None_3": {"doc_hash": "423a97d48bc6d9e04d4961bb826c28100b2a0afd33e81d7ae385d0bda7e4ada5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_join_all_operations_TestPlotData.test_join_all_operations.for_var_key_in_v2_items_.if_key_is_None_.else_.assert_vector_equal_p2_fr": {"doc_hash": "e5e1e03c7d2a7feb16cd7e5e08c33a49739d745019b0dad74804a6e5572183de"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_join_all_operations_same_data_TestPlotData.test_join_all_operations_same_data.for_var_key_in_v2_items_.if_key_is_None_.else_.assert_vector_equal_p2_fr": {"doc_hash": "5a2d3dff0ade1a19651dea6795b62de68a22489e275ddcf150aaaa5046e20884"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_join_add_variable_new_data_TestPlotData.test_join_add_variable_new_data.for_var_key_in_dict_v1.assert_vector_equal_p2_fr": {"doc_hash": "1a7ec2f9febd68e786f8482b99fe842e243df29c7adf6120ca5430dd3963ea03"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_join_replace_variable_new_data_TestPlotData.test_join_replace_variable_new_data.for_var_key_in_variables.assert_vector_equal_p2_fr": {"doc_hash": "2229764840ee0d83f979b1326d641d021a420e08e0a89c8a12a71d94dee976e1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_join_add_variable_different_index_TestPlotData.test_join_add_variable_different_index.assert_p2_frame_loc_d1_in": {"doc_hash": "7e2306c7e6cb8bd00f6704fe3f674818609ead63437b709c18fc4fdd105c5a1b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_join_replace_variable_different_index_TestPlotData.test_join_replace_variable_different_index.assert_p2_frame_loc_d1_in": {"doc_hash": "67cea8035a06f674f94eb20d7b7bef1e5924e686dfc132a223ea085ecd6ef34d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_join_subset_data_inherit_variables_": {"doc_hash": "c4a8b8139d8bebc1b81180d8f8be80f769fe799992a7c169e2b04cbbbd1aa7fe"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_groupby.py_np_test_agg_one_grouper.assert_array_equal_res_y": {"doc_hash": "78d25f9dc2af39de1a4a8d7a1034238e12d103501390b15c8726b29495e3c0cd"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_groupby.py_test_agg_two_groupers_test_agg_two_groupers.assert_array_equal_res_y": {"doc_hash": "4da1c6eedd7b081edeaeabfe151b4c6d1fbc74bc5df7f223f125b6df7c89ba2e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_groupby.py_test_agg_two_groupers_ordered_test_agg_two_groupers_ordered.assert_array_equal_res_y": {"doc_hash": "71f8fdfbcf0169b4af6c7673db4b611e5af854d5202cfa8266ac6d8866b409b9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_groupby.py_test_apply_no_grouper_test_apply_one_grouper.assert_array_equal_res_x": {"doc_hash": "a0addf8a7faca869d175b0552ada9f302ef310e6c0eac83580c49ad5955a41e7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_groupby.py_test_apply_mutate_columns_test_apply_mutate_columns.assert_array_equal_res_y": {"doc_hash": "f5b998ac0efa0f962f18f5ab1c5f988783c91de0d58e86274c368abcf8daf77e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_groupby.py_test_apply_replace_columns_": {"doc_hash": "6daa886e66cd310a3d356db2be72e40a3b3f344297f0c8eeb38e31e260d7f27a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_from_itertools_import_pro_MoveFixtures.df.return.pd_DataFrame_data_": {"doc_hash": "c44dda7f2a91a0bc1ecf8703e0fdda9ed0fab24d64868638a3629289807cb528"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_MoveFixtures.toy_df_MoveFixtures.toy_df_widths.return.toy_df": {"doc_hash": "b0d9e1b8d30295b51f0895ddb278e86249a3a2847c44c2ee9cfd9754692e9cda"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_MoveFixtures.toy_df_facets_MoveFixtures.toy_df_facets.return.pd_DataFrame_data_": {"doc_hash": "066c1fe54e7e65f5fe01f0039285b4abba808b29afb5b4b6555d87ef72967b6b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestJitter_TestJitter.test_seed.for_var_in_xy_.assert_series_equal_res1_": {"doc_hash": "69deb1ff3a88036eb336d803595a54d13967b3b54688ea7925267e281318ec28"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestDodge_TestDodge.test_widths_drop.None_2": {"doc_hash": "ce316fddeacd617d0f7f883fa9bf264980d9f881344c0599b5194653d6581745"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestDodge.test_faceted_default_TestDodge.test_faceted_default.None_2": {"doc_hash": "8e78788957791e834b3fe22a4f80184d62b7fedf2689f22c6a9dfdc77cabda59"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestDodge.test_faceted_fill_TestDodge.test_faceted_fill.None_2": {"doc_hash": "c868db522a7e9113a875c947d0194eda819439d71d727df2295b840ba640ecf3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestDodge.test_faceted_drop_TestDodge.test_faceted_drop.None_2": {"doc_hash": "5488f6d9a368ed7a8b9d8f08c84400148c262a1b1b1b6a3fb47b0d6f0babe401"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestDodge.test_orient_TestDodge._Now_tests_with_slightly": {"doc_hash": "92e3c325d5704ddaf7d1c2c3b7203dd3b1f71403f97baded60cf743018a2ebdf"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestDodge.test_single_semantic_TestDodge.test_single_semantic.for_val_shift_in_zip_lev.assert_series_equal_res_l": {"doc_hash": "cf4e14c527dc7161e937faaca1bf028999b22973aec7bfd10b4f7e1b41c53e2c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestDodge.test_two_semantics_TestDodge.test_two_semantics.for_v2_v3_shift_in_zi.assert_series_equal_res_l": {"doc_hash": "a30371fd2326317fa8fbd3f6a8bf385754a509d9a5d7f6ba87051d682c4eda0b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestStack_TestStack.test_faceted.assert_array_equal_res_b": {"doc_hash": "e451a3d94f46a263b996105b0b130d7ab2301291b58a705dc2a405a3a7afd407"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestStack.test_misssing_data_TestStack.test_baseline_homogeneity_check.with_pytest_raises_Runtim.move_toy_df_groupby_x_": {"doc_hash": "1c99d506dd1804035004b6f4a781a354de52ed7addfc2593ac0b6a0ef1667a3c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestShift_TestShift.test_moves.assert_array_equal_res_y": {"doc_hash": "a8076470df041c09b992ba8520db4fd928f42e08b4125cf25a0ce416141ff853"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestNorm_": {"doc_hash": "4eb356f95e2b63a66d7588ff606b741eb3b87c74698cb4b611976aa7851f39e7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_MockMark_MockMark._legend_artist.return.a": {"doc_hash": "6c07bac4e89337e357e6dc3966aaae8ef75e0e0c84fe20e2fef299918ac24365"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestInit_TestInit.test_positional_x.assert_list_p__data_sourc": {"doc_hash": "d070331c9f699770975ee0e221692d7c85ce464bc1972d8ac7a788762d474100"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestInit.test_positional_too_many_TestInit.test_unknown_keywords.with_pytest_raises_TypeEr.Plot_long_df_bad_x_": {"doc_hash": "76ab5286424c3ff92e82dd9aaa4faffc48fcb86e1517a20c54b188e21543caaf"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLayerAddition_TestLayerAddition.test_with_late_data_definition.for_var_in_xy_.assert_vector_equal_layer": {"doc_hash": "a55c3a0fb6b34538a80760a3b1b1e9578f60f60d26094eba911dcf7f63498926"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLayerAddition.test_with_new_data_definition_TestLayerAddition.test_with_new_data_definition.for_var_in_xy_.assert_vector_equal_": {"doc_hash": "4e63b5b99947deb53d144c85b9c473b3b137c38c17d8b601f7f0b22122d30174"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLayerAddition.test_drop_variable_TestLayerAddition.test_stat_nondefault.assert_layer_stat___cl": {"doc_hash": "9bdb4eb4ccb7712f7a65a01a129e5acd3a231fd3e058033b6b30ce439600bc88"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLayerAddition.test_orient_TestLayerAddition.test_orient.assert_m_orient_at_call_": {"doc_hash": "3ab575ee813899f7ab914082457b7f822ad9a3cb01b0f47e35032d6a82e7ac0c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling_TestScaling.test_faceted_log_scale.for_ax_in_p__figure_axes_.assert_array_equal_xfm_1": {"doc_hash": "e455e8a89bcb220be16dc30fa864ab56d1722a784804593d548056301d562ec6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_paired_single_log_scale_TestScaling.test_paired_single_log_scale.assert_array_equal_xfm_lo": {"doc_hash": "c8936fcfc8c48eec8c774f95f746f0055107595511495a5cea6989c7e1511c4e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_log_scale_name_TestScaling.test_mark_data_log_transform_is_inverted.assert_vector_equal_m_pas": {"doc_hash": "cb65a63840b1e83b45ded86711dce047fc43920a4b05a196efd045644875336f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_mark_data_log_transfrom_with_stat_TestScaling.test_mark_data_log_transfrom_with_stat.assert_vector_equal_m_pas": {"doc_hash": "59a3f0439af043199e1b4272be06f6f6b97de7dadb857eec8d931dd1d24012d8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_mark_data_from_categorical_TestScaling.test_mark_data_from_datetime.assert_vector_equal_m_pas": {"doc_hash": "faaf23744684337f3cae72b93c5f15b92d6f0d0212961d3cc6159c177168ac68"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_facet_categories_TestScaling.test_facet_categories.None_1": {"doc_hash": "13bed10bd127d39bfc3528ef8c14d94098c7c770e53f62298d4cd8a02c3e639f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_facet_categories_unshared_TestScaling.test_facet_categories_unshared.None_1": {"doc_hash": "0172a2aba2862d40ea3645c93e1ae7a9ef0c72bde50b16b839ff2054fb7101d1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_facet_categories_single_dim_shared_TestScaling.test_facet_categories_single_dim_shared.None_3": {"doc_hash": "ac8be8ff377db948e84c1461ce1a4aa10c59126fb5cd2d278e066a000b79d095"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_pair_categories_TestScaling.test_pair_categories.None_1": {"doc_hash": "c5efdd2e1c55c549b4793529b2dc397a97e0743f75e9509810da314384223144"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_pair_categories_shared_TestScaling.test_pair_categories_shared.None_2": {"doc_hash": "95eddc3b0777d283a3a119e643a94fcc95be284fe943bbb396aafb9fc1a557d9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_identity_mapping_linewidth_TestScaling._TODO_where_should_RGB_c": {"doc_hash": "5ea164bd20eb5ed5e489eb0371cf62af3673b159398a5a74131564099fe75c94"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_identity_mapping_color_strings_TestScaling.test_identity_mapping_color_strings.assert_array_equal_m_pass": {"doc_hash": "7ec539ecf936e7bbb2ccce9a6ff5c67a2b24cf562402626d3bc364700a3775d6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_identity_mapping_color_tuples_TestScaling.test_undefined_variable_raises.with_pytest_raises_Runtim.p_plot_": {"doc_hash": "1117de6ecbbfb3054cc0769e7137816e59ca75cdf8bf8bfa35534041186e99fe"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting_TestPlotting.test_single_split_single_layer.for_col_in_p__data_frame_.assert_series_equal_m_pas": {"doc_hash": "2982ca14883323ef1bbb0065f5b062c24768f4c5dee35326ef14e1be3c88a95c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_single_split_multi_layer_TestPlotting.check_splits_single_var.for_i_key_in_enumerate_s.for_var_col_in_data_vars.assert_array_equal_mark_p": {"doc_hash": "ef048722c617012781697cc33f5d92e36d60c8289141bb0fa04dafb721342c3c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.check_splits_multi_vars_TestPlotting.check_splits_multi_vars.for_i_keys_in_enumerate_.for_var_col_in_data_vars.assert_array_equal_mark_p": {"doc_hash": "52ddcfb2d50a48a17356bc368dc5fd0021f8c32f49f173f64a21d73aababe6a8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_one_grouping_variable_TestPlotting.test_one_grouping_variable.self_check_splits_single_": {"doc_hash": "799092ba6fe332d07e3ad96eda6c2d3e835ab9cea410997ec2b349d7f78f0a05"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_two_grouping_variables_TestPlotting.test_two_grouping_variables.self_check_splits_multi_v": {"doc_hash": "5be895f552cf71c2f65c3353fe1a008a76f3aaf48a1e586541b812e293dc7d45"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_facets_no_subgroups_TestPlotting.test_facets_no_subgroups.self_check_splits_single_": {"doc_hash": "627a4ad24f227763864b6bd20d21be83de64cd7d69373e7f625e95d96389324e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_facets_one_subgroup_TestPlotting.test_facets_one_subgroup.self_check_splits_multi_v": {"doc_hash": "4db8f4a5249cb5051ad1b00dd8d9d84817cb1b76c9aa4f1236fbda94b6c4f561"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_layer_specific_facet_disabling_TestPlotting.test_layer_specific_facet_disabling.for_data_in_m_passed_data.for_var_col_in_axis_vars.assert_vector_equal_data_": {"doc_hash": "06b4003df56d802fdfe2779f17e0de224490a0599fe4c2747a69a43229290fa9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_paired_variables_TestPlotting.test_paired_one_dimension.for_data_x_i_in_zip_m_pa.assert_vector_equal_data_": {"doc_hash": "7342277999b5bd399ef9fd1506e8d4a48093a7f3aa4ac5f4d880e3e7f4b31aea"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_paired_variables_one_subset_TestPlotting.test_paired_variables_one_subset.for_data_x_i_y_i_g_i_.None_1": {"doc_hash": "8b3a53eeb05e0655152053f192050bc98fca28da2415b4ee39a06edf60359241"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_paired_and_faceted_TestPlotting.test_paired_and_faceted.for_data_x_i_f_i_in_z.None_1": {"doc_hash": "e43e3989153c4421a963b88bec4cbc148188142ec474b7282c7d69c564256fa6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_on_type_check_TestPlotting.test_axis_labels_from_constructor.None_5": {"doc_hash": "00c4f63f4c3bd8a957e175a794cc13ca81415306dc0ca39ac11e78f31de01775"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_axis_labels_from_layer_TestPlotting.test_axis_labels_are_first_name.assert_ax_get_ylabel_": {"doc_hash": "6b6f957b993a1f2799a05b57a10b97c554e8d5400709ad4148485548f6da8422"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestFacetInterface_TestFacetInterface.check_facet_results_1d.for_subplot_level_in_zip.assert_gridspec_shape_sub": {"doc_hash": "c9affd7f1a3f027705e223dbf6b09bec8711404def7323192747715e5d5e0826"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestFacetInterface.test_1d_TestFacetInterface.test_1d_with_order.self_check_facet_results_": {"doc_hash": "0e8f1077aa7c9f9d97e0841e524a94043e62b620ee467786cb7788154dd17c45"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestFacetInterface.check_facet_results_2d_TestFacetInterface.check_facet_results_2d.for_subplot_row_level_.assert_gridspec_shape_": {"doc_hash": "639270f3eaedb34883a04c8999ed25e55a166d9911f7e4a361d2b2e46a39dd3b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestFacetInterface.test_2d_TestFacetInterface.test_2d_with_order.self_check_facet_results_": {"doc_hash": "4af36bea8a01456b9acd6d3a4771e6d986d0991eecaf315faa889f89dd577c82"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestFacetInterface.test_axis_sharing_TestFacetInterface.test_axis_sharing.for_shared_unshared_v.for_root_other_in_vecto.assert_not_any_shareset_u": {"doc_hash": "7bfb08fe8ae8ada186f2a6b1be9c2c71189bd23d53994297f3c232ee33e3e75c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestFacetInterface.test_col_wrapping_TestFacetInterface.test_row_wrapping._TODO_test_axis_labels_a": {"doc_hash": "63da9b5396496c8eb1185ca633f3cdacea2ea252023e5ad0466f6f1f3a3a264b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface_TestPairInterface.test_single_dimension.self_check_pair_grid_p_": {"doc_hash": "972b6a7965da63dfb46e4a7e17bb79df559ab5d0635dfb9eb1e4c801fbe4816b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_non_cross_TestPairInterface.test_non_cross.for_axis_in_xy_.assert_not_any_shareset_j": {"doc_hash": "a811582e74b619b370aae121ca232aa4a4fc54dbf453c412df611077a1bc85ac"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_with_facets_TestPairInterface.test_with_facets.for_y_i_col_i_subplot.assert_gridspec_shape_ax_": {"doc_hash": "8a43091621d64e2f6b6a649dde685f436da95b91f7efab71889090f432757107"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_error_on_facet_overlap_TestPairInterface.test_error_on_facet_overlap.with_pytest_raises_Runtim.p_plot_": {"doc_hash": "6f14cbd0f30b7fd6b96fa7510a79550445bcf33e940653a0a5bbef9fbcb2ba42"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_error_on_wrap_overlap_TestPairInterface.test_error_on_wrap_overlap.with_pytest_raises_Runtim.p_plot_": {"doc_hash": "db96d240eb91c8ce274e8adc1ae6cf2150fed268cdf53289fbd245107edcbb42"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_axis_sharing_TestPairInterface.test_axis_sharing.for_axis_in_xy_.assert_not_any_shareset_j": {"doc_hash": "143ec1c6a8c13a04d95ae912e0ce21bfb55653b495e37b264a9cc67c238fcdf7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_axis_sharing_with_facets_TestPairInterface.test_axis_sharing_with_facets.None_1.assert_all_y_shareset_joi": {"doc_hash": "50fb104a86e7fd0fb68ad96a74c198e4da819763e4f0b7108faaffd5abdd1fcf"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_non_cross_wrapping_TestPairInterface.test_non_cross_wrapping.assert_len_p__figure_axes": {"doc_hash": "eceef018a2fc6a0735d64b816a4b0a152d99ea5086b7fc6df0628eb9b5f7a331"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLabelVisibility_TestLabelVisibility.test_1d_column.for_s_in_other_.assert_not_any_t_get_visi": {"doc_hash": "31574a6da114c03371a640534e94bb0eee3519f0b0fc365de9f80864e13a62cf"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLabelVisibility.test_1d_row_TestLabelVisibility.test_1d_row.for_s_in_other_.assert_all_t_get_visible_": {"doc_hash": "77995cfb97817dd7c130dbf4fa47269da2e50c6f801b401c8cc527a0e84bc491"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLabelVisibility.test_1d_column_wrapped_TestLabelVisibility.test_1d_column_wrapped.assert_not_any_t_get_visi": {"doc_hash": "02b94790108e84ecaa21dd0b53566861f8e9b57b34e91a99f47ba2ac7515f790"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLabelVisibility.test_1d_row_wrapped_TestLabelVisibility.test_1d_row_wrapped.assert_not_any_t_get_visi": {"doc_hash": "ee3c85f0a909162b231697e0c16e0063e4ed544319b7cec91076d7c23f97216f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLabelVisibility.test_1d_column_wrapped_non_cross_TestLabelVisibility.test_1d_column_wrapped_non_cross.for_s_in_p__subplots_.None_3": {"doc_hash": "b204e7351581630b60af5a59573a1268380fa27c89db397392345e3b86aa5261"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLabelVisibility.test_2d_TestLabelVisibility.test_2d.for_s_in_subplots_1_su.assert_not_any_t_get_visi": {"doc_hash": "b24bac7bfda32b8692c619c02e60a25dfbca45443576a03f22227a8cdfa5cab8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLabelVisibility.test_2d_unshared_TestLabelVisibility.test_2d_unshared.for_s_in_subplots_1_su.assert_all_t_get_visible_": {"doc_hash": "88dbfd63ab76765a862ce6737dba98786d735e500d5ac47d9dbd08a3db95a856"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend_TestLegend.test_single_layer_single_variable.for_a_label_in_zip_artis.assert_a_variables_c": {"doc_hash": "e1ec4d39c496ab49fed96af3f84d34c7d7814eb9598bba208e5c2a0a795d670c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend.test_single_layer_common_variable_TestLegend.test_single_layer_common_variable.for_a_label_in_zip_artis.assert_a_variables_lis": {"doc_hash": "7fbf94a9f78f11ed1108e73028d242abe9b7463df27c85cd2906a465c577e442"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend.test_single_layer_common_unnamed_variable_TestLegend.test_single_layer_common_unnamed_variable.for_a_label_in_zip_artis.assert_a_variables_lis": {"doc_hash": "4dedd4f4fca3a0ce2e2c593b5d2686b8006cc6a8682f869a403cacacfddf3dd7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend.test_single_layer_multi_variable_TestLegend.test_single_layer_multi_variable.for_e_s_in_zip_e1_e2_.for_a_label_in_zip_artis.assert_a_variables_va": {"doc_hash": "d9f453aad40060372c928149523ad5f0cfce99f2f4ef65b0bacbc915fd7aba6e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend.test_multi_layer_single_variable_TestLegend.test_multi_layer_single_variable.for_e_in_e1_e2_.for_a_label_in_zip_artis.assert_a_variables_c": {"doc_hash": "48d9bad42c4edd8fc16bace194b58029317b79dae88c6ebd40fc1916d451554d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend.test_multi_layer_multi_variable_TestLegend.test_multi_layer_multi_variable.for_e_s_in_zip_e1_e2_.for_a_label_in_zip_artis.assert_a_variables_va": {"doc_hash": "8d30a9e04b74a0603b2b03be70fb080018a9f09f5a3369511c5c7738a1332daa"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend.test_multi_layer_different_artists_TestLegend.test_multi_layer_different_artists.if_Version_mpl___version_.None_1": {"doc_hash": "4e3ad2148a5abb2ca2232bca8f2779f7cc88e6c4d937ee4bf04d0ffd48c08f7e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend.test_identity_scale_ignored_": {"doc_hash": "8da2ac93bb13feeb4b0a29da1c91e5d216b86cc13cbec2ea35cf0835a0dbcdfb"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_np_from_seaborn_palettes_imp": {"doc_hash": "5ed9d1d755d484da76940e9d17d1d5cbc4fc3cd5780d34174e19be56b5720dc0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_DataFixtures_DataFixtures.vectors.return._num_num_vector_cat_": {"doc_hash": "4ede12909705184bd6b6c0a29b01645e1d785369d5790dff55c32b20d96fc96d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestCoordinate_TestCoordinate.test_bad_scale_arg_type.with_pytest_raises_TypeEr.Coordinate_x_infer_sca": {"doc_hash": "1df2dd4d27b8087993d315211c9ac77de7affe18278cacc61b2745ff910b24a7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestColor_TestColor.test_continuous_named_palette.self_assert_same_rgb_m_nu": {"doc_hash": "db9bf9814aac3ee88797fa3d5f5f0b36860438dabd85f6810cdb681406aa38b4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestColor.test_continuous_tuple_palette_TestColor._TODO_default_scales_for": {"doc_hash": "f517c441a23e4cfed0041c44eb1ab4cba26d9ae4afbe308e6404d561131d6784"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestColor.test_inference_TestColor.test_inference.assert_scale_values_va": {"doc_hash": "dc0d4c8e8637bda80be60cb34a2920a669af3e305eaadcac5e9f7df99fe3060b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestColor.test_inference_binary_data_TestColor.test_standardization.if_Version_mpl___version_.assert_f_1234_to_r": {"doc_hash": "1b2c3f11063f5145f10aa068d3886df3b6ed0ca57ad8273661cfea8fed78351c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_ObjectPropertyBase_ObjectPropertyBase.test_mapping_from_list.for_i_expected_in_enumer.self_assert_equal_actual_": {"doc_hash": "0703716cc5300b9099d09a8cb5d0ef5c72e0403d01134107736646717e964349"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_ObjectPropertyBase.test_mapping_from_dict_ObjectPropertyBase.test_mapping_from_dict.for_i_level_in_enumerate.self_assert_equal_actual_": {"doc_hash": "0bce45d805ea1aaece6e40f25fbcb087cc287e0220d4349c34eacd4edc8f2f78"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_ObjectPropertyBase.test_mapping_with_null_value_ObjectPropertyBase.test_bad_scale_values.with_pytest_raises_TypeEr.self_prop_get_mapping_N": {"doc_hash": "dcfcc2739368f8741b7b029af4f348fb20e58a6865025900c401707e5d19abc7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestMarker_TestLineStyle.test_bad_dashes.with_pytest_raises_TypeEr.p_standardize_1_2_x_": {"doc_hash": "fb73b06dc8567bae2ca855498f74299b1e996c30e11dc27d1500399082712f37"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestFill_TestFill.test_values_error.with_pytest_raises_TypeEr.Fill_get_mapping_Nomina": {"doc_hash": "1e80ddc0617500516adb0baf4935847f67118ec36653f4bd67250dd93b2b0b7a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_IntervalBase_IntervalBase.test_inference.assert_scale_values_ar": {"doc_hash": "4f11d011d4cabea6018a76f8c66b0d9e9277e02dc9b1e3d5c84a4e732927b17c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_IntervalBase.test_mapped_interval_numeric_IntervalBase.test_bad_scale_values_categorical_data.with_pytest_raises_TypeEr.self_prop_get_mapping_N": {"doc_hash": "02062ddfbfefde6457935d2a3281ef9ff2823049c3a6877fd772ad04486dabb0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestAlpha_": {"doc_hash": "85ba169ae64e4a7bb2ae5b1d1693977cc633eb50a06bcf4c0a2793221ad006bd"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_rules.py_np_test_variable_type.None_17": {"doc_hash": "adc4d23e1bca34db675d8a714a9576d1d56ebae24cfd31a7293047217a1840f7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_rules.py_test_categorical_order_": {"doc_hash": "7011b0e265bbd6d16e7c01dd6c0c4f38911d2e6a2bf8f1251a9d8505822d92c9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestNominal_TestNominal.test_coordinate_axis_with_subset_order.assert_f_format_ticks_0_": {"doc_hash": "e9ab9fc91a95c6d998ecf5cf49ce916862daac139e7fd5a4af2e61d9bd48cfb9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestNominal.test_coordinate_axis_with_category_dtype_TestNominal.test_coordinate_numeric_data.assert_f_format_ticks_0_": {"doc_hash": "48636c12af2a90063f1f23c8c92b690348c93cefa83b8f16a4cf2eeb153114c9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestNominal.test_coordinate_numeric_data_with_order_TestNominal.test_coordinate_numeric_data_with_order.assert_f_format_ticks_0_": {"doc_hash": "e3a98d2f96ef40ea871d96be96f6468f9ad7745bfd6ce6ae36bbb509f05f3ad0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestNominal.test_color_defaults_TestNominal.test_object_dict.assert_s_x_x_z_": {"doc_hash": "33ce2f39094d4b52c7ec329c2c9fb125343b5fcabe1cee13258904a8e5d44856"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestNominal.test_object_order_TestNominal.test_interval_with_transform.assert_array_equal_s_x_": {"doc_hash": "07c09c1c3e210acfba929de1dfe936464acbbb8e641e2cb2e5386fb9440666c7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_itertools_TestSpecificationChecks.test_wrapped_x_pairing_and_facetd_rows.with_pytest_raises_Runtim.Subplots_facet_spec_": {"doc_hash": "cc92aed11e2277eade0b6ef3ba30390b7f90b3e1551f6f645eec99797c1dec74"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec_TestSubplotSpec.test_single_facet.None_4": {"doc_hash": "b5f5999d9a8468a225379c59bf5d49e72eb2eccdb218425d2d43f326f2b35cb6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_two_facets_TestSubplotSpec.test_two_facets.None_4": {"doc_hash": "894ca945322b5ae18293e41aa1f0aacb5e8b84fc16ee131e435394d8d1859e8b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_col_facet_wrapped_TestSubplotSpec.test_col_facet_wrapped.None_4": {"doc_hash": "21f4ef24105c77822e4b614b0bee36ffc01d0c09705e5c1cbf7a8bd6bb5a94f0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_row_facet_wrapped_TestSubplotSpec.test_row_facet_wrapped.None_4": {"doc_hash": "6ad31b5b8b2dc331d8b71afb61d3a8d559cbb03ab2339584f1393844d61fe57e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_col_facet_wrapped_single_row_TestSubplotSpec.test_col_facet_wrapped_single_row.None_4": {"doc_hash": "8ee4445280ff1b4daf8789d33d8d36e3d596c0ba99a7638a7612fd574d6d72d7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_x_and_y_paired_TestSubplotSpec.test_x_and_y_paired.None_4": {"doc_hash": "a73012cf9eee1165791e6fb92fc980212347afeb87aa4ae4bb603c41162abde5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_x_paired_TestSubplotSpec.test_y_paired.None_4": {"doc_hash": "c7b8ce06970bc99077d8deacf290245f5032c98c5f095db9a6c92e38bfba3724"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_x_paired_and_wrapped_TestSubplotSpec.test_x_paired_and_wrapped.None_4": {"doc_hash": "8c55e95c771bd8c1f090b3aa8fc805c3fb49e3c5c622df7cb86eaa1251c3070c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_col_faceted_y_paired_TestSubplotSpec.test_col_faceted_y_paired.None_4": {"doc_hash": "21954ead5089a61079b41aa788c588ce7c42a300bed537d03b5174a3c6dc40a2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_row_faceted_x_paired_TestSubplotSpec.test_row_faceted_x_paired.None_4": {"doc_hash": "fab6d476181d758bba851480b861de1ad241e0791a7d5364ef6aaf334178f6a2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_x_any_y_paired_non_cross_TestSubplotSpec.test_x_any_y_paired_non_cross.None_4": {"doc_hash": "f128aafec4b92adf40f392b55607b120db00f3e761e251f2d1ee58e8b6255fa9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_x_any_y_paired_non_cross_wrapped_TestSubplotSpec.test_forced_unshared_facets.None_1": {"doc_hash": "852b771ad173e3367a120b5757105f619c020bdaf207f08902c9424a1a4d2e14"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements_TestSubplotElements.test_single_facet_dim.for_i_e_in_enumerate_s_.assert_e_right_dim": {"doc_hash": "bfe3be55cba139a0391d1d80e501841b90c76061dc40df9b430359217e3d2b3d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements.test_single_facet_dim_wrapped_TestSubplotElements.test_single_facet_dim_wrapped.for_i_e_in_enumerate_s_.for_side_expected_in_zip.assert_e_side_expecte": {"doc_hash": "6f002e9bc9d63a8ee2196dc8ab0baaafb155b3f55b6523b14efa9437a9a9e171"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements.test_both_facet_dims_TestSubplotElements.test_both_facet_dims.for_e_in_es_.assert_e_y_y_": {"doc_hash": "4c4daf74345d525f849e789171f50be4b3c10dc88d7d581f6cbad1113698cc88"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements.test_single_paired_var_TestSubplotElements.test_single_paired_var.for_side_expected_in_zip.assert_e_side_expecte": {"doc_hash": "c19ef9c52b596f8fd425c01899fed5d3654404ec8355b61408efb3727fa059dd"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements.test_single_paired_var_wrapped_TestSubplotElements.test_single_paired_var_wrapped.for_i_e_in_enumerate_s_.for_side_expected_in_zip.assert_e_side_expecte": {"doc_hash": "87427f0d501199727f57c85ebff73fe0cea789b33abfc57d28f80537d8e9de5c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements.test_both_paired_variables_TestSubplotElements.test_both_paired_variables.for_i_in_range_len_y_.for_j_in_range_len_x_.assert_e_y_f_y_i_": {"doc_hash": "ddf6a1b41ae260c1ae38efefe0c392cea8c9d46c77bdb3c406dab00a12f283f2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements.test_both_paired_non_cross_TestSubplotElements.test_both_paired_non_cross.for_i_e_in_enumerate_s_.assert_e_bottom_": {"doc_hash": "b09c4960b4b2d78296241855a2f15b37e16b5bfd1eaf7fecb693f23425f9be4a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements.test_one_facet_one_paired_": {"doc_hash": "1fccad24bac89f714bf5fde20fb23c0c9dde6d36bb0de111ef9bb4d828c531a2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_area.py_mpl_TestAreaMarks.test_single_defaults.assert_array_equal_lw_mp": {"doc_hash": "6187075b0ae72bd765590f3a772a4ecdb645a57977b4c8aece537babc6f95eac"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_base.py_from_dataclasses_import_d_TestMappable.test_rcparam.assert_array_equal_m__res": {"doc_hash": "aa37e53e439e05c8e72f8e9ad8205323ff063d9ce230ff1c124424828eb81047"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_base.py_TestMappable.test_depends_TestMappable.test_depends.None_1": {"doc_hash": "bd1bd7075695ffa0136bfc176c941b06ef16ee2ec2c251d53f60d5930fc93ca3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_base.py_TestMappable.test_mapped_TestMappable.test_color.assert_array_equal_resolv": {"doc_hash": "07e21e92aa3497733f57ca78fc5b7e6fb0e87443596ba6514abffa377485390d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_base.py_TestMappable.test_color_mapped_alpha_TestMappable.test_color_mapped_alpha.assert_array_equal_resolv": {"doc_hash": "c8b2014aadc15d80cdf0133599f923e27ac4b8fd5c506376d892369b9fcc9f55"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_base.py_TestMappable.test_color_scaled_as_strings_": {"doc_hash": "79b4f6906371d6bb721cfc2015737414f829d027c46ee245b8a91fdbd027d273"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_regression.py_np_TestPolyFit.test_no_grouper.assert_array_almost_equal": {"doc_hash": "7ad6dc6f01ffcbecdd7b491043861349a77276af7666aa8242212b4acafe630a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_regression.py_TestPolyFit.test_one_grouper_": {"doc_hash": "c63ad31a2b6dc74998060671f22159eb50217c8268f95a86bca7100dc21f88a5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/conftest.py_np_remove_pandas_unit_conversion.None_2": {"doc_hash": "45aaa1c13f1f8a8add5f34a42108f369b3fedde7d22fccad7f3cf7b4ddfef8bd"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/conftest.py_close_figs_wide_dict_of_lists.return._s_name_s_to_list_for_": {"doc_hash": "49a9df3022be243be8db009566a5388609cda8efdef239530465ec8ff2a7ffc3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/conftest.py_long_df_long_df.return.df": {"doc_hash": "013f3db4d2c7d5eb63416f318b55f84ef1c9ea58a3c3b98b10b488300d5f1d5a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/conftest.py_long_dict_": {"doc_hash": "22f09bc09ba864e5254d6486f8c6b5fc6850b2ba1fd94717c303739cc2334c1e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_np_test_bootstrap_range.assert_amax_out_max_": {"doc_hash": "ef64f789b1de322b44f7ef2a28fb774fb0c6e80fe1de11ea059886d76635fa7c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_bootstrap_multiarg_test_bootstrap_multiarg.assert_array_equal_out_ac": {"doc_hash": "5df79fb52fdf7bc001f6b1417007e55cde35c6b84955c9c79933de4010c53405"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_bootstrap_axis_test_bootstrap_seed.assert_array_equal_boots1": {"doc_hash": "fff5a08a9270678cf92ae195ded3d20a1d12261b277727c9578d8b8ed92482f3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_bootstrap_ols_test_bootstrap_ols.assert_w_boot_noisy_std_": {"doc_hash": "5189ad060120770fdc1cf3846c26094c81e0f350031477bbf1be7da81bbf867b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_bootstrap_units_test_bootstrap_arglength.with_pytest_raises_ValueE.algo_bootstrap_np_arange_": {"doc_hash": "fc8fedcf6bd1be173e081ebc3cca7d0a15553026bd8ac72d7ccab7315d820281"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_bootstrap_string_func_test_bootstrap_string_func.with_pytest_raises_Attrib.algo_bootstrap_x_func_n": {"doc_hash": "d877a4f981cb8ca3e82e05b53bbc9372fd8d139602746dd0e7e93d07762bdc9a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_bootstrap_reproducibility_test_bootstrap_reproducibility.with_pytest_warns_UserWar.assert_array_equal_boots1": {"doc_hash": "90287b6bae19379ab437728249ae2caaddc95736a89845a91ddf0c5cd020b042"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_seed_new_test_seed_new.for_seed1_seed2_rng_cla.assert_rng1_uniform_": {"doc_hash": "5d67f23397d34040cddb2e28d30c8fb4ed3577ff100af52229ebebe0ed5540c6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_seed_old_test_seed_old.assert_rng1_uniform_": {"doc_hash": "72a24b7de7d1f5197aaaf5bac4533b9b051ffa49a7901e8cc076f7e069992701"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_bad_seed_old_": {"doc_hash": "920badcc6bfd6bb4e58ee66a384a2b466971d1728a000b6df078983b69118df7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_np_rs.np_random_RandomState_0_": {"doc_hash": "2daa5bd65aeedad072b55fe4b1da5e4e2b4c57ce35fe883513fdb3542ae7e981"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid_TestFacetGrid.test_self_axes.for_ax_in_g_axes_flat_.assert_isinstance_ax_plt": {"doc_hash": "81fedf13b1cfbf71b091184546835e53f7131be7919ee130645d258ac1d5d7cc"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_axes_array_size_TestFacetGrid.test_single_axes.None_2.g_ax": {"doc_hash": "3e95c69d6eea29958340ba392564dbd699d5b36ed292662934a1cd36c25c1d68"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_col_wrap_TestFacetGrid.test_col_wrap.assert_len_list_g_facet_d": {"doc_hash": "b8468dde4f93390d493056b671879ab3490844f0a40d91802d649cea8c87f6b2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_normal_axes_TestFacetGrid.test_normal_axes.None_19": {"doc_hash": "72e62ca0de2cc9ee837d2db84c79e227b0218d2df6fc50b33954330cf3b851a3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_wrapped_axes_TestFacetGrid.test_wrapped_axes.None_4": {"doc_hash": "572c927bdbdc3726521e8337e670ba366a2d3edfc8c2c35bfc1cf588970c438e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_axes_dict_TestFacetGrid.test_axes_dict.for_row_var_col_var_a.assert_g_axes_i_j_is_ax": {"doc_hash": "fbd75611f978d48353b1dd5369a16e5ee9f295363bb2844485e5c2b918baa361"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_figure_size_TestFacetGrid.test_figure_size.None_2": {"doc_hash": "f12da53373aa5a16d6e7f22daa53682e31d12ee5974f846808a2fdbe624c831c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_figure_size_with_legend_TestFacetGrid.test_figure_size_with_legend.None_4": {"doc_hash": "a186f48cb1b5821e0b5249179bbad10701205fed5bc930df0868d1c02661dd1f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_legend_data_TestFacetGrid.test_legend_data.for_label_level_in_zip_l.assert_label_get_text_": {"doc_hash": "8e82d4062e7603d0f378156f297ed67a962e7c03e65857d1f3bfe20d7286a7e0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_legend_data_missing_level_TestFacetGrid.test_legend_data_missing_level.for_label_level_in_zip_l.assert_label_get_text_": {"doc_hash": "abdb0a4604a3055682888d11f9417e6eb417acab125e812a2bbbfa231eca4716"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_get_boolean_legend_data_TestFacetGrid.test_get_boolean_legend_data.for_label_level_in_zip_l.assert_label_get_text_": {"doc_hash": "033d8848dcd3e3aa89c153fd98fee87176862bac4d0629ae625ff4590a41e645"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_legend_tuples_TestFacetGrid.test_subplot_kws.for_ax_in_g_axes_flat_.assert_PolarAxesSubplot_": {"doc_hash": "93c3a7c6365b920066b083d0825837ca0f04641ee209a9c7b1b099e8870ce02d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_gridspec_kws_TestFacetGrid.test_gridspec_kws_col_wrap.with_pytest_warns_UserWar.ag_FacetGrid_self_df_col": {"doc_hash": "e096485d8aeefe62b708fb4bc9184420fcb0a79ea2b7e84734af6324dd744b1c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_data_generator_TestFacetGrid.test_data_generator.assert_data_c_u_": {"doc_hash": "9c41e5e415acb49e116930da06b12e520b5b557c0e9f99713f199953bc7019e3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_map_TestFacetGrid.test_map.npt_assert_array_equal_y_": {"doc_hash": "9d419510f1a29a4bc13fe6fcc824a047927087aee03bb96608693cec530fa562"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_map_dataframe_TestFacetGrid.test_map_dataframe.npt_assert_array_equal_y_": {"doc_hash": "b66693645064023d65e6eca57df2c73df14a20ead5b7ea95247bd06d9ed663d4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_set_TestFacetGrid.test_set.for_ax_in_g_axes_flat_.None_3": {"doc_hash": "36307c1c6a8e8f07d21f2a76f534ee1c037eaacbea42a1fa924c260e75b130a1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_set_titles_TestFacetGrid.test_set_titles.None_3": {"doc_hash": "f15d76f940c5825d320f593bbc5e5cac0968115c8cca94d3a11d35e1d19d7c6f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_set_titles_margin_titles_TestFacetGrid.test_set_titles_margin_titles.None_10": {"doc_hash": "473d169e2d345e51aeacc8b42bdc4fc011cbea8aea84d8a1d56c1466e7e384f2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_set_ticklabels_TestFacetGrid.test_set_ticklabels.for_ax_in_g__left_axes_.for_l_in_ax_get_yticklabe.assert_l_get_rotation_": {"doc_hash": "aa68ce0b9ceb49031118a1f74fb87d0c3e2ca7472a4a1b88a47eee859d3617b2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_set_axis_labels_TestFacetGrid.test_axis_lims.assert_g_axes_0_0_get_y": {"doc_hash": "f401284cecc947fd3945894d54164cd708f4ef38ee1553ac2ad03a53d8e4ba40"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_data_orders_TestFacetGrid.test_data_orders.assert_g_axes_shape_4": {"doc_hash": "9eb4bd9d194f37f0ea90853fced26036424b505fb6df9f5859f945dab83e23a7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_palette_TestFacetGrid.test_palette.None_4": {"doc_hash": "bbe0d38c2843c4de849a34dccaf1958139146ec1f0415abb22355fffe94e3798"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_hue_kws_TestFacetGrid.test_dropna.None_3": {"doc_hash": "d7ebc5f38966af0ef410c689bb41cc817fc1fb27b8c03192a6bdf69cbffc383b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_categorical_column_missing_categories_TestFacetGrid.test_categorical_warning.with_pytest_warns_UserWar.g_map_pointplot_b_x_": {"doc_hash": "1f596e4e1f40bb13ecb37f23dffe7da5244c7b7d24d1ef48dd06582380779eaf"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_refline_TestFacetGrid.test_refline.None_2": {"doc_hash": "9b2cf0d991adcf626cc3bd2316ef73f262e50f99122cc7fe1a7cba8977c59509"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid_TestPairGrid.test_remove_hue_from_default.assert_hue_in_g_y_vars": {"doc_hash": "486f8b0ddb94aa21b51d6d485cc97718fb8a02fa85e5a3431ce9ccd45fd93b74"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_specific_nonsquare_axes_TestPairGrid.test_specific_nonsquare_axes.assert_not_g_square_grid": {"doc_hash": "5fab1558de8624621179ba00c577c7ed72857c904b7c81de982e5d08028516b6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_size_TestPairGrid.test_empty_grid.with_pytest_raises_ValueE.ag_PairGrid_self_df_a_": {"doc_hash": "abb1cecad23d2ac8bbc76978d85d4fca23b21967fed2468adccc2c996cd093dc"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_TestPairGrid.test_map.None_1.for_j_ax_in_enumerate_ax.npt_assert_array_equal_y_": {"doc_hash": "0220f991ed33845a9ddc881b16542895abf9e07e16776e72a3bdb0001af349e8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_nonsquare_TestPairGrid.test_map_nonsquare.for_i_i_var_in_enumerate.npt_assert_array_equal_y_": {"doc_hash": "59f8ab5cbbe6637afc2d91f29d3c2b9ecac7f16beeefaa49466f2665dec777e8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_lower_TestPairGrid.test_map_lower.for_i_j_in_zip_np_triu_.assert_len_ax_collections": {"doc_hash": "eb0159a4961e16ca480cda54e83fce1d86121110969fdf17b4e2f21c876316cb"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_upper_TestPairGrid.test_map_upper.for_i_j_in_zip_np_tril_.assert_len_ax_collections": {"doc_hash": "ba2e81d627559901d96c460c0e8ca18e458c46b97a2114fb20c8e94221e930a1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_mixed_funcsig_TestPairGrid.test_map_mixed_funcsig.for_i_j_in_zip_np_triu_.npt_assert_array_equal_y_": {"doc_hash": "1e0c260035c290218bb2924de44546cf4c62d2f45adf0cdb5de390032366fbb7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_diag_TestPairGrid.test_map_diag.None_2.for_ptch_in_ax_patches_.assert_not_ptch_fill": {"doc_hash": "5556fae704c029ca203d0382ed5736d6a7324ab0892ad4392de306f3d89426a3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_diag_rectangular_TestPairGrid.test_map_diag_rectangular.None_4.for_i_y_var_in_enumerate.if_x_var_y_var_.else_.assert_array_equal_y_sel": {"doc_hash": "61fc7b28b551c0404dc46cfc6c9617131f24e532687c271ac8c3db05c7973451"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_diag_color_TestPairGrid.test_map_diag_palette.for_ax_in_g_diag_axes_.for_line_color_in_zip_ax.assert_colors_equal_line_": {"doc_hash": "0f7b9497351336f70be2a0c2fbe5660a835608c6579c01c065b0455c9c0187de"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_diag_and_offdiag_TestPairGrid.test_map_diag_and_offdiag.for_i_j_in_zip_np_diag_.assert_len_ax_collections": {"doc_hash": "a30b4087ab43289e5b37084f807bd5a6a1d9ad4942c73b4c810d8a7be99b281b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_diag_sharey_TestPairGrid.test_map_diag_matplotlib.None_1.assert_len_ax_patches_": {"doc_hash": "69b51c735eca34ed4e483469de93ba4953c75ab342b455af84cb79ce4dc01015"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_palette_TestPairGrid.test_palette.None_4": {"doc_hash": "4ccb0e5e1af85e4a8deac23981df8cab4a137254fe14c77b603beabb33d6e54e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_hue_kws_TestPairGrid.test_hue_kws.None_1.assert_line_get_marker_": {"doc_hash": "65f8556c5c484c6c3c765eef13250e185b5d5c3c8388a2ed8bb50772956baa62"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_hue_order_TestPairGrid.test_hue_order.None_7": {"doc_hash": "d634c80556124cf2f7d9e8619577a7e45a7f4046e79cb51097f70c4eaf4617c8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_hue_order_missing_level_TestPairGrid.test_hue_order_missing_level.None_7": {"doc_hash": "6853ae1bed3dcb5f6fac4c4cfeb34a4ae313b2d16cd29261410cb0c7cf88ed6e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_hue_in_map_TestPairGrid.test_nondefault_index.None_1.for_j_ax_in_enumerate_ax.for_k_k_level_in_enumera.npt_assert_array_equal_y_": {"doc_hash": "42037f6113d149bf02b61b3b11d3ad35fb0c58c04e95080b1289e4354b8759d0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_dropna_TestPairGrid.test_histplot_legend.assert_len_g__legend_lege": {"doc_hash": "0ab68f1ddf3e0f4a3e41ed2c282f0f9caed61386976391160d34a9db7e56bf46"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_pairplot_TestPairGrid.test_pairplot.None_4.assert_len_ax_collections": {"doc_hash": "dad6ffc56ebe45fd2057164cc88494c43124b66acbf9fbd076173f660864420a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_pairplot_reg_TestPairGrid.test_pairplot_reg.for_i_j_in_zip_np_diag_.assert_len_ax_collections": {"doc_hash": "0c9abc5417b46bbc291b41f5627bbeb006a866fe0197e874d2bc9955da2532d9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_pairplot_reg_hue_TestPairGrid.test_pairplot_reg_hue.None_1": {"doc_hash": "f7de3c60c7186c40ace965978d29925ff3e694d40764d6f7eacf39cc355573de"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_pairplot_diag_kde_TestPairGrid.test_pairplot_diag_kde.for_i_j_in_zip_np_diag_.assert_len_ax_collections": {"doc_hash": "62d37dcf2e994259074309b1de5161857c7cb64855dbb86d34a338cb3380d8e8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_pairplot_kde_TestPairGrid.test_pairplot_hist.assert_plots_equal_ax1_a": {"doc_hash": "24d38cd9efc5459f0bcdb59800fae218c72881d33bc02cf36de708125766edf0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointGrid_TestJointGrid.test_axlims.assert_g_ax_marg_y_get_yl": {"doc_hash": "35150cd08da34717cc36e3553a6b16c84b02d91ab1293d070b828e30026a3790"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointGrid.test_marginal_ticks_TestJointGrid.test_marginal_ticks.None_3": {"doc_hash": "7412a6034734b796d9ed6e1fa1895ea35b95d450eaec144ebbc9cdbdec21e21f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointGrid.test_bivariate_plot_TestJointGrid.test_univariate_plot.npt_assert_array_equal_y1": {"doc_hash": "45c4d43689339a65a2b672c4ede605f14b295b8646e7bf0fcf031270860c3c3d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointGrid.test_univariate_plot_distplot_TestJointGrid.test_univariate_plot_matplotlib.assert_len_g_ax_marg_y_pa": {"doc_hash": "22e5e9529d5fdd3416e89881612300b569d169d6c15da73576a2e7b7c92a9a7f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointGrid.test_plot_TestJointGrid.test_space.assert_joint_bounds_3_": {"doc_hash": "25601956b76658b530fd4994294d93b64200e6af7b1b8d552c9f5b6f2c4724a3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointGrid.test_hue_TestJointGrid.test_hue.None_7": {"doc_hash": "d30f461c5c49d54d0e7d0ba9fd710764f34407adfec3d79941a087f30a587661"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointGrid.test_refline_TestJointGrid.test_refline.None_13": {"doc_hash": "c539caadf88bfb7ae3e20e485b3089f2f7414a47e61dab5f199d5ca0b3f529d3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot_TestJointPlot.test_scatter.None_3": {"doc_hash": "9dc922b152a8671295d17a9dfbcb3a1deb718a25355f20e40c0e2682c270f6e4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot.test_scatter_hue_TestJointPlot.test_scatter_hue.None_5": {"doc_hash": "0e0637e27795216438c59b03070a7fa829ab88a63393561a0b72e16be4cfeb3f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot.test_reg_TestJointPlot.test_resid.assert_not_g_ax_marg_y_li": {"doc_hash": "ddc6f982d26e07a880a740c355d3d9edf71bbef8ea928ba9e5d7b03cee0b9a4a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot.test_hist_TestJointPlot.test_hist.None_5": {"doc_hash": "a667d7964ec2e83c090d0de15e599998532a6febb2d0288666fd7640ef5bff5d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot.test_hex_TestJointPlot.test_kde.None_5": {"doc_hash": "f6277e495aebe3ed7050c2d21b6299e19cf3ceac38fa3fbb12d641cbd81454d7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot.test_kde_hue_TestJointPlot.test_kde_hue.None_5": {"doc_hash": "e201c6c5515efc44d5731dc96a2a32aa88788d2821213e26e7bf4751f88fdcef"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot.test_color_TestJointPlot.test_palette.None_5": {"doc_hash": "a2d267c8d1d93f4694cdb817e359cf51d947b9c8d7152ae5e3564203a9c1aab1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot.test_hex_customise_": {"doc_hash": "72a7a9908df6257e8ea175db2ba5ec5dc32cc322159d2243475cb1d7710ef7da"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_itertools_PLOT_FUNCS._": {"doc_hash": "c2b61a62e1463e537c0a39bc8c8e7b1453d9f039a4a50f4506d586f775518d9a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotterNew_TestCategoricalPlotterNew.test_axis_labels.for_axis_in_xy_.assert_label_func_va": {"doc_hash": "eeb532b1e9026920527d2d39904cd1e9134e63181fb39eeb2b02f725d4bd9fd5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotterNew.test_empty_TestCategoricalPlotterNew.test_redundant_hue_backcompat.assert_all_isinstance_k_": {"doc_hash": "e8988bbb9fab785a73f6ed0d52b76c75d9f62c516dab6ebc593f676010a0dda0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_CategoricalFixture_CategoricalFixture.get_box_artists.if_Version_mpl___version_.else_.return._p_for_p_in_ax_patches_if": {"doc_hash": "0ff31cf8560823c71102afd18b6d6f7005e2b57f27fb22cbc74a7024c391abe0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter_TestCategoricalPlotter.test_wide_df_data.with_pytest_raises_ValueE.p_establish_variables_hue": {"doc_hash": "b773eb0e25cd3d6df97b14a3d7de04c0ee1f22d656dfecefec2895bc19b7fb83"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_1d_input_data_TestCategoricalPlotter.test_1d_input_data.None_12": {"doc_hash": "dda43433adbb005a5d8985738e72e8c29fe41752060d211f4880449806a862f2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_2d_input_data_TestCategoricalPlotter.test_2d_input_data.None_7": {"doc_hash": "6a69f58c7c67503b6ea039b9eb37e68af602114e39962a1307328df94a44abf5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_3d_input_data_TestCategoricalPlotter.test_wide_array_input_data.assert_p_value_label_is_N": {"doc_hash": "35e5fb20b94c7c5040c78edac77b0474c6fa141e38adbb5fff72ff8c14184cf7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_single_long_direct_inputs_TestCategoricalPlotter.test_single_long_direct_inputs.assert_len_p_plot_data_0_": {"doc_hash": "5918ac7b4119ef6b4463121dc19c8a2a6ce06579a088fd59f110ba63f739ad73"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_single_long_indirect_inputs_TestCategoricalPlotter.test_single_long_indirect_inputs.None_5": {"doc_hash": "6a69d2fd22babe6958ab116bf74d67753c75cc5b81faf5944e71203328e2fe7e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_longform_groupby_TestCategoricalPlotter.test_longform_groupby.for_i_d1_d2_in_enumer.assert_np_array_equal_d1_": {"doc_hash": "1fb307ce60d4d714fe6550bf655efd88f3eac5d34c77d1d0ea3ed9c13bef5beb"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_input_validation_TestCategoricalPlotter.test_order.None_5": {"doc_hash": "990ae358178b18873ab8776d0a3a2a540f5130962b518084f503b7af219c068b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_hue_order_TestCategoricalPlotter.test_hue_order.assert_p_hue_names_o": {"doc_hash": "f17c82ba433cfa1ede3905e40d89a0fbc016530a1f873788fd13c79c68365e27"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_plot_units_TestCategoricalPlotter.test_default_palettes.None_1": {"doc_hash": "726fd6eb70bd4494d6d40e0f30400c1d13310839220aff712561dbbb26c7b209"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_default_palette_with_many_levels_TestCategoricalPlotter.test_specific_color.npt_assert_array_almost_e": {"doc_hash": "fc03c9f8c5df205b83afd19e38b0b5822448301e51379c7ae60f3f18592d3956"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_specific_palette_TestCategoricalPlotter.test_specific_palette.None_2": {"doc_hash": "7d1dd00d413b2a27c4d11c71098f732e2a09fd3b433c43b1fdf06228f5afbf77"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_dict_as_palette_TestCategoricalPlotter.test_palette_desaturation.None_1": {"doc_hash": "13f81a1fbcd0aebbb97ef7d87dd410c1034c682bd3921a439fb9356578b9e764"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter_TestCategoricalStatPlotter.test_no_bootstrappig.None_5": {"doc_hash": "487d8a24ead44eb1686f8cff9afcb9b67c8251c0a1f9a8abfa0692bdc4e3e203"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_single_layer_stats_TestCategoricalStatPlotter.test_single_layer_stats.for_ci___grp_y_in_zip.npt_assert_array_almost_e": {"doc_hash": "bdf43fd167d36873df66ac3a5194b77724b7da5fbd462525d9a69466a0478948"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_single_layer_stats_with_units_TestCategoricalStatPlotter.test_single_layer_stats_with_units.npt_assert_array_less_ci1": {"doc_hash": "27af1c5f47d671f60fb20e4f54db3bf9e6e2113e424e927ac68a1ea3f24de332"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_single_layer_stats_with_missing_data_TestCategoricalStatPlotter.test_single_layer_stats_with_missing_data.npt_assert_array_equal_p_": {"doc_hash": "26be2294cbf9499b5943f82299a03996069a0c228ac9162ffcf3c70de03f78cb"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_nested_stats_TestCategoricalStatPlotter.test_nested_stats.for_ci_g___grp_y_in_z.for_ci_hue_y_in_zip_ci_g.npt_assert_array_almost_e": {"doc_hash": "8ce7cb029175f4dc89b2008e94a60ddd2496638fb5c627b77898bb073fd465c8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_bootstrap_seed_TestCategoricalStatPlotter.test_bootstrap_seed.npt_assert_array_equal_co": {"doc_hash": "b0069c59799928aec2285414c9be4661a74fee970e3cf7311c640f3fc41ac56d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_nested_stats_with_units_TestCategoricalStatPlotter.test_nested_stats_with_units.npt_assert_array_less_ci1": {"doc_hash": "f913f063143e52f6dc761342ee9cd47dabe3edf04cc37bad330cd3b46dbb9db8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_nested_stats_with_missing_data_TestCategoricalStatPlotter.test_nested_stats_with_missing_data.None_7": {"doc_hash": "75a05b46622fd32cdc44b74c0d7916eea199286105af446c825848add3b884dc"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_sd_error_bars_TestCategoricalStatPlotter.test_sd_error_bars.for_ci___grp_y_in_zip.npt_assert_array_almost_e": {"doc_hash": "95e73a58c2c1750a1c02ae8fb30c68cbcc4287ac30ccf94211b95afd40682d7c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_nested_sd_error_bars_TestCategoricalStatPlotter.test_nested_sd_error_bars.for_ci_g___grp_y_in_z.for_ci_hue_y_in_zip_ci_g.npt_assert_array_almost_e": {"doc_hash": "bebed4339b23431ad8fe6c726c89ecefa6c9fa592a5a819148f6adb880925293"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_draw_cis_TestCategoricalStatPlotter.test_draw_cis.None_10": {"doc_hash": "235557162c5c45f5be76eeba45c35c4c2ec00261a4c03d69a62c65cd422053bb"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxPlotter_TestBoxPlotter.test_nested_width.None_4": {"doc_hash": "43877c671fcec7619568a3e58df99d87b498b2492f8256a26d40a72a4cd43c57"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxPlotter.test_hue_offsets_TestBoxPlotter.test_hue_offsets.npt_assert_array_almost_e": {"doc_hash": "73745649240e0f883114652536cc9b98f6a202a9849b2a4041e5feed83cb4a8e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxPlotter.test_axes_data_TestBoxPlotter.test_box_colors.None_1": {"doc_hash": "fb8333d75741b632488f7b03007d5471cd9446ec104bbf2ccacce049a53f35f5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxPlotter.test_draw_missing_boxes_TestBoxPlotter.test_missing_data.None_1": {"doc_hash": "9ae6dd8a78a320ed0880f86ebc28a2f919f197ca6c591640155ccd11e591c925"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxPlotter.test_unaligned_index_TestBoxPlotter.test_unaligned_index.None_1.assert_np_array_equal_l1_": {"doc_hash": "2d50cc66b8d838c729364297097895ad76c34a9dd7a22e1fe915abf4f578dd90"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxPlotter.test_boxplots_TestBoxPlotter.test_boxplots.None_15": {"doc_hash": "f03929ae3e95362142ed29e3aa7c05883c352ad7ae792072ce6cc5aaefad3548"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxPlotter.test_axes_annotation_TestBoxPlotter.test_axes_annotation.None_9": {"doc_hash": "6830f2e6b0b75db425644626ab1de3ff0332c1b87e7dab4a32a2980c4ed628c8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter_TestViolinPlotter.test_split_error.with_pytest_raises_ValueE.cat__ViolinPlotter_kws_": {"doc_hash": "420e59f36df968fcc21b69d3383ff87bf6fc8b777e36b59fb28073c4bfd72470"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_no_observations_TestViolinPlotter.test_no_observations.None_12": {"doc_hash": "99d2798633d9b5f034f0a9987deb708f2a0f7ca45cc5927b05b6c138ab3a8890"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_single_observation_TestViolinPlotter.test_single_observation.None_11": {"doc_hash": "3ec63895c504a684cd814ba81f20886d41561225996546a2ddbf93a5d56343e2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_dwidth_TestViolinPlotter.test_dwidth.None_3": {"doc_hash": "25eb7b99b81baca12011498713caea3cd2d9566d66793aa23457ec0da58a6066"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_scale_area_TestViolinPlotter.test_scale_area.None_7": {"doc_hash": "89e60f14b4d724caccb4e5e41d0d6c742e6ea5e8c4edd306cfa961b0577aa103"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_scale_width_TestViolinPlotter.test_scale_width.None_3": {"doc_hash": "184205dd0698774b4fb4622cb99f71e6eb00e3344c97bccc2e8fbcce16694842"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_scale_count_TestViolinPlotter.test_scale_count.None_5": {"doc_hash": "5d20d596020de2832b127475aece424b65539aed1205fa371e2c025cc0ab4539"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_bad_scale_TestViolinPlotter.test_kde_fit.assert_bw_2_data_st": {"doc_hash": "b1ff7e18fe214ebfe2360d4c2baaa14bd4b50a14c9f6e8f393652446ccc0d134"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_to_density_TestViolinPlotter.test_draw_to_density.None_23": {"doc_hash": "c94ac2eec17f2599e5c456eaa82028c3e2db5ca80dc81ee8626506f69a7bc988"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_single_observations_TestViolinPlotter.test_draw_single_observations.None_7": {"doc_hash": "415ba139efd2ba7ff8a3d67d9e74fbe8bfcbeae1349b51dfd069fa88c70de2c1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_box_lines_TestViolinPlotter.test_draw_box_lines.None_7": {"doc_hash": "1576fce1568f4c24731de6a3e4cda7be1b322b2d8925e9a85dedf4f7abe3a77c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_quartiles_TestViolinPlotter.test_draw_quartiles.for_val_line_in_zip_np_p.npt_assert_array_equal_y_": {"doc_hash": "4a2ad0b1d64d31f9e3318be463b9296f93d91ae3a00cd3c41d800ff20fbda375"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_points_TestViolinPlotter.test_draw_points.None_7": {"doc_hash": "d200388e23c5bed2f43069008b4f560aa19b02e222ae5859e594892bc63de1f4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_sticks_TestViolinPlotter.test_validate_inner.with_pytest_raises_ValueE.cat__ViolinPlotter_kws_": {"doc_hash": "e77dd7e9c4335a2a2a83aa80457a588b48b8a8c75810d6e169b2693e7acb032a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_violinplots_TestViolinPlotter.test_draw_violinplots.None_16": {"doc_hash": "814925484d58afa1451469fb2368cece234563712fc7660f44d2e346267b979e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_violinplots_no_observations_TestViolinPlotter.test_draw_violinplots_no_observations.None_5": {"doc_hash": "1deecc9e603401b56683eeee4982b2e2a8a37888b0fb9ea3618833f01f86a5ed"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_violinplots_single_observations_TestViolinPlotter.test_draw_violinplots_single_observations.None_7": {"doc_hash": "9686160f779c4e9c2e4e30331cfe0a0919f996dc1bffa05f9932937125549330"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_violinplots_TestViolinPlotter.test_split_one_each.assert_len_ax_lines_4": {"doc_hash": "acd686c792a8df3bb21860e5a8cdfd9835428de982e5375a40794161d1a23b99"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py___SharedAxesLevelTests.test_two_calls.assert_ax_get_xlim_": {"doc_hash": "74a01be6906457234b59eb6606b8458b080120719e64eb763459ff2e97415c14"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests_SharedScatterTests.test_color.if_Version_mpl___version_.assert_self_get_last_colo": {"doc_hash": "2686b6a306bb2c8321b32bddb76626f3f7791dfe70ef055929896e4736ae50ce"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_supplied_color_array_SharedScatterTests.test_supplied_color_array.assert_array_equal_ax_col": {"doc_hash": "16f5675046a2acf7b5bd212991e8201ba226531fa6ab3527b16ba3a871b1b1fd"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_wide_SharedScatterTests.test_wide.for_i_label_in_enumerate.for_point_color_in_points.assert_tuple_point_color_": {"doc_hash": "5168f869fb484d2ed68d8c43919444ff844341d427b2b008949ecc1b36d55e0b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_flat_SharedScatterTests.test_flat.assert_array_equal_pos_va": {"doc_hash": "7255d370fcfa55a15a3e0fb5cd74c838c73bbff3a99ed2b4f835328b0fc613ed"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_positions_SharedScatterTests.test_positions.for_i_label_in_enumerate.assert_cat_axis_get_major": {"doc_hash": "7feec69ded70472f77e16a19db68ee0b3c4880145c1a199c1dc359cb048cb755"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_positions_dodged_SharedScatterTests.test_positions_dodged.for_i_cat_val_in_enumera.for_j_hue_val_in_enumera.assert_0_np_ptp_cat_po": {"doc_hash": "827d256ef57fe3f3c79103d592b7968ee3ba89fc022d2290659da72109a896aa"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_positions_unfixed_SharedScatterTests.test_positions_unfixed.for_i_cat_level_cat_da.assert_array_equal_cat_po": {"doc_hash": "168d0cccf429d097135d3f181ad2b3b9692b4fbce5c5b38dfe6bbda09d55138b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_order_SharedScatterTests.test_order.for_i_points_in_enumerat.if_x_type_cat_in_x_.else_.assert_not_positions_size": {"doc_hash": "d6d5ba15d992fc7e4082c3d8d5c5831e41c5c0ca31f575e4b2272e2899629c7c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_hue_categorical_SharedScatterTests.test_hue_categorical.for_i_level_in_enumerate.for_hue_color_in_zip_poi.assert_tuple_color_to": {"doc_hash": "817e08706b3aef399cc1d84363e06cc19be4c42aaec76a25bb863d64bb1cee64"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_hue_dodged_SharedScatterTests.test_hue_dodged.while_colors_.if_points_get_offsets_a.assert_face_color_expe": {"doc_hash": "2d9eadd200755fb09755a07920169460d4bd43161a9af1ff14fc78b7c71f88f9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_single_SharedScatterTests.test_single.assert_not_ticklabels_0_": {"doc_hash": "397adfa5ad0f0e4a25fae441dee6fab5cbcfaaefe4f741d0cc10cfbeb245c63c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_attributes_SharedScatterTests.test_legend_disabled.assert_ax_legend__is_None": {"doc_hash": "46d8a71611d6e1dce4c213ffbf6c11a76056fbcd34013e96bee9ce7c2095a39e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_palette_from_color_deprecation_SharedScatterTests.test_palette_with_hue_deprecation.for_strip_color_in_zip_s.assert_same_color_strip_g": {"doc_hash": "f970a3c72bf030cf462756ca2a4b692d1ce7e19d4812ae8190659b5ba7cc3449"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_log_scale_SharedScatterTests.test_log_scale.assert_np_ptp_np_log10_ca": {"doc_hash": "1fe2bfbb6bcb5c6e3ba10efbdea4990cffb5e942d5106fc4f7733f43bdcf1c66"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_vs_catplot_SharedScatterTests.test_vs_catplot.assert_plots_equal_ax_g_": {"doc_hash": "8f89ecd864054f5fc07cda1dad791d334b2c6689971a034383a94bf3b2e19cdc"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestStripPlot_TestStripPlot.test_jitter_unfixed.assert_p2_std_p1_std_": {"doc_hash": "eb67c1a6ccbb2501d93cc9ec9c75ecf32fe79219722f280643fd0bb3aafb9974"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_draw_vertical_bars_TestBarPlotter.test_draw_vertical_bars.for_bar_pos_stat_in_zip.assert_bar_get_height_": {"doc_hash": "f2b761c6c1e22db90816653c1fcf445f78aa0f6ce20b7b24f2ec78e194413b6b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_draw_horizontal_bars_TestBarPlotter.test_draw_horizontal_bars.for_bar_pos_stat_in_zip.assert_bar_get_width_": {"doc_hash": "290cc891df6ee5f0f1e5503ea45eacb351db38b6c646bea7352f80b68c1051fa"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_draw_nested_vertical_bars_TestBarPlotter.test_draw_nested_vertical_bars.for_bar_stat_in_zip_ax_p.assert_bar_get_height_": {"doc_hash": "44e0ca7dadffb1784c7afea2341bb99688792226ccc0d6592d0c99b6644e2c72"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_draw_nested_horizontal_bars_TestBarPlotter.test_draw_nested_horizontal_bars.for_bar_stat_in_zip_ax_p.assert_bar_get_width_": {"doc_hash": "802639c26db58effd850e0d9389ced48b60fe47769d8957ee3ca640746bcd9d7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_draw_missing_bars_TestBarPlotter.test_draw_missing_bars.None_5": {"doc_hash": "e16eef6871313eacabdc02133f158b8c9206704a73141eebcf9c34b5723e649b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_unaligned_index_TestBarPlotter.test_unaligned_index.None_3.assert_approx_p1_get_widt": {"doc_hash": "372dba256e310413cdd67b728106f1d7b547bcd345d4ae2ba1a17fe7c858c1f0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_barplot_colors_TestBarPlotter.test_barplot_colors.None_8": {"doc_hash": "f98a87c212bfc50c820f5cfe3003428ce8c1e9a71e00c650fd02bebc59006072"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_simple_barplots_TestBarPlotter.test_simple_barplots.None_3": {"doc_hash": "3fe32244c36516c3f14f3881a0e0e6266516a59e56bb607a1fa4427309b41609"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter_TestPointPlotter.test_different_defualt_colors.npt_assert_array_equal_p_": {"doc_hash": "e2b0ea14529cfcd68401dd1334da84c21b7328927d3c525b66fd250629a791d8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_hue_offsets_TestPointPlotter.test_hue_offsets.None_7": {"doc_hash": "7f46dc5c7c6aa1c1b02cd2068dd43cac15c1ac603684773f5d0b73563fa2d5c1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_draw_vertical_points_TestPointPlotter.test_draw_vertical_points.for_got_color_want_color.npt_assert_array_equal_go": {"doc_hash": "9abc9057cbdbdf8fe1a1189bc9a5ececa6cf3dd0e60eff227510d5c6dfe1933e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_draw_horizontal_points_TestPointPlotter.test_draw_horizontal_points.for_got_color_want_color.npt_assert_array_equal_go": {"doc_hash": "dda46c0de0d06d0ad2d7f1622d3df08bd078baba5f6e44a41fbface176d24ad1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_draw_vertical_nested_points_TestPointPlotter.test_draw_vertical_nested_points.for_points_numbers_colo.for_got_color_in_points_g.npt_assert_array_equal_go": {"doc_hash": "1caaf51ba061e0db0cda8c733168e51782dff3530e46cbe069c63b7766e0e4ab"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_draw_horizontal_nested_points_TestPointPlotter.test_draw_horizontal_nested_points.for_points_numbers_colo.for_got_color_in_points_g.npt_assert_array_equal_go": {"doc_hash": "d8adac78b63bcd95b090eb42067d17d25c41e0201b3bff5eb8efead94cbd6d60"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_draw_missing_points_TestPointPlotter.test_draw_missing_points.None_3": {"doc_hash": "59d7ce7b2561aeababc737181d2fe20f23508330ca985abc48eaecfdbeac8dea"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_unaligned_index_TestPointPlotter.test_unaligned_index.None_3.assert_approx_p1_get_offs": {"doc_hash": "1a0bf54a94b61f711799cde96c45d02f0d5db5b8330ea6467fad9d6a31e426fd"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_pointplot_colors_TestPointPlotter.test_pointplot_colors.None_8": {"doc_hash": "6192cf6da0ff4c8ec46823ede842af3504361dff2d0354ce2874ee2fd7ecb006"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_simple_pointplots_TestPointPlotter.test_simple_pointplots.None_3": {"doc_hash": "325665742bcc88579e85c15e136af23b1fb2e175011f913569e19dd08b004f2f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCountPlot_TestCountPlot.test_input_error.with_pytest_raises_ValueE.cat_countplot_x_g_y_h": {"doc_hash": "b157facb22e33569dd84e6aed1ff1baf43018b36c3310cbe5a38d5b2f696ca23"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCatPlot_TestCatPlot.test_facet_organization.None_3": {"doc_hash": "9a436e0e8ac298491cbf1c1f7feb7d14bdbab0ab51d48db7b15134de05f4aa57"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCatPlot.test_plot_elements_TestCatPlot.test_plot_elements.None_18": {"doc_hash": "1c6feb54da3082d541fdfae2ca37a9602137f2abd188dda83dadb94bde2e159e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCatPlot.test_bad_plot_kind_error_TestCatPlot.test_plot_colors.None_5": {"doc_hash": "0bf53a8a5a91895daf2e29f35d7ced11d857f59c97f94a6d49b1ce4374450c3b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCatPlot.test_array_faceter_TestCatPlot.test_array_faceter.for_ax1_ax2_in_zip_g1_ax.assert_plots_equal_ax1_a": {"doc_hash": "e5680e1573e4e4301490b19a54df9b6677deb312080c06397695640fd2ca85e5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter_TestBoxenPlotter.edge_calc.return.np_percentile_data_q_": {"doc_hash": "46265a17a2539b7b8202ce2923db84df1e2394bb574f21275c401c3af383f31b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_box_ends_finite_TestBoxenPlotter.test_box_ends_finite.assert_np_sum_list_k_f_": {"doc_hash": "a6813967a12baba7f14b21e8f797991094aaba2de9a2f40ebf04a28b29facee5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_box_ends_correct_tukey_TestBoxenPlotter.test_box_ends_correct_tukey.assert_expected_k_calc": {"doc_hash": "c4c67b7b06cd113c26cf0c1768d99c348d91dbd094eb934f211f5cf1e8f05cbe"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_box_ends_correct_proportion_TestBoxenPlotter.test_box_ends_correct_proportion.assert_expected_k_calc": {"doc_hash": "eb50ae0b6f75d62195524e28441f217f93bac6b67383a1f31096c8f4d74e2f96"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_box_ends_correct_trustworthy_TestBoxenPlotter.test_box_ends_correct_trustworthy.assert_exp_k_calc_k": {"doc_hash": "5845cc8b1091c21fe60eae177ac05e6e9f3c08f3570536bd85293be62566e7a4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_outliers_TestBoxenPlotter.test_outliers.npt_assert_equal_out_calc": {"doc_hash": "8c80dd189a501a98704180fe6f91095f62011bb7a47c4a54fb81b79c98b23a75"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_showfliers_TestBoxenPlotter.test_showfliers.None_1": {"doc_hash": "2c79444a3461f17814478aa1c9c748d4de03bfa8fbc21ab764106487dbeb33ab"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_invalid_depths_TestBoxenPlotter.test_invalid_depths.for_alpha_in_13_37_.with_pytest_raises_ValueE.cat__LVPlotter_kws_": {"doc_hash": "3528d6614d6766ec6f847d87f5218f8074a821bacf7c300ce6fc7fb728299f16"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_valid_depths_TestBoxenPlotter.test_valid_scales.for_scale_in_valid_scales.if_scale_not_in_valid_sca.else_.cat__LVPlotter_kws_": {"doc_hash": "fe47c6a7f34fe7b5ea58b09f2eb7f38c9cba329432b00e7dfb71f0864e6d64ed"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_hue_offsets_TestBoxenPlotter.test_hue_offsets.npt_assert_array_almost_e": {"doc_hash": "12acfb3740aaf8d69cff07677838d61731db59f64b01b8d0c1db0fc4f02a8f32"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_draw_missing_boxes_TestBoxenPlotter.test_unaligned_index.None_1.assert_np_array_equal_l1_": {"doc_hash": "8b9097fed3e9794f20613ffe6bcd1f7431f5b219070778489144725c070df394"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_missing_data_TestBoxenPlotter.test_missing_data.None_1": {"doc_hash": "c129e0e99879a25b1dc5bd7fe3b7509a822b7914da7f283544093398e2b848f6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_boxenplots_TestBoxenPlotter.test_boxenplots.None_19": {"doc_hash": "9ded964ad2fa4bdce443351dcf3c047c6cee5320e6f54bd1b779ac6fb1ac74b6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_axes_annotation_TestBoxenPlotter.test_axes_annotation.None_9": {"doc_hash": "606a40c5aec96c03158ef1aa973f8876ed0bcecc8c78c2891c8bd71e49d54393"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_legend_titlesize_TestBoxenPlotter.test_legend_titlesize.plt_close_all_": {"doc_hash": "bdd8a3bd1e96ebeba7f7fea29958a4f8348255517511a95aba556cb15b42d378"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_Float64_input_TestBoxenPlotter.test_Float64_input.plt_close_all_": {"doc_hash": "3cfa06eb9fb43015b7a47149288b0170812e684d2156ef7666234e149a5b8bce"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBeeswarm_TestBeeswarm.test_position_candidates.assert_array_equal_": {"doc_hash": "a90f8e2f3acf6a389b35b566635fb942eb5c302f0c1cfb8170f0c0e06bad9412"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBeeswarm.test_find_first_non_overlapping_candidate_TestBeeswarm.test_beeswarm.assert_array_equal_y_swa": {"doc_hash": "b0aeae2c0555a37741962ca413bb643ac977b393af3e90f0f442e55a6b81ac08"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBeeswarm.test_add_gutters_": {"doc_hash": "c05af41a755a58a4d9b3c5f9a35eaf4bbbeca000bab1b0164a9a71e151f501e3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_itertools_try_.except_ImportError_.PD_NA.None": {"doc_hash": "0ed0f3192dc441b7e75caf5b3f844964189cabb559b7668d6f8fba923d88ec84"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_long_variables_TestSemanticMapping.test_call_lookup.for_key_val_in_lookup_ta.assert_m_key_val": {"doc_hash": "9be3f5a8d9cbd5ddc80e9333d2fb9dd4fcc1e13a35b23bbda2490035a83ff0d2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestHueMapping_TestHueMapping.test_plotter_default_init.None_3": {"doc_hash": "937656bbe12ff32e4e677bbfe6d6c16fabd6c692557e7dbdbf388e9985b70b33"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestHueMapping.test_plotter_reinit_TestHueMapping.test_hue_map_null.assert_m_lookup_table_is_": {"doc_hash": "78b77dcdf6ecb8f6ae95e90c1d54898d532c0fd09b3b114130cfd5a40557ac26"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestHueMapping.test_hue_map_categorical_TestHueMapping.test_hue_map_categorical._Test_explicit_categorie": {"doc_hash": "a94aaaf6f3c9b96ebeb474ba56630f70838e5e2745b295633c7b9ffdf411e624"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestHueMapping.test_hue_map_categorical.p_33_TestHueMapping.test_hue_map_categorical.None_26": {"doc_hash": "e1c0e475a43fd71f066f898bc72829dba6cea5404ec91a6e7dd01dc39a018332"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestHueMapping.test_hue_map_numeric_TestHueMapping.test_hue_map_without_hue_dataa.with_pytest_warns_UserWar.HueMapping_p_palette_vi": {"doc_hash": "395d3714d33224755983969627382d549bae8c6aa5e1299bd280b4d5be3e0e8a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestSizeMapping_TestSizeMapping.test_init_from_map.assert_max_p__size_map_lo": {"doc_hash": "285e8767604ed8235cecf93c7fc6b8b8c3a3e6f4e46246526acf3f1ccdb0cd9d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestSizeMapping.test_plotter_default_init_TestSizeMapping.test_plotter_default_init.None_3": {"doc_hash": "1d5e9e0caf578befa0bb6937a22e0c561b14051bc56bc5fc5cdc74fb2f219296"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestSizeMapping.test_plotter_reinit_TestSizeMapping.test_size_map_null.assert_m_lookup_table_is_": {"doc_hash": "ba7c7446716061f14fe20c15fbd40a98530738655c15c941fcd7314b0df66bf8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestSizeMapping.test_map_size_numeric_TestSizeMapping.test_map_size_numeric.None_4.SizeMapping_p_norm_bad_": {"doc_hash": "f1f1b48e0ae572144666b89fc4f453719e475faae483bbffd9aefcbf986e80ed"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestSizeMapping.test_map_size_categorical_TestSizeMapping.test_map_size_categorical.None_2.SizeMapping_p_sizes_bad": {"doc_hash": "9a2d7e145db5f30187886d64d49ea77150c1024592a923310a81d71f3edeafa2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestStyleMapping_TestStyleMapping.test_plotter_default_init.None_1": {"doc_hash": "e60d2d0dd8a6695f64a16d4f9d8488fd3c7e749844d8640081f5c0f0f9b74d8d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestStyleMapping.test_plotter_reinit_TestStyleMapping.test_style_map_null.assert_m_lookup_table_is_": {"doc_hash": "d01ad47c6813b7df1ba1f651da65150bf4d2738eb308b3dc596923c7a6f36934"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestStyleMapping.test_map_style_TestStyleMapping.test_map_style.None_8.StyleMapping_p_markers_m": {"doc_hash": "10031d619b31750402c84ee7cca30a70e5e1b045a21033085dc338453035a9dd"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter_TestVectorPlotter.test_flat_variables.assert_p_variables_y_": {"doc_hash": "15b20269cc12074275f9498ac69e8269773c813f784bfd464cf993c69f5e0e19"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_long_df_TestVectorPlotter.test_long_dict.for_key_val_in_long_vari.assert_array_equal_p_plot": {"doc_hash": "a1ec364a7f8d585961563d94fa90e08841f50e21be9a8fb742f1adf614b7d52d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_long_vectors_TestVectorPlotter.test_long_vectors.for_key_val_in_long_vari.assert_array_equal_p_plot": {"doc_hash": "16fabf205b31da609a27922a5c8a5fd8dfc4d17267f3b7d0e618d1443a7c110a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_long_undefined_variables_TestVectorPlotter.test_long_undefined_variables.None_2.p_assign_variables_": {"doc_hash": "32da94ef1527b15b9657e40da9ff2ad4e729dc16297ebd746d25af820e64b10f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_empty_data_input_TestVectorPlotter.test_wide_categorical_columns.assert_array_equal_p_plot": {"doc_hash": "456ab88f316026b161306270530079f1a44664bc4906d2bb92a0080d0db0cc6d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_iter_data_quantitites_TestVectorPlotter.test_iter_data_quantitites.None_8": {"doc_hash": "d1714546e0bcea118fd0af0e249501fc26ac3b92ebedbdf57d3b7e584008c1a6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_iter_data_keys_TestVectorPlotter.test_iter_data_keys.None_5.assert_sub_vars_col_in": {"doc_hash": "69c86e7dae0ee944091576039ee95dd3778b29eef3980a64f4598ec32325ceac"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_iter_data_values_TestVectorPlotter.test_iter_data_values.None_1.assert_frame_equal_sub_da": {"doc_hash": "f25e7d14fbea008917e3dc48f98d6deae00df7e72625e6ee123c3227e457793f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_iter_data_reverse_TestVectorPlotter.test_iter_data_dropna.assert_some_missing": {"doc_hash": "86538327135fba7711064ed470e0cd6980467f68d11549d1c192b1fc980160a5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_axis_labels_TestVectorPlotter.test_axis_labels.assert_not_ax2_yaxis_labe": {"doc_hash": "c9f5b2c802ca5e9c8a7573474c7bb83c0d2b2989e268e522b15d177a23a0b71a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_attach_basics_TestVectorPlotter.test_attach_disallowed.None_3.p__attach_ax_allowed_typ": {"doc_hash": "fed04689a55ed06bd3aca8e34d6781d7a940f7d21c9a4774483d4e0e5f07491d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_attach_log_scale_TestVectorPlotter.test_attach_log_scale.None_29": {"doc_hash": "cb8c0b8bcda107b94ca3a46e36361064ba8f04347cb5ac5b13d0b5fa4167d6d4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_attach_converters_TestVectorPlotter.test_attach_facets.assert_p_facets_g": {"doc_hash": "8164cc5c9762d34832e6483d0061157d40f8bf7553c8eddfab9a03c322f2fd28"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_attach_shared_axes_TestVectorPlotter.test_attach_shared_axes.None_18": {"doc_hash": "1dd80533f6153abb10bb9e5f53bbf6c9ba1bcf86a06959654e49ef2b6475c1f1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_get_axes_single_TestVectorPlotter.test_get_axes_facets.assert_p__get_axes_row_": {"doc_hash": "c139144844e635359a925b16a0a6406b78a8f2e4f4ed3876d16201d2283b999a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_comp_data_TestVectorPlotter.test_comp_data.None_4": {"doc_hash": "0bda0ed392c72b6e3cc2c8533cd271e2122e24ff06f6d0d60401e714fdb330fc"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_comp_data_log_TestVectorPlotter.test_comp_data_category_order.assert_array_equal_": {"doc_hash": "5daafa88349ffe25713afadbea1a24c20c63c32405d66b5bf78d0e79ce7a832e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.comp_data_missing_fixture_TestVectorPlotter.comp_data_missing_fixture.return.orig_data_comp_data": {"doc_hash": "bb980df5deef4e7ca09f8a3593b0a786052c52bd754eedb6edaaf860d7842df4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_comp_data_missing_TestVectorPlotter.test_scale_datetime.with_pytest_raises_NotImp.p_scale_datetime_x_": {"doc_hash": "e418bf9cf91616e869a48be1ac5ef050d1f27ec1527ce055582e80504a9083c6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_scale_categorical_TestVectorPlotter.test_scale_categorical.assert_all_s_endswith_": {"doc_hash": "86f5b272e7c84dd7d257d7c8d2eaa99de5e2c2490f67f6444751a2abe8e24d09"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestCoreFunc_TestCoreFunc.test_unique_markers.for_m_in_markers_.assert_mpl_markers_Marker": {"doc_hash": "4eeded98b7ec050b8984ae5316fca18e721c6eb3f6218fc1aa119783bdb1bffa"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestCoreFunc.test_variable_type_TestCoreFunc.test_variable_type.None_17": {"doc_hash": "dc75676e8a406e4c16c3b22b47616975f889a0f7e3963c88f9514a46f1937944"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestCoreFunc.test_infer_orient_TestCoreFunc.test_infer_orient.with_pytest_raises_ValueE.infer_orient_cats_nums_": {"doc_hash": "179cb9af68c4f6180769648b8330842a7a387d51b1d6864ae50d3c0d33bc3f02"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestCoreFunc.test_categorical_order_": {"doc_hash": "0921577378cb0b499125c8f15eba7b781aec8e301caf9fcdf2df88a3d9bf99ba"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_decorators.py_inspect_": {"doc_hash": "65ff391cb2d0648fbac2788400a687076ca6d694f0fbc3512ad17db91d72d77e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_itertools_get_contour_color.if_isinstance_c_mpl_coll.elif_isinstance_c_mpl_co.if_c_get_facecolor_size.else_.return.c_get_edgecolor_": {"doc_hash": "5187b0f3078f2965d071b476ac98f2ab247f37fdbcaf63b5e8eec646ac198c78"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDistPlot_TestDistPlot.test_hist_bins.for_edge_bar_in_zip_n_ed.assert_pytest_approx_edge": {"doc_hash": "4c775877c33789449df8a75a8b09dde4261f922a37458c153e0a6c39942fcc47"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDistPlot.test_elements_TestDistPlot.test_elements.with_pytest_warns_UserWar.None_11": {"doc_hash": "c4a9bd2e75b18f1c3a42a77002410d82108bc7deea2035e19977b7075de14e78"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDistPlot.test_distplot_with_nans_TestDistPlot.test_distplot_with_nans.for_bar1_bar2_in_zip_ax1.assert_bar1_get_height_": {"doc_hash": "f9cdb2de8556072f1f73c6ee537600d99103a0b7bab217111d0f911442eaf0d2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_SharedAxesLevelTests_SharedAxesLevelTests.test_color.None_6": {"doc_hash": "4d0914dfe2c0ec0a4bce1eee680b3c6925f06c3260508d41da57c3834737ff2f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestRugPlot_TestRugPlot.test_long_data.for_a_b_in_itertools_pro.self_assert_rug_equal_a_": {"doc_hash": "67e465865ca7a260c268d89a41db45977deb86cc09dd4901d6e173814502c9e7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestRugPlot.test_bivariate_data_TestRugPlot.test_bivariate_data.None_4": {"doc_hash": "3d5f6767c7c6c6833f38e7fe292e05002576f9fe05dfc447ce5d13c8904cb4e7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestRugPlot.test_wide_vs_long_data_TestRugPlot.test_wide_vs_long_data.assert_array_equal_wide_s": {"doc_hash": "ab57618ccad6aae41fff5df67cbaca6ab98fd480cb26c81c7637ae0ff12b1ecb"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestRugPlot.test_flat_vector_TestRugPlot.test_rug_colors.assert_array_equal_ax_col": {"doc_hash": "7c5bca6b5e5edcccd824ec21412651a4cce45afa49fba0e561e3d23108b80689"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestRugPlot.test_expand_margins_TestRugPlot.test_expand_margins.assert_y1_height_2_": {"doc_hash": "aa69ee21942a2aa132e3f1ed6616537f46e4f9327f76fb7dcc69841916a29536"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate_TestKDEPlotUnivariate.test_color.if_fill_.None_3": {"doc_hash": "60a7e06403db6dac5f76862bbeb982a0f9ac8a627b487b1a5391c00338fcdb2e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_long_vectors_TestKDEPlotUnivariate.test_long_vectors.None_2.assert_array_equal_a_b_": {"doc_hash": "bbef826924feaec76fc0c4abcc597c5814207ca1c886263250ef7f2ccfa357a4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_hue_colors_TestKDEPlotUnivariate.test_hue_colors.for_line_fill_color_in_.assert_colors_equal_fill_": {"doc_hash": "ac5fc09899acec493c85a3b24f3e442f2b9fea96e8ef9aae190503971b940c6b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_hue_stacking_TestKDEPlotUnivariate.test_hue_stacking.assert_array_equal_layere": {"doc_hash": "f723cf20fcf200b07eb09ecb70a6fb4d9c4669fd7a02def7f87f61f614735638"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_hue_filling_TestKDEPlotUnivariate.test_hue_filling.assert_array_almost_equal": {"doc_hash": "5200afc688e89643f9ca25d8bd5f1afdd12ed000f55774f704cdcf96af06fd7d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_fill_default_TestKDEPlotUnivariate.test_fill_nondefault.assert_len_ax2_collection": {"doc_hash": "640491276d889681e28aa1b1b819d07786ce39bfefe7a2024c823cfc54c4b10e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_color_cycle_interaction_TestKDEPlotUnivariate.test_color_cycle_interaction.None_14": {"doc_hash": "fd8e1563c56238f27e7c1b3d75b9e8b8309c8058bf8ceac8ed353dfd9c8c8301"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_artist_color_TestKDEPlotUnivariate.test_artist_color.None_3": {"doc_hash": "86c57f58555afbf657444cff56ab86c63015476962586078c3c8d7cc588e0eee"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_datetime_scale_TestKDEPlotUnivariate.test_multiple_argument_check.with_pytest_raises_ValueE.kdeplot_data_long_df_x_": {"doc_hash": "ee773f3740484c7f93599c084a9ce507ecd2612032816ee58744f874024d8319"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_cut_TestKDEPlotUnivariate.test_cut.assert_len_xdata_0_le": {"doc_hash": "08b6d679d3932d9008a18e9b1067834d46030803f2154f49ba029a572e732489"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_clip_TestKDEPlotUnivariate.test_cumulative_requires_scipy.with_pytest_raises_Runtim.kdeplot_data_long_df_x_": {"doc_hash": "45a6f51237771cc3d4b0a4fef8a35aea2ca2c74931e61ac254062a22e7dc9a90"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_common_norm_TestKDEPlotUnivariate.test_common_norm.for_line_in_ax2_lines_.assert_integrate_ydata_x": {"doc_hash": "766afbf8a6bb47f7d8d0650131e117027291edf9b3a8a8f708d16fd8e61e09f5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_common_grid_TestKDEPlotUnivariate.test_common_grid.for_line_in_ax2_lines_.assert_xdata_max_lon": {"doc_hash": "7e9f5205919a5ea0804339d824114faa0ea6b562520312cbd6e403086759caa9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_bw_method_TestKDEPlotUnivariate.test_bw_method.None_3": {"doc_hash": "3788c2c685d97a9385a8578459afeda189107aed40e7de435b3d92a779030c75"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_bw_adjust_TestKDEPlotUnivariate.test_bw_adjust.None_3": {"doc_hash": "e1a6d9b5be0773c2afc97a014922686bae363fff7932c6690434d01f35d74151"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_log_scale_implicit_TestKDEPlotUnivariate.test_log_scale_implicit.assert_array_equal_ax_lin": {"doc_hash": "a69db83d537a09eba74cc76c1350747f86efe432e93ce313ffc541ed9a7c28ce"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_log_scale_explicit_TestKDEPlotUnivariate.test_log_scale_explicit.assert_ax_get_yscale_": {"doc_hash": "06ab16c5bac5ed387d17f85deb6be563e3c482a94d0d02cd93ca091ada1be81d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_log_scale_with_hue_TestKDEPlotUnivariate.test_weights.assert_y1_pytest_appro": {"doc_hash": "1d809bdc8a8c53533fc93b5047f9a64e9ecc84bb40f52f81ef3e225bd6820294"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_weight_norm_TestKDEPlotUnivariate.test_weight_norm.assert_integrate_y1_x1_": {"doc_hash": "70e506c0c0df1cf87afc11f798b34c4bf1ee41a81d4c6e863e9be3cf868bc379"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_sticky_edges_TestKDEPlotUnivariate.test_sticky_edges.assert_ax2_collections_0_": {"doc_hash": "c84433f5574e029e9f78a9ea43aace7ea687adfdf1b8866b593b2b974f23eaaf"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_line_kws_TestKDEPlotUnivariate.test_axis_labels.assert_ax2_get_ylabel_": {"doc_hash": "8267f0efe80d48be31b299f43aa3c388a55243d15a462aed2c42677d584606b4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_legend_TestKDEPlotUnivariate.test_legend.assert_ax_legend__is_None": {"doc_hash": "6b978c2b65d391d17d16149b646f33d956684e6fdc6f3cdbba4707478d540756"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate_TestKDEPlotBivariate.test_long_vectors.for_x_y_in_zip_x_values_.for_c1_c2_in_zip_ax1_col.assert_array_equal_c1_get": {"doc_hash": "457dc7c58ddea340e564e0dbce5e215b5ea4b1c6f517d53fd2232f07f1c8d5e3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_singular_data_TestKDEPlotBivariate.test_fill_artists.for_fill_in_True_False_.for_c_in_ax_collections_.if_fill_or_Version_mpl___.else_.assert_isinstance_c_mpl_": {"doc_hash": "5b79e2b2f4a84c4114a7b3b1cf77b98fcd2af263a8844c8875b95debaf661ab5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_common_norm_TestKDEPlotBivariate.test_common_norm.assert_n_seg_2_n_seg_1": {"doc_hash": "6dc2d6f60fcf7aee14077a732e4b85bda824ff342250dec9d57fedf1422f01e4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_log_scale_TestKDEPlotBivariate.test_log_scale.for_c1_c2_in_zip_ax1_col.assert_array_equal_get_co": {"doc_hash": "0c56e172efa21547538dc92d1ce3ecbc3e95568f48b39e8f30c68261a7f62700"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_bandwidth_TestKDEPlotBivariate.test_bandwidth.for_c1_c2_in_zip_ax1_col.if_seg1_seg2_.assert_np_abs_x2_max_": {"doc_hash": "c2dbbed42596efe011929d213f75a5c0c551cb75fdbcbb613ed435889fcf71ff"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_weights_TestKDEPlotBivariate.test_weights.for_c1_c2_in_zip_ax1_col.if_get_contour_coords_c1_.assert_not_np_array_equal": {"doc_hash": "0139e02fff68638e7243ed12722848daebafaf6fdd2647c65b0e7b10d7af9136"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_hue_ignores_cmap_TestKDEPlotBivariate.test_contour_line_colors.for_c_in_ax_collections_.assert_colors_equal_get_c": {"doc_hash": "4eb8d73ac3c3916daf31eef81c8c2183a934686624a1c6d35d4c9fae5941ae66"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_contour_fill_colors_TestKDEPlotBivariate.test_colorbar.assert_len_ax_figure_axes": {"doc_hash": "6b6276265bdaf918a9b3aba298d3d65c103bac7ca3369dc0014d4852ed320755"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_levels_and_thresh_TestKDEPlotBivariate.test_levels_and_thresh.None_3.assert_array_equal_c1_get": {"doc_hash": "25e37ac8882e31750224d633aaf92c3e3d4d4604809c563f9e5c1d93ac09b34a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_quantile_to_level_TestKDEPlotBivariate.test_input_checking.with_pytest_raises_TypeEr.kdeplot_data_long_df_x_": {"doc_hash": "dd3d2989bea8cc849621e3369ed01163ddc2f7d48af96d0285f4dec7b0a4c599"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate_TestHistPlotUnivariate.test_color.super_test_color_long_d": {"doc_hash": "2820db4f9e465092ab12af4131e7bfad0a7337d4c7a43de6104c4a4c4f99f46f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_long_vectors_TestHistPlotUnivariate.test_long_vectors.for_a_bars_b_bars_in_ite.for_a_b_in_zip_a_bars_b.None_1": {"doc_hash": "80b30d8bd1a69664dbb9621824053511f1a51f1c4fe0bacf8104511a77328a45"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_wide_vs_long_data_TestHistPlotUnivariate.test_wide_vs_long_data.for_a_b_in_zip_ax1_patch.assert_a_get_xy_b_ge": {"doc_hash": "dc457a7171c08bade5408d3fd618010c98ac68d6d38716b684b541af8b4d11dd"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_flat_vector_TestHistPlotUnivariate.test_variable_assignment.for_a_b_in_zip_ax1_patch.assert_a_get_height_": {"doc_hash": "cd69a410c81ac89ee638e321b9fa88ea7709b0c0225d68e545e087f82ecfdae8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_hue_fill_colors_TestHistPlotUnivariate.test_hue_fill_colors.for_poly_color_in_zip_ax.assert_colors_equal_poly_": {"doc_hash": "3e1f68f7efdb2f089cb2b3441cbf79f5066ff848f848489540e621fc666f9b91"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_hue_stack_TestHistPlotUnivariate.test_hue_stack.assert_array_equal_": {"doc_hash": "b93eaa78beb914a4e11c4262c4344b89ea18ce0d08af0dc0dbad0413ea0a25c5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_hue_fill_TestHistPlotUnivariate.test_hue_fill.None_3": {"doc_hash": "f29a1b9a454da913e67efb4d5465a3e3e8316607e4bb89d1dc96904f5aa52806"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_hue_dodge_TestHistPlotUnivariate.test_hue_dodge.None_4": {"doc_hash": "591b6bacc092f01587d5156979c8d2e6c1e8aee812ad6ec74b71347a5c1da1d4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_hue_as_numpy_dodged_TestHistPlotUnivariate.test_density_stat_common_norm.assert_np_multiply_bar_he": {"doc_hash": "62aac02b4bfbb75c01d8b96c6a7f350a4ccffa2b9e821a8146ed6c5a4d39fc46"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_density_stat_unique_norm_TestHistPlotUnivariate.test_density_stat_unique_norm.for_bars_in_bar_groups_.assert_bar_areas_sum_": {"doc_hash": "5b277fc8109ef42497be8a5efb5f048ae6ea974923d59c4d4061b19a449b954b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.height_norm_arg_TestHistPlotUnivariate.test_probability_stat_common_norm.assert_sum_bar_heights_": {"doc_hash": "2552a5f856b464321448b94add18de553b1dbe9f11efcb49d033606dc12564c5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_probability_stat_unique_norm_TestHistPlotUnivariate.test_probability_stat_unique_norm.for_bars_in_bar_groups_.assert_sum_bar_heights_": {"doc_hash": "88ed8fcb55af2d5f007775b2645e09216c87a8de20b41475b8b06d272c3d7f9d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_percent_stat_TestHistPlotUnivariate.test_common_bins.assert_array_equal_": {"doc_hash": "27cbd8de4eb4027c3b05554d84f3ed27afe3d8597ccab4619d4cd200bca601ba"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_unique_bins_TestHistPlotUnivariate.test_weights_with_missing.assert_sum_bar_heights_": {"doc_hash": "b1cdd31a71dadd2d82dbd20a7742eda011bee3fbc62b387f82bfaed9ecb38051"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_weight_norm_TestHistPlotUnivariate.test_weight_norm.assert_sum_y1_2_sum": {"doc_hash": "c00d5477f0bc5a9ec71273ed6020a31c4ce54d57f08c2cea9c7c7a4424c74c0e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_datetime_scale_TestHistPlotUnivariate.test_datetime_scale.assert_ax1_get_xlim_": {"doc_hash": "68e52e4e637115bf441f04bf4ccdbbb1c0dcdd243ae6f6c2d64c39015c990d95"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_kde_TestHistPlotUnivariate.test_kde.assert_kde_area_pytest": {"doc_hash": "d77287cf97fc1379c19d593c0633469ad4a375d3170311deb9e9a5631145a780"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_kde_with_hue_TestHistPlotUnivariate.test_kde_with_hue.for_i_bars_in_enumerate_.if_multiple_layer_.elif_multiple_dodge_.assert_kde_area_pytest": {"doc_hash": "71849ec160f88275ba82d561699484f51f8d1caaf5d808a05da5865083464f4e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_kde_default_cut_TestHistPlotUnivariate.test_kde_singular_data.None_3": {"doc_hash": "8c5f886a5714fe259cf6fc8f5e30b42deabaf61f533c21aeaef7f8fb23cc0ee7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_element_default_TestHistPlotUnivariate.test_bars_no_fill.for_bar_in_ax_patches_.assert_bar_get_edgecolor_": {"doc_hash": "ee5ea40c2ca95751bbdef446bd06fbdbe0f821e576148390658fb4ce87773960"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_step_fill_TestHistPlotUnivariate.test_step_fill.assert_y_n_2_bar_he": {"doc_hash": "36517da2a2857f69e7fdc8405f260e6bd805c1c3be67231738b491e75aa9c363"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_poly_fill_TestHistPlotUnivariate.test_poly_fill.assert_array_equal_y_1_n_": {"doc_hash": "531ae6808eef55a53a92ccb9539f2910c140246e72773cac46630c14f888a2a4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_poly_no_fill_TestHistPlotUnivariate.test_poly_no_fill.assert_array_equal_y_bar": {"doc_hash": "80d6b86d38608fbb831d8dc0acd6621a9e70d09e8ba032c9d6b06fee62a402ef"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_step_no_fill_TestHistPlotUnivariate.test_step_no_fill.assert_y_1_y_2_": {"doc_hash": "87cba5cd6f623af031da91c19f5938886634c35e31266968c63c4e847dd52db7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_step_fill_xy_TestHistPlotUnivariate.test_weights_with_auto_bins.assert_len_ax_patches_": {"doc_hash": "2e896c1a681d9085178951ebb09de6a1729b37e2faef7612fb089b46424f52d0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_shrink_TestHistPlotUnivariate.test_shrink.for_p1_p2_in_zip_ax1_pat.assert_x2_w2_2_p": {"doc_hash": "3ddebc936edb82a8b578661baa4c012d280e626f4b1ddb9d222970d40d7064ea"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_log_scale_explicit_TestHistPlotUnivariate.test_log_scale_implicit.assert_np_allclose_steps_": {"doc_hash": "40bf8bb23ed1fa50732c90893ed487b5f79a3bf4f16bfe29aa868c473561fa10"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_auto_linewidth_TestHistPlotUnivariate.test_auto_linewidth.None_10": {"doc_hash": "68e1484f9ea208f04b59a1c685592abf6d8e09866484484d8de0cbc281d25c22"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_bar_kwargs_TestHistPlotUnivariate.test_step_line_kwargs.assert_line_get_linestyle": {"doc_hash": "66a6b2b33acc1340ab9e1826acb30336de8b2b8158404f5d8f9ebf8158a4b257"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate_TestHistPlotBivariate.test_mesh.for_i_y_x_in_enumerat.assert_path_vertices_0_1": {"doc_hash": "e04ddf002463dfe6f24b941970f15a52a8978ee2c50ff34ea15b5056801f68bb"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_with_hue_TestHistPlotBivariate.test_mesh_with_hue.for_i_sub_df_in_long_df_.for_i_y_x_in_enumerat.assert_path_vertices_0_1": {"doc_hash": "f0f2a3d40c0d86db08b286e3b5f83078b38d18dda393951c2a4578000f9811d9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_with_hue_unique_bins_TestHistPlotBivariate.test_mesh_with_hue_unique_bins.for_i_sub_df_in_long_df_.for_i_y_x_in_enumerat.assert_path_vertices_0_1": {"doc_hash": "a376266071de2917b64d5f7580d3e844e1d4664a82aea840bc4bbde804fd467d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_with_col_unique_bins_TestHistPlotBivariate.test_mesh_with_col_unique_bins.for_i_sub_df_in_long_df_.for_i_y_x_in_enumerat.assert_path_vertices_0_1": {"doc_hash": "4afc7d08e5220713cbba3696453adc5fc0207629bcab3ed3d2a960f3f2859996"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_log_scale_TestHistPlotBivariate.test_mesh_log_scale.for_i_y_i_x_i_in_enum.assert_path_vertices_0_1": {"doc_hash": "d5bbd695b795b37e1a1870d6de8655fe6ce25e1d2fcb159580c794228569441d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_thresh_TestHistPlotBivariate.test_mesh_sticky_edges.None_3": {"doc_hash": "85e2f908f00be31ec740abeb91ff9fe0fa9b930897dd1fe8cf738c08d4171a26"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_common_norm_TestHistPlotBivariate.test_mesh_common_norm.for_i_sub_df_in_long_df_.assert_array_equal_mesh_d": {"doc_hash": "58bbda47d82d69046d5d018e1f3d4265f7c1e36b6c674b11b286cec4b537a888"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_unique_norm_TestHistPlotBivariate.test_mesh_normalization.assert_mesh_data_data_sum": {"doc_hash": "7310f56878ced3d97cff178a8b941517485f57f20780474b833d59dc06ada88a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_colors_TestHistPlotBivariate.test_mesh_colors.for_i_mesh_in_enumerate_.assert_array_equal_": {"doc_hash": "2c89eff64741dbca13ba75e0a0ecc0fa14e170ff077680bc8e6b3734a3a9cf68"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_color_limits_TestHistPlotBivariate.test_color_limits.assert_array_equal_": {"doc_hash": "fcf83f80ca5bc728193d328721dc62504a8a9e549f75a2d84954937820a3b30a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_hue_color_limits_TestHistPlotBivariate.test_colorbar.None_3": {"doc_hash": "3eb4fae6fa11833f7d438c9ec2ebadd8ddb5b6aeac519bbe48168dab9e902bd1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestECDFPlotUnivariate_TestECDFPlotUnivariate.test_long_vectors.None_2.assert_array_equal_a_b_": {"doc_hash": "7c85a4840cd3c86e3893bd4b1c8f2226c9e8fac56df25059b43df14bf47584d7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestECDFPlotUnivariate.test_hue_TestECDFPlotUnivariate.test_drawstyle.assert_ax_lines_0_get_dr": {"doc_hash": "421dfaf27a60413bb9cfa55d4c106d398b4b82b823542fac06253eb6c8f4d998"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestECDFPlotUnivariate.test_proportion_limits_TestECDFPlotUnivariate.test_proportion_limits.assert_sticky_edges_": {"doc_hash": "37a12bdf657359d87ac9b0aeb4f33d1f922265f220e0f68e739d1b5921073575"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestECDFPlotUnivariate.test_proportion_limits_complementary_TestECDFPlotUnivariate.test_proportion_limits_complementary.assert_sticky_edges_": {"doc_hash": "8f316ff0b5cbe444926a27bccfb46426c7c70569937279f9cbea0b50c1752b3a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestECDFPlotUnivariate.test_proportion_count_TestECDFPlotUnivariate.test_proportion_count.assert_sticky_edges_": {"doc_hash": "63d52adb3738d560f17c707ebfffc227f53df91770a088bfcae4518714c42415"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestECDFPlotUnivariate.test_weights_TestECDFPlotUnivariate.test_bivariate_error.with_pytest_raises_NotImp.ecdfplot_data_long_df_x_": {"doc_hash": "56ef2230f109b0a596cbf12477a0e78f9c9a9f0aa7e5b3b4befd738b7f1c2eab"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestECDFPlotUnivariate.test_log_scale_TestECDFPlotUnivariate.test_log_scale.assert_array_almost_equal": {"doc_hash": "54ae83301f4ffbc3191e0c28540527acb43497eb9bebc46dd0886d78d9bb3a9d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot_TestDisPlot.test_versus_single_histplot.if_kwargs_.assert_plots_equal_ax_g2": {"doc_hash": "d43482cb930d3281e60f22792da4f7fadfe60c7ea0a010381c242b8a757ac8a9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_versus_single_kdeplot_TestDisPlot.test_versus_single_kdeplot.if_kwargs_.assert_plots_equal_ax_g2": {"doc_hash": "3996c73ed29ff74e404f8e91b35076568723971572013e87f4968ac53d5b1bff"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_versus_single_ecdfplot_TestDisPlot.test_versus_single_ecdfplot.if_kwargs_.assert_plots_equal_ax_g2": {"doc_hash": "ed1ab1df2956c36d3a30bbb8eaca1533e2ce3308c84358f7867ff06704dc2be3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_with_rug_TestDisPlot.test_with_rug.assert_plots_equal_ax_g2": {"doc_hash": "2f60305b273e97502d9395036da0a6f73339b2e4641b4494d55a733ea78def2d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_facets_TestDisPlot.test_facets.for_i_line_in_enumerate_.assert_text_in_facet_ax_g": {"doc_hash": "0b86867fd59507ba433340e2f1c76596232ccd68a1a9249531116fed042bc5fa"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_facet_multiple_TestDisPlot.test_facet_multiple.assert_plots_equal_ax_g_": {"doc_hash": "6933bccddab93d2133f53785432bc66efe4e1bd8ef2c2c15b3498f5076d42e45"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_ax_warning_TestDisPlot.test_bivariate_ecdf_error.with_pytest_raises_NotImp.displot_long_df_x_x_y": {"doc_hash": "6e58708334c440fe9d3c6baf704a4dd3de017a4086abe8620fc09f2bb3a70f70"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_bivariate_kde_norm_TestDisPlot.test_bivariate_kde_norm.None_2": {"doc_hash": "52f7d8a0f6b0b1fade407f11f14c6e225f058a7cdde0aaf0e9b47fe694a5195c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_bivariate_hist_norm_TestDisPlot.test_bivariate_hist_norm.assert_clim1_1_clim2_1": {"doc_hash": "26d147d64b354a8c5aa81e03bfba36d5d04f5fd6ed3d23a7c9caf7f2520361d7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_facetgrid_data_": {"doc_hash": "4cb5f10b083b72cc4610df4dd1322c81580aaa6500bb38252a4d2a1e62a8c31a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_docstrings.py_from_seaborn__docstrings__": {"doc_hash": "899dae2aed2d1b91827bb0e7ee78a1801d37797991379579591d15d6e968fa65"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_tempfile_from_seaborn__testing_imp": {"doc_hash": "91a42b422582d22e7153fb67e5cc581111c2fc4836a1359f76c33a2447928999"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap_TestHeatmap.test_df_input.assert_p_ylabel_lette": {"doc_hash": "4d80516a6b9fe4145e1e40dbf726e248e3aee3d7f79fb2010aaae4e5cd10ee2d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_df_multindex_input_TestHeatmap.test_df_multindex_input.assert_p_xlabel_lette": {"doc_hash": "956816c5c4f69ffc2a2425ba2760103924bb237ff8b7670c4d4b7f1242b3d591"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_mask_input_TestHeatmap.test_mask_limits.None_5": {"doc_hash": "68b6cdce85305f757cfa53558ce576d1a9fc0cc73f0c7df53576a19a1f179d9d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_default_vlims_TestHeatmap.test_custom_vlim_colors.npt_assert_array_almost_e": {"doc_hash": "8b4b22525db125ae4591ec5f811252f270af7c56119d96bd0857ef1c0d2994da"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_custom_center_colors_TestHeatmap.test_cmap_with_properties.None_8": {"doc_hash": "bcdd0b10f720dc1e214d5b9c5b99a3424331fb731baf8479b246dbe171f077c3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_custom_ticklabel_interval_TestHeatmap.test_custom_ticklabel_interval.None_3": {"doc_hash": "6985830b2ce203577e1c4e5b54b33651c459066c5c83f6418e6e6bde81d82a1b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_heatmap_annotation_TestHeatmap.test_heatmap_annotation_overwrite_kws.for_text_in_ax_texts_.assert_text_get_va_": {"doc_hash": "7e634a3bd1e9baefa50c35c1050ee09d416fc4a48a619e9840c90a3f96ea9c2f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_heatmap_annotation_with_mask_TestHeatmap.test_heatmap_annotation_with_mask.for_val_text_in_zip_df_m.assert_f_val_1f_te": {"doc_hash": "f5dd578fbdc35a9d7f923bbf5c65ed7e3baa87cdcb7f16006c41ff90fed42bdc"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_heatmap_annotation_mesh_colors_TestHeatmap.test_heatmap_annotation_with_limited_ticklabels.for_val_text_in_zip_self.assert_text_get_text_": {"doc_hash": "5169bb7405293651e43c1f27fbd79eafeccc6101b082f73b910ee789d0c7441c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_heatmap_cbar_TestHeatmap.test_heatmap_cbar.None_5": {"doc_hash": "8133f3e8bc008c3504fdb4e30c86c5c2966de9aeb236ebd16addfc5152bdfeef"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_heatmap_axes_TestHeatmap.test_heatmap_axes.assert_ax_get_ylim_": {"doc_hash": "8b7a080da6f69191150793a50d716c2ce37da25f44dd94c47ea5e90e84a4157d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_heatmap_ticklabel_rotation_TestHeatmap.test_heatmap_ticklabel_rotation.None_3": {"doc_hash": "e1221e4b2dace38919d8b63edd079d03f991bdfa631f53a9e1b300792702ef08"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_heatmap_inner_lines_TestHeatmap.test_square_aspect.assert_obs_aspect_equ": {"doc_hash": "c86c679eecc0410ab15358e91173f05ff3f940b95c32cefcdd2b7e0a66f45673"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_mask_validation_TestHeatmap.test_mask_validation.None_1.mat__matrix_mask_self_df_": {"doc_hash": "76339d2124f58b2dd1fff40c7260307c0ad983c12f3b6db91a9366c9a7468227"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_missing_data_mask_TestHeatmap.test_cbar_ticks.assert_len_ax2_collection": {"doc_hash": "d8bdc6b678492677758ed21e044edb7b10c7c6388a5ddd70f6a33912d21b41c0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram_TestDendrogram.if_not__no_scipy_.df_norm_leaves.np_asarray_df_norm_column": {"doc_hash": "f74acd502799daed17b2f5f112c802b0ae910311ffe57300cf5db195e2fce846"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_ndarray_input_TestDendrogram.test_ndarray_input.assert_p_ylabel_": {"doc_hash": "ce58130ee052b362a14348e802f31f439d7e0036de8ff2d93673641326697753"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_df_input_TestDendrogram.test_df_input.assert_p_ylabel_": {"doc_hash": "20f1e305810f30ea8c220d5aefec3b740ad3b7c4b603ea33f593a43dc47c5787"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_df_multindex_input_TestDendrogram.test_df_multindex_input.assert_p_xlabel_lette": {"doc_hash": "a97f2cdd5b13318a030debaebf5a9c859fdf6ed6a4e56a5b3dd717de95f9cb43"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_axis0_input_TestDendrogram.test_axis0_input.assert_p_ylabel_": {"doc_hash": "5a670dc64c6367079619f369495b379dd0776eff3932827c336efd2359f82f7e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_rotate_input_TestDendrogram.test_rotate_axis0_input.npt_assert_array_equal_p_": {"doc_hash": "c3aef03abe6ba9d449e9e6bb926db9cb9873597fc253a862669e7c9ad19f88d1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_custom_linkage_TestDendrogram.test_custom_linkage.assert_p_dendrogram_de": {"doc_hash": "c840dee4b4f1cd494f91d3c2e1e78d8bc698160e303a30d92d6138c749ee362a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_label_false_TestDendrogram.test_fastcluster_other_method.npt_assert_array_equal_p_": {"doc_hash": "4455ff8c6a9f5d57477ff96d1640c69a5af70c9b63967cef813bed0e078e457a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_fastcluster_non_euclidean_TestDendrogram.test_dendrogram_plot.assert_len_ax_collections": {"doc_hash": "d6338f4b6f6a0d873e49fa2d0eb1568c30a927cedfe5e7e3a8beb29d3829423c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_dendrogram_rotate_TestDendrogram.test_dendrogram_rotate.assert_ylim_0_ymax": {"doc_hash": "e2f5ffbf54bb0ac284baae0120c76dc343ea29423c199dc31216f4d5ae727b96"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_dendrogram_ticklabel_rotation_TestDendrogram.test_dendrogram_ticklabel_rotation.None_5": {"doc_hash": "a912a7cdcd8d93d7fbac65064772a9e915ba69c83f83ab52064debd37cbf8535"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap_TestClustermap.test_corr_df_input.npt_assert_array_almost_e": {"doc_hash": "4a4221481a62e7186999c60fc775ca9a1912642ffc7a534814beaafbc685620e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_pivot_input_TestClustermap.test_colors_input.assert_len_cg_fig_axes_": {"doc_hash": "38bdcd6c8dddb5132f63936df954362a9255dc911a48c253da35b868b874ca24"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_categorical_colors_input_TestClustermap.test_categorical_colors_input.assert_len_cg_fig_axes_": {"doc_hash": "bfffe7bd0ce63dad38b26992de66f05449dc49b06a8870381b6885f4264e571e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_nested_colors_input_TestClustermap.test_nested_colors_input.assert_len_cm_fig_axes_": {"doc_hash": "6a733ca916cf70e53f1e964e602741aeae47d736e632b01494b4be837ba7cacc"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_colors_input_custom_cmap_TestClustermap.test_colors_input_custom_cmap.assert_len_cg_fig_axes_": {"doc_hash": "bfd1c45377e2505beba3253d500b832aeb0c2c4bfefb30d9e774b2144d2f4643"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_z_score_TestClustermap.test_color_list_to_matrix_and_cmap.for_i_leaf_in_enumerate_.assert_colors_equal_cmap_": {"doc_hash": "e403e472e3a06622fc5b95855acaeb0edc8b742198dbd597c7b933d4217b2192"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_nested_color_list_to_matrix_and_cmap_TestClustermap.test_nested_color_list_to_matrix_and_cmap.for_i_leaf_in_enumerate_.for_j_color_row_in_enume.assert_colors_equal_cmap_": {"doc_hash": "982f9a72905dd3c021a6d86803801a3a9cf67404118d36ae9f45fd2782037a52"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_color_list_to_matrix_and_cmap_axis1_TestClustermap.test_savefig.cg_savefig_tempfile_Named": {"doc_hash": "b1292aa9dcce2798f85cfe3bf0b59bf574edef49029bbab5f0442950ea9a6a79"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_plot_dendrograms_TestClustermap.test_plot_dendrograms.pdt_assert_frame_equal_cm": {"doc_hash": "3c50ad4f10da1fd580f866bde1a440f29338e99b1974a24bf76ce5b58ade2d04"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_cluster_false_TestClustermap.test_row_col_colors.assert_len_cm_ax_col_colo": {"doc_hash": "5475394a23969bbd3f941a705502ee85c90e3ac9ff2a66c72fafca57da325dba"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_cluster_false_row_col_colors_TestClustermap.test_cluster_false_row_col_colors.pdt_assert_frame_equal_cm": {"doc_hash": "0df1a8f22e2ddefdcdf6cec3c7453726ca958578cbc697b554a83857f722f6a6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_df_TestClustermap.test_row_col_colors_df.assert_col_labels_cm_c": {"doc_hash": "d3041805d765c1ffa9ed2fdb26ec6ab56a7e8c14393b01e8148aa2ff6d701bf6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_df_shuffled_TestClustermap.test_row_col_colors_df_shuffled.assert_list_cm_row_colors": {"doc_hash": "7d0da7cdb59a6c2acbe8429209348c0179882ddba9bb2564cdcf839607aca759"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_df_missing_TestClustermap.test_row_col_colors_df_missing.assert_list_cm_row_colors": {"doc_hash": "5375a4a63af12b26b8e9dd082b3cb3326c0cbc7f39078efddfaa6a7006fcc98d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_df_one_axis_TestClustermap.test_row_col_colors_df_one_axis.assert_col_labels_cm2_": {"doc_hash": "4e3a8a0046c29f79e3d47f8aaac37474bec5b559775c8913d23f2823a35f4dc1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_series_TestClustermap.test_row_col_colors_series.assert_col_labels_cm_c": {"doc_hash": "f32ac06d2798e744a899fe9d09023347ecdbac05e53b5097d9bacca28f7541a3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_series_shuffled_TestClustermap.test_row_col_colors_series_shuffled.assert_list_cm_row_colors": {"doc_hash": "258feffc1489a62580e87e7b202b456ca5aeb13b49b43cdbe980770f523d115c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_series_missing_TestClustermap.test_row_col_colors_series_missing.assert_list_cm_row_colors": {"doc_hash": "3577da21da2615881136ca30b6b5793d466772d4b1db3ca08a4907ef658ae4ec"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_ignore_heatmap_kwargs_TestClustermap.test_row_col_colors_ignore_heatmap_kwargs.None_1": {"doc_hash": "dc6e896db9804a5a1748b02355244ef32c09ad3d663f353cad18c6eb4a47a327"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_raise_on_mixed_index_types_TestClustermap.test_row_col_colors_raise_on_mixed_index_types.None_1.mat_clustermap_self_x_nor": {"doc_hash": "874be8083d614123713fb0d8a155cde99ecda1d38df6d7c153f7c3f9049986c9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_mask_reorganization_TestClustermap.test_mask_reorganization.None_3": {"doc_hash": "ee224d3919f03d3ee65c5b62863af25dee1e0d7d74e31b1f5d3e245672a39b91"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_ticklabel_reorganization_TestClustermap.test_noticklabels.assert_ytl_actual_": {"doc_hash": "69f56f496dc4044ef0e30a7de28ad019f9cb2b19d28fb59add7e2d1fa036b2a8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_size_ratios_TestClustermap.test_size_ratios.None_8": {"doc_hash": "c5083748603302c738fd0220eb7223692b6122127203cdb4b07a93a55ddb1787"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_cbar_pos_TestClustermap.test_square_warning.assert_np_array_equal_g1_": {"doc_hash": "39ac23b540fc9741bc5e6cd5b6aec64f4353ff73055594a85a115b47fd202e49"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_clustermap_annotation_": {"doc_hash": "1ed58b3f751e4f3ccc7717a715dcc8d293e2a8f483f9c555b94a787bc523921a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_miscplot.py_plt_": {"doc_hash": "187aa3d37a09e850b8134ef9b6ed21e8b416aff5742907d415908969de1173df"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_colorsys_TestColorPalettes.test_big_palette_context.rcmod_set_": {"doc_hash": "21af4df53700028b625e4d232475350d2b1accc092fb821206189947d959ad9b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_palette_size_TestColorPalettes.test_palette_size.None_4": {"doc_hash": "63536f31ac19de60527d9f66e48aea4ea97e84a1c29e4f47354c9f708513f6c7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_seaborn_palettes_TestColorPalettes.test_seaborn_palettes.for_name_in_pals_.assert_b_g_r_m_y_c_": {"doc_hash": "3c28acfe37b1a945bb33af23d5e9c94fc884c210f439a94ee085e2cc6182df16"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_hls_palette_TestColorPalettes.test_husl_palette.npt_assert_array_equal_cm": {"doc_hash": "bae35fe9da0b992e4cfc1db71734db5b43704d06de6f1ca29d3985a51cc02a91"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_mpl_palette_TestColorPalettes.test_mpl_palette.None_2": {"doc_hash": "98c2112fe90b3ea92887b98d75eb852dc2d45726dd4fb7e939e269b6192b2553"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_mpl_dark_palette_TestColorPalettes.test_palette_cycles.assert_double_deep_dee": {"doc_hash": "eb3d7696a9bf27baed2e7728a3f4a9e6ad3755a53a9e3eff6d50d33a218225a3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_hls_values_TestColorPalettes.test_hls_values.None_2": {"doc_hash": "87b03259babe8cc013d663ccdbc2e1ca517aa1c7fda04189222cb75b61132bf2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_husl_values_TestColorPalettes.test_husl_values.None_2": {"doc_hash": "22312b9fd70213e267150f5a7951416b31a0a06dd783d849e066ebcf3729e66d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_cbrewer_qual_TestColorPalettes.test_rgb_from_hls.assert_rgb_got_rgb_wan": {"doc_hash": "14c135a18bde0331a86e0f039189761b41e04669ba694dfba8e53061f1e9b025"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_rgb_from_husl_TestColorPalettes.test_rgb_from_xkcd.assert_rgb_got_rgb_wan": {"doc_hash": "b6b7a420935c760215f35c528000271340f0d43e04b2b100a2de81ff4cb17300"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_light_palette_TestColorPalettes.test_light_palette.None_6": {"doc_hash": "f9a9396f88883cbbc4c2dfeca1021ccd63f71d9b75d53187e7fb10e50dc3b1c0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_dark_palette_TestColorPalettes.test_dark_palette.None_6": {"doc_hash": "fb5cc1ab161a18e2d66a7527e3db80261091f69d859a53beaea92f47bf1e9061"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_diverging_palette_TestColorPalettes.test_diverging_palette.assert_isinstance_pal_cma": {"doc_hash": "93cdf1b717a57d9b1b513e6b3229583be22533aabd28137dc5e4c83b86a87b9e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_blend_palette_TestColorPalettes.test_cubehelix_reverse.assert_pal_forward_pal": {"doc_hash": "32ce326ca3921845d1653d749cbaeff1ba9e6aa9d72174acfe4ce36bf30b0dcd"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_cubehelix_cmap_TestColorPalettes.test_cubehelix_cmap.assert_pal_forward_pal": {"doc_hash": "c2fa20a0ace5384fbfebb268485794508cb30f65dfe63c4f8fde25c61f7bcca1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_cubehelix_code_TestColorPalettes.test_cubehelix_code.assert_pal1_5_pal2_": {"doc_hash": "e64a73a1dd0525c88e277ad38ba9d165afc73c371407922a52e89674c98aa329"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_xkcd_palette_": {"doc_hash": "75f3efc1c147e904ac3ce3129036ec21fe8b5d91fcf4e0bf63d98c58c9d3c5a6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_pytest_has_verdana.return.verdana_font_unlikely_": {"doc_hash": "4ff552d80696616644c2faadd36e6c72dc0cf493305b9d98ecf0f8a12d5db060"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_RCParamTester_RCParamTester.assert_rc_params_equal.for_key_v1_in_params1_it.if_isinstance_v1_np_ndar.else_.assert_v1_v2": {"doc_hash": "68edb529cdf793beaa6377d368e20b23ec98fd17c8c749da9cee93b4a2723350"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_TestAxesStyle_TestAxesStyle.test_set_rc.rcmod_set_theme_": {"doc_hash": "a4c9471ddd7d9d5ec55ba3ec5ce1e5a8573d9807ad6e21f83fb8ae829e18c4fd"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_TestAxesStyle.test_set_with_palette_TestAxesStyle.test_set_with_palette.rcmod_set_theme_": {"doc_hash": "f539dfa051889c52997b983dd34c59b5c15920345b8fffb749ed110ceb4fe042"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_TestAxesStyle.test_reset_defaults_TestAxesStyle.test_set_is_alias.rcmod_set_theme_": {"doc_hash": "1083a1520f8f4107bf7f11b0ff928d6bc833cd20fa081df93d802f1cfa647877"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_TestPlottingContext_TestPlottingContext.test_font_scale.for_k_in_font_keys_.assert_notebook_ref_k_": {"doc_hash": "9e7e811c029b07dc8e99c6427c8d4a58ae9420399d98bf32fb08a2c63c5a8476"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_TestPlottingContext.test_rc_override_TestPlottingContext.test_context_context_manager.None_3": {"doc_hash": "aef01f3b1b2bb6204e270fb34e86ecd74b909492d3b57c5d6bcf5f5457049983"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_TestFonts_": {"doc_hash": "1621495f6ff4414932ad52c6f29087eeae75f03d4abb1bea96f6a0407a120ad9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_np_TestLinearPlotter.test_establish_variables_from_bad.with_pytest_raises_ValueE.p_establish_variables_Non": {"doc_hash": "b72685b600306b2b9f8c61967ec3b30a7c73fb7cfa8f88e180d411cd95338c06"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestLinearPlotter.test_dropna_TestLinearPlotter.test_dropna.None_5": {"doc_hash": "e55a93d55738cef3046790d5aafb90d9fcdc1e701a87050254760b89be7f68d8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter_TestRegressionPlotter.test_singleton.assert_not_p_fit_reg": {"doc_hash": "518e522bc7b1a8651b73769a988c91b1c5885ed05b3eeca687c10cae00339ad6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_ci_TestRegressionPlotter.test_ci.assert_p_x_ci_sd_": {"doc_hash": "5b440b48e20cbda49a984ed312eed705d3281a97da6c84c87de78d8f6711d9a3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_fast_regression_TestRegressionPlotter.test_fast_regression.npt_assert_array_almost_e": {"doc_hash": "5603ca8df96e37d879008577d5a290fe807158c757dfdedf33513c6f57b5799e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_regress_poly_TestRegressionPlotter.test_regress_poly.npt_assert_array_almost_e": {"doc_hash": "c8f250ee44ae48530d06a5e6f3a010a945ef06bb9d1bf4d1bcd08f282a957766"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_regress_logx_TestRegressionPlotter.test_regress_logx.assert_yhat_lin_90_yha": {"doc_hash": "9905dc2219f47e83d25da4ff239b23e72452655c1e14a11ec3e29ce169d69949"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_regress_n_boot_TestRegressionPlotter.test_regress_n_boot.npt_assert_equal_boots_sm": {"doc_hash": "8b6c9b070bba8d495b6cf893f25fa2c854fa65a0bdbed02786a41277b1544722"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_regress_without_bootstrap_TestRegressionPlotter.test_regress_without_bootstrap.assert_boots_smod_is_None": {"doc_hash": "d5450c910c80f39ffcfc534a81ed1f95ab836febf5f068a4e17b8c4e77ef6a87"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_regress_bootstrap_seed_TestRegressionPlotter.test_regress_bootstrap_seed.npt_assert_array_equal_bo": {"doc_hash": "686b1ce650efe070f0b7cd7a4c68ed77e312dc38dcc042a9c309ffdbef858395"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_numeric_bins_TestRegressionPlotter.test_bin_results.None_2": {"doc_hash": "2dbfed401fc41d78379b58b6c0dcf703add9dbe10e9e53bf0c5193c20cb3bac0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_scatter_data_TestRegressionPlotter.test_scatter_data.None_7": {"doc_hash": "9eaa9c5d5036e57272fd71ec273a6ce988569ddd415d22f801936895023ecea0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_estimate_data_TestRegressionPlotter.test_estimate_cis.npt_assert_array_equal_ci": {"doc_hash": "ffcdd52f4097e39973ae6b7785193657d13bf0ddd37f299c7b769c2fcb9c6900"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_estimate_units_TestRegressionPlotter.test_estimate_units.npt_assert_array_less_ci_": {"doc_hash": "30c518394c32e924dae0c3c297da368c591c0475791a257c936433a073c3c3fa"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_partial_TestRegressionPlotter.test_partial.None_6": {"doc_hash": "0dfccde11d47afc4258e52a14f7ff2f0be0932a72584fc1df33adae7b28eb503"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_logistic_regression_TestRegressionPlotter.test_logistic_perfect_separation.assert_np_isnan_yhat_all": {"doc_hash": "55545e4420d829cadc37e58a9b9b06e16d5ec88b46373f37c8095d2ca81611fa"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_robust_regression_TestRegressionPlotter.test_robust_regression.assert_len_ols_yhat_l": {"doc_hash": "ed90132c69b58b28a626528f5d3fba8c87083c0c0b7f3dc6dee730198461cbb2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_lowess_regression_TestRegressionPlotter.test_regression_options.None_1.lm__RegressionPlotter_x_": {"doc_hash": "018edba78a8034c118c65a45dcaa736acf06f1ea45037c9ad18bc50c157cd5a6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_regression_limits_TestRegressionPlotter.test_regression_limits.assert_grid_max_self": {"doc_hash": "26dbd5cbc0e641be7548a58afc08425daeea99e296c0fe33822465507746f10f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots_TestRegressionPlots.test_regplot_basic.npt_assert_array_equal_y_": {"doc_hash": "e67e8711ebeaf2bcfb41ffb477ab1f52b8902d6a820f343311c204f26f18b66b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_regplot_selective_TestRegressionPlots.test_regplot_selective.None_2": {"doc_hash": "fab9f657af28959c750c3c7909eac40d1a395f6cee744ce78c38153463cbe02a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_regplot_binned_TestRegressionPlots.test_lmplot_hue.assert_len_ax_collections": {"doc_hash": "01cc0b43f3b6d10f7a7b6d020630e0abac8748e6c644d787c90bdd6bf7c3d4a3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_lmplot_markers_TestRegressionPlots.test_lmplot_markers.with_pytest_raises_ValueE.lm_lmplot_x_x_y_y_d": {"doc_hash": "295ba311ece4bf1e97ebc4fdc8f0cbeed9a98fffc0aaaf5952a05bcfded82c00"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_lmplot_marker_linewidths_TestRegressionPlots.test_lmplot_facets.assert_g_axes_shape_1": {"doc_hash": "bd477e3e0fc6fcc5a25fb4539c2e624b3343b07e634da864585f8db611d813bc"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_lmplot_hue_col_nolegend_TestRegressionPlots.test_lmplot_scatter_kws.npt_assert_array_equal_bl": {"doc_hash": "3b494867bca0951a72b81e447e9989ce41d8a64fb995ff6e34141ebd16f8898c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_lmplot_facet_truncate_TestRegressionPlots.test_lmplot_facet_truncate.for_ax_in_g_axes_flat_.for_line_in_ax_lines_.assert_ax_get_xlim_t": {"doc_hash": "470f921b67d61a12065b779274b013e06acccd99b69651306a10b8829ef84829"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_lmplot_sharey_TestRegressionPlots.test_lmplot_sharey.assert_ax1_get_ylim_1_": {"doc_hash": "a59dfc21fc1c45450b2f439658e95675ae13ee138db31a9ed3648be17afb6009"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_lmplot_facet_kws_": {"doc_hash": "dd5abd6a4621903bfa817752ed84f4e21ca7aa57d79394ddc1b1a34521350505"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_from_itertools_import_pro_from_seaborn__testing_imp": {"doc_hash": "5ea83cdd7213d851d5182453723b1684064eef56b8bcb3703068fd0c601a39bb"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_long_semantics_long_semantics.return.request_param": {"doc_hash": "7a6bdf7fd43ac6fe14a3f7c2ad69d18408e2c8fb2b15aa106d35ab552df85fc4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_Helpers_Helpers.paths_equal.return.equal": {"doc_hash": "42ed6e244f20e50deeac7c94119d0a4053566297c2ba09accef66cb5a13460a3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_SharedAxesLevelTests_SharedAxesLevelTests.test_color.None_3": {"doc_hash": "7d5dc98f214cc37d54a712f8e6ced1bebf6d8d612c545dfe924f1b93786bbcb0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter_TestRelationalPlotter.test_wide_df_variables.assert_p_variables_style": {"doc_hash": "f9229f5ace406f2b445b1956c55fc8b4ac4e868377d698a869e5283169a26359"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_df_with_nonnumeric_variables_TestRelationalPlotter.test_wide_df_with_nonnumeric_variables.assert_p_variables_style": {"doc_hash": "af0aa2184b73661b86ed28ce82e2e642166366ee817ec6a3018b4b6c1da7888d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_array_variables_TestRelationalPlotter.test_wide_array_variables.assert_p_variables_style": {"doc_hash": "55aafb0d383a776fa82b5f2fc4f80dc440ebc680c65f5d586ce8280c60a83eff"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_flat_array_variables_TestRelationalPlotter.test_flat_array_variables.assert_p_variables_y_i": {"doc_hash": "4a11841b47d09847c7fc74c23a608dbfcb5357f061d9e215013a254a9f711514"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_flat_list_variables_TestRelationalPlotter.test_flat_list_variables.assert_p_variables_y_i": {"doc_hash": "7e62839135ecffd46d5fc388f1199cf0b2589d816aecbf4ca38db2e251ef8734"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_flat_series_variables_TestRelationalPlotter.test_flat_series_variables.assert_p_variables_y_i": {"doc_hash": "6341f79c27ee47996b59ca85798d687d2afeb3fcfcbdaa178e309db60909a231"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_list_of_series_variables_TestRelationalPlotter.test_wide_list_of_series_variables.assert_p_variables_style": {"doc_hash": "90221405ff211014730884427828ee6edce762b5fdaa38abeac19682917aceda"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_list_of_arrays_variables_TestRelationalPlotter.test_wide_list_of_arrays_variables.assert_p_variables_style": {"doc_hash": "19aa677e5ffd196298580bbf89f07860ca614a470d61926a832d14fd7a073d37"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_list_of_list_variables_TestRelationalPlotter.test_wide_list_of_list_variables.assert_p_variables_style": {"doc_hash": "4a50ac36174aeb30f515be2b8364b1188d172cec0035482ee3867f10033317a5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_dict_of_series_variables_TestRelationalPlotter.test_wide_dict_of_series_variables.assert_p_variables_style": {"doc_hash": "285c09472ca57fed87707c0914908ba05ca2bf94ec84031eb401fe0d52ce79b6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_dict_of_arrays_variables_TestRelationalPlotter.test_wide_dict_of_arrays_variables.assert_p_variables_style": {"doc_hash": "83549269c60a4dd94cc0047a5f7cbf4b5134a45236bc11a02e0d3472f0c71a21"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_dict_of_lists_variables_TestRelationalPlotter.test_wide_dict_of_lists_variables.assert_p_variables_style": {"doc_hash": "f6576ecd12edca0c1b3933696d6e8c35d9f8414aea9c5449cc0b7e01b0249cdc"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_simple_TestRelationalPlotter.test_relplot_simple.with_pytest_raises_ValueE.g.relplot_data_long_df_x_": {"doc_hash": "442ee3ca5748c8373a8dff0eb3da83232206cefda6af2590c87d850b9702ed75"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_complex_TestRelationalPlotter.test_relplot_complex.None_3.for___grp_df_ax_in_zi.assert_array_equal_y_grp": {"doc_hash": "e8f2ada5ca0faac3ad5990126167a9b9f5b6959ed254dfae3f043d89b8601ab5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_vectors_TestRelationalPlotter.test_relplot_vectors.for___grp_df_ax_in_zi.assert_array_equal_y_grp": {"doc_hash": "9a128d51275f214b1b5e3c9238b71cdfc4e7908172253ea5bcf6c890e5db24e7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_wide_TestRelationalPlotter.test_relplot_hues.for___grp_df_ax_in_zi.assert_same_color_points_": {"doc_hash": "17e0ac2ccd68ce18aa28d9160557a4255fadf6a6a241455de3f38a7df90ee254"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_sizes_TestRelationalPlotter.test_relplot_sizes.for___grp_df_ax_in_zi.assert_array_equal_points": {"doc_hash": "45831604c1edeb4dfafdb46545728ae598151462c4cf0d0a8b88f68855db81df"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_styles_TestRelationalPlotter.test_relplot_styles.for___grp_df_ax_in_zi.assert_self_paths_equal_p": {"doc_hash": "1ae5b0831feed94223fd078dff79219985e9e1f986d27dd43b14d19fc564b669"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_stringy_numerics_TestRelationalPlotter.test_relplot_stringy_numerics.None_1": {"doc_hash": "ee5f9758e26aefca7f29c29fc8af1961171e0bc59ba33e51538573c909d7a8e7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_legend_TestRelationalPlotter.test_relplot_legend.for_line_color_in_zip_li.assert_line_get_color_": {"doc_hash": "6513452b3b775dfa890075ed14e9ed2e955bcd61a0e3fb67abeaa75f10575227"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_data_TestRelationalPlotter.test_relplot_data.None_1": {"doc_hash": "095fb2a7fbae2f1ab8067cefe532db4ea63939bc70e2dedb402caba143468446"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_facet_variable_collision_TestRelationalPlotter.test_ax_kwarg_removal.assert_len_g_ax_collectio": {"doc_hash": "a0f59f4955978b68b25f23664d6a7a6535d0aa879b8142819ad8a7d628043d64"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter_TestLinePlotter.test_legend_data.None_23": {"doc_hash": "87189cb31b11e047c7b1e87f949c5f4dedddf453f2d850ed167dfcaed06693ba"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_legend_data.assert_len_labels_len__TestLinePlotter.test_legend_data.None_42": {"doc_hash": "70242a20c47124fdfb2f01a0ae1545652c10dab74299fd09280a8448e28b88b0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_plot_TestLinePlotter.test_plot.assert_len_ax_collections": {"doc_hash": "b88c5372f15681700dd77d3d513bc3dae2aea8f9cf94ab5a5491247092943b6b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_plot._Test_that_nans_do_not_p_TestLinePlotter.test_plot.None_39": {"doc_hash": "ec7a90d097c7c486e1f1dcb7b31263237af2133ad6ae67453872fd2a8f795481"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_log_scale_TestLinePlotter.test_log_scale.None_8": {"doc_hash": "2c14c5ac28af273f0c23b45ba91b9371247581345a5596f2fbfd4e44409afa8f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_axis_labels_TestLinePlotter.test_axis_labels.assert_not_ax2_yaxis_labe": {"doc_hash": "8e34b559dded9972a14167a029ce731de80f5bd1d1c557e2c83e13b39ef71d19"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_matplotlib_kwargs_TestLinePlotter.test_matplotlib_kwargs.for_key_val_in_kws_items.assert_plot_val_val": {"doc_hash": "0f804b0de287f288d9b72be4b2a50bf1728a9f0fe910d9882d86ff2fea73fac2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_nonmapped_dashes_TestLinePlotter.test_lineplot_axes.assert_ax_is_ax1": {"doc_hash": "b6fbf3710b4aa6de4f010fe9fe14d23afc30cf33f0c118adc69215e58c6cb287"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_lineplot_vs_relplot_TestLinePlotter.test_lineplot_vs_relplot.for_l1_l2_in_zip_lin_lin.assert_l1_get_linestyle_": {"doc_hash": "e62e4222c53ea3cdf81e04abd1cc8c2ebe2c732642098ced58d43046b008301a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_lineplot_smoke_TestLinePlotter.test_lineplot_smoke.None_51": {"doc_hash": "a285389bcfbd7ecf3c15674c8e839f11a761981ab194e76131aff107e4adc10b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_ci_deprecation_TestLinePlotter.test_ci_deprecation.None_3": {"doc_hash": "8f186e6b0f3e68a961387ad83d1e628aeca4c7176f0731eb9600c3b40bc5eac2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter_TestScatterPlotter.test_color.if_Version_mpl___version_.assert_self_get_last_colo": {"doc_hash": "33c3943dfe86ed0dd5949edbb498d639c839602ce99a2f801204b21219774f08"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_legend_data_TestScatterPlotter.test_legend_data.None_4": {"doc_hash": "2d43f361755d40beec70a8aeb12b907a5dc1dda0f3c88c6e3a8812e8b209ed66"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_legend_data.None_11_TestScatterPlotter.test_legend_data.with_pytest_raises_ValueE.p_add_legend_data_ax_": {"doc_hash": "4d307ae10947c7c8867ebb254cc9bd4a0d86041bc90391610f693d3e7ad49274"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_plot_TestScatterPlotter.test_plot.None_21": {"doc_hash": "d0a7377751da3395d266754a8223611db7da6d49ef1373aa690a13de2232aa41"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_axis_labels_TestScatterPlotter.test_scatterplot_axes.assert_ax_is_ax1": {"doc_hash": "97dcab4e4b0feae22c2dd023522de045afd8b41588b14e383882de6e245346bd"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_literal_attribute_vectors_TestScatterPlotter.test_literal_attribute_vectors.None_2": {"doc_hash": "608e8f1059f9c7ca680fc476942777647c88fdfbd28a3aba35f24a43eaff061b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_linewidths_TestScatterPlotter.test_linewidths.assert_ax_collections_0_": {"doc_hash": "c27c3944b555f9389c7fe5a3e002a7dcdf72915ee1d7c11813fc3c91db19d105"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_size_norm_extrapolation_TestScatterPlotter.test_size_norm_extrapolation.for_key_in_set_legend_dat.assert_legend_data_0_key": {"doc_hash": "08d47239c308e3bfade733494aaf72df3af7924a7de1d1cc7d27e67adcaa9591"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_datetime_scale_TestScatterPlotter.test_unfilled_marker_edgecolor_warning.assert_not_record": {"doc_hash": "36a5b54e48c92c95baf4717a106777051c399d22b412c7bce76dec38df4f47cc"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_scatterplot_vs_relplot_TestScatterPlotter.test_scatterplot_vs_relplot.for_s_pts_r_pts_in_zip_a.assert_self_paths_equal_s": {"doc_hash": "eecc5bfb7235e0c2822537e59db39097d4e1e6277bfedf39590470e7255a2779"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_scatterplot_smoke_": {"doc_hash": "45867103cac19d61401b41f3799a8917d6d9243997b46680b851e70b329ed126"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_np_DistributionFixtures.weights.return.rng_uniform_0_5_100_": {"doc_hash": "9937c4b58b68e67db998c8ba07aff0d5b09df91197a6307a0cff63ffa050ef78"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestKDE_TestKDE.test_cut.assert_support_max_p": {"doc_hash": "a3216788a6bfd973eefaae75fde6a43b8e0a017e85a4204579b061cf72d76a21"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestKDE.test_clip_TestKDE.test_bivariate_grid.assert_yy_size_n": {"doc_hash": "42fc3cf6e78c4a7686c9bab1dc4895dbce2170e4572639a829f8fd0854ced17f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestKDE.test_bivariate_normalization_TestKDE.test_bivariate_normalization.assert_total_pytest_ap": {"doc_hash": "3f5d9dfda7e049ceb4a344984bea6d15272065eace833264274fcbf599f8a170"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestKDE.test_bivariate_cumulative_TestKDE.test_bivariate_cumulative.assert_density_1_1_": {"doc_hash": "042e3ed9d84e3bdb1806c375eb281e5fc63358c07b1eb0e50b55170d82d98b65"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram_TestHistogram.test_array_bins.assert_array_equal_bin_kw": {"doc_hash": "619a70f2fc2ebc4918d27602bf1e9ed5c4ab01a8747cad644d5b92a7c8abe20e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_bivariate_string_bins_TestHistogram.test_bivariate_string_bins.None_3": {"doc_hash": "4dc29cfe7d97afb1f868d568f245b759ec7320c26858a78baa585dcda6a3091f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_bivariate_int_bins_TestHistogram.test_bivariate_int_bins.assert_len_e2_b2_1": {"doc_hash": "aa30c583149f98988e5878027b7ee9c6286bf896833578c2031ef0fde1dee6d8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_bivariate_array_bins_TestHistogram.test_bivariate_array_bins.assert_array_equal_e2_b2": {"doc_hash": "dfa5864882b00a8c32c51c45804a7acbc3878cf613f0b92b0e04170545c58b11"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_binwidth_TestHistogram.test_bivariate_binwidth.None_6": {"doc_hash": "4d6604e6dcade24511a5877bef42c8d7efa42ce5c0d6b1a71fae9dad204d8699"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_binrange_TestHistogram.test_bivariate_binrange.assert_e2_max_r2_1_": {"doc_hash": "37993def9d5c76b4e242fdb6b9eeaaa45174265e5ba92a45e5005f7785a2d6de"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_discrete_bins_TestHistogram.test_cumulative_frequency.assert_heights_1_len": {"doc_hash": "48b5407c4d710af40997caf94bee21a87d9c7e06a6238ac96197611aa95662c2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_bivariate_histogram_TestHistogram.test_bivariate_histogram.None_2": {"doc_hash": "95e5029dc4540b9641f63cd3f8b53948f2925fa1e83afcc1d7cd4de67c66f64e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_bivariate_count_stat_TestHistogram.test_bad_stat.with_pytest_raises_ValueE.Histogram_stat_invalid_": {"doc_hash": "eb66d6ef4983b21e629d64e1d0c16d3430bd92c6f38bf4ccfad1ad390a1309cf"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestECDF_TestECDF.test_univariate_count_weights.assert_stat_0_0": {"doc_hash": "25571826397942692b8d0148487de604116f751537c7bc9a404e894d1e12e0e9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestECDF.test_against_statsmodels_TestECDF.test_bivariate_error.with_pytest_raises_NotImp.ecdf_x_y_": {"doc_hash": "3c33221e5f274f73948df4d8206adf7da2f2787d5f69c0976851f3d192cd9d00"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestEstimateAggregator.test_sd_errorbars_TestEstimateAggregator.test_sd_errorbars.None_5": {"doc_hash": "6c1b2425dd1cd3006148972393b2f73430589f65b7593e5e99db0eddc33f335c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestEstimateAggregator.test_pi_errorbars_TestEstimateAggregator.test_pi_errorbars.None_3": {"doc_hash": "93ab2da6cdea2975b5b5786e9017fe22ee194a783797c6037e65f2b3a5e4e4f5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestEstimateAggregator.test_ci_errorbars_TestEstimateAggregator.test_ci_errorbars.assert_array_equal_out_or": {"doc_hash": "36ae71232432cbd99f47abbb67d8071dae96a9417632537b9258a82c55b55789"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestEstimateAggregator.test_custom_errorbars_TestEstimateAggregator.test_singleton_errorbars.assert_pd_isna_out_ymax_": {"doc_hash": "a2660472e6c8b06291d9d4b0933bf28db3eda474c0b3b76a43365342f761933f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestEstimateAggregator.test_errorbar_validation_": {"doc_hash": "09d6032f180ff7eca32b989539d5aafa608b5a04bb59bb2599bbb623737c2bad"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py__Tests_for_seaborn_util_a_norm.np_random_randn_100_": {"doc_hash": "7b129282e195d3312049c365d10adaded88d793714725335d4a0847a787ffc06"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py__network_test_ci_to_errsize.assert_array_equal_actual": {"doc_hash": "7140714075156d3972ecd8964e9b43fb987345dc5db98d59cac7858e312271c0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_desaturate_test_saturate.assert_out_1_0_0_": {"doc_hash": "407a0e6afdd0b73932bbce8b7b1db49c341d53fd9b02042d22f6ce474aa4fbaa"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_to_utf8_test_to_utf8.assert_u_exp": {"doc_hash": "2b3be4cb806a162ab22f2f9387a2ed31eefb0201300d71832b33642b6a685562"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_TestSpineUtils_TestSpineUtils.test_despine.None_3.assert_ax_spines_side_g": {"doc_hash": "3a2feb6d08504ca5a528bd7f3989ea0477f71dbcb4780d9a194648f64c05e57b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_TestSpineUtils.test_despine_specific_axes_TestSpineUtils.test_despine_side_specific_offset.for_side_in_self_sides_.if_is_visible_and_side_.else_.assert_new_position_se": {"doc_hash": "8f2553b686129bda26a4bd14187200c41da780b172d05bc4f05372cb8b47aca8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_TestSpineUtils.test_despine_with_offset_specific_axes_TestSpineUtils.test_despine_with_offset_specific_axes.for_side_in_self_sides_.if_ax2_spines_side_get_v.else_.assert_pos2_self_origi": {"doc_hash": "fd751bf719180484a6785b7effbd121bf9967ce0d50ea74f56425434da3882c2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_TestSpineUtils.test_despine_trim_spines_TestSpineUtils.test_despine_trim_categorical.assert_bounds_0_2_": {"doc_hash": "452ea289e1a03e88f7e053d246f041efb29d64ce9c10b312fdf99cfa85a979bb"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_TestSpineUtils.test_despine_moved_ticks_TestSpineUtils.test_despine_moved_ticks.None_7": {"doc_hash": "43dfb3e05a16c7f69e9e9c7da2c0b9ed8cc88b271312a147e978828ba22ec732"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_ticklabels_overlap_test_ticklabels_overlap.assert_not_y": {"doc_hash": "db4a7d65991e53a166a9139cb53ca8351efd0cf6cbd74e7c1fa4ef53f1c6c517"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_move_legend_matplotlib_objects_test_move_legend_matplotlib_objects.assert_fig_legends_0_get": {"doc_hash": "6119bd550e1562b8d19467ab50eb9f1dbbd2df24853b99c7d4e23c7ba9e2b4bb"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_move_legend_grid_object_test_move_legend_grid_object.for_i_h_in_enumerate_g_l.assert_mpl_colors_to_rgb_": {"doc_hash": "c21a0701d3fc67e99ab55fd2684206a4115e47fe560b6158956ce3c7bb2b0e8d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_move_legend_input_checks_test_load_cached_datasets.for_name_in_get_dataset_n.check_load_cached_dataset": {"doc_hash": "8bf4b02fa232d17617ef1d3dc9634b76268b5ec219b400741d2fc5722d9bd41b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_relative_luminance_test_relative_luminance.for_lum1_lum2_in_zip_lum.assert_lum1_pytest_app": {"doc_hash": "2dd04eb2139a56f1315904fcaafd9e0409fbc0fa39b37975e6f4aee3fb29d48c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_get_color_cycle_test_get_color_cycle.with_mpl_rc_context_rc_.assert_get_color_cycle_": {"doc_hash": "35c89d87089400fd6d84376a273e34a33ed67451afad03e2a9fecd3b498a5af6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_remove_na_test_remove_na.assert_series_equal_a_ser": {"doc_hash": "5b2267fdf171631709462520adebba0df5642d2276ba73982628346d31286dd0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_assign_default_kwargs_test_draw_figure.assert_ax_get_xticklabels": {"doc_hash": "b0efdf1909db653ac43efee86d5842284de4c4c34186c1ab7d05b884be6f62ef"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_deprecate_ci_": {"doc_hash": "a4ad6476d68f1378941fb44e777b6679937bd446f9a9046223a424bdc9058024"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/conf.py__Configuration_file_for___Define_replacements_us": {"doc_hash": "88ac02f9aedf6120375cf4890f14181a69fe702619fe4e70bad7c64c21cd7999"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/conf.py_rst_epilog_": {"doc_hash": "e70b70e201001d2966c6c619dde10d6a48455e0e426e331244ae244941bda52f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_from_pathlib_import_Path_TEMPLATE._": {"doc_hash": "3229f8ffafa71efa5b124cb0ef971e5df327d177afcb1b3600d773e08e824522"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_main_write_thumbnail.with_.fig_savefig_svg_path_for": {"doc_hash": "067165575992bd80b7acaf7992801d2074e57f7c2455e148282b1713577b273b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_introduction_introduction.return.f": {"doc_hash": "bab2f8ded73ecae62968063ceb736dcbc4ba4a0bb0b0bd4bb3e78de408e795ff"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_function_overview_function_overview.return.f": {"doc_hash": "fe2718f70d882d20d0460293abf9c521812cb1c25be456b19089c63d0e2a27c5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_data_structure_data_structure.return.f": {"doc_hash": "166809181aa2eb2bdb5490b9277206ebc7d1fbaa52540f4c304cb43aa412fc3b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_error_bars_error_bars.return.g_figure": {"doc_hash": "1e5df452b84e7e4492493af961ad396223ffaf6a139b9e11522ca9dee77b3f32"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_properties_properties.return.f": {"doc_hash": "e9f408c87be6a1325d918ac03485a8b0cfe9d7aa33ab504095d525f2d2eaec3b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_objects_interface_objects_interface.return.f": {"doc_hash": "ebba85e1db673ab83f62900cd50e9e061139b34c8e74ea50ae91119ac754bd64"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_relational_relational.return.g_figure": {"doc_hash": "19ea17f782ba642ce7db652ff43627f174034df1e41dbee85ccd6d7d6c89a39b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_distributions_categorical.return.g_figure": {"doc_hash": "f5c909cbd1424f2c43e1aed591b6c0d0b5fe6668377043540a2054a72e17036d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_regression_regression.return.g_figure": {"doc_hash": "f09bc5202e53bafc83e61ef3eaa56cb49be5237aa975f8e45db76f8adf77e500"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_axis_grids_axis_grids.return.g_figure": {"doc_hash": "dc9d5fca2a124a6baac491f688baea59ad209ed88446a9eca578bb9b3ef822e6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_aesthetics_aesthetics.return.f": {"doc_hash": "0401502b83f9935a90301e54a8cca7cccd355c42acfa1f446c97192f6696ba6f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_color_palettes_": {"doc_hash": "ed3ab4f477f9ed9e14a2e6a1ece90b4531d4680e92328f4579b3feaaee14d136"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/strip_regplot.py___": {"doc_hash": "e6ca6aeacc65143d05ec50839f02a49a4be8c9379606691450b88412892458eb"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_compat.py_set_scale_obj_set_scale_obj.if_Version_mpl___version_.else_.ax_set_f_axis_scale_": {"doc_hash": "e316a3671134e92410321ac68f01683ad7ab1e3849ca2912f89f73eb89f41067"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_compat.py_get_colormap_": {"doc_hash": "e76013e2cc8e181ab37a60eb5ace8238d34619134183ad2bd84c3d33bcc00eab"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/moves.py_from___future___import_an_Move.__call__.raise_NotImplementedError": {"doc_hash": "342ccaa3973d78d6742f7c44622239fe27e4bcf8b7cab95abdf08b3f945cfe9b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/moves.py_Jitter_Jitter.__call__.return.data": {"doc_hash": "3efb81d79a27c974e1a48f60bf978529d74be620d01e2aecbffad27ae2ab6dc3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/moves.py_Shift_Shift.__call__.return.data": {"doc_hash": "0ca34e160d299071db74472763d6b586a0c82ab4b6fddf4c4cf7e7731613bf4d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/moves.py_Norm_": {"doc_hash": "ba43c315fa945b816f35ff9347f30a7412f4942754e882d1d92178a3dfcc939e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py__The_classes_for_specif_default.Default_": {"doc_hash": "efc4a62bff5c27cbcd9466dae271e5caa1e2867e179d2dc09620e5ce31257bf9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_theme_context_theme_context.try_.finally_.for_code_color_in_zip_.None_1": {"doc_hash": "6f342ccd65c308d92812c03055d2811fba1f26820e716aea665cff393f930be2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_build_plot_signature_build_plot_signature.return.cls": {"doc_hash": "8c4687206a63e513c6d1060fb984288c88813f1f16432691585aedc78931d867"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py__The_main_interface_Plot.__init__.self._target.None": {"doc_hash": "04fe507ffbabf53c7c9674f160d5cca0280448c75f534e1402e9262969fe3d49"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.__add___Plot._clone.return.new": {"doc_hash": "56716f4572fad2d1be94923b71174d2082afa1192261055e57c6d49684e22981"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot._theme_with_defaults_Plot._variables.return.variables": {"doc_hash": "3dcba42d9d4f90588649b4e1dec871dd7a5dce849265af31dc4822e1510b9820"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.share_Plot.share.return.new": {"doc_hash": "afb1b7c7252bb303982b598a57bc2f79373d944f48cb71b3d961302a8aa95641"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.limit_Plot.limit.return.new": {"doc_hash": "aa7ce0533f92be091ab930067a8ee04f9dec71f504cb963da8f9d9c52282c5a5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.label_Plot.label.return.new": {"doc_hash": "5bc468f0893ea651cd4de33d78e846168f954b5ff9e6bd1bb0dcf865892602a1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.layout_Plot.layout.return.new": {"doc_hash": "69a0b52438c2c2c6e9eb0f0fb0ad416e4c83e26b0c662dff8695c7b415ad6936"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot._TODO_def_legend_ugh__Plot.theme.return.new": {"doc_hash": "90d8d52fc60be5f0edc5580dd3eae978eb3810f27f9f5af6d9a82a0fe94b4d94"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.save_Plot.save.return.self": {"doc_hash": "5ce309f8b01b52977598ff51036e40cb9f4c261d08f2333805e78345b2486592"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.show_Plot.plot.with_theme_context_self__.return.self__plot_pyplot_": {"doc_hash": "b8784f2061a7b2001efed37bcc37249f48e28e57a8c27ebe3d3a87d500f7b462"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot._plot_Plot._plot.return.plotter": {"doc_hash": "81fadf204cbb9d2b77460c7c8a507a0b4bc4a1a9a41d4d289f0c7c807368b20c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._extract_data_Plotter._resolve_label.return.label": {"doc_hash": "2bbd5dd5b00ab5e7e1f1454ad3102959b37dedfb70e22b05d6e963af46e7c298"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._setup_figure.for_sub_in_subplots__Plotter._setup_figure.for_sub_in_subplots_.if_title_parts_.elif_not_has_col_or_has_.title_text.ax_set_title_title_": {"doc_hash": "f28cd84ea935e90acb876f364f1313fae55ba62b40c9e10714460c704db2cb08"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._compute_stats_Plotter._compute_stats.for_layer_in_layers_.for_coord_vars_in_iter_ax.if_pair_vars_.else_.data.frame.res": {"doc_hash": "6b3311af7ac32a1017152107c391f505fe837262863309417e816d9e6e37f3cc"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._get_scale_Plotter._get_subplot_data.return.seed_values": {"doc_hash": "cf3cc478c4972d252175a53c743293552e09d29d31d428b7f24dd4615739f0b2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._setup_scales_Plotter._setup_scales.for_var_in_variables_.for_layer_new_series_in_.if_var_in_layer_df_.layer_df_var_new_serie": {"doc_hash": "6d8218b07128262cfca49775d9b7fce8d499ed0e65f24bbc2059e5d2ade05bcb"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._make_legend_Plotter._make_legend.for_name___handles_.if_base_legend_.else_.self__figure_legends_appe": {"doc_hash": "2f3aeefdcc04c1f4271c4800153a5178953ca6b04a5ff994699d3722bbb59019"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._finalize_figure_": {"doc_hash": "0ff39b9e431f83b6afb2bbfd700f8a61f8cafaca3f539b287f99e049690a1335"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_PointSize_Alpha._TODO_validate_enforce": {"doc_hash": "5114d278bdb1646e8c6771aa1210d285216a1b1f45aee313519dbcf5bc65b9a4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Scale_Scale._get_formatter.raise_NotImplementedError": {"doc_hash": "b2e4ab818c9adef40f921b22338d5b6303c1523c2a05ace1c486612d27e276d8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Scale._get_scale_Scale._get_scale.return.InternalScale_name_forw": {"doc_hash": "0c8856dcf9b81d67b1326c89fcfaef07d9a906277176b8e1027b516618c97a6a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Scale._spacing_Scale._identity.return.Identity_": {"doc_hash": "2511adb68b2ff9d5f2f052576bd50d17cca6b57a52732bf89d3aad032bfc714e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Nominal_Nominal._setup._TODO_define_this_more_c": {"doc_hash": "598124a07fce072c7523d9e4d0d82a707066d6ffd17429215e59b23b86e9b14f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Nominal._setup.convert_units_Nominal._setup.return.new": {"doc_hash": "b59bc245b649fd669f625de82d1709759a0c4935247a75a1a04cd65a1b16039a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Nominal.tick_Nominal.tick.return.new": {"doc_hash": "22bb32e31e9982998d9bb068cca642d6e554bed9de1fe2fe27ce7c587ce3fee4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Nominal.label_Discrete._": {"doc_hash": "1ba110cb93a307ae57e86954e9ace08017f3688afa3da16d1a545eda3aa2b9e9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_ContinuousBase_ContinuousBase._setup.return.new": {"doc_hash": "e117282818a6d38d619f627bfbc54b25949a180534c7e04408c525bf63512fde"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_ContinuousBase._get_transform_ContinuousBase._get_transform.if_arg_is_None_.elif_isinstance_arg_str_.if_arg_ln_.else_.raise_ValueError_f_Unknow": {"doc_hash": "ac340d112a246bdd8b8141a060b792957b12ed00eae55e918a0798899f8b79ff"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Continuous_Continuous.tick.return.new": {"doc_hash": "3a06de22b5e852043c0f0b1b22e1d15f81dde2ce489eb0b36def3e9ebd8ec2e9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Continuous.label_Continuous.label.return.new": {"doc_hash": "d3e51453d720d50e03462ffe06f0748aba1540c740ffef17f4132f6668d4aad7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Continuous._parse_for_log_params_Continuous._parse_for_log_params.return.log_base_symlog_thresh": {"doc_hash": "5f3f4973da7ff75e111c46c397a7fe386ca9f6fda58cc64a530d78c85d33956a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Continuous._get_locators_Continuous._get_locators.return.major_locator_minor_loca": {"doc_hash": "daeffda1681bbee23c07f9f7eed2eb6625214de15c7c2dc395f99d34c820653e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Continuous._get_formatter_Continuous._get_formatter.return.formatter": {"doc_hash": "c88a4eb43f6fa697e094ad0235928828e4997bac9512d3ea97f136927820b70c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Temporal_Temporal._priority.2": {"doc_hash": "e04f651da5e82e0b0edb839fc3565abb60b1bcb81a9c06b2dc9909db6d84332c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Temporal.tick_Temporal.tick.return.new": {"doc_hash": "a2cc725a56b3ffb3b48feea84b45845060b3e029d141a5f67abbf8392413ff36"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Temporal.label_Temporal.label.return.new": {"doc_hash": "15a7e7f432fa74079021109565a20d4caf79eeedbced8d5003dbda77c1b0e418"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Temporal._get_locators_Temporal._get_formatter.return.formatter": {"doc_hash": "cc255aaa0750670b0b645bf58ccfc91ac4c42e269bb21f78f8d8dc5a8775b797"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py___PseudoAxis.set_units.self.units.units": {"doc_hash": "ced798af7234fe65d1dda645380df9c72b1c256793a894eeedf1e60058bdd546"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_None_10__make_logit_transforms.return.logit_expit": {"doc_hash": "8006e74f9b0efbfc21d8ac71ecd840b3fbe5ec3cf04d935ec2d3e0fe4790324a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/area.py_from___future___import_an_AreaBase._plot.for_ax_ax_patches_in_pat.for_patch_in_ax_patches_.ax_add_patch_patch_": {"doc_hash": "158bb26ed439e9751b865c346302a71716ac641f3e1e3b8f4dbca81cf3e57cb0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/area.py_AreaBase._standardize_coordinate_parameters_AreaBase._get_verts.return.verts": {"doc_hash": "677826a2abba9d58ffbb8aa072332fd13eea272272497b6afea2fa7accfe1c22"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/area.py_AreaBase._legend_artist_AreaBase._legend_artist.return.mpl_patches_Patch_": {"doc_hash": "0e5f15a1bbc9142d441a0f4a49ebcf65f4c4ca9b766234df3f29a8df4f237807"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/area.py_Area._postprocess_artist_Area._postprocess_artist.artist_sticky_edges_val_i": {"doc_hash": "e45adc80d106807b1bec1b2b176646e2f8486be76c7b9416ebb6a3b6b191aa90"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/area.py_Band_": {"doc_hash": "ad29161795e4d5dc123fafd9adf41033bdbbaf226ddd160bf1844b60dcbeb27d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_from___future___import_an_if_TYPE_CHECKING_.from_seaborn__core_scales": {"doc_hash": "bda07f31253ee4c043ea0f24ed0ec0145b438425745ce4a9647aab477b593bf5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_BarBase_BarBase._make_patches.return.bars_vals": {"doc_hash": "62a5fe8a686926114fd3dad926360db70522c1c667f6d3dae26ef8894557dc86"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_BarBase._resolve_properties_BarBase._resolve_properties.return.resolved": {"doc_hash": "28aae51c1e85230d4208fa07ba1a78d1d39ccae7e17bc1b25a609d204898c9ef"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_BarBase._legend_artist_BarBase._legend_artist.return.artist": {"doc_hash": "a9fb41af08782edf1d4e322655a813eae978b5670c11c3279163c1481642bd2e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_Bar_Bar._TODO_is_this_mappable": {"doc_hash": "de8e93e304efcc192b17107f626a3561af27b85226c861b67d2673771f37eff6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_Bar._plot_Bar._plot.for___data_ax_in_split_.ax_add_container_containe": {"doc_hash": "b2d075eb7e1588a65c15d88f7887f6464ee984d2e8a620570b9165cc8c02b67a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_Bars_Bars._TODO_is_this_mappable": {"doc_hash": "2a511c5523f9916bebb0773a7f010681991a87905c1a56826679f832b0716f49"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_Bars._plot_": {"doc_hash": "6551965584848c587ffbbf783387c95a8fb11b6b37db4d2321a1fb67881597bc"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/base.py_resolve_color_resolve_color._i_e_set_fillalpha_to_": {"doc_hash": "2387afef1f64f2f7af9808925137454ef241d940a0aa6deee5b818ec1f3daea8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/base.py_document_properties_": {"doc_hash": "52feb2b4d1a7b184a98dac58c8354550ab2c720a16ea85c4609ef4222b366e00"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_from___future___import_an_if_TYPE_CHECKING_.from_seaborn__core_scales": {"doc_hash": "718bffe2c5afa01cbb4532e0b6082f9b4e04fd0ecf29746afe2b83cf4cfaeea8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_DotBase_DotBase._resolve_properties.return.resolved": {"doc_hash": "ca3b74a6caaa530cbed1f013ad7c880b5f8fbb67fd630b66cdfc9d74d71a2e11"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_DotBase._plot_DotBase._plot.for___data_ax_in_split_.ax_add_collection_points_": {"doc_hash": "4ea457069d3e289475ea8a392d04b9c28f39b3bf21abe2886d6de3282ff260d9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_DotBase._legend_artist_DotBase._legend_artist.return.mpl_collections_PathColle": {"doc_hash": "b436faf787c36f585597324c2437b04ccb70f23da30eb28d4ef8115d0942e68d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_Dot_Dot.edgestyle.Mappable_grouping_Fa": {"doc_hash": "a11b18007ba6898bf0ce8e73a9391a9f3fb999d834a1428d0b193fd7cb938512"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_Dot._resolve_properties_Dot._resolve_properties.return.resolved": {"doc_hash": "3bfba2fd7efc0c38b2976e1397867919438bf8a4231b3725c775d4522f313c10"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_Dots_Dots.fillalpha.Mappable_2_grouping_Fal": {"doc_hash": "89e3f4c9d37f156f1f6667e962fa8ede580ef360b21761a5dd11fbabc1bff7ee"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_Dots._resolve_properties_": {"doc_hash": "bb287f506c040a01a8ca51189de4bb65d16d1abdc8c33674a7aa9713398f4235"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/line.py_from___future___import_an_Path._sort.False": {"doc_hash": "a2cc2eb9ee7468ad56c701eab1145ea5b488de16ee2d139b08845b8b1f7a1e18"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/line.py_Path._plot_Path._plot.for_keys_data_ax_in_spl.ax_add_line_line_": {"doc_hash": "24ca40309b012cb2123976f3c7e5df1ee23d84860c9febc1764ee6ebdb37286f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/line.py_Path._legend_artist_Path._handle_capstyle.if_vals_linestyle_1_i.kws_dash_capstyle_ca": {"doc_hash": "a02179eaaa30203b7c7a8b0705ce6b18b886aba1f7993cf15e1af3c91672ab18"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/line.py_Line_Paths.__post_init__.self_artist_kws_setdefaul": {"doc_hash": "b5f45a5efbf3864810ee438b4ab6dcbbb3f5d1ce1d0759c1082672293388e391"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/line.py_Paths._setup_lines_Paths._setup_lines.return.line_data": {"doc_hash": "255830a6e6e48e1e7fd5764567980ade302c5f998cf5ad48d43e48df49bd3857"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/line.py_Paths._plot_Lines._sort.True": {"doc_hash": "7a6c2240a00fd988c50cb4136f5809050d676cd946cd77ac746cab0e5cd5f397"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/line.py_Range_": {"doc_hash": "83155e5cd3fe4897a0c1eb31ea44a55d71b46aac8677159bb9d752e9b00968af"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_SemanticMapping_SemanticMapping.map.return.plotter": {"doc_hash": "cc89a6c07a98ac34cae4d496dc02e794b6b8dd8646ab4d73264097e48614ad1c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_SemanticMapping._check_list_length_SemanticMapping.__call__.if_isinstance_key_list_.else_.return.self__lookup_single_key_": {"doc_hash": "76c071577b7a4c80bd22367d33f2369d06a36356f21a13e90af689e2727b70bf"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_HueMapping._lookup_single_HueMapping._lookup_single.return.value": {"doc_hash": "fd07c305817f7801e8fcbc9b87db76b7c400d4737b017bcdb1a8843d747cf408"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_HueMapping.infer_map_type_HueMapping.categorical_mapping.return.levels_lookup_table": {"doc_hash": "db4d9982208671ecd4832c1cec1f99f6605d18f3944a8992f1300fc873ee045b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/aggregation.py_Est_Est._process.return.pd_DataFrame_res_": {"doc_hash": "01ffbf351ee1957c2fbadfdc31309d87a84b12b71d1a8857fa4bb0a585979cc2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/aggregation.py_Est.__call___": {"doc_hash": "992a4097215f39387efb994a48180ae1e706aa3d1979c6608e3278411a1e38e2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/histogram.py_from___future___import_an_Hist._but_it_only_computes_un": {"doc_hash": "aeb97971e399a4260fd0fa292346e02f55c2c62a7f1797f0df7af80cdf0eba1c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/histogram.py_Hist._define_bin_edges_Hist._define_bin_edges.return.bin_edges": {"doc_hash": "483fa4fba99017f9153b587f1844db674736ae3ad28f95ba81e471b3d438f6ea"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/histogram.py_Hist._define_bin_params_Hist._define_bin_params.return.bin_kws": {"doc_hash": "65dba00fb4445b70f2653d5e2462e4cc8b3ee58795d672b9f5d72524e7b8e7b5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/histogram.py_Hist._get_bins_and_eval_Hist._eval.return.pd_DataFrame_orient_pos": {"doc_hash": "c4639221757fa96709bbbb60d6ddc4cde2bc407ed142dd4a527bacd7ec600c47"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/histogram.py_Hist._normalize_Hist._normalize.return.data_assign_other_his": {"doc_hash": "ac761278c9f9fa583626723274c33164cc1329a2b18b6643979b6d4bb123cc70"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/histogram.py_Hist.__call___": {"doc_hash": "f69eea0126317ca49f3df33471cb36c8ff86e47b876b9be7d626f78251d5fa65"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py__BaseGrid__BaseGrid.figure.return.self__figure": {"doc_hash": "d081d04822f5990de4a51792b9280c27b50f01c9a1617ecf0ba28dfa6384e88b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py__BaseGrid.apply__BaseGrid.apply.return.self": {"doc_hash": "4639a2b45cb4592e4f4921fc5a2acd4ac5e2fc078da47abd682fb87235a5a1b4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py__BaseGrid.pipe__BaseGrid.savefig.self_figure_savefig_args": {"doc_hash": "3a76b2be18df4cfda9216ee8349053b934ddc1868d933275db860c65c3c36bf9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_Grid_Grid.tight_layout.return.self": {"doc_hash": "cd94bf0315813d2a2114c2eda638c61f12dd2dfcb5c3e8d711500fe544bc246f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_Grid._get_palette_Grid._get_palette.return.palette": {"doc_hash": "243380787eada725dd2a77752d4eafcec71e35085831af77a7eebd560da0c5fd"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_Grid.legend_Grid.tick_params.return.self": {"doc_hash": "2323abe6608164a88565489223bd7ebb4ee8a6b9d8376c6ef7f9aae4c402a534"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid.refline_FacetGrid.refline.return.self": {"doc_hash": "a7c1f86d5adbe88d0bb816f85a009c38d2a45f1fcdcc0bd2f336aa086c9848aa"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__LVPlotter._lvplot__LVPlotter._lvplot._If_we_only_have_one_dat": {"doc_hash": "261dbeea48b0a788401199724e8b5546db5b7fccc347cb86f4bbbb721a71fd2e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__LVPlotter._lvplot.if_len_box_data_1___LVPlotter._lvplot.if_len_box_data_1_.else_.ax_add_collection_collect": {"doc_hash": "e18a47f65154bbf58c7b95042bc8234bf863ec50bf43a14a5c89f1577218d6c2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_violinplot.__doc___violinplot.__doc__.dedent_": {"doc_hash": "1afc7e679727fc4915e41e0b602e7d3c6a90203d5041a080cc1619efdce28268"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_boxenplot_boxenplot.return.ax": {"doc_hash": "7720041a73622bade947a771fe495d12293ac1b2c3d8399eba0322f5c408d65c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/cm.py__lut_dict_": {"doc_hash": "e70e3ff4cc854389305a23b85451761a248d5d29a5547b9f2d0c224f927ad1b6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/appdirs.py__get_win_folder_with_jna_": {"doc_hash": "c1b0628617644bb5d8f10ee38ddc231c055f4b7bafcdc328678116c2027c4d17"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py_set_axes_style._": {"doc_hash": "b3f2342f81a359ad268cae8e4955a12681625fba64af06f758871949bd94be8e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__regression_docs_update___lmplot.return.facets": {"doc_hash": "c412198c5976165edb9a25761da1a81657edc01085d421c6b9d242f911b1ca79"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_load_dataset_load_dataset._Set_some_columns_as_a_c": {"doc_hash": "abca8afb8bab2edf71979385b9e11d271a4c93c2cf67d24e7139d3a1fc97dcd7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_load_dataset.if_name_tips__load_dataset.return.df": {"doc_hash": "4aa4bf2cc8a0af10ffdbc47e0e7c4832f987c2e7417d5be5c4d95f63563eb967"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__deprecate_ci__deprecate_ci.return.errorbar": {"doc_hash": "537d77bf664f34c0915fce05aa1c38ef0bbb2c50c24cf31f3d75f76b7f84fbe7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__disable_autolayout_": {"doc_hash": "7ad9d6043df1d0058d729f0b02764efe2c2e9c47be2909da2716775891e422f4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_io_assert_gridspec_shape.if_Version_mpl___version_.else_.assert_gs_ncols_ncols": {"doc_hash": "64ced690f0cba77224178310fb8a58c6db335342d59ca73cbf7b7dc56eb0b9ba"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLayerAddition.test_variable_list_TestLayerAddition.test_variable_list.None_5": {"doc_hash": "4813c1eccdd7b580b118c6b55ceefaf21c9d06e56d9b6615e54b4b4c40910c4d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLayerAddition.test_type_checks_TestLayerAddition.test_type_checks.None_3.p_add_MockMark_MockMar": {"doc_hash": "abbab4033da7b599eb41c03727fe467a923bf64caaf9ac8ef806b0b22c361802"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_computed_var_ticks_TestScaling.test_computed_var_ticks.assert_array_equal_ax_get": {"doc_hash": "08213964cd9dffba522d3bdbfc94167e4e99d6310bafe62231cdd25f75d01254"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_computed_var_transform_TestScaling.test_computed_var_transform.assert_array_equal_xfm_1": {"doc_hash": "70e968cd8b85863845c701868fdf2463f37ced3829e8a76fefc008feb40ae296"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_explicit_range_with_axis_scaling_TestScaling.test_derived_range_with_axis_scaling.assert_vector_equal_m_pas": {"doc_hash": "78758dd213ccbf0327cfe1ce3e8623ac78801a6d8ca163e1a273cba675178140"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_theme_default_TestPlotting.test_stat_and_move.assert_vector_equal_m_pas": {"doc_hash": "ad6e2e36c43314a4f9c49378ecedb1157b3e93016b318e707065f5cf8372ed8f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_stat_log_scale_TestPlotting.test_stat_log_scale._Test_data_was_not_mutat": {"doc_hash": "cb71ad353ce0e7ae8aa55a0ec3bf8ae13be63de2cb0cef7ed41b49936fd7d36c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_move_log_scale_TestPlotting.test_multi_move_with_pairing.for_frame_in_m_passed_dat.assert_vector_equal_frame": {"doc_hash": "0830fc34fc24669ae37b9703cf3a16a9ccb90e87e20320c47f399a699d000ed9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_move_with_range_TestPlotting.test_move_with_range.for_i_df_in_m_passed_dat.assert_array_equal_df_x_": {"doc_hash": "229effb3158b4f402dee616bf9772df25e47a915647ce6c92b6313080c5e1739"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_methods_clone_TestPlotting.test_on_figure.assert_p__figure_is_f": {"doc_hash": "4270fa7d666c7786be16d606affebaa2158a45759573e55bac48534704bb60b9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_on_subfigure_TestPlotting.test_on_subfigure.assert_p__figure_is_sf2_f": {"doc_hash": "ebddf79f8385d15ff3c98e1c18a0b0e771bc3779eb4ca66868273dff85bbb5ed"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_limits_TestPlotting.test_limits.assert_ax_get_xlim_": {"doc_hash": "c4818de1cf7b4ce87f7a696d7e42e1aaf63ad223f6085e0faa4662768e8f6f2b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_labels_axis_TestPlotting.test_labels_legend.None_1": {"doc_hash": "23468615dcbfacfb6566e0afdc385d7fd651cdaeca97d1310de9d9758225a652"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_labels_facets_TestPlotting.test_title_single.assert_p__figure_axes_0_": {"doc_hash": "cf2136e9af773ca584530eb295e5a3d42b5f18a2aa59707435c69af486f86814"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_title_facet_function_TestPlotting.test_title_facet_function.None_1.assert_ax_get_title_": {"doc_hash": "f1472544cfe449281fbc17688003f0f6ea5bea9ec0c483512d6ba1f7eeb90b00"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestFacetInterface.test_layout_algo_TestFacetInterface.test_layout_algo.assert_sep1_sep2": {"doc_hash": "fd6437c15f0478bacdff4e96064b4ab757d22479b386fa80f722d64d30fdd9f6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_list_of_vectors_TestPairInterface.test_with_no_variables.assert_len_p__figure_axes": {"doc_hash": "a6fe113e0eb61486285ca91d5d18a721e6983c8ab7228d9b9227dce8c0611240"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_x_wrapping_TestPairInterface.test_x_wrapping.for_ax_var_in_zip_p__fig.assert_label_get_text_": {"doc_hash": "24acc3fdba216abdf2d56cdc59655327fd91b8264a9011b1359d34d00bb14f25"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_y_wrapping_TestPairInterface.test_y_wrapping.for_i_ax_in_enumerate_p_.assert_label_get_text_": {"doc_hash": "e81a3066c08c28acf9c6654e54723f2c5a8727b0aa8604dc7e1e67671b9a4f85"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_cross_mismatched_lengths_TestPairInterface.test_labels.assert_ax1_get_xlabel_": {"doc_hash": "321b1cc714ebee371b89b7be8dea8237071d4e2b98450dff0bc675a7b3b82e9c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_re_TestContinuous.test_color_callable_values._FIXME_RGBA": {"doc_hash": "5d8f5f4e62c236b41059c9e9741ed5e7fe5986b465a5e3b5ce1306e90493e564"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestContinuous.test_color_with_norm_TestContinuous.test_log_tick_upto.assert_a_major_locator_nu": {"doc_hash": "7a64d716f3b3d2521abc07019050a9c6af1c5c25dcb9037ed4fb3b336fe4b0b4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestContinuous.test_log_tick_count_TestContinuous.test_log_tick_every.with_pytest_raises_Runtim.Continuous_trans_log_t": {"doc_hash": "41e92ac224801565d59d6c9b4a77d0de0e948c83f186279dd26c2ab102e4ed0f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestContinuous.test_symlog_tick_default_TestContinuous.test_symlog_tick_default.assert_pos_ticks_0_0": {"doc_hash": "e2d7a5a8b3bf6dfcd6d18d8a7e82ee30b7027dc73afcc27a844bd2899ae2b217"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestContinuous.test_label_formatter_TestContinuous.test_label_type_checks.None_1.s_label_like_2_": {"doc_hash": "508ce6cdd8032837afda2569535f946a68b288ae117ee701a046eee7221bc942"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestTemporal_TestTemporal.test_tick_upto.assert_set_locator_maxtic": {"doc_hash": "943731f1fa14ac9306cab3053ebbea553236737333f54372127f2f9aa13c8eec"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestTemporal.test_label_formatter_": {"doc_hash": "04683af5dac38a90e1e1a524b90d61345ac5930be9dbfadf71802a3830992c40"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_y_paired_and_wrapped_TestSubplotSpec.test_y_paired_and_wrapped_single_row.None_4": {"doc_hash": "4d1c768416ce7192e5bae19122691e4894dc514857db26b74844da86714ce346"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_area.py_TestAreaMarks.test_set_parameters_TestAreaMarks.test_set_parameters.assert_ls_expected": {"doc_hash": "ff01871107f167f4eaef8a14bee5698d70b40ea33944fdc40efaaffdd26a82c6"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_area.py_TestAreaMarks.test_mapped_TestAreaMarks.test_mapped.assert_lws_0_lws_1_": {"doc_hash": "a5e6611769ed9e3dda4994ada9289f759f5a9bb58c77618f4e2f473b258f6eae"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_area.py_TestAreaMarks.test_unfilled_": {"doc_hash": "00e9803f1d6b81421375ac7abae6b1037775136608466b2863cc7a04a0088596"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_np_TestBar.test_numeric_positions_horizontal.for_i_bar_in_enumerate_b.self_check_bar_bar_0_y_": {"doc_hash": "0dfbd08f5a448b3bfd4cb8542c92c3ce223dc51288ac4c5e72c49060b816602e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBar.test_set_properties_TestBar.test_set_properties.for_bar_in_ax_patches_.assert_bar_get_linestyle_": {"doc_hash": "4e4f6087222b3b29d8c003dd4a5cd96db200d0215706f697f6a8266f2cc979cb"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBar.test_mapped_properties_TestBar.test_mapped_properties.assert_ax_patches_0_get_": {"doc_hash": "281f1f1b5f20bbf9ab30f8d9c791d6722af2963c6b2aee17597a5c9d0a043322"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBar.test_zero_height_skipped_TestBar.test_artist_kws_clip.assert_patch_clipbox_is_N": {"doc_hash": "104bca697a2875fd2cb2483a8a297de73ff8c04f7b3aeb906fa03bced6cb2256"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBars_TestBars.test_positions.for_i_path_in_enumerate_.assert_verts_3_1_y_i": {"doc_hash": "8d6a7d2fdb92bf1629ecf6b0ce87c5ec7704e50808f2681579104c1b3598402e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBars.test_positions_horizontal_TestBars.test_positions_horizontal.for_i_path_in_enumerate_.assert_verts_1_0_y_i": {"doc_hash": "c9d081538421684fa1f309f373d31163c88ed4465f00ed1ac78569a3e46f32de"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBars.test_width_TestBars.test_mapped_edgewidth.assert_array_equal_np_arg": {"doc_hash": "8afe176575266134a4db8da2d749143357de70f0c149ceac0d3f563c282f446d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBars.test_auto_edgewidth_TestBars.test_auto_edgewidth.assert_lw0_lw1_all_": {"doc_hash": "9562757913a6af63b98875adfe7f03b4f16faa9c515d828e1a41e842e2c0e3ad"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBars.test_unfilled_": {"doc_hash": "df30326a7665d79e28a7daa18e954010cf4b103e76d5d57ae1b949302cd33734"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_from_matplotlib_colors_im_DotBase.check_colors.assert_array_equal_getter": {"doc_hash": "7f1f8de230ef1d98a56075108bbffcb82087b29ddc2ab198f75bf88dce1c6fc1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDot_TestDot.test_simple.self_check_colors_edge_": {"doc_hash": "934931723a4e157d4a316929e44a0f9c400da17a83a39a769a107bfc06d9cfad"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDot.test_filled_unfilled_mix_TestDot.test_filled_unfilled_mix.assert_array_equal_points": {"doc_hash": "b80f893a5ca720dd3c689b251a120bade7a699065e2a80913ccb58fe237991ab"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDot.test_missing_coordinate_data_TestDot.test_missing_semantic_data.self_check_offsets_points": {"doc_hash": "78c3aee1a2d393d2eed151e65220782569a0f555a026d6702666a747e48de7ac"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDots_TestDots.test_simple.self_check_colors_edge_": {"doc_hash": "fbeda92ab95dc7f13d5ca8e50feeace2c5e53e05059fae6b25c85b077bd5e9e2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDots.test_color_direct_TestDots.test_color_direct.self_check_colors_edge_": {"doc_hash": "6227de2a2fe2bb8d8e26e2571b20008192398d9b5856d23eb8f88529dc23d2c5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDots.test_color_mapped_TestDots.test_color_mapped.self_check_colors_edge_": {"doc_hash": "b467f219a5e85e2ba36164f0f4de2b5852722be12d94f4eaa9746eeea052c4a3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDots.test_fill_TestDots.test_fill.self_check_colors_edge_": {"doc_hash": "c09218369783ed0133ad56a1fd69cde04c71342f0e2c27dee71176a60ec9dc98"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDots.test_pointsize_TestDots.test_stroke.assert_array_equal_points": {"doc_hash": "e3f64a006f3a071813c781ba0f3ba6b8fdef306e64ed52e4ec810473ee895219"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDots.test_filled_unfilled_mix_": {"doc_hash": "4ab9ee8ada298ded76130dc11829354e78153e5366ecfbb5972da8f4d2f6e513"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_np_TestPath.test_xy_data.None_3": {"doc_hash": "d767b24822a6aee2e2b26d638804920181ceaae3e86758b943322db24847003e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_shared_colors_direct_TestPath.test_separate_colors_direct.None_3": {"doc_hash": "68615249f79b699129c359224e58c29e70f69a20361ae1d19ae5fb1a958c9626"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_shared_colors_mapped_TestPath.test_shared_colors_mapped.for_i_line_in_enumerate_.None_2": {"doc_hash": "6d88d9c165bd668232fc0403981bc10267253d4dc008793b4d57b233506bfa7b"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_separate_colors_mapped_TestPath.test_separate_colors_mapped.for_i_line_in_enumerate_.None_2": {"doc_hash": "ab6bc05f010f0a7ebf39e6e17923d8dd68782f769df0c3732997b4dca314ebfe"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_color_with_alpha_TestPath.test_color_with_alpha.None_3": {"doc_hash": "6bb60d4b8ca3229a6c73e0da700d465ded13be59a3aa3e8f12e5bf19d96eddc2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_color_and_alpha_TestPath.test_color_and_alpha.None_3": {"doc_hash": "5d6746b25d45449bf9fa6f0af9cc5713c4f8e2ca122ea8a77fbafa448dc0b054"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_other_props_direct_TestPath.test_other_props_direct.assert_line_get_markeredg": {"doc_hash": "8a3ea9b4d6a6c0cf7c3e3dee9fe41f41afe62dde6f84c2cdd8588bae0b7cbaa5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_other_props_mapped_TestPath.test_other_props_mapped.assert_line1_get_markersi": {"doc_hash": "aaa6cb727bf3d7e58c96eda8649d370037c88d1456b06e5103310d89ecceec89"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_capstyle_TestPath.test_capstyle.assert_line_get_solid_cap": {"doc_hash": "6d99fc08c13b0a1f68ae2bffaeea9c7a90fa66c5830ac9bd23b54c9572396692"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestLine_TestLine.test_xy_data.None_3": {"doc_hash": "facb56d44eb36054aa8d841ecb4b307ba74783ebdde6743a62c5a5e3475c3632"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPaths_TestPaths.test_xy_data.None_3": {"doc_hash": "f264466acfedf9651ea2090304b6196079139422947dbe1b77acdd9e806d08f5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPaths.test_props_direct_TestPaths.test_props_direct.assert_lines_get_linestyl": {"doc_hash": "86153367aadf8d1f90d87b3e7ff71e26827af8f19f5dbe67564b555ac8a757bf"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPaths.test_props_mapped_TestPaths.test_props_mapped.assert_lines_get_linestyl": {"doc_hash": "2f00bb301c9b4c7b759c5610efc6189645831fdb5626921aa0337ed308b512fa"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPaths.test_color_with_alpha_TestPaths.test_color_and_alpha.assert_same_color_lines_g": {"doc_hash": "2ae266fa43477c1b0ab15b80658e15fa5f0f7a24ffb57e361ee679a8aea08200"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPaths.test_capstyle_TestPaths.test_capstyle.with_mpl_rc_context_rc_.None_2": {"doc_hash": "49921a3657b422912080cdbef94e6441c83dcd678182fea96f05c59c046cc36f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestLines_TestLines.test_xy_data.None_3": {"doc_hash": "71954ac1bd5462c54fbcfcff504133a2e5f277a677a54b3e9d5a175cdd966da0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestRange_TestRange.test_xy_data.for_i_path_in_enumerate_.None_1": {"doc_hash": "ea07f27a9e2d152e0df2d74c6eb22024b70c47fe7e11555c46761decf6f775e2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestRange.test_mapped_color_TestRange.test_mapped_color.for_i_path_in_enumerate_.assert_same_color_lines_g": {"doc_hash": "bc52e49cb94dd4e0b3b8800db95ba97bf52c309205f4fc3ed792bde76eb65216"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestRange.test_direct_properties_": {"doc_hash": "3fa538bdac8320d4c815313f61e4c4ba2aef64882467194ede1fce0e1c01878f"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_aggregation.py_np_AggregationFixtures.get_groupby.return.GroupBy_cols_": {"doc_hash": "7a6f973217bc6a0d4997c2863fc65206feaa751fedca974a861ef4b7805a9ce9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_aggregation.py_TestAgg_TestAgg.test_func.assert_frame_equal_res_e": {"doc_hash": "03cd5c9f7bc27ada7ec2ae8103d8a6ca7a4493f209e6417984b362b0069c0584"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_aggregation.py_TestEst_TestEst.test_mean_sd.assert_frame_equal_res_e": {"doc_hash": "56ab76288e9afe900da06bd54a6a71397db671a90891e2e895c86a84a6a8c136"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_aggregation.py_TestEst.test_sd_single_obs_": {"doc_hash": "2e277ab867cd8dbdb6bec2754bc2d025b0ee13a4eb726c4c4cdbb53a2cee1c62"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_histogram.py_np_TestHist.test_proportion_stat.assert_out_y_sum_": {"doc_hash": "e95f9c33b083b4e91411e30f232dee23165fa6e77a0012d8d56139f6daa4b744"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_histogram.py_TestHist.test_percent_stat_TestHist.test_histogram_single.assert_array_equal_out_s": {"doc_hash": "1bcba1773f97f05fdf40c6173804a3c33d4a273c1085d6f7e15772383a3af58c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_histogram.py_TestHist.test_histogram_multiple_": {"doc_hash": "736f8493fd67d60a0a8da6c0d37325736b6c5eda8af3e276b2a8ae8fbae8b57a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_apply_TestFacetGrid.test_pipe.assert_g_figure_get_facec": {"doc_hash": "5e2e5e4470264c4cc5c21c6cfd17abb54840461f29639e6788311353c6a3eee7"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_tick_params_TestFacetGrid.test_tick_params.for_ax_in_g_axes_flat_.for_axis_in_xaxis_ya.for_tick_in_getattr_ax_a.assert_tick_get_pad_": {"doc_hash": "38a866c054eaffd169081f7eeb5537c2886c2acb02b577fa7fe8d255de41fc3d"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_corner_TestPairGrid.test_corner.assert_g_axes_0_0_get_y": {"doc_hash": "ef8101d9e7c2c322404c575a930d48642e13d01b94b66369ce2477afbb41e33e"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_pairplot_markers_TestPairGrid.test_pairplot_markers.with_pytest_warns_UserWar.g.ag_pairplot_self_df_hue_": {"doc_hash": "c795e5129ac6c03f436cc3682550e8232ab79283f804cfb5e7fbab3bb12747a9"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_corner_despine_TestPairGrid.test_tick_params.for_ax_in_g_axes_flat_.for_axis_in_xaxis_ya.for_tick_in_getattr_ax_a.assert_tick_get_pad_": {"doc_hash": "888514a83086fbd9c1d90c3d9f657e2daa8e84169483eb1a330c6a7681cb6796"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestStripPlot.test_jitter_TestSwarmPlot.func.staticmethod_partial_swar": {"doc_hash": "dd99dd1d364d86a69a4accf4b82f512ce000b69822c01e0c4d5cd5a5667a2703"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter_TestBarPlotter.test_nested_width.None_2": {"doc_hash": "f595cbeb8a9e12475264d503f83a19a5ce618a4558eeae28e412dddbd1ce74d8"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_errorbar_TestBarPlotter.test_errorbar.for_i_line_in_enumerate_.assert_array_equal_line_g": {"doc_hash": "196be72c857370292a937f356723885f10a889f4e53e57a24fac4f623dd6b1e3"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_errorbar_TestPointPlotter.test_errorbar.for_i_line_in_enumerate_.assert_array_equal_line_g": {"doc_hash": "5b50e498f4b67d3d29326550985fdb57928b863c52dca5a44c60f7a659df05d1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCatPlot.test_ax_kwarg_removal_TestCatPlot.test_share_xy.None_9.assert_len_ax_collections": {"doc_hash": "eefce72bc8dc22e299db35042c3bca8a2136762585603c848ad8fe3e3ee2de1a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_axes_data_TestBoxenPlotter.test_box_colors.None_3": {"doc_hash": "6f8e803dc9b65951acf2f9f3d9a915aaa93bb11f1d35e3103eed813ad98fa678"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_line_kws_TestBoxenPlotter.test_line_kws.plt_close_all_": {"doc_hash": "f44f16336b801b0d4a70a3c0033d665fc82ebfa5e6c21563b379e4f4a96e3596"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_flier_kws_TestBoxenPlotter.test_flier_kws.plt_close_all_": {"doc_hash": "54d343f260c5265f119cdbe1769af01908df589f7726c463a1bba836274a2ab5"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_box_kws_TestBoxenPlotter.test_box_kws.plt_close_all_": {"doc_hash": "b11f80e597138a601029537f41b3e789e90a5cddb0ab907ef6bf3f00cd3e7fb0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestRugPlot.test_multiple_rugs_TestRugPlot.test_log_scale.assert_array_almost_equal": {"doc_hash": "35204fdd4178de1735b80066088addd0f5ec1567bc1426cc3bc38f4f6e554f2c"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_wide_vs_long_data_TestKDEPlotUnivariate.test_empty_data.assert_not_ax_lines": {"doc_hash": "a4df17cd1b94ad43e4f92f880b2ea6dd2672bfc2c64378a663591d75080a6278"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_singular_data_TestKDEPlotUnivariate.test_singular_data.None_3": {"doc_hash": "7154dd1d530795f7dd5b5f1840797d302ce7bf73553b07b647ead753353e353a"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_variable_assignment_TestKDEPlotUnivariate.test_shade_deprecation.assert_array_equal_": {"doc_hash": "9585b24e070117de596bc5f3662807e650b5d11c913cd06e2286410e066f3630"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_discrete_TestHistPlotUnivariate.test_categorical_yaxis_inversion.assert_ymax_ymin": {"doc_hash": "f5b3d11eda7c3e9ca2acb4bb8072fad5ddc3cffa8c6ac90691c5e80ef39ec6b4"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_log_scale_dodge_TestHistPlotUnivariate.test_log_scale_dodge.assert_np_unique_np_round": {"doc_hash": "2874af1f7a2fa953a1f20c4b5278b25aa0a2cdca83e8fbb63fb0236de1817102"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_ticklabels_off_TestHeatmap.test_custom_ticklabels.assert_p_yticklabels_y": {"doc_hash": "5ad52bb5842c5c40c49452fa776cd71e3d6c0931519a71fd684a4232ca0100f0"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_TestPalette_TestPalette.test_set_palette.assert_mpl_colors_same_co": {"doc_hash": "aea3f3f5730f66e9206a3c7e7c113496ea10adac9d2b298e93d4e43acdf5a0c2"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_regplot_scatter_kws_alpha_TestRegressionPlots.test_regplot_scatter_kws_alpha.for_line_in_ax_lines_.assert_line_get_alpha_": {"doc_hash": "b6de31398d7c95a6a1a5f242d7616e7f610cff858f29799b918a544707d342ee"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_orient_TestLinePlotter.test_orient.with_pytest_raises_ValueE.lineplot_long_df_x_y_": {"doc_hash": "4de373ee598dc06521993b32b14ab057e801869bf56fe4ec042746010c963468"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_supplied_color_array_TestScatterPlotter.test_hue_order.assert_t_get_text_for_": {"doc_hash": "cabbbcec7369a47f6933d6406b8d0bd2fb64be87436d1b25406f60833f9d8530"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestEstimateAggregator_TestEstimateAggregator.test_custom_func_estimator.assert_out_x_func_l": {"doc_hash": "57cd777eeb67a2e716d2861afbb8dd5e499606f57afd701df9ac1b4b0aaf17cd"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestEstimateAggregator.test_se_errorbars_TestEstimateAggregator.test_se_errorbars.None_5": {"doc_hash": "a603f8f1f6b5089364be72d8f9716cbf218d8b013994c14989b2c56faa198535"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_locator_to_legend_entries_test_locator_to_legend_entries.for_i_exp_in_enumerate_.assert_re_match_f_1e_0_ex": {"doc_hash": "a7092e7fdcbc3379e529967c8bf9d40af13624a718eab764533c0f73a732040c"}}, "docstore/data": {"/tmp/repos/swe-bench_mwaskom__seaborn/ci/cache_test_datasets.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/ci/cache_test_datasets.py__", "embedding": null, "metadata": {"file_path": "ci/cache_test_datasets.py", "file_name": "cache_test_datasets.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 20, "span_ids": ["impl", "docstring", "imports"], "tokens": 84}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nCache test datasets before running test suites to avoid\nrace conditions to due tests parallelization\n\"\"\"\nimport seaborn as sns\n\ndatasets = (\n \"anscombe\",\n \"attention\",\n \"dots\",\n \"exercise\",\n \"flights\",\n \"fmri\",\n \"iris\",\n \"planets\",\n \"tips\",\n \"titanic\"\n)\nlist(map(sns.load_dataset, datasets))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/ci/check_gallery.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/ci/check_gallery.py__", "embedding": null, "metadata": {"file_path": "ci/check_gallery.py", "file_name": "check_gallery.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 15, "span_ids": ["impl", "docstring", "imports"], "tokens": 79}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Execute the scripts that comprise the example gallery in the online docs.\"\"\"\nfrom glob import glob\nimport matplotlib.pyplot as plt\n\nif __name__ == \"__main__\":\n\n fnames = sorted(glob(\"examples/*.py\"))\n\n for fname in fnames:\n\n print(f\"- {fname}\")\n with open(fname) as fid:\n exec(fid.read())\n plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/gallery_generator.py___INDEX_TEMPLATE._": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/gallery_generator.py___INDEX_TEMPLATE._", "embedding": null, "metadata": {"file_path": "doc/sphinxext/gallery_generator.py", "file_name": "gallery_generator.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 125, "span_ids": ["impl", "imports:10", "impl:2", "docstring", "execfile", "docstring:2", "imports"], "tokens": 575}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nSphinx plugin to run example scripts and create a gallery page.\n\nLightly modified from the mpld3 project.\n\n\"\"\"\nimport os\nimport os.path as op\nimport re\nimport glob\nimport token\nimport tokenize\nimport shutil\nimport warnings\n\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt # noqa: E402\n\n\n# Python 3 has no execfile\ndef execfile(filename, globals=None, locals=None):\n with open(filename, \"rb\") as fp:\n exec(compile(fp.read(), filename, 'exec'), globals, locals)\n\n\nRST_TEMPLATE = \"\"\"\n\n.. currentmodule:: seaborn\n\n.. _{sphinx_tag}:\n\n{docstring}\n\n.. image:: {img_file}\n\n**seaborn components used:** {components}\n\n.. literalinclude:: {fname}\n :lines: {end_line}-\n\n\"\"\"\n\n\nINDEX_TEMPLATE = \"\"\"\n:html_theme.sidebar_secondary.remove:\n\n.. raw:: html\n\n \n\n.. _{sphinx_tag}:\n\nExample gallery\n===============\n\n{toctree}\n\n{contents}\n\n.. raw:: html\n\n
\n\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/gallery_generator.py_create_thumbnail_indent.return.s_replace_n_n_N_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/gallery_generator.py_create_thumbnail_indent.return.s_replace_n_n_N_", "embedding": null, "metadata": {"file_path": "doc/sphinxext/gallery_generator.py", "file_name": "gallery_generator.py", "file_type": "text/x-python", "category": "implementation", "start_line": 134, "end_line": 167, "span_ids": ["indent", "create_thumbnail"], "tokens": 329}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def create_thumbnail(infile, thumbfile,\n width=275, height=275,\n cx=0.5, cy=0.5, border=4):\n baseout, extout = op.splitext(thumbfile)\n\n im = matplotlib.image.imread(infile)\n rows, cols = im.shape[:2]\n x0 = int(cx * cols - .5 * width)\n y0 = int(cy * rows - .5 * height)\n xslice = slice(x0, x0 + width)\n yslice = slice(y0, y0 + height)\n thumb = im[yslice, xslice]\n thumb[:border, :, :3] = thumb[-border:, :, :3] = 0\n thumb[:, :border, :3] = thumb[:, -border:, :3] = 0\n\n dpi = 100\n fig = plt.figure(figsize=(width / dpi, height / dpi), dpi=dpi)\n\n ax = fig.add_axes([0, 0, 1, 1], aspect='auto',\n frameon=False, xticks=[], yticks=[])\n if all(thumb.shape):\n ax.imshow(thumb, aspect='auto', resample=True,\n interpolation='bilinear')\n else:\n warnings.warn(\n f\"Bad thumbnail crop. {thumbfile} will be empty.\"\n )\n fig.savefig(thumbfile, dpi=dpi)\n return fig\n\n\ndef indent(s, N=4):\n \"\"\"indent a string\"\"\"\n return s.replace('\\n', '\\n' + N * ' ')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/gallery_generator.py_ExampleGenerator_ExampleGenerator.components.return._join_refs_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/gallery_generator.py_ExampleGenerator_ExampleGenerator.components.return._join_refs_", "embedding": null, "metadata": {"file_path": "doc/sphinxext/gallery_generator.py", "file_name": "gallery_generator.py", "file_type": "text/x-python", "category": "implementation", "start_line": 170, "end_line": 256, "span_ids": ["ExampleGenerator.rstfilename", "ExampleGenerator.fname", "ExampleGenerator.modulename", "ExampleGenerator.pngfilename", "ExampleGenerator.sphinxtag", "ExampleGenerator.pyfilename", "ExampleGenerator.pagetitle", "ExampleGenerator.dirname", "ExampleGenerator.components", "ExampleGenerator.htmlfilename", "ExampleGenerator", "ExampleGenerator.thumbfilename", "ExampleGenerator.plotfunc"], "tokens": 561}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ExampleGenerator:\n \"\"\"Tools for generating an example page from a file\"\"\"\n def __init__(self, filename, target_dir):\n self.filename = filename\n self.target_dir = target_dir\n self.thumbloc = .5, .5\n self.extract_docstring()\n with open(filename) as fid:\n self.filetext = fid.read()\n\n outfilename = op.join(target_dir, self.rstfilename)\n\n # Only actually run it if the output RST file doesn't\n # exist or it was modified less recently than the example\n file_mtime = op.getmtime(filename)\n if not op.exists(outfilename) or op.getmtime(outfilename) < file_mtime:\n self.exec_file()\n else:\n print(f\"skipping {self.filename}\")\n\n @property\n def dirname(self):\n return op.split(self.filename)[0]\n\n @property\n def fname(self):\n return op.split(self.filename)[1]\n\n @property\n def modulename(self):\n return op.splitext(self.fname)[0]\n\n @property\n def pyfilename(self):\n return self.modulename + '.py'\n\n @property\n def rstfilename(self):\n return self.modulename + \".rst\"\n\n @property\n def htmlfilename(self):\n return self.modulename + '.html'\n\n @property\n def pngfilename(self):\n pngfile = self.modulename + '.png'\n return \"_images/\" + pngfile\n\n @property\n def thumbfilename(self):\n pngfile = self.modulename + '_thumb.png'\n return pngfile\n\n @property\n def sphinxtag(self):\n return self.modulename\n\n @property\n def pagetitle(self):\n return self.docstring.strip().split('\\n')[0].strip()\n\n @property\n def plotfunc(self):\n match = re.search(r\"sns\\.(.+plot)\\(\", self.filetext)\n if match:\n return match.group(1)\n match = re.search(r\"sns\\.(.+map)\\(\", self.filetext)\n if match:\n return match.group(1)\n match = re.search(r\"sns\\.(.+Grid)\\(\", self.filetext)\n if match:\n return match.group(1)\n return \"\"\n\n @property\n def components(self):\n\n objects = re.findall(r\"sns\\.(\\w+)\\(\", self.filetext)\n\n refs = []\n for obj in objects:\n if obj[0].isupper():\n refs.append(f\":class:`{obj}`\")\n else:\n refs.append(f\":func:`{obj}`\")\n return \", \".join(refs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/gallery_generator.py_ExampleGenerator.extract_docstring_ExampleGenerator.extract_docstring.self.end_line.erow_1_start_row": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/gallery_generator.py_ExampleGenerator.extract_docstring_ExampleGenerator.extract_docstring.self.end_line.erow_1_start_row", "embedding": null, "metadata": {"file_path": "doc/sphinxext/gallery_generator.py", "file_name": "gallery_generator.py", "file_type": "text/x-python", "category": "implementation", "start_line": 258, "end_line": 299, "span_ids": ["ExampleGenerator.extract_docstring"], "tokens": 374}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ExampleGenerator:\n\n def extract_docstring(self):\n \"\"\" Extract a module-level docstring\n \"\"\"\n lines = open(self.filename).readlines()\n start_row = 0\n if lines[0].startswith('#!'):\n lines.pop(0)\n start_row = 1\n\n docstring = ''\n first_par = ''\n line_iter = lines.__iter__()\n tokens = tokenize.generate_tokens(lambda: next(line_iter))\n for tok_type, tok_content, _, (erow, _), _ in tokens:\n tok_type = token.tok_name[tok_type]\n if tok_type in ('NEWLINE', 'COMMENT', 'NL', 'INDENT', 'DEDENT'):\n continue\n elif tok_type == 'STRING':\n docstring = eval(tok_content)\n # If the docstring is formatted with several paragraphs,\n # extract the first one:\n paragraphs = '\\n'.join(line.rstrip()\n for line in docstring.split('\\n')\n ).split('\\n\\n')\n if len(paragraphs) > 0:\n first_par = paragraphs[0]\n break\n\n thumbloc = None\n for i, line in enumerate(docstring.split(\"\\n\")):\n m = re.match(r\"^_thumb: (\\.\\d+),\\s*(\\.\\d+)\", line)\n if m:\n thumbloc = float(m.group(1)), float(m.group(2))\n break\n if thumbloc is not None:\n self.thumbloc = thumbloc\n docstring = \"\\n\".join([l for l in docstring.split(\"\\n\")\n if not l.startswith(\"_thumb\")])\n\n self.docstring = docstring\n self.short_desc = first_par\n self.end_line = erow + 1 + start_row", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/gallery_generator.py_ExampleGenerator.exec_file_ExampleGenerator.exec_file.create_thumbnail_pngfile_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/gallery_generator.py_ExampleGenerator.exec_file_ExampleGenerator.exec_file.create_thumbnail_pngfile_", "embedding": null, "metadata": {"file_path": "doc/sphinxext/gallery_generator.py", "file_name": "gallery_generator.py", "file_type": "text/x-python", "category": "implementation", "start_line": 301, "end_line": 317, "span_ids": ["ExampleGenerator.exec_file"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ExampleGenerator:\n\n def exec_file(self):\n print(f\"running {self.filename}\")\n\n plt.close('all')\n my_globals = {'pl': plt,\n 'plt': plt}\n execfile(self.filename, my_globals)\n\n fig = plt.gcf()\n fig.canvas.draw()\n pngfile = op.join(self.target_dir, self.pngfilename)\n thumbfile = op.join(\"example_thumbs\", self.thumbfilename)\n self.html = f\"\"\n fig.savefig(pngfile, dpi=75, bbox_inches=\"tight\")\n\n cx, cy = self.thumbloc\n create_thumbnail(pngfile, thumbfile, cx=cx, cy=cy)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/gallery_generator.py_ExampleGenerator.toctree_entry_ExampleGenerator.contents_entry.return._raw_html_n_n_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/gallery_generator.py_ExampleGenerator.toctree_entry_ExampleGenerator.contents_entry.return._raw_html_n_n_", "embedding": null, "metadata": {"file_path": "doc/sphinxext/gallery_generator.py", "file_name": "gallery_generator.py", "file_type": "text/x-python", "category": "implementation", "start_line": 313, "end_line": 329, "span_ids": ["ExampleGenerator.toctree_entry", "ExampleGenerator.contents_entry"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ExampleGenerator:\n\n def toctree_entry(self):\n return f\" ./{op.splitext(self.htmlfilename)[0]}\\n\\n\"\n\n def contents_entry(self):\n return (\".. raw:: html\\n\\n\"\n \"
\\n\"\n \" \\n\"\n \" \\n\"\n \" \\n\"\n \"

{}

\\n\"\n \"
\\n\"\n \"
\\n\"\n \"
\\n\\n\"\n \"\\n\\n\"\n \"\".format(self.htmlfilename,\n self.thumbfilename,\n self.plotfunc))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/gallery_generator.py_main_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/gallery_generator.py_main_", "embedding": null, "metadata": {"file_path": "doc/sphinxext/gallery_generator.py", "file_name": "gallery_generator.py", "file_type": "text/x-python", "category": "implementation", "start_line": 338, "end_line": 400, "span_ids": ["main", "setup"], "tokens": 469}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def main(app):\n static_dir = op.join(app.builder.srcdir, '_static')\n target_dir = op.join(app.builder.srcdir, 'examples')\n image_dir = op.join(app.builder.srcdir, 'examples/_images')\n thumb_dir = op.join(app.builder.srcdir, \"example_thumbs\")\n source_dir = op.abspath(op.join(app.builder.srcdir, '..', 'examples'))\n if not op.exists(static_dir):\n os.makedirs(static_dir)\n\n if not op.exists(target_dir):\n os.makedirs(target_dir)\n\n if not op.exists(image_dir):\n os.makedirs(image_dir)\n\n if not op.exists(thumb_dir):\n os.makedirs(thumb_dir)\n\n if not op.exists(source_dir):\n os.makedirs(source_dir)\n\n banner_data = []\n\n toctree = (\"\\n\\n\"\n \".. toctree::\\n\"\n \" :hidden:\\n\\n\")\n contents = \"\\n\\n\"\n\n # Write individual example files\n for filename in sorted(glob.glob(op.join(source_dir, \"*.py\"))):\n\n ex = ExampleGenerator(filename, target_dir)\n\n banner_data.append({\"title\": ex.pagetitle,\n \"url\": op.join('examples', ex.htmlfilename),\n \"thumb\": op.join(ex.thumbfilename)})\n shutil.copyfile(filename, op.join(target_dir, ex.pyfilename))\n output = RST_TEMPLATE.format(sphinx_tag=ex.sphinxtag,\n docstring=ex.docstring,\n end_line=ex.end_line,\n components=ex.components,\n fname=ex.pyfilename,\n img_file=ex.pngfilename)\n with open(op.join(target_dir, ex.rstfilename), 'w') as f:\n f.write(output)\n\n toctree += ex.toctree_entry()\n contents += ex.contents_entry()\n\n if len(banner_data) < 10:\n banner_data = (4 * banner_data)[:10]\n\n # write index file\n index_file = op.join(target_dir, 'index.rst')\n with open(index_file, 'w') as index:\n index.write(INDEX_TEMPLATE.format(sphinx_tag=\"example_gallery\",\n toctree=toctree,\n contents=contents))\n\n\ndef setup(app):\n app.connect('builder-inited', main)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/extract_examples.py__Turn_the_examples_sect_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/extract_examples.py__Turn_the_examples_sect_", "embedding": null, "metadata": {"file_path": "doc/tools/extract_examples.py", "file_name": "extract_examples.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 74, "span_ids": ["impl", "add_cell", "docstring", "imports", "line_type"], "tokens": 448}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Turn the examples section of a function docstring into a notebook.\"\"\"\nimport re\nimport sys\nimport pydoc\nimport seaborn\nfrom seaborn.external.docscrape import NumpyDocString\nimport nbformat\n\n\ndef line_type(line):\n\n if line.startswith(\" \"):\n return \"code\"\n else:\n return \"markdown\"\n\n\ndef add_cell(nb, lines, cell_type):\n\n cell_objs = {\n \"code\": nbformat.v4.new_code_cell,\n \"markdown\": nbformat.v4.new_markdown_cell,\n }\n text = \"\\n\".join(lines)\n cell = cell_objs[cell_type](text)\n nb[\"cells\"].append(cell)\n\n\nif __name__ == \"__main__\":\n\n _, name = sys.argv\n\n # Parse the docstring and get the examples section\n obj = getattr(seaborn, name)\n if obj.__class__.__name__ != \"function\":\n obj = obj.__init__\n lines = NumpyDocString(pydoc.getdoc(obj))[\"Examples\"]\n\n # Remove code indentation, the prompt, and mpl return variable\n pat = re.compile(r\"\\s{4}[>\\.]{3} (ax = ){0,1}(g = ){0,1}\")\n\n nb = nbformat.v4.new_notebook()\n\n # We always start with at least one line of text\n cell_type = \"markdown\"\n cell = []\n\n for line in lines:\n\n # Ignore matplotlib plot directive\n if \".. plot\" in line or \":context:\" in line:\n continue\n\n # Ignore blank lines\n if not line:\n continue\n\n if line_type(line) != cell_type:\n # We are on the first line of the next cell,\n # so package up the last cell\n add_cell(nb, cell, cell_type)\n cell_type = line_type(line)\n cell = []\n\n if line_type(line) == \"code\":\n line = re.sub(pat, \"\", line)\n\n cell.append(line)\n\n # Package the final cell\n add_cell(nb, cell, cell_type)\n\n nbformat.write(nb, f\"docstrings/{name}.ipynb\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/generate_logos.py_np_poisson_disc_sample.return.samples": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/generate_logos.py_np_poisson_disc_sample.return.samples", "embedding": null, "metadata": {"file_path": "doc/tools/generate_logos.py", "file_name": "generate_logos.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 58, "span_ids": ["impl", "imports", "poisson_disc_sample"], "tokens": 369}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nimport seaborn as sns\nfrom matplotlib import patches\nimport matplotlib.pyplot as plt\nfrom scipy.signal import gaussian\nfrom scipy.spatial import distance\n\n\nXY_CACHE = {}\n\nSTATIC_DIR = \"_static\"\nplt.rcParams[\"savefig.dpi\"] = 300\n\n\ndef poisson_disc_sample(array_radius, pad_radius, candidates=100, d=2, seed=None):\n \"\"\"Find positions using poisson-disc sampling.\"\"\"\n # See http://bost.ocks.org/mike/algorithms/\n rng = np.random.default_rng(seed)\n uniform = rng.uniform\n randint = rng.integers\n\n # Cache the results\n key = array_radius, pad_radius, seed\n if key in XY_CACHE:\n return XY_CACHE[key]\n\n # Start at a fixed point we know will work\n start = np.zeros(d)\n samples = [start]\n queue = [start]\n\n while queue:\n\n # Pick a sample to expand from\n s_idx = randint(len(queue))\n s = queue[s_idx]\n\n for i in range(candidates):\n # Generate a candidate from this sample\n coords = uniform(s - 2 * pad_radius, s + 2 * pad_radius, d)\n\n # Check the three conditions to accept the candidate\n in_array = np.sqrt(np.sum(coords ** 2)) < array_radius\n in_ring = np.all(distance.cdist(samples, [coords]) > pad_radius)\n\n if in_array and in_ring:\n # Accept the candidate\n samples.append(coords)\n queue.append(coords)\n break\n\n if (i + 1) == candidates:\n # We've exhausted the particular sample\n queue.pop(s_idx)\n\n samples = np.array(samples)\n XY_CACHE[key] = samples\n return samples", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/generate_logos.py_logo_logo._Add_scatterplot_in_top_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/generate_logos.py_logo_logo._Add_scatterplot_in_top_", "embedding": null, "metadata": {"file_path": "doc/tools/generate_logos.py", "file_name": "generate_logos.py", "file_type": "text/x-python", "category": "implementation", "start_line": 61, "end_line": 141, "span_ids": ["logo"], "tokens": 764}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def logo(\n ax,\n color_kws, ring, ring_idx, edge,\n pdf_means, pdf_sigma, dy, y0, w, h,\n hist_mean, hist_sigma, hist_y0, lw, skip,\n scatter, pad, scale,\n):\n\n # Square, invisible axes with specified limits to center the logo\n ax.set(xlim=(35 + w, 95 - w), ylim=(-3, 53))\n ax.set_axis_off()\n ax.set_aspect('equal')\n\n # Magic numbers for the logo circle\n radius = 27\n center = 65, 25\n\n # Full x and y grids for a gaussian curve\n x = np.arange(101)\n y = gaussian(x.size, pdf_sigma)\n\n x0 = 30 # Magic number\n xx = x[x0:]\n\n # Vertical distances between the PDF curves\n n = len(pdf_means)\n dys = np.linspace(0, (n - 1) * dy, n) - (n * dy / 2)\n dys -= dys.mean()\n\n # Compute the PDF curves with vertical offsets\n pdfs = [h * (y[x0 - m:-m] + y0 + dy) for m, dy in zip(pdf_means, dys)]\n\n # Add in constants to fill from bottom and to top\n pdfs.insert(0, np.full(xx.shape, -h))\n pdfs.append(np.full(xx.shape, 50 + h))\n\n # Color gradient\n colors = sns.cubehelix_palette(n + 1 + bool(hist_mean), **color_kws)\n\n # White fill between curves and around edges\n bg = patches.Circle(\n center, radius=radius - 1 + ring, color=\"white\",\n transform=ax.transData, zorder=0,\n )\n ax.add_artist(bg)\n\n # Clipping artist (not shown) for the interior elements\n fg = patches.Circle(center, radius=radius - edge, transform=ax.transData)\n\n # Ring artist to surround the circle (optional)\n if ring:\n wedge = patches.Wedge(\n center, r=radius + edge / 2, theta1=0, theta2=360, width=edge / 2,\n transform=ax.transData, color=colors[ring_idx], alpha=1\n )\n ax.add_artist(wedge)\n\n # Add histogram bars\n if hist_mean:\n hist_color = colors.pop(0)\n hist_y = gaussian(x.size, hist_sigma)\n hist = 1.1 * h * (hist_y[x0 - hist_mean:-hist_mean] + hist_y0)\n dx = x[skip] - x[0]\n hist_x = xx[::skip]\n hist_h = h + hist[::skip]\n # Magic number to avoid tiny sliver of bar on edge\n use = hist_x < center[0] + radius * .5\n bars = ax.bar(\n hist_x[use], hist_h[use], bottom=-h, width=dx,\n align=\"edge\", color=hist_color, ec=\"w\", lw=lw,\n zorder=3,\n )\n for bar in bars:\n bar.set_clip_path(fg)\n\n # Add each smooth PDF \"wave\"\n for i, pdf in enumerate(pdfs[1:], 1):\n u = ax.fill_between(xx, pdfs[i - 1] + w, pdf, color=colors[i - 1], lw=0)\n u.set_clip_path(fg)\n\n # Add scatterplot in top wave area\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/generate_logos.py_logo.if_scatter__logo.if_scatter_.u_set_visible_False_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/generate_logos.py_logo.if_scatter__logo.if_scatter_.u_set_visible_False_", "embedding": null, "metadata": {"file_path": "doc/tools/generate_logos.py", "file_name": "generate_logos.py", "file_type": "text/x-python", "category": "implementation", "start_line": 142, "end_line": 156, "span_ids": ["logo"], "tokens": 242}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def logo(\n ax,\n color_kws, ring, ring_idx, edge,\n pdf_means, pdf_sigma, dy, y0, w, h,\n hist_mean, hist_sigma, hist_y0, lw, skip,\n scatter, pad, scale,\n):\n # ... other code\n if scatter:\n seed = sum(map(ord, \"seaborn logo\"))\n xy = poisson_disc_sample(radius - edge - ring, pad, seed=seed)\n clearance = distance.cdist(xy + center, np.c_[xx, pdfs[-2]])\n use = clearance.min(axis=1) > pad / 1.8\n x, y = xy[use].T\n sizes = (x - y) % 9\n\n points = ax.scatter(\n x + center[0], y + center[1], s=scale * (10 + sizes * 5),\n zorder=5, color=colors[-1], ec=\"w\", lw=scale / 2,\n )\n path = u.get_paths()[0]\n points.set_clip_path(path, transform=u.get_transform())\n u.set_visible(False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/generate_logos.py_savefig_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/generate_logos.py_savefig_", "embedding": null, "metadata": {"file_path": "doc/tools/generate_logos.py", "file_name": "generate_logos.py", "file_type": "text/x-python", "category": "implementation", "start_line": 159, "end_line": 225, "span_ids": ["savefig", "impl:6"], "tokens": 617}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def savefig(fig, shape, variant):\n\n fig.subplots_adjust(0, 0, 1, 1, 0, 0)\n\n facecolor = (1, 1, 1, 1) if bg == \"white\" else (1, 1, 1, 0)\n\n for ext in [\"png\", \"svg\"]:\n fig.savefig(f\"{STATIC_DIR}/logo-{shape}-{variant}bg.{ext}\", facecolor=facecolor)\n\n\nif __name__ == \"__main__\":\n\n for bg in [\"white\", \"light\", \"dark\"]:\n\n color_idx = -1 if bg == \"dark\" else 0\n\n kwargs = dict(\n color_kws=dict(start=.3, rot=-.4, light=.8, dark=.3, reverse=True),\n ring=True, ring_idx=color_idx, edge=1,\n pdf_means=[8, 24], pdf_sigma=16,\n dy=1, y0=1.8, w=.5, h=12,\n hist_mean=2, hist_sigma=10, hist_y0=.6, lw=1, skip=6,\n scatter=True, pad=1.8, scale=.5,\n )\n color = sns.cubehelix_palette(**kwargs[\"color_kws\"])[color_idx]\n\n # ------------------------------------------------------------------------ #\n\n fig, ax = plt.subplots(figsize=(2, 2), facecolor=\"w\", dpi=100)\n logo(ax, **kwargs)\n savefig(fig, \"mark\", bg)\n\n # ------------------------------------------------------------------------ #\n\n fig, axs = plt.subplots(1, 2, figsize=(8, 2), dpi=100,\n gridspec_kw=dict(width_ratios=[1, 3]))\n logo(axs[0], **kwargs)\n\n font = {\n \"family\": \"avenir\",\n \"color\": color,\n \"weight\": \"regular\",\n \"size\": 120,\n }\n axs[1].text(.01, .35, \"seaborn\", ha=\"left\", va=\"center\",\n fontdict=font, transform=axs[1].transAxes)\n axs[1].set_axis_off()\n savefig(fig, \"wide\", bg)\n\n # ------------------------------------------------------------------------ #\n\n fig, axs = plt.subplots(2, 1, figsize=(2, 2.5), dpi=100,\n gridspec_kw=dict(height_ratios=[4, 1]))\n\n logo(axs[0], **kwargs)\n\n font = {\n \"family\": \"avenir\",\n \"color\": color,\n \"weight\": \"regular\",\n \"size\": 34,\n }\n axs[1].text(.5, 1, \"seaborn\", ha=\"center\", va=\"top\",\n fontdict=font, transform=axs[1].transAxes)\n axs[1].set_axis_off()\n savefig(fig, \"tall\", bg)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/nb_to_doc.py__usr_bin_env_python_pop_recursive.return.current_pop_nested_1_d": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/nb_to_doc.py__usr_bin_env_python_pop_recursive.return.current_pop_nested_1_d", "embedding": null, "metadata": {"file_path": "doc/tools/nb_to_doc.py", "file_name": "nb_to_doc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 62, "span_ids": ["pop_recursive", "docstring", "imports", "MetadataError"], "tokens": 213}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "#! /usr/bin/env python\nimport os\nimport sys\nimport nbformat\nfrom nbconvert import RSTExporter\nfrom nbconvert.preprocessors import (\n ExecutePreprocessor,\n TagRemovePreprocessor,\n ExtractOutputPreprocessor\n)\nfrom traitlets.config import Config\n\n\nclass MetadataError(Exception):\n pass\n\n\ndef pop_recursive(d, key, default=None):\n \"\"\"dict.pop(key) where `key` is a `.`-delimited list of nested keys.\n >>> d = {'a': {'b': 1, 'c': 2}}\n >>> pop_recursive(d, 'a.c')\n 2\n >>> d\n {'a': {'b': 1}}\n \"\"\"\n nested = key.split('.')\n current = d\n for k in nested[:-1]:\n if hasattr(current, 'get'):\n current = current.get(k, {})\n else:\n return default\n if not hasattr(current, 'pop'):\n return default\n return current.pop(nested[-1], default)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/nb_to_doc.py_strip_output_strip_output.return.nb": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/nb_to_doc.py_strip_output_strip_output.return.nb", "embedding": null, "metadata": {"file_path": "doc/tools/nb_to_doc.py", "file_name": "nb_to_doc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 65, "end_line": 103, "span_ids": ["strip_output"], "tokens": 303}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def strip_output(nb):\n \"\"\"\n Strip the outputs, execution count/prompt number and miscellaneous\n metadata from a notebook object, unless specified to keep either the\n outputs or counts.\n \"\"\"\n keys = {'metadata': [], 'cell': {'metadata': [\"execution\"]}}\n\n nb.metadata.pop('signature', None)\n nb.metadata.pop('widgets', None)\n\n for field in keys['metadata']:\n pop_recursive(nb.metadata, field)\n\n if 'NB_KERNEL' in os.environ:\n nb.metadata['kernelspec']['name'] = os.environ['NB_KERNEL']\n nb.metadata['kernelspec']['display_name'] = os.environ['NB_KERNEL']\n\n for cell in nb.cells:\n\n if 'outputs' in cell:\n cell['outputs'] = []\n if 'prompt_number' in cell:\n cell['prompt_number'] = None\n if 'execution_count' in cell:\n cell['execution_count'] = None\n\n # Always remove this metadata\n for output_style in ['collapsed', 'scrolled']:\n if output_style in cell.metadata:\n cell.metadata[output_style] = False\n if 'metadata' in cell:\n for field in ['collapsed', 'scrolled', 'ExecuteTime']:\n cell.metadata.pop(field, None)\n for (extra, fields) in keys['cell'].items():\n if extra in cell:\n for field in fields:\n pop_recursive(getattr(cell, extra), field)\n return nb", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/nb_to_doc.py_if___name_____main____": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/nb_to_doc.py_if___name_____main____", "embedding": null, "metadata": {"file_path": "doc/tools/nb_to_doc.py", "file_name": "nb_to_doc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 106, "end_line": 177, "span_ids": ["impl"], "tokens": 604}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "if __name__ == \"__main__\":\n\n # Get the desired ipynb file path and parse into components\n _, fpath, outdir = sys.argv\n basedir, fname = os.path.split(fpath)\n fstem = fname[:-6]\n\n # Read the notebook\n with open(fpath) as f:\n nb = nbformat.read(f, as_version=4)\n\n # Run the notebook\n kernel = os.environ.get(\"NB_KERNEL\", None)\n if kernel is None:\n kernel = nb[\"metadata\"][\"kernelspec\"][\"name\"]\n ep = ExecutePreprocessor(\n timeout=600,\n kernel_name=kernel,\n extra_arguments=[\"--InlineBackend.rc=figure.dpi=88\"]\n )\n ep.preprocess(nb, {\"metadata\": {\"path\": basedir}})\n\n # Remove plain text execution result outputs\n for cell in nb.get(\"cells\", {}):\n if \"show-output\" in cell[\"metadata\"].get(\"tags\", []):\n continue\n fields = cell.get(\"outputs\", [])\n for field in fields:\n if field[\"output_type\"] == \"execute_result\":\n data_keys = field[\"data\"].keys()\n for key in list(data_keys):\n if key == \"text/plain\":\n field[\"data\"].pop(key)\n if not field[\"data\"]:\n fields.remove(field)\n\n # Convert to .rst formats\n exp = RSTExporter()\n\n c = Config()\n c.TagRemovePreprocessor.remove_cell_tags = {\"hide\"}\n c.TagRemovePreprocessor.remove_input_tags = {\"hide-input\"}\n c.TagRemovePreprocessor.remove_all_outputs_tags = {\"hide-output\"}\n c.ExtractOutputPreprocessor.output_filename_template = \\\n f\"{fstem}_files/{fstem}_\" + \"{cell_index}_{index}{extension}\"\n\n exp.register_preprocessor(TagRemovePreprocessor(config=c), True)\n exp.register_preprocessor(ExtractOutputPreprocessor(config=c), True)\n\n body, resources = exp.from_notebook_node(nb)\n\n # Clean the output on the notebook and save a .ipynb back to disk\n nb = strip_output(nb)\n with open(fpath, \"wt\") as f:\n nbformat.write(nb, f)\n\n # Write the .rst file\n rst_path = os.path.join(outdir, f\"{fstem}.rst\")\n with open(rst_path, \"w\") as f:\n f.write(body)\n\n # Write the individual image outputs\n imdir = os.path.join(outdir, f\"{fstem}_files\")\n if not os.path.exists(imdir):\n os.mkdir(imdir)\n\n for imname, imdata in resources[\"outputs\"].items():\n if imname.startswith(fstem):\n impath = os.path.join(outdir, f\"{imname}\")\n with open(impath, \"wb\") as f:\n f.write(imdata)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/set_nb_kernels.py__Recursively_set_the_ke_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/tools/set_nb_kernels.py__Recursively_set_the_ke_", "embedding": null, "metadata": {"file_path": "doc/tools/set_nb_kernels.py", "file_name": "set_nb_kernels.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 23, "span_ids": ["impl", "docstring", "imports"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Recursively set the kernel name for all jupyter notebook files.\"\"\"\nimport sys\nfrom glob import glob\n\nimport nbformat\n\n\nif __name__ == \"__main__\":\n\n _, kernel_name = sys.argv\n\n nb_paths = glob(\"./**/*.ipynb\", recursive=True)\n for path in nb_paths:\n\n with open(path) as f:\n nb = nbformat.read(f, as_version=4)\n\n nb[\"metadata\"][\"kernelspec\"][\"name\"] = kernel_name\n nb[\"metadata\"][\"kernelspec\"][\"display_name\"] = kernel_name\n\n with open(path, \"w\") as f:\n nbformat.write(nb, f)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/anscombes_quartet.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/anscombes_quartet.py___", "embedding": null, "metadata": {"file_path": "examples/anscombes_quartet.py", "file_name": "anscombes_quartet.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 19, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nAnscombe's quartet\n==================\n\n_thumb: .4, .4\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"ticks\")\n\n# Load the example dataset for Anscombe's quartet\ndf = sns.load_dataset(\"anscombe\")\n\n# Show the results of a linear regression within each dataset\nsns.lmplot(\n data=df, x=\"x\", y=\"y\", col=\"dataset\", hue=\"dataset\",\n col_wrap=2, palette=\"muted\", ci=None,\n height=4, scatter_kws={\"s\": 50, \"alpha\": 1}\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/different_scatter_variables.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/different_scatter_variables.py___", "embedding": null, "metadata": {"file_path": "examples/different_scatter_variables.py", "file_name": "different_scatter_variables.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 26, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nScatterplot with multiple semantics\n===================================\n\n_thumb: .45, .5\n\n\"\"\"\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nsns.set_theme(style=\"whitegrid\")\n\n# Load the example diamonds dataset\ndiamonds = sns.load_dataset(\"diamonds\")\n\n# Draw a scatter plot while assigning point colors and sizes to different\n# variables in the dataset\nf, ax = plt.subplots(figsize=(6.5, 6.5))\nsns.despine(f, left=True, bottom=True)\nclarity_ranking = [\"I1\", \"SI2\", \"SI1\", \"VS2\", \"VS1\", \"VVS2\", \"VVS1\", \"IF\"]\nsns.scatterplot(x=\"carat\", y=\"price\",\n hue=\"clarity\", size=\"depth\",\n palette=\"ch:r=-.2,d=.3_r\",\n hue_order=clarity_ranking,\n sizes=(1, 8), linewidth=0,\n data=diamonds, ax=ax)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/errorband_lineplots.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/errorband_lineplots.py__", "embedding": null, "metadata": {"file_path": "examples/errorband_lineplots.py", "file_name": "errorband_lineplots.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 18, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 89}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nTimeseries plot with error bands\n================================\n\n_thumb: .48, .45\n\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"darkgrid\")\n\n# Load an example dataset with long-form data\nfmri = sns.load_dataset(\"fmri\")\n\n# Plot the responses for different events and regions\nsns.lineplot(x=\"timepoint\", y=\"signal\",\n hue=\"region\", style=\"event\",\n data=fmri)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/faceted_histogram.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/faceted_histogram.py__", "embedding": null, "metadata": {"file_path": "examples/faceted_histogram.py", "file_name": "faceted_histogram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 15, "span_ids": ["impl", "docstring", "imports"], "tokens": 85}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nFacetting histograms by subsets of data\n=======================================\n\n_thumb: .33, .57\n\"\"\"\nimport seaborn as sns\n\nsns.set_theme(style=\"darkgrid\")\ndf = sns.load_dataset(\"penguins\")\nsns.displot(\n df, x=\"flipper_length_mm\", col=\"species\", row=\"sex\",\n binwidth=3, height=3, facet_kws=dict(margin_titles=True),\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/faceted_lineplot.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/faceted_lineplot.py___", "embedding": null, "metadata": {"file_path": "examples/faceted_lineplot.py", "file_name": "faceted_lineplot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 24, "span_ids": ["impl", "docstring", "imports"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nLine plots on multiple facets\n=============================\n\n_thumb: .48, .42\n\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"ticks\")\n\ndots = sns.load_dataset(\"dots\")\n\n# Define the palette as a list to specify exact values\npalette = sns.color_palette(\"rocket_r\")\n\n# Plot the lines on two facets\nsns.relplot(\n data=dots,\n x=\"time\", y=\"firing_rate\",\n hue=\"coherence\", size=\"choice\", col=\"align\",\n kind=\"line\", size_order=[\"T1\", \"T2\"], palette=palette,\n height=5, aspect=.75, facet_kws=dict(sharex=False),\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/grouped_barplot.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/grouped_barplot.py___", "embedding": null, "metadata": {"file_path": "examples/grouped_barplot.py", "file_name": "grouped_barplot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 21, "span_ids": ["impl", "docstring", "imports"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nGrouped barplots\n================\n\n_thumb: .36, .5\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"whitegrid\")\n\npenguins = sns.load_dataset(\"penguins\")\n\n# Draw a nested barplot by species and sex\ng = sns.catplot(\n data=penguins, kind=\"bar\",\n x=\"species\", y=\"body_mass_g\", hue=\"sex\",\n errorbar=\"sd\", palette=\"dark\", alpha=.6, height=6\n)\ng.despine(left=True)\ng.set_axis_labels(\"\", \"Body mass (g)\")\ng.legend.set_title(\"\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/grouped_boxplot.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/grouped_boxplot.py___", "embedding": null, "metadata": {"file_path": "examples/grouped_boxplot.py", "file_name": "grouped_boxplot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 19, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 103}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nGrouped boxplots\n================\n\n_thumb: .66, .45\n\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"ticks\", palette=\"pastel\")\n\n# Load the example tips dataset\ntips = sns.load_dataset(\"tips\")\n\n# Draw a nested boxplot to show bills by day and time\nsns.boxplot(x=\"day\", y=\"total_bill\",\n hue=\"smoker\", palette=[\"m\", \"g\"],\n data=tips)\nsns.despine(offset=10, trim=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/grouped_violinplots.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/grouped_violinplots.py___", "embedding": null, "metadata": {"file_path": "examples/grouped_violinplots.py", "file_name": "grouped_violinplots.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 18, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nGrouped violinplots with split violins\n======================================\n\n_thumb: .44, .47\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"whitegrid\")\n\n# Load the example tips dataset\ntips = sns.load_dataset(\"tips\")\n\n# Draw a nested violinplot and split the violins for easier comparison\nsns.violinplot(data=tips, x=\"day\", y=\"total_bill\", hue=\"smoker\",\n split=True, inner=\"quart\", linewidth=1,\n palette={\"Yes\": \"b\", \"No\": \".85\"})\nsns.despine(left=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/heat_scatter.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/heat_scatter.py___", "embedding": null, "metadata": {"file_path": "examples/heat_scatter.py", "file_name": "heat_scatter.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 42, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 330}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nScatterplot heatmap\n-------------------\n\n_thumb: .5, .5\n\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"whitegrid\")\n\n# Load the brain networks dataset, select subset, and collapse the multi-index\ndf = sns.load_dataset(\"brain_networks\", header=[0, 1, 2], index_col=0)\n\nused_networks = [1, 5, 6, 7, 8, 12, 13, 17]\nused_columns = (df.columns\n .get_level_values(\"network\")\n .astype(int)\n .isin(used_networks))\ndf = df.loc[:, used_columns]\n\ndf.columns = df.columns.map(\"-\".join)\n\n# Compute a correlation matrix and convert to long-form\ncorr_mat = df.corr().stack().reset_index(name=\"correlation\")\n\n# Draw each cell as a scatter point with varying size and color\ng = sns.relplot(\n data=corr_mat,\n x=\"level_0\", y=\"level_1\", hue=\"correlation\", size=\"correlation\",\n palette=\"vlag\", hue_norm=(-1, 1), edgecolor=\".7\",\n height=10, sizes=(50, 250), size_norm=(-.2, .8),\n)\n\n# Tweak the figure to finalize\ng.set(xlabel=\"\", ylabel=\"\", aspect=\"equal\")\ng.despine(left=True, bottom=True)\ng.ax.margins(.02)\nfor label in g.ax.get_xticklabels():\n label.set_rotation(90)\nfor artist in g.legend.legendHandles:\n artist.set_edgecolor(\".7\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/hexbin_marginals.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/hexbin_marginals.py__", "embedding": null, "metadata": {"file_path": "examples/hexbin_marginals.py", "file_name": "hexbin_marginals.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 16, "span_ids": ["impl", "docstring", "imports"], "tokens": 92}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nHexbin plot with marginal distributions\n=======================================\n\n_thumb: .45, .4\n\"\"\"\nimport numpy as np\nimport seaborn as sns\nsns.set_theme(style=\"ticks\")\n\nrs = np.random.RandomState(11)\nx = rs.gamma(2, size=1000)\ny = -.5 * x + rs.normal(size=1000)\n\nsns.jointplot(x=x, y=y, kind=\"hex\", color=\"#4CB391\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/histogram_stacked.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/histogram_stacked.py___", "embedding": null, "metadata": {"file_path": "examples/histogram_stacked.py", "file_name": "histogram_stacked.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 30, "span_ids": ["impl", "docstring", "imports"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nStacked histogram on a log scale\n================================\n\n_thumb: .5, .45\n\n\"\"\"\nimport seaborn as sns\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\n\nsns.set_theme(style=\"ticks\")\n\ndiamonds = sns.load_dataset(\"diamonds\")\n\nf, ax = plt.subplots(figsize=(7, 5))\nsns.despine(f)\n\nsns.histplot(\n diamonds,\n x=\"price\", hue=\"cut\",\n multiple=\"stack\",\n palette=\"light:m_r\",\n edgecolor=\".3\",\n linewidth=.5,\n log_scale=True,\n)\nax.xaxis.set_major_formatter(mpl.ticker.ScalarFormatter())\nax.set_xticks([500, 1000, 2000, 5000, 10000])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/horizontal_boxplot.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/horizontal_boxplot.py___", "embedding": null, "metadata": {"file_path": "examples/horizontal_boxplot.py", "file_name": "horizontal_boxplot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 31, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nHorizontal boxplot with observations\n====================================\n\n_thumb: .7, .37\n\"\"\"\nimport seaborn as sns\nimport matplotlib.pyplot as plt\n\nsns.set_theme(style=\"ticks\")\n\n# Initialize the figure with a logarithmic x axis\nf, ax = plt.subplots(figsize=(7, 6))\nax.set_xscale(\"log\")\n\n# Load the example planets dataset\nplanets = sns.load_dataset(\"planets\")\n\n# Plot the orbital period with horizontal boxes\nsns.boxplot(x=\"distance\", y=\"method\", data=planets,\n whis=[0, 100], width=.6, palette=\"vlag\")\n\n# Add in points to show each observation\nsns.stripplot(x=\"distance\", y=\"method\", data=planets,\n size=4, color=\".3\", linewidth=0)\n\n# Tweak the visual presentation\nax.xaxis.grid(True)\nax.set(ylabel=\"\")\nsns.despine(trim=True, left=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/jitter_stripplot.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/jitter_stripplot.py___", "embedding": null, "metadata": {"file_path": "examples/jitter_stripplot.py", "file_name": "jitter_stripplot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 39, "span_ids": ["impl", "docstring", "imports"], "tokens": 278}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nConditional means with observations\n===================================\n\n\"\"\"\nimport pandas as pd\nimport seaborn as sns\nimport matplotlib.pyplot as plt\n\nsns.set_theme(style=\"whitegrid\")\niris = sns.load_dataset(\"iris\")\n\n# \"Melt\" the dataset to \"long-form\" or \"tidy\" representation\niris = pd.melt(iris, \"species\", var_name=\"measurement\")\n\n# Initialize the figure\nf, ax = plt.subplots()\nsns.despine(bottom=True, left=True)\n\n# Show each observation with a scatterplot\nsns.stripplot(\n data=iris, x=\"value\", y=\"measurement\", hue=\"species\",\n dodge=True, alpha=.25, zorder=1, legend=False\n)\n\n# Show the conditional means, aligning each pointplot in the\n# center of the strips by adjusting the width allotted to each\n# category (.8 by default) by the number of hue levels\nsns.pointplot(\n data=iris, x=\"value\", y=\"measurement\", hue=\"species\",\n join=False, dodge=.8 - .8 / 3, palette=\"dark\",\n markers=\"d\", scale=.75, errorbar=None\n)\n\n# Improve the legend\nsns.move_legend(\n ax, loc=\"lower right\", ncol=3, frameon=True, columnspacing=1, handletextpad=0\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/joint_histogram.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/joint_histogram.py___", "embedding": null, "metadata": {"file_path": "examples/joint_histogram.py", "file_name": "joint_histogram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 27, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nJoint and marginal histograms\n=============================\n\n_thumb: .52, .505\n\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"ticks\")\n\n# Load the planets dataset and initialize the figure\nplanets = sns.load_dataset(\"planets\")\ng = sns.JointGrid(data=planets, x=\"year\", y=\"distance\", marginal_ticks=True)\n\n# Set a log scaling on the y axis\ng.ax_joint.set(yscale=\"log\")\n\n# Create an inset legend for the histogram colorbar\ncax = g.figure.add_axes([.15, .55, .02, .2])\n\n# Add the joint and marginal histogram plots\ng.plot_joint(\n sns.histplot, discrete=(True, False),\n cmap=\"light:#03012d\", pmax=.8, cbar=True, cbar_ax=cax\n)\ng.plot_marginals(sns.histplot, element=\"step\", color=\"#03012d\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/joint_kde.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/joint_kde.py__", "embedding": null, "metadata": {"file_path": "examples/joint_kde.py", "file_name": "joint_kde.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 19, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 93}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nJoint kernel density estimate\n=============================\n\n_thumb: .6, .4\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"ticks\")\n\n# Load the penguins dataset\npenguins = sns.load_dataset(\"penguins\")\n\n# Show the joint distribution using kernel density estimation\ng = sns.jointplot(\n data=penguins,\n x=\"bill_length_mm\", y=\"bill_depth_mm\", hue=\"species\",\n kind=\"kde\",\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/kde_ridgeplot.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/kde_ridgeplot.py___", "embedding": null, "metadata": {"file_path": "examples/kde_ridgeplot.py", "file_name": "kde_ridgeplot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 51, "span_ids": ["impl", "label", "impl:2", "docstring", "impl:20", "docstring:2", "imports"], "tokens": 399}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nOverlapping densities ('ridge plot')\n====================================\n\n\n\"\"\"\nimport numpy as np\nimport pandas as pd\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nsns.set_theme(style=\"white\", rc={\"axes.facecolor\": (0, 0, 0, 0)})\n\n# Create the data\nrs = np.random.RandomState(1979)\nx = rs.randn(500)\ng = np.tile(list(\"ABCDEFGHIJ\"), 50)\ndf = pd.DataFrame(dict(x=x, g=g))\nm = df.g.map(ord)\ndf[\"x\"] += m\n\n# Initialize the FacetGrid object\npal = sns.cubehelix_palette(10, rot=-.25, light=.7)\ng = sns.FacetGrid(df, row=\"g\", hue=\"g\", aspect=15, height=.5, palette=pal)\n\n# Draw the densities in a few steps\ng.map(sns.kdeplot, \"x\",\n bw_adjust=.5, clip_on=False,\n fill=True, alpha=1, linewidth=1.5)\ng.map(sns.kdeplot, \"x\", clip_on=False, color=\"w\", lw=2, bw_adjust=.5)\n\n# passing color=None to refline() uses the hue mapping\ng.refline(y=0, linewidth=2, linestyle=\"-\", color=None, clip_on=False)\n\n\n# Define and use a simple function to label the plot in axes coordinates\ndef label(x, color, label):\n ax = plt.gca()\n ax.text(0, .2, label, fontweight=\"bold\", color=color,\n ha=\"left\", va=\"center\", transform=ax.transAxes)\n\n\ng.map(label, \"x\")\n\n# Set the subplots to overlap\ng.figure.subplots_adjust(hspace=-.25)\n\n# Remove axes details that don't play well with overlap\ng.set_titles(\"\")\ng.set(yticks=[], ylabel=\"\")\ng.despine(bottom=True, left=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/large_distributions.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/large_distributions.py___", "embedding": null, "metadata": {"file_path": "examples/large_distributions.py", "file_name": "large_distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 15, "span_ids": ["impl", "docstring", "imports"], "tokens": 107}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nPlotting large distributions\n============================\n\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"whitegrid\")\n\ndiamonds = sns.load_dataset(\"diamonds\")\nclarity_ranking = [\"I1\", \"SI2\", \"SI1\", \"VS2\", \"VS1\", \"VVS2\", \"VVS1\", \"IF\"]\n\nsns.boxenplot(x=\"clarity\", y=\"carat\",\n color=\"b\", order=clarity_ranking,\n scale=\"linear\", data=diamonds)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/layered_bivariate_plot.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/layered_bivariate_plot.py___", "embedding": null, "metadata": {"file_path": "examples/layered_bivariate_plot.py", "file_name": "layered_bivariate_plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 24, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nBivariate plot with multiple elements\n=====================================\n\n\n\"\"\"\nimport numpy as np\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nsns.set_theme(style=\"dark\")\n\n# Simulate data from a bivariate Gaussian\nn = 10000\nmean = [0, 0]\ncov = [(2, .4), (.4, .2)]\nrng = np.random.RandomState(0)\nx, y = rng.multivariate_normal(mean, cov, n).T\n\n# Draw a combo histogram and scatterplot with density contours\nf, ax = plt.subplots(figsize=(6, 6))\nsns.scatterplot(x=x, y=y, s=5, color=\".15\")\nsns.histplot(x=x, y=y, bins=50, pthresh=.1, cmap=\"mako\")\nsns.kdeplot(x=x, y=y, levels=5, color=\"w\", linewidths=1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/logistic_regression.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/logistic_regression.py___", "embedding": null, "metadata": {"file_path": "examples/logistic_regression.py", "file_name": "logistic_regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 20, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nFaceted logistic regression\n===========================\n\n_thumb: .58, .5\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"darkgrid\")\n\n# Load the example Titanic dataset\ndf = sns.load_dataset(\"titanic\")\n\n# Make a custom palette with gendered colors\npal = dict(male=\"#6495ED\", female=\"#F08080\")\n\n# Show the survival probability as a function of age and sex\ng = sns.lmplot(x=\"age\", y=\"survived\", col=\"sex\", hue=\"sex\", data=df,\n palette=pal, y_jitter=.02, logistic=True, truncate=False)\ng.set(xlim=(0, 80), ylim=(-.05, 1.05))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/many_facets.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/many_facets.py___", "embedding": null, "metadata": {"file_path": "examples/many_facets.py", "file_name": "many_facets.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 40, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 312}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nPlotting on a large number of facets\n====================================\n\n_thumb: .4, .3\n\n\"\"\"\nimport numpy as np\nimport pandas as pd\nimport seaborn as sns\nimport matplotlib.pyplot as plt\n\nsns.set_theme(style=\"ticks\")\n\n# Create a dataset with many short random walks\nrs = np.random.RandomState(4)\npos = rs.randint(-1, 2, (20, 5)).cumsum(axis=1)\npos -= pos[:, 0, np.newaxis]\nstep = np.tile(range(5), 20)\nwalk = np.repeat(range(20), 5)\ndf = pd.DataFrame(np.c_[pos.flat, step, walk],\n columns=[\"position\", \"step\", \"walk\"])\n\n# Initialize a grid of plots with an Axes for each walk\ngrid = sns.FacetGrid(df, col=\"walk\", hue=\"walk\", palette=\"tab20c\",\n col_wrap=4, height=1.5)\n\n# Draw a horizontal line to show the starting point\ngrid.refline(y=0, linestyle=\":\")\n\n# Draw a line plot to show the trajectory of each random walk\ngrid.map(plt.plot, \"step\", \"position\", marker=\"o\")\n\n# Adjust the tick positions and labels\ngrid.set(xticks=np.arange(5), yticks=[-3, 3],\n xlim=(-.5, 4.5), ylim=(-3.5, 3.5))\n\n# Adjust the arrangement of the plots\ngrid.fig.tight_layout(w_pad=1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/many_pairwise_correlations.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/many_pairwise_correlations.py___", "embedding": null, "metadata": {"file_path": "examples/many_pairwise_correlations.py", "file_name": "many_pairwise_correlations.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 35, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 230}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nPlotting a diagonal correlation matrix\n======================================\n\n_thumb: .3, .6\n\"\"\"\nfrom string import ascii_letters\nimport numpy as np\nimport pandas as pd\nimport seaborn as sns\nimport matplotlib.pyplot as plt\n\nsns.set_theme(style=\"white\")\n\n# Generate a large random dataset\nrs = np.random.RandomState(33)\nd = pd.DataFrame(data=rs.normal(size=(100, 26)),\n columns=list(ascii_letters[26:]))\n\n# Compute the correlation matrix\ncorr = d.corr()\n\n# Generate a mask for the upper triangle\nmask = np.triu(np.ones_like(corr, dtype=bool))\n\n# Set up the matplotlib figure\nf, ax = plt.subplots(figsize=(11, 9))\n\n# Generate a custom diverging colormap\ncmap = sns.diverging_palette(230, 20, as_cmap=True)\n\n# Draw the heatmap with the mask and correct aspect ratio\nsns.heatmap(corr, mask=mask, cmap=cmap, vmax=.3, center=0,\n square=True, linewidths=.5, cbar_kws={\"shrink\": .5})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/marginal_ticks.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/marginal_ticks.py___", "embedding": null, "metadata": {"file_path": "examples/marginal_ticks.py", "file_name": "marginal_ticks.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 16, "span_ids": ["impl", "docstring", "imports"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nScatterplot with marginal ticks\n===============================\n\n_thumb: .66, .34\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"white\", color_codes=True)\nmpg = sns.load_dataset(\"mpg\")\n\n# Use JointGrid directly to draw a custom plot\ng = sns.JointGrid(data=mpg, x=\"mpg\", y=\"acceleration\", space=0, ratio=17)\ng.plot_joint(sns.scatterplot, size=mpg[\"horsepower\"], sizes=(30, 120),\n color=\"g\", alpha=.6, legend=False)\ng.plot_marginals(sns.rugplot, height=1, color=\"g\", alpha=.6)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/multiple_bivariate_kde.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/multiple_bivariate_kde.py___", "embedding": null, "metadata": {"file_path": "examples/multiple_bivariate_kde.py", "file_name": "multiple_bivariate_kde.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 25, "span_ids": ["impl", "docstring", "imports"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nMultiple bivariate KDE plots\n============================\n\n_thumb: .6, .45\n\"\"\"\nimport seaborn as sns\nimport matplotlib.pyplot as plt\n\nsns.set_theme(style=\"darkgrid\")\niris = sns.load_dataset(\"iris\")\n\n# Set up the figure\nf, ax = plt.subplots(figsize=(8, 8))\nax.set_aspect(\"equal\")\n\n# Draw a contour plot to represent each bivariate density\nsns.kdeplot(\n data=iris.query(\"species != 'versicolor'\"),\n x=\"sepal_width\",\n y=\"sepal_length\",\n hue=\"species\",\n thresh=.1,\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/multiple_conditional_kde.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/multiple_conditional_kde.py___", "embedding": null, "metadata": {"file_path": "examples/multiple_conditional_kde.py", "file_name": "multiple_conditional_kde.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 21, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nConditional kernel density estimate\n===================================\n\n_thumb: .4, .5\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"whitegrid\")\n\n# Load the diamonds dataset\ndiamonds = sns.load_dataset(\"diamonds\")\n\n# Plot the distribution of clarity ratings, conditional on carat\nsns.displot(\n data=diamonds,\n x=\"carat\", hue=\"cut\",\n kind=\"kde\", height=6,\n multiple=\"fill\", clip=(0, None),\n palette=\"ch:rot=-.25,hue=1,light=.75\",\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/multiple_ecdf.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/multiple_ecdf.py___", "embedding": null, "metadata": {"file_path": "examples/multiple_ecdf.py", "file_name": "multiple_ecdf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 18, "span_ids": ["impl", "docstring", "imports"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nFacetted ECDF plots\n===================\n\n_thumb: .30, .49\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"ticks\")\nmpg = sns.load_dataset(\"mpg\")\n\ncolors = (250, 70, 50), (350, 70, 50)\ncmap = sns.blend_palette(colors, input=\"husl\", as_cmap=True)\nsns.displot(\n mpg,\n x=\"displacement\", col=\"origin\", hue=\"model_year\",\n kind=\"ecdf\", aspect=.75, linewidth=2, palette=cmap,\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/multiple_regression.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/multiple_regression.py___", "embedding": null, "metadata": {"file_path": "examples/multiple_regression.py", "file_name": "multiple_regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 22, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nMultiple linear regression\n==========================\n\n_thumb: .45, .45\n\"\"\"\nimport seaborn as sns\nsns.set_theme()\n\n# Load the penguins dataset\npenguins = sns.load_dataset(\"penguins\")\n\n# Plot sepal width as a function of sepal_length across days\ng = sns.lmplot(\n data=penguins,\n x=\"bill_length_mm\", y=\"bill_depth_mm\", hue=\"species\",\n height=5\n)\n\n# Use more informative axis labels than are provided by default\ng.set_axis_labels(\"Snoot length (mm)\", \"Snoot depth (mm)\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/pair_grid_with_kde.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/pair_grid_with_kde.py__", "embedding": null, "metadata": {"file_path": "examples/pair_grid_with_kde.py", "file_name": "pair_grid_with_kde.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 16, "span_ids": ["impl", "docstring", "imports"], "tokens": 89}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nPaired density and scatterplot matrix\n=====================================\n\n_thumb: .5, .5\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"white\")\n\ndf = sns.load_dataset(\"penguins\")\n\ng = sns.PairGrid(df, diag_sharey=False)\ng.map_upper(sns.scatterplot, s=15)\ng.map_lower(sns.kdeplot)\ng.map_diag(sns.kdeplot, lw=2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/paired_pointplots.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/paired_pointplots.py___", "embedding": null, "metadata": {"file_path": "examples/paired_pointplots.py", "file_name": "paired_pointplots.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 21, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nPaired categorical plots\n========================\n\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"whitegrid\")\n\n# Load the example Titanic dataset\ntitanic = sns.load_dataset(\"titanic\")\n\n# Set up a grid to plot survival probability against several variables\ng = sns.PairGrid(titanic, y_vars=\"survived\",\n x_vars=[\"class\", \"sex\", \"who\", \"alone\"],\n height=5, aspect=.5)\n\n# Draw a seaborn pointplot onto each Axes\ng.map(sns.pointplot, scale=1.3, errwidth=4, color=\"xkcd:plum\")\ng.set(ylim=(0, 1))\nsns.despine(fig=g.fig, left=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/pairgrid_dotplot.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/pairgrid_dotplot.py___", "embedding": null, "metadata": {"file_path": "examples/pairgrid_dotplot.py", "file_name": "pairgrid_dotplot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 39, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 268}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nDot plot with several variables\n===============================\n\n_thumb: .3, .3\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"whitegrid\")\n\n# Load the dataset\ncrashes = sns.load_dataset(\"car_crashes\")\n\n# Make the PairGrid\ng = sns.PairGrid(crashes.sort_values(\"total\", ascending=False),\n x_vars=crashes.columns[:-3], y_vars=[\"abbrev\"],\n height=10, aspect=.25)\n\n# Draw a dot plot using the stripplot function\ng.map(sns.stripplot, size=10, orient=\"h\", jitter=False,\n palette=\"flare_r\", linewidth=1, edgecolor=\"w\")\n\n# Use the same x axis limits on all columns and add better labels\ng.set(xlim=(0, 25), xlabel=\"Crashes\", ylabel=\"\")\n\n# Use semantically meaningful titles for the columns\ntitles = [\"Total crashes\", \"Speeding crashes\", \"Alcohol crashes\",\n \"Not distracted crashes\", \"No previous crashes\"]\n\nfor ax, title in zip(g.axes.flat, titles):\n\n # Set a different title for each axes\n ax.set(title=title)\n\n # Make the grid horizontal instead of vertical\n ax.xaxis.grid(False)\n ax.yaxis.grid(True)\n\nsns.despine(left=True, bottom=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/palette_choices.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/palette_choices.py___", "embedding": null, "metadata": {"file_path": "examples/palette_choices.py", "file_name": "palette_choices.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 38, "span_ids": ["impl", "docstring", "imports"], "tokens": 314}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nColor palette choices\n=====================\n\n\"\"\"\nimport numpy as np\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nsns.set_theme(style=\"white\", context=\"talk\")\nrs = np.random.RandomState(8)\n\n# Set up the matplotlib figure\nf, (ax1, ax2, ax3) = plt.subplots(3, 1, figsize=(7, 5), sharex=True)\n\n# Generate some sequential data\nx = np.array(list(\"ABCDEFGHIJ\"))\ny1 = np.arange(1, 11)\nsns.barplot(x=x, y=y1, palette=\"rocket\", ax=ax1)\nax1.axhline(0, color=\"k\", clip_on=False)\nax1.set_ylabel(\"Sequential\")\n\n# Center the data to make it diverging\ny2 = y1 - 5.5\nsns.barplot(x=x, y=y2, palette=\"vlag\", ax=ax2)\nax2.axhline(0, color=\"k\", clip_on=False)\nax2.set_ylabel(\"Diverging\")\n\n# Randomly reorder the data to make it qualitative\ny3 = rs.choice(y1, len(y1), replace=False)\nsns.barplot(x=x, y=y3, palette=\"deep\", ax=ax3)\nax3.axhline(0, color=\"k\", clip_on=False)\nax3.set_ylabel(\"Qualitative\")\n\n# Finalize the plot\nsns.despine(bottom=True)\nplt.setp(f.axes, yticks=[])\nplt.tight_layout(h_pad=2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/palette_generation.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/palette_generation.py___", "embedding": null, "metadata": {"file_path": "examples/palette_generation.py", "file_name": "palette_generation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 36, "span_ids": ["impl", "docstring", "imports"], "tokens": 282}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nDifferent cubehelix palettes\n============================\n\n_thumb: .4, .65\n\"\"\"\nimport numpy as np\nimport seaborn as sns\nimport matplotlib.pyplot as plt\n\nsns.set_theme(style=\"white\")\nrs = np.random.RandomState(50)\n\n# Set up the matplotlib figure\nf, axes = plt.subplots(3, 3, figsize=(9, 9), sharex=True, sharey=True)\n\n# Rotate the starting point around the cubehelix hue circle\nfor ax, s in zip(axes.flat, np.linspace(0, 3, 10)):\n\n # Create a cubehelix colormap to use with kdeplot\n cmap = sns.cubehelix_palette(start=s, light=1, as_cmap=True)\n\n # Generate and plot a random bivariate dataset\n x, y = rs.normal(size=(2, 50))\n sns.kdeplot(\n x=x, y=y,\n cmap=cmap, fill=True,\n clip=(-5, 5), cut=10,\n thresh=0, levels=15,\n ax=ax,\n )\n ax.set_axis_off()\n\nax.set(xlim=(-3.5, 3.5), ylim=(-3.5, 3.5))\nf.subplots_adjust(0, 0, 1, 1, .08, .08)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/part_whole_bars.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/part_whole_bars.py___", "embedding": null, "metadata": {"file_path": "examples/part_whole_bars.py", "file_name": "part_whole_bars.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 31, "span_ids": ["impl", "impl:2", "docstring:3", "docstring", "docstring:2", "imports", "impl:3"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nHorizontal bar plots\n====================\n\n\"\"\"\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nsns.set_theme(style=\"whitegrid\")\n\n# Initialize the matplotlib figure\nf, ax = plt.subplots(figsize=(6, 15))\n\n# Load the example car crash dataset\ncrashes = sns.load_dataset(\"car_crashes\").sort_values(\"total\", ascending=False)\n\n# Plot the total crashes\nsns.set_color_codes(\"pastel\")\nsns.barplot(x=\"total\", y=\"abbrev\", data=crashes,\n label=\"Total\", color=\"b\")\n\n# Plot the crashes where alcohol was involved\nsns.set_color_codes(\"muted\")\nsns.barplot(x=\"alcohol\", y=\"abbrev\", data=crashes,\n label=\"Alcohol-involved\", color=\"b\")\n\n# Add a legend and informative axis label\nax.legend(ncol=2, loc=\"lower right\", frameon=True)\nax.set(xlim=(0, 24), ylabel=\"\",\n xlabel=\"Automobile collisions per billion miles\")\nsns.despine(left=True, bottom=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/pointplot_anova.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/pointplot_anova.py___", "embedding": null, "metadata": {"file_path": "examples/pointplot_anova.py", "file_name": "pointplot_anova.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 20, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 133}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nPlotting a three-way ANOVA\n==========================\n\n_thumb: .42, .5\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"whitegrid\")\n\n# Load the example exercise dataset\nexercise = sns.load_dataset(\"exercise\")\n\n# Draw a pointplot to show pulse as a function of three categorical factors\ng = sns.catplot(\n data=exercise, x=\"time\", y=\"pulse\", hue=\"kind\", col=\"diet\",\n capsize=.2, palette=\"YlGnBu_d\", errorbar=\"se\",\n kind=\"point\", height=6, aspect=.75,\n)\ng.despine(left=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/radial_facets.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/radial_facets.py___", "embedding": null, "metadata": {"file_path": "examples/radial_facets.py", "file_name": "radial_facets.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 28, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nFacetGrid with custom projection\n================================\n\n_thumb: .33, .5\n\n\"\"\"\nimport numpy as np\nimport pandas as pd\nimport seaborn as sns\n\nsns.set_theme()\n\n# Generate an example radial datast\nr = np.linspace(0, 10, num=100)\ndf = pd.DataFrame({'r': r, 'slow': r, 'medium': 2 * r, 'fast': 4 * r})\n\n# Convert the dataframe to long-form or \"tidy\" format\ndf = pd.melt(df, id_vars=['r'], var_name='speed', value_name='theta')\n\n# Set up a grid of axes with a polar projection\ng = sns.FacetGrid(df, col=\"speed\", hue=\"speed\",\n subplot_kws=dict(projection='polar'), height=4.5,\n sharex=False, sharey=False, despine=False)\n\n# Draw a scatterplot onto each axes in the grid\ng.map(sns.scatterplot, \"theta\", \"r\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/regression_marginals.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/regression_marginals.py__", "embedding": null, "metadata": {"file_path": "examples/regression_marginals.py", "file_name": "regression_marginals.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 15, "span_ids": ["impl", "docstring", "imports"], "tokens": 91}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nLinear regression with marginal distributions\n=============================================\n\n_thumb: .65, .65\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"darkgrid\")\n\ntips = sns.load_dataset(\"tips\")\ng = sns.jointplot(x=\"total_bill\", y=\"tip\", data=tips,\n kind=\"reg\", truncate=False,\n xlim=(0, 60), ylim=(0, 12),\n color=\"m\", height=7)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/residplot.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/residplot.py___", "embedding": null, "metadata": {"file_path": "examples/residplot.py", "file_name": "residplot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 17, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 111}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nPlotting model residuals\n========================\n\n\"\"\"\nimport numpy as np\nimport seaborn as sns\nsns.set_theme(style=\"whitegrid\")\n\n# Make an example dataset with y ~ x\nrs = np.random.RandomState(7)\nx = rs.normal(2, 1, 75)\ny = 2 + 1.5 * x + rs.normal(0, 2, 75)\n\n# Plot the residuals after fitting a linear model\nsns.residplot(x=x, y=y, lowess=True, color=\"g\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/scatter_bubbles.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/scatter_bubbles.py___", "embedding": null, "metadata": {"file_path": "examples/scatter_bubbles.py", "file_name": "scatter_bubbles.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 18, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 111}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nScatterplot with varying point sizes and hues\n==============================================\n\n_thumb: .45, .5\n\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"white\")\n\n# Load the example mpg dataset\nmpg = sns.load_dataset(\"mpg\")\n\n# Plot miles per gallon against horsepower with other semantics\nsns.relplot(x=\"horsepower\", y=\"mpg\", hue=\"origin\", size=\"weight\",\n sizes=(40, 400), alpha=.5, palette=\"muted\",\n height=6, data=mpg)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/scatterplot_categorical.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/scatterplot_categorical.py__", "embedding": null, "metadata": {"file_path": "examples/scatterplot_categorical.py", "file_name": "scatterplot_categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 17, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 94}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nScatterplot with categorical variables\n======================================\n\n_thumb: .45, .45\n\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"whitegrid\", palette=\"muted\")\n\n# Load the penguins dataset\ndf = sns.load_dataset(\"penguins\")\n\n# Draw a categorical scatterplot to show each observation\nax = sns.swarmplot(data=df, x=\"body_mass_g\", y=\"sex\", hue=\"species\")\nax.set(ylabel=\"\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/scatterplot_matrix.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/scatterplot_matrix.py__", "embedding": null, "metadata": {"file_path": "examples/scatterplot_matrix.py", "file_name": "scatterplot_matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 12, "span_ids": ["impl", "docstring", "imports"], "tokens": 48}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nScatterplot Matrix\n==================\n\n_thumb: .3, .2\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"ticks\")\n\ndf = sns.load_dataset(\"penguins\")\nsns.pairplot(df, hue=\"species\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/scatterplot_sizes.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/scatterplot_sizes.py___", "embedding": null, "metadata": {"file_path": "examples/scatterplot_sizes.py", "file_name": "scatterplot_sizes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 25, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nScatterplot with continuous hues and sizes\n==========================================\n\n_thumb: .51, .44\n\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"whitegrid\")\n\n# Load the example planets dataset\nplanets = sns.load_dataset(\"planets\")\n\ncmap = sns.cubehelix_palette(rot=-.2, as_cmap=True)\ng = sns.relplot(\n data=planets,\n x=\"distance\", y=\"orbital_period\",\n hue=\"year\", size=\"mass\",\n palette=cmap, sizes=(10, 200),\n)\ng.set(xscale=\"log\", yscale=\"log\")\ng.ax.xaxis.grid(True, \"minor\", linewidth=.25)\ng.ax.yaxis.grid(True, \"minor\", linewidth=.25)\ng.despine(left=True, bottom=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/simple_violinplots.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/simple_violinplots.py___", "embedding": null, "metadata": {"file_path": "examples/simple_violinplots.py", "file_name": "simple_violinplots.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 19, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nViolinplots with observations\n=============================\n\n\"\"\"\nimport numpy as np\nimport seaborn as sns\n\nsns.set_theme()\n\n# Create a random dataset across several variables\nrs = np.random.default_rng(0)\nn, p = 40, 8\nd = rs.normal(0, 2, (n, p))\nd += np.log(np.arange(1, p + 1)) * -5 + 10\n\n# Show each distribution with both violins and points\nsns.violinplot(data=d, palette=\"light:g\", inner=\"points\", orient=\"h\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/smooth_bivariate_kde.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/smooth_bivariate_kde.py___", "embedding": null, "metadata": {"file_path": "examples/smooth_bivariate_kde.py", "file_name": "smooth_bivariate_kde.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 17, "span_ids": ["impl", "docstring", "imports"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nSmooth kernel density with marginal histograms\n==============================================\n\n_thumb: .48, .41\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"white\")\n\ndf = sns.load_dataset(\"penguins\")\n\ng = sns.JointGrid(data=df, x=\"body_mass_g\", y=\"bill_depth_mm\", space=0)\ng.plot_joint(sns.kdeplot,\n fill=True, clip=((2200, 6800), (10, 25)),\n thresh=0, levels=100, cmap=\"rocket\")\ng.plot_marginals(sns.histplot, color=\"#03051A\", alpha=1, bins=25)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/spreadsheet_heatmap.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/spreadsheet_heatmap.py___", "embedding": null, "metadata": {"file_path": "examples/spreadsheet_heatmap.py", "file_name": "spreadsheet_heatmap.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 17, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 110}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nAnnotated heatmaps\n==================\n\n\"\"\"\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nsns.set_theme()\n\n# Load the example flights dataset and convert to long-form\nflights_long = sns.load_dataset(\"flights\")\nflights = flights_long.pivot(\"month\", \"year\", \"passengers\")\n\n# Draw a heatmap with the numeric values in each cell\nf, ax = plt.subplots(figsize=(9, 6))\nsns.heatmap(flights, annot=True, fmt=\"d\", linewidths=.5, ax=ax)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/structured_heatmap.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/structured_heatmap.py___", "embedding": null, "metadata": {"file_path": "examples/structured_heatmap.py", "file_name": "structured_heatmap.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 37, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 308}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nDiscovering structure in heatmap data\n=====================================\n\n_thumb: .3, .25\n\"\"\"\nimport pandas as pd\nimport seaborn as sns\nsns.set_theme()\n\n# Load the brain networks example dataset\ndf = sns.load_dataset(\"brain_networks\", header=[0, 1, 2], index_col=0)\n\n# Select a subset of the networks\nused_networks = [1, 5, 6, 7, 8, 12, 13, 17]\nused_columns = (df.columns.get_level_values(\"network\")\n .astype(int)\n .isin(used_networks))\ndf = df.loc[:, used_columns]\n\n# Create a categorical palette to identify the networks\nnetwork_pal = sns.husl_palette(8, s=.45)\nnetwork_lut = dict(zip(map(str, used_networks), network_pal))\n\n# Convert the palette to vectors that will be drawn on the side of the matrix\nnetworks = df.columns.get_level_values(\"network\")\nnetwork_colors = pd.Series(networks, index=df.columns).map(network_lut)\n\n# Draw the full plot\ng = sns.clustermap(df.corr(), center=0, cmap=\"vlag\",\n row_colors=network_colors, col_colors=network_colors,\n dendrogram_ratio=(.1, .2),\n cbar_pos=(.02, .32, .03, .2),\n linewidths=.75, figsize=(12, 13))\n\ng.ax_row_dendrogram.remove()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/three_variable_histogram.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/three_variable_histogram.py__", "embedding": null, "metadata": {"file_path": "examples/three_variable_histogram.py", "file_name": "three_variable_histogram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 16, "span_ids": ["impl", "docstring", "imports"], "tokens": 88}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nTrivariate histogram with two categorical variables\n===================================================\n\n_thumb: .32, .55\n\n\"\"\"\nimport seaborn as sns\nsns.set_theme(style=\"dark\")\n\ndiamonds = sns.load_dataset(\"diamonds\")\nsns.displot(\n data=diamonds, x=\"price\", y=\"color\", col=\"clarity\",\n log_scale=(True, False), col_wrap=4, height=4, aspect=.7,\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/timeseries_facets.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/timeseries_facets.py___", "embedding": null, "metadata": {"file_path": "examples/timeseries_facets.py", "file_name": "timeseries_facets.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 40, "span_ids": ["impl", "docstring", "imports"], "tokens": 273}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nSmall multiple time series\n--------------------------\n\n_thumb: .42, .58\n\n\"\"\"\nimport seaborn as sns\n\nsns.set_theme(style=\"dark\")\nflights = sns.load_dataset(\"flights\")\n\n# Plot each year's time series in its own facet\ng = sns.relplot(\n data=flights,\n x=\"month\", y=\"passengers\", col=\"year\", hue=\"year\",\n kind=\"line\", palette=\"crest\", linewidth=4, zorder=5,\n col_wrap=3, height=2, aspect=1.5, legend=False,\n)\n\n# Iterate over each subplot to customize further\nfor year, ax in g.axes_dict.items():\n\n # Add the title as an annotation within the plot\n ax.text(.8, .85, year, transform=ax.transAxes, fontweight=\"bold\")\n\n # Plot every year's time series in the background\n sns.lineplot(\n data=flights, x=\"month\", y=\"passengers\", units=\"year\",\n estimator=None, color=\".7\", linewidth=1, ax=ax,\n )\n\n# Reduce the frequency of the x axis ticks\nax.set_xticks(ax.get_xticks()[::2])\n\n# Tweak the supporting aspects of the plot\ng.set_titles(\"\")\ng.set_axis_labels(\"\", \"Passengers\")\ng.tight_layout()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/wide_data_lineplot.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/wide_data_lineplot.py___", "embedding": null, "metadata": {"file_path": "examples/wide_data_lineplot.py", "file_name": "wide_data_lineplot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 20, "span_ids": ["impl", "docstring", "imports"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nLineplot from a wide-form dataset\n=================================\n\n_thumb: .52, .5\n\n\"\"\"\nimport numpy as np\nimport pandas as pd\nimport seaborn as sns\nsns.set_theme(style=\"whitegrid\")\n\nrs = np.random.RandomState(365)\nvalues = rs.randn(365, 4).cumsum(axis=0)\ndates = pd.date_range(\"1 1 2016\", periods=365, freq=\"D\")\ndata = pd.DataFrame(values, dates, columns=[\"A\", \"B\", \"C\", \"D\"])\ndata = data.rolling(7).mean()\n\nsns.lineplot(data=data, palette=\"tab10\", linewidth=2.5)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/wide_form_violinplot.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/wide_form_violinplot.py___", "embedding": null, "metadata": {"file_path": "examples/wide_form_violinplot.py", "file_name": "wide_form_violinplot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 35, "span_ids": ["impl", "impl:2", "docstring", "docstring:2", "imports"], "tokens": 291}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nViolinplot from a wide-form dataset\n===================================\n\n_thumb: .6, .45\n\"\"\"\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nsns.set_theme(style=\"whitegrid\")\n\n# Load the example dataset of brain network correlations\ndf = sns.load_dataset(\"brain_networks\", header=[0, 1, 2], index_col=0)\n\n# Pull out a specific subset of networks\nused_networks = [1, 3, 4, 5, 6, 7, 8, 11, 12, 13, 16, 17]\nused_columns = (df.columns.get_level_values(\"network\")\n .astype(int)\n .isin(used_networks))\ndf = df.loc[:, used_columns]\n\n# Compute the correlation matrix and average over networks\ncorr_df = df.corr().groupby(level=\"network\").mean()\ncorr_df.index = corr_df.index.astype(int)\ncorr_df = corr_df.sort_index().T\n\n# Set up the matplotlib figure\nf, ax = plt.subplots(figsize=(11, 6))\n\n# Draw a violinplot with a narrower bandwidth than the default\nsns.violinplot(data=corr_df, palette=\"Set3\", bw=.2, cut=1, linewidth=1)\n\n# Finalize the figure\nax.set(ylim=(-.7, 1.05))\nsns.despine(left=True, bottom=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/__init__.py__Import_seaborn_objects_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/__init__.py__Import_seaborn_objects_", "embedding": null, "metadata": {"file_path": "seaborn/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 22, "span_ids": ["docstring:6", "docstring:7", "impl", "impl:8", "docstring:4", "docstring:3", "docstring", "impl:11", "docstring:12", "impl:9", "docstring:2", "docstring:13", "docstring:5", "imports:3", "impl:5", "docstring:14", "docstring:9", "impl:10", "impl:2", "impl:7", "docstring:8", "docstring:11", "docstring:10", "imports", "impl:4", "impl:12", "impl:6", "impl:3", "imports:2"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Import seaborn objects\nfrom .rcmod import * # noqa: F401,F403\nfrom .utils import * # noqa: F401,F403\nfrom .palettes import * # noqa: F401,F403\nfrom .relational import * # noqa: F401,F403\nfrom .regression import * # noqa: F401,F403\nfrom .categorical import * # noqa: F401,F403\nfrom .distributions import * # noqa: F401,F403\nfrom .matrix import * # noqa: F401,F403\nfrom .miscplot import * # noqa: F401,F403\nfrom .axisgrid import * # noqa: F401,F403\nfrom .widgets import * # noqa: F401,F403\nfrom .colors import xkcd_rgb, crayons # noqa: F401\nfrom . import cm # noqa: F401\n\n# Capture the original matplotlib rcParams\nimport matplotlib as mpl\n_orig_rc_params = mpl.rcParams.copy()\n\n# Define the seaborn version\n__version__ = \"0.12.1.dev0\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_compat.py_np_MarkerStyle.return.mpl_markers_MarkerStyle_m": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_compat.py_np_MarkerStyle.return.mpl_markers_MarkerStyle_m", "embedding": null, "metadata": {"file_path": "seaborn/_compat.py", "file_name": "_compat.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 19, "span_ids": ["MarkerStyle", "imports"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nimport matplotlib as mpl\nfrom seaborn.external.version import Version\n\n\ndef MarkerStyle(marker=None, fillstyle=None):\n \"\"\"\n Allow MarkerStyle to accept a MarkerStyle object as parameter.\n\n Supports matplotlib < 3.3.0\n https://github.com/matplotlib/matplotlib/pull/16692\n\n \"\"\"\n if isinstance(marker, mpl.markers.MarkerStyle):\n if fillstyle is None:\n return marker\n else:\n marker = marker.get_marker()\n return mpl.markers.MarkerStyle(marker, fillstyle)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_compat.py_norm_from_scale_norm_from_scale.if_norm_is_None_.else_._TODO_more_helpful_error": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_compat.py_norm_from_scale_norm_from_scale.if_norm_is_None_.else_._TODO_more_helpful_error", "embedding": null, "metadata": {"file_path": "seaborn/_compat.py", "file_name": "_compat.py", "file_type": "text/x-python", "category": "implementation", "start_line": 22, "end_line": 36, "span_ids": ["norm_from_scale"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def norm_from_scale(scale, norm):\n \"\"\"Produce a Normalize object given a Scale and min/max domain limits.\"\"\"\n # This is an internal maplotlib function that simplifies things to access\n # It is likely to become part of the matplotlib API at some point:\n # https://github.com/matplotlib/matplotlib/issues/20329\n if isinstance(norm, mpl.colors.Normalize):\n return norm\n\n if scale is None:\n return None\n\n if norm is None:\n vmin = vmax = None\n else:\n vmin, vmax = norm # TODO more helpful error if this fails?\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_compat.py_norm_from_scale.ScaledNorm_norm_from_scale.return.new_norm": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_compat.py_norm_from_scale.ScaledNorm_norm_from_scale.return.new_norm", "embedding": null, "metadata": {"file_path": "seaborn/_compat.py", "file_name": "_compat.py", "file_type": "text/x-python", "category": "implementation", "start_line": 38, "end_line": 67, "span_ids": ["norm_from_scale.ScaledNorm.__call__", "norm_from_scale.ScaledNorm"], "tokens": 308}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def norm_from_scale(scale, norm):\n # ... other code\n\n class ScaledNorm(mpl.colors.Normalize):\n\n def __call__(self, value, clip=None):\n # From github.com/matplotlib/matplotlib/blob/v3.4.2/lib/matplotlib/colors.py\n value, is_scalar = self.process_value(value)\n self.autoscale_None(value)\n if self.vmin > self.vmax:\n raise ValueError(\"vmin must be less or equal to vmax\")\n if self.vmin == self.vmax:\n return np.full_like(value, 0)\n if clip is None:\n clip = self.clip\n if clip:\n value = np.clip(value, self.vmin, self.vmax)\n # ***** Seaborn changes start ****\n t_value = self.transform(value).reshape(np.shape(value))\n t_vmin, t_vmax = self.transform([self.vmin, self.vmax])\n # ***** Seaborn changes end *****\n if not np.isfinite([t_vmin, t_vmax]).all():\n raise ValueError(\"Invalid vmin or vmax\")\n t_value -= t_vmin\n t_value /= (t_vmax - t_vmin)\n t_value = np.ma.masked_invalid(t_value, copy=False)\n return t_value[0] if is_scalar else t_value\n\n new_norm = ScaledNorm(vmin, vmax)\n new_norm.transform = scale.get_transform().transform\n\n return new_norm", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_compat.py_scale_factory_scale_factory.return.scale": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_compat.py_scale_factory_scale_factory.return.scale", "embedding": null, "metadata": {"file_path": "seaborn/_compat.py", "file_name": "_compat.py", "file_type": "text/x-python", "category": "implementation", "start_line": 70, "end_line": 105, "span_ids": ["scale_factory.if_isinstance_scale_str_.Axis:2", "scale_factory.if_isinstance_scale_str_.Axis", "scale_factory"], "tokens": 279}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def scale_factory(scale, axis, **kwargs):\n \"\"\"\n Backwards compatability for creation of independent scales.\n\n Matplotlib scales require an Axis object for instantiation on < 3.4.\n But the axis is not used, aside from extraction of the axis_name in LogScale.\n\n \"\"\"\n modify_transform = False\n if Version(mpl.__version__) < Version(\"3.4\"):\n if axis[0] in \"xy\":\n modify_transform = True\n axis = axis[0]\n base = kwargs.pop(\"base\", None)\n if base is not None:\n kwargs[f\"base{axis}\"] = base\n nonpos = kwargs.pop(\"nonpositive\", None)\n if nonpos is not None:\n kwargs[f\"nonpos{axis}\"] = nonpos\n\n if isinstance(scale, str):\n class Axis:\n axis_name = axis\n axis = Axis()\n\n scale = mpl.scale.scale_factory(scale, axis, **kwargs)\n\n if modify_transform:\n transform = scale.get_transform()\n transform.base = kwargs.get(\"base\", 10)\n if kwargs.get(\"nonpositive\") == \"mask\":\n # Setting a private attribute, but we only get here\n # on an old matplotlib, so this won't break going forwards\n transform._clip = False\n\n return scale", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/data.py___PlotData.__contains__.return.key_in_self_frame": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/data.py___PlotData.__contains__.return.key_in_self_frame", "embedding": null, "metadata": {"file_path": "seaborn/_core/data.py", "file_name": "data.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 72, "span_ids": ["PlotData.__contains__", "imports:5", "impl", "docstring", "PlotData", "imports"], "tokens": 438}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nComponents for parsing variable assignments and internally representing plot data.\n\"\"\"\nfrom __future__ import annotations\n\nfrom collections import abc\nimport pandas as pd\n\nfrom typing import TYPE_CHECKING\nif TYPE_CHECKING:\n from pandas import DataFrame\n from seaborn._core.typing import DataSource, VariableSpec\n\n\n# TODO Repetition in the docstrings should be reduced with interpolation tools\n\nclass PlotData:\n \"\"\"\n Data table with plot variable schema and mapping to original names.\n\n Contains logic for parsing variable specification arguments and updating\n the table with layer-specific data and/or mappings.\n\n Parameters\n ----------\n data\n Input data where variable names map to vector values.\n variables\n Keys are names of plot variables (x, y, ...) each value is one of:\n\n - name of a column (or index level, or dictionary entry) in `data`\n - vector in any format that can construct a :class:`pandas.DataFrame`\n\n Attributes\n ----------\n frame\n Data table with column names having defined plot variables.\n names\n Dictionary mapping plot variable names to names in source data structure(s).\n ids\n Dictionary mapping plot variable names to unique data source identifiers.\n\n \"\"\"\n frame: DataFrame\n frames: dict[tuple, DataFrame]\n names: dict[str, str | None]\n ids: dict[str, str | int]\n source_data: DataSource\n source_vars: dict[str, VariableSpec]\n\n def __init__(\n self,\n data: DataSource,\n variables: dict[str, VariableSpec],\n ):\n\n frame, names, ids = self._assign_variables(data, variables)\n\n self.frame = frame\n self.names = names\n self.ids = ids\n\n self.frames = {} # TODO this is a hack, remove\n\n self.source_data = data\n self.source_vars = variables\n\n def __contains__(self, key: str) -> bool:\n \"\"\"Boolean check on whether a variable is defined in this dataset.\"\"\"\n if self.frame is None:\n return any(key in df for df in self.frames.values())\n return key in self.frame", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/data.py_PlotData.join_PlotData.join.return.new": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/data.py_PlotData.join_PlotData.join.return.new", "embedding": null, "metadata": {"file_path": "seaborn/_core/data.py", "file_name": "data.py", "file_type": "text/x-python", "category": "implementation", "start_line": 74, "end_line": 119, "span_ids": ["PlotData.join"], "tokens": 389}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PlotData:\n\n def join(\n self,\n data: DataSource,\n variables: dict[str, VariableSpec] | None,\n ) -> PlotData:\n \"\"\"Add, replace, or drop variables and return as a new dataset.\"\"\"\n # Inherit the original source of the upsteam data by default\n if data is None:\n data = self.source_data\n\n # TODO allow `data` to be a function (that is called on the source data?)\n\n if not variables:\n variables = self.source_vars\n\n # Passing var=None implies that we do not want that variable in this layer\n disinherit = [k for k, v in variables.items() if v is None]\n\n # Create a new dataset with just the info passed here\n new = PlotData(data, variables)\n\n # -- Update the inherited DataSource with this new information\n\n drop_cols = [k for k in self.frame if k in new.frame or k in disinherit]\n parts = [self.frame.drop(columns=drop_cols), new.frame]\n\n # Because we are combining distinct columns, this is perhaps more\n # naturally thought of as a \"merge\"/\"join\". But using concat because\n # some simple testing suggests that it is marginally faster.\n frame = pd.concat(parts, axis=1, sort=False, copy=False)\n\n names = {k: v for k, v in self.names.items() if k not in disinherit}\n names.update(new.names)\n\n ids = {k: v for k, v in self.ids.items() if k not in disinherit}\n ids.update(new.ids)\n\n new.frame = frame\n new.names = names\n new.ids = ids\n\n # Multiple chained operations should always inherit from the original object\n new.source_data = self.source_data\n new.source_vars = self.source_vars\n\n return new", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/data.py_PlotData._assign_variables_PlotData._assign_variables.if_isinstance_source_data.else_.index._": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/data.py_PlotData._assign_variables_PlotData._assign_variables.if_isinstance_source_data.else_.index._", "embedding": null, "metadata": {"file_path": "seaborn/_core/data.py", "file_name": "data.py", "file_type": "text/x-python", "category": "implementation", "start_line": 121, "end_line": 181, "span_ids": ["PlotData._assign_variables"], "tokens": 452}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PlotData:\n\n def _assign_variables(\n self,\n data: DataSource,\n variables: dict[str, VariableSpec],\n ) -> tuple[DataFrame, dict[str, str | None], dict[str, str | int]]:\n \"\"\"\n Assign values for plot variables given long-form data and/or vector inputs.\n\n Parameters\n ----------\n data\n Input data where variable names map to vector values.\n variables\n Keys are names of plot variables (x, y, ...) each value is one of:\n\n - name of a column (or index level, or dictionary entry) in `data`\n - vector in any format that can construct a :class:`pandas.DataFrame`\n\n Returns\n -------\n frame\n Table mapping seaborn variables (x, y, color, ...) to data vectors.\n names\n Keys are defined seaborn variables; values are names inferred from\n the inputs (or None when no name can be determined).\n ids\n Like the `names` dict, but `None` values are replaced by the `id()`\n of the data object that defined the variable.\n\n Raises\n ------\n ValueError\n When variables are strings that don't appear in `data`, or when they are\n non-indexed vector datatypes that have a different length from `data`.\n\n \"\"\"\n source_data: dict | DataFrame\n frame: DataFrame\n names: dict[str, str | None]\n ids: dict[str, str | int]\n\n plot_data = {}\n names = {}\n ids = {}\n\n given_data = data is not None\n if given_data:\n source_data = data\n else:\n # Data is optional; all variables can be defined as vectors\n # But simplify downstream code by always having a usable source data object\n source_data = {}\n\n # TODO Generally interested in accepting a generic DataFrame interface\n # Track https://data-apis.org/ for development\n\n # Variables can also be extracted from the index of a DataFrame\n if isinstance(source_data, pd.DataFrame):\n index = source_data.index.to_frame().to_dict(\"series\")\n else:\n index = {}\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/data.py_PlotData._assign_variables.for_key_val_in_variables_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/data.py_PlotData._assign_variables.for_key_val_in_variables_", "embedding": null, "metadata": {"file_path": "seaborn/_core/data.py", "file_name": "data.py", "file_type": "text/x-python", "category": "implementation", "start_line": 183, "end_line": 263, "span_ids": ["PlotData._assign_variables"], "tokens": 721}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PlotData:\n\n def _assign_variables(\n self,\n data: DataSource,\n variables: dict[str, VariableSpec],\n ) -> tuple[DataFrame, dict[str, str | None], dict[str, str | int]]:\n # ... other code\n\n for key, val in variables.items():\n\n # Simply ignore variables with no specification\n if val is None:\n continue\n\n # Try to treat the argument as a key for the data collection.\n # But be flexible about what can be used as a key.\n # Usually it will be a string, but allow other hashables when\n # taking from the main data object. Allow only strings to reference\n # fields in the index, because otherwise there is too much ambiguity.\n\n # TODO this will be rendered unnecessary by the following pandas fix:\n # https://github.com/pandas-dev/pandas/pull/41283\n try:\n hash(val)\n val_is_hashable = True\n except TypeError:\n val_is_hashable = False\n\n val_as_data_key = (\n # See https://github.com/pandas-dev/pandas/pull/41283\n # (isinstance(val, abc.Hashable) and val in source_data)\n (val_is_hashable and val in source_data)\n or (isinstance(val, str) and val in index)\n )\n\n if val_as_data_key:\n\n if val in source_data:\n plot_data[key] = source_data[val]\n elif val in index:\n plot_data[key] = index[val]\n names[key] = ids[key] = str(val)\n\n elif isinstance(val, str):\n\n # This looks like a column name but, lookup failed.\n\n err = f\"Could not interpret value `{val}` for `{key}`. \"\n if not given_data:\n err += \"Value is a string, but `data` was not passed.\"\n else:\n err += \"An entry with this name does not appear in `data`.\"\n raise ValueError(err)\n\n else:\n\n # Otherwise, assume the value somehow represents data\n\n # Ignore empty data structures\n if isinstance(val, abc.Sized) and len(val) == 0:\n continue\n\n # If vector has no index, it must match length of data table\n if isinstance(data, pd.DataFrame) and not isinstance(val, pd.Series):\n if isinstance(val, abc.Sized) and len(data) != len(val):\n val_cls = val.__class__.__name__\n err = (\n f\"Length of {val_cls} vectors must match length of `data`\"\n f\" when both are used, but `data` has length {len(data)}\"\n f\" and the vector passed to `{key}` has length {len(val)}.\"\n )\n raise ValueError(err)\n\n plot_data[key] = val\n\n # Try to infer the original name using pandas-like metadata\n if hasattr(val, \"name\"):\n names[key] = ids[key] = str(val.name) # type: ignore # mypy/1424\n else:\n names[key] = None\n ids[key] = id(val)\n\n # Construct a tidy plot DataFrame. This will convert a number of\n # types automatically, aligning on index in case of pandas objects\n # TODO Note: this fails when variable specs *only* have scalars!\n frame = pd.DataFrame(plot_data)\n\n return frame, names, ids", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/groupby.py__Simplified_split_apply_GroupBy.__init__.self.order.order": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/groupby.py__Simplified_split_apply_GroupBy.__init__.self.order.order", "embedding": null, "metadata": {"file_path": "seaborn/_core/groupby.py", "file_name": "groupby.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 45, "span_ids": ["imports:5", "impl", "docstring", "GroupBy", "imports"], "tokens": 334}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Simplified split-apply-combine paradigm on dataframes for internal use.\"\"\"\nfrom __future__ import annotations\n\nimport pandas as pd\n\nfrom seaborn._core.rules import categorical_order\n\nfrom typing import TYPE_CHECKING\nif TYPE_CHECKING:\n from typing import Callable\n from pandas import DataFrame, MultiIndex, Index\n\n\nclass GroupBy:\n \"\"\"\n Interface for Pandas GroupBy operations allowing specified group order.\n\n Writing our own class to do this has a few advantages:\n - It constrains the interface between Plot and Stat/Move objects\n - It allows control over the row order of the GroupBy result, which is\n important when using in the context of some Move operations (dodge, stack, ...)\n - It simplifies some complexities regarding the return type and Index contents\n one encounters with Pandas, especially for DataFrame -> DataFrame applies\n - It increases future flexibility regarding alternate DataFrame libraries\n\n \"\"\"\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 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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/groupby.py_GroupBy._get_groups_GroupBy._reorder_columns.return.res_reindex_columns_pd_In": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/groupby.py_GroupBy._get_groups_GroupBy._reorder_columns.return.res_reindex_columns_pd_In", "embedding": null, "metadata": {"file_path": "seaborn/_core/groupby.py", "file_name": "groupby.py", "file_type": "text/x-python", "category": "implementation", "start_line": 47, "end_line": 73, "span_ids": ["GroupBy._get_groups", "GroupBy._reorder_columns"], "tokens": 238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GroupBy:\n\n def _get_groups(self, data: DataFrame) -> MultiIndex:\n \"\"\"Return index with Cartesian product of ordered grouping variable levels.\"\"\"\n levels = {}\n for var, order in self.order.items():\n if var in data:\n if order is None:\n order = categorical_order(data[var])\n levels[var] = order\n\n grouper: str | list[str]\n groups: Index | MultiIndex | None\n if not levels:\n grouper = []\n groups = None\n elif len(levels) > 1:\n grouper = list(levels)\n groups = pd.MultiIndex.from_product(levels.values(), names=grouper)\n else:\n grouper, = list(levels)\n groups = pd.Index(levels[grouper], name=grouper)\n return grouper, groups\n\n def _reorder_columns(self, res, data):\n \"\"\"Reorder result columns to match original order with new columns appended.\"\"\"\n cols = [c for c in data if c in res]\n cols += [c for c in res if c not in data]\n return res.reindex(columns=pd.Index(cols))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/groupby.py_GroupBy.agg_GroupBy.agg.return.res": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/groupby.py_GroupBy.agg_GroupBy.agg.return.res", "embedding": null, "metadata": {"file_path": "seaborn/_core/groupby.py", "file_name": "groupby.py", "file_type": "text/x-python", "category": "implementation", "start_line": 75, "end_line": 99, "span_ids": ["GroupBy.agg"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GroupBy:\n\n def agg(self, data: DataFrame, *args, **kwargs) -> DataFrame:\n \"\"\"\n Reduce each group to a single row in the output.\n\n The output will have a row for each unique combination of the grouping\n variable levels with null values for the aggregated variable(s) where\n those combinations do not appear in the dataset.\n\n \"\"\"\n grouper, groups = self._get_groups(data)\n\n if not grouper:\n # We will need to see whether there are valid usecases that end up here\n raise ValueError(\"No grouping variables are present in dataframe\")\n\n res = (\n data\n .groupby(grouper, sort=False, observed=True)\n .agg(*args, **kwargs)\n .reindex(groups)\n .reset_index()\n .pipe(self._reorder_columns, data)\n )\n\n return res", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/groupby.py_GroupBy.apply_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/groupby.py_GroupBy.apply_", "embedding": null, "metadata": {"file_path": "seaborn/_core/groupby.py", "file_name": "groupby.py", "file_type": "text/x-python", "category": "implementation", "start_line": 101, "end_line": 125, "span_ids": ["GroupBy.apply"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GroupBy:\n\n def apply(\n self, data: DataFrame, func: Callable[..., DataFrame],\n *args, **kwargs,\n ) -> DataFrame:\n \"\"\"Apply a DataFrame -> DataFrame mapping to each group.\"\"\"\n grouper, groups = self._get_groups(data)\n\n if not grouper:\n return self._reorder_columns(func(data, *args, **kwargs), data)\n\n parts = {}\n for key, part_df in data.groupby(grouper, sort=False):\n parts[key] = func(part_df, *args, **kwargs)\n stack = []\n for key in groups:\n if key in parts:\n if isinstance(grouper, list):\n group_ids = dict(zip(grouper, key))\n else:\n group_ids = {grouper: key}\n stack.append(parts[key].assign(**group_ids))\n\n res = pd.concat(stack, ignore_index=True)\n return self._reorder_columns(res, data)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/moves.py_Dodge_Dodge.__call__.return.out": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/moves.py_Dodge_Dodge.__call__.return.out", "embedding": null, "metadata": {"file_path": "seaborn/_core/moves.py", "file_name": "moves.py", "file_type": "text/x-python", "category": "implementation", "start_line": 64, "end_line": 121, "span_ids": ["Dodge.__call__", "Dodge"], "tokens": 476}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Dodge(Move):\n \"\"\"\n Displacement and narrowing of overlapping marks along orientation axis.\n \"\"\"\n empty: str = \"keep\" # Options: keep, drop, fill\n gap: float = 0\n\n # TODO accept just a str here?\n # TODO should this always be present?\n # TODO should the default be an \"all\" singleton?\n by: Optional[list[str]] = None\n\n def __call__(\n self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n ) -> DataFrame:\n\n grouping_vars = [v for v in groupby.order if v in data]\n groups = groupby.agg(data, {\"width\": \"max\"})\n if self.empty == \"fill\":\n groups = groups.dropna()\n\n def groupby_pos(s):\n grouper = [groups[v] for v in [orient, \"col\", \"row\"] if v in data]\n return s.groupby(grouper, sort=False, observed=True)\n\n def scale_widths(w):\n # TODO what value to fill missing widths??? Hard problem...\n # TODO short circuit this if outer widths has no variance?\n empty = 0 if self.empty == \"fill\" else w.mean()\n filled = w.fillna(empty)\n scale = filled.max()\n norm = filled.sum()\n if self.empty == \"keep\":\n w = filled\n return w / norm * scale\n\n def widths_to_offsets(w):\n return w.shift(1).fillna(0).cumsum() + (w - w.sum()) / 2\n\n new_widths = groupby_pos(groups[\"width\"]).transform(scale_widths)\n offsets = groupby_pos(new_widths).transform(widths_to_offsets)\n\n if self.gap:\n new_widths *= 1 - self.gap\n\n groups[\"_dodged\"] = groups[orient] + offsets\n groups[\"width\"] = new_widths\n\n out = (\n data\n .drop(\"width\", axis=1)\n .merge(groups, on=grouping_vars, how=\"left\")\n .drop(orient, axis=1)\n .rename(columns={\"_dodged\": orient})\n )\n\n return out", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/moves.py_Stack_Stack.__call__.return.GroupBy_groupers_apply_d": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/moves.py_Stack_Stack.__call__.return.GroupBy_groupers_apply_d", "embedding": null, "metadata": {"file_path": "seaborn/_core/moves.py", "file_name": "moves.py", "file_type": "text/x-python", "category": "implementation", "start_line": 124, "end_line": 156, "span_ids": ["Stack._stack", "Stack.__call__", "Stack"], "tokens": 286}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Stack(Move):\n \"\"\"\n Displacement of overlapping bar or area marks along the value axis.\n \"\"\"\n # TODO center? (or should this be a different move, eg. Stream())\n\n def _stack(self, df, orient):\n\n # TODO should stack do something with ymin/ymax style marks?\n # Should there be an upstream conversion to baseline/height parameterization?\n\n if df[\"baseline\"].nunique() > 1:\n err = \"Stack move cannot be used when baselines are already heterogeneous\"\n raise RuntimeError(err)\n\n other = {\"x\": \"y\", \"y\": \"x\"}[orient]\n stacked_lengths = (df[other] - df[\"baseline\"]).dropna().cumsum()\n offsets = stacked_lengths.shift(1).fillna(0)\n\n df[other] = stacked_lengths\n df[\"baseline\"] = df[\"baseline\"] + offsets\n\n return df\n\n def __call__(\n self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n ) -> DataFrame:\n\n # TODO where to ensure that other semantic variables are sorted properly?\n # TODO why are we not using the passed in groupby here?\n groupers = [\"col\", \"row\", orient]\n return GroupBy(groupers).apply(data, self._stack, orient)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot._resolve_positionals_Plot._resolve_positionals.return.data_variables": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot._resolve_positionals_Plot._resolve_positionals.return.data_variables", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 180, "end_line": 212, "span_ids": ["Plot._resolve_positionals"], "tokens": 299}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@build_plot_signature\nclass Plot:\n\n def _resolve_positionals(\n self,\n args: tuple[DataSource | VariableSpec, ...],\n data: DataSource,\n variables: dict[str, VariableSpec],\n ) -> tuple[DataSource, dict[str, VariableSpec]]:\n \"\"\"Handle positional arguments, which may contain data / x / y.\"\"\"\n if len(args) > 3:\n err = \"Plot() accepts no more than 3 positional arguments (data, x, y).\"\n raise TypeError(err)\n\n # TODO need some clearer way to differentiate data / vector here\n # (There might be an abstract DataFrame class to use here?)\n if isinstance(args[0], (abc.Mapping, pd.DataFrame)):\n if data is not None:\n raise TypeError(\"`data` given by both name and position.\")\n data, args = args[0], args[1:]\n\n if len(args) == 2:\n x, y = args\n elif len(args) == 1:\n x, y = *args, None\n else:\n x = y = None\n\n for name, var in zip(\"yx\", (y, x)):\n if var is not None:\n if name in variables:\n raise TypeError(f\"`{name}` given by both name and position.\")\n # Keep coordinates at the front of the variables dict\n variables = {name: var, **variables}\n\n return data, variables", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.on_Plot.on.return.new": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.on_Plot.on.return.new", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 337, "end_line": 381, "span_ids": ["Plot.on"], "tokens": 400}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@build_plot_signature\nclass Plot:\n\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 accepted_types: tuple # Allow tuple of various length\n if hasattr(mpl.figure, \"SubFigure\"): # Added in mpl 3.4\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 else:\n accepted_types = mpl.axes.Axes, mpl.figure.Figure\n accepted_types_str = f\"{mpl.axes.Axes} or {mpl.figure.Figure}\"\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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.add_Plot.add.return.new": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.add_Plot.add.return.new", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 383, "end_line": 470, "span_ids": ["Plot.add"], "tokens": 803}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@build_plot_signature\nclass Plot:\n\n def add(\n self,\n mark: Mark,\n *transforms: Stat | Mark,\n orient: str | None = None,\n legend: bool = True,\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 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 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 \"orient\": {\"v\": \"x\", \"h\": \"y\"}.get(orient, orient), # type: ignore\n })\n\n return new", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.pair_Plot.pair.return.new": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.pair_Plot.pair.return.new", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 472, "end_line": 533, "span_ids": ["Plot.pair"], "tokens": 521}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@build_plot_signature\nclass Plot:\n\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 # 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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.facet_Plot.facet.return.new": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.facet_Plot.facet.return.new", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 535, "end_line": 594, "span_ids": ["Plot.facet"], "tokens": 433}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@build_plot_signature\nclass Plot:\n\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 variables = {}\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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot._TODO_def_twin__Plot.scale.return.new": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot._TODO_def_twin__Plot.scale.return.new", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 596, "end_line": 623, "span_ids": ["Plot.scale", "Plot.facet"], "tokens": 301}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@build_plot_signature\nclass Plot:\n\n # TODO def twin()?\n\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 use `None` to use an \"identity\" scale, which treats data\n values as literally encoding visual properties.\n\n Examples\n --------\n .. include:: ../docstrings/objects.Plot.scale.rst\n\n \"\"\"\n new = self._clone()\n new._scales.update(scales)\n return new", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py__The_plot_compilati_Plotter._TODO_what_else_is_usefu": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py__The_plot_compilati_Plotter._TODO_what_else_is_usefu", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 853, "end_line": 901, "span_ids": ["Plotter.save", "Plotter", "Plot._plot", "Plotter.show"], "tokens": 356}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# ---- The plot compilation engine ---------------------------------------------- #\n\n\nclass Plotter:\n \"\"\"\n Engine for compiling a :class:`Plot` spec into a Matplotlib figure.\n\n This class is not intended to be instantiated directly by users.\n\n \"\"\"\n # TODO decide if we ever want these (Plot.plot(debug=True))?\n _data: PlotData\n _layers: list[Layer]\n _figure: Figure\n\n def __init__(self, pyplot: bool, theme: dict[str, Any]):\n\n self._pyplot = pyplot\n self._theme = theme\n self._legend_contents: list[tuple[\n tuple[str, str | int], list[Artist], list[str],\n ]] = []\n self._scales: dict[str, Scale] = {}\n\n def save(self, loc, **kwargs) -> Plotter: # TODO type args\n kwargs.setdefault(\"dpi\", 96)\n try:\n loc = os.path.expanduser(loc)\n except TypeError:\n # loc may be a buffer in which case that would not work\n pass\n self._figure.savefig(loc, **kwargs)\n return self\n\n def show(self, **kwargs) -> None:\n \"\"\"\n Display the plot by hooking into pyplot.\n\n This method calls :func:`matplotlib.pyplot.show` with any keyword parameters.\n\n \"\"\"\n # TODO if we did not create the Plotter with pyplot, is it possible to do this?\n # If not we should clearly raise.\n import matplotlib.pyplot as plt\n with theme_context(self._theme):\n plt.show(**kwargs)\n\n # TODO API for accessing the underlying matplotlib objects\n # TODO what else is useful in the public API for this class?", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._repr_png__Plotter._repr_png_.return.data_metadata": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._repr_png__Plotter._repr_png_.return.data_metadata", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 903, "end_line": 940, "span_ids": ["Plotter._repr_png_"], "tokens": 401}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Plotter:\n\n def _repr_png_(self) -> tuple[bytes, dict[str, float]]:\n\n # TODO better to do this through a Jupyter hook? e.g.\n # ipy = IPython.core.formatters.get_ipython()\n # fmt = ipy.display_formatter.formatters[\"text/html\"]\n # fmt.for_type(Plot, ...)\n # Would like to have a svg option too, not sure how to make that flexible\n\n # TODO use matplotlib backend directly instead of going through savefig?\n\n # TODO perhaps have self.show() flip a switch to disable this, so that\n # user does not end up with two versions of the figure in the output\n\n # TODO use bbox_inches=\"tight\" like the inline backend?\n # pro: better results, con: (sometimes) confusing results\n # Better solution would be to default (with option to change)\n # to using constrained/tight layout.\n\n # TODO need to decide what the right default behavior here is:\n # - Use dpi=72 to match default InlineBackend figure size?\n # - Accept a generic \"scaling\" somewhere and scale DPI from that,\n # either with 1x -> 72 or 1x -> 96 and the default scaling be .75?\n # - Listen to rcParams? InlineBackend behavior makes that so complicated :(\n # - Do we ever want to *not* use retina mode at this point?\n\n from PIL import Image\n\n dpi = 96\n buffer = io.BytesIO()\n\n with theme_context(self._theme):\n self._figure.savefig(buffer, dpi=dpi * 2, format=\"png\", bbox_inches=\"tight\")\n data = buffer.getvalue()\n\n scaling = .85 / 2\n w, h = Image.open(buffer).size\n metadata = {\"width\": w * scaling, \"height\": h * scaling}\n return data, metadata", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._setup_figure_Plotter._setup_figure._Figure_annotation": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._setup_figure_Plotter._setup_figure._Figure_annotation", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 973, "end_line": 997, "span_ids": ["Plotter._setup_figure"], "tokens": 220}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Plotter:\n\n def _setup_figure(self, p: Plot, common: PlotData, layers: list[Layer]) -> None:\n\n # --- Parsing the faceting/pairing parameterization to specify figure grid\n\n subplot_spec = p._subplot_spec.copy()\n facet_spec = p._facet_spec.copy()\n pair_spec = p._pair_spec.copy()\n\n for axis in \"xy\":\n if axis in p._shares:\n subplot_spec[f\"share{axis}\"] = p._shares[axis]\n\n for dim in [\"col\", \"row\"]:\n if dim in common.frame and dim not in facet_spec[\"structure\"]:\n order = categorical_order(common.frame[dim])\n facet_spec[\"structure\"][dim] = order\n\n self._subplots = subplots = Subplots(subplot_spec, facet_spec, pair_spec)\n\n # --- Figure initialization\n self._figure = subplots.init_figure(\n pair_spec, self._pyplot, p._figure_spec, p._target,\n )\n\n # --- Figure annotation\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._plot_layer_Plotter._plot_layer.if_layer_legend_.self__update_legend_conte": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._plot_layer_Plotter._plot_layer.if_layer_legend_.self__update_legend_conte", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1284, "end_line": 1352, "span_ids": ["Plotter._plot_layer"], "tokens": 670}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Plotter:\n\n def _plot_layer(self, p: Plot, layer: Layer) -> None:\n\n data = layer[\"data\"]\n mark = layer[\"mark\"]\n move = layer[\"move\"]\n\n default_grouping_vars = [\"col\", \"row\", \"group\"] # TODO where best to define?\n grouping_properties = [v for v in PROPERTIES if v[0] not in \"xy\"]\n\n pair_variables = p._pair_spec.get(\"structure\", {})\n\n for subplots, df, scales in self._generate_pairings(data, pair_variables):\n\n orient = layer[\"orient\"] or mark._infer_orient(scales)\n\n def get_order(var):\n # Ignore order for x/y: they have been scaled to numeric indices,\n # so any original order is no longer valid. Default ordering rules\n # sorted unique numbers will correctly reconstruct intended order\n # TODO This is tricky, make sure we add some tests for this\n if var not in \"xy\" and var in scales:\n return getattr(scales[var], \"order\", None)\n\n if \"width\" in mark._mappable_props:\n width = mark._resolve(df, \"width\", None)\n else:\n width = df.get(\"width\", 0.8) # TODO what default\n if orient in df:\n df[\"width\"] = width * scales[orient]._spacing(df[orient])\n\n if \"baseline\" in mark._mappable_props:\n # TODO what marks should have this?\n # If we can set baseline with, e.g., Bar(), then the\n # \"other\" (e.g. y for x oriented bars) parameterization\n # is somewhat ambiguous.\n baseline = mark._resolve(df, \"baseline\", None)\n else:\n # TODO unlike width, we might not want to add baseline to data\n # if the mark doesn't use it. Practically, there is a concern about\n # Mark abstraction like Area / Ribbon\n baseline = df.get(\"baseline\", 0)\n df[\"baseline\"] = baseline\n\n if move is not None:\n moves = move if isinstance(move, list) else [move]\n for move_step in moves:\n move_by = getattr(move_step, \"by\", None)\n if move_by is None:\n move_by = grouping_properties\n move_groupers = [*move_by, *default_grouping_vars]\n if move_step.group_by_orient:\n move_groupers.insert(0, orient)\n order = {var: get_order(var) for var in move_groupers}\n groupby = GroupBy(order)\n df = move_step(df, groupby, orient, scales)\n\n df = self._unscale_coords(subplots, df, orient)\n\n grouping_vars = mark._grouping_props + default_grouping_vars\n split_generator = self._setup_split_generator(grouping_vars, df, subplots)\n\n mark._plot(split_generator, scales, orient)\n\n # TODO is this the right place for this?\n for view in self._subplots:\n view[\"ax\"].autoscale_view()\n\n if layer[\"legend\"]:\n self._update_legend_contents(p, mark, data, scales)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._scale_coords_Plotter._scale_coords.return.out_df": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._scale_coords_Plotter._scale_coords.return.out_df", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1151, "end_line": 1171, "span_ids": ["Plotter._scale_coords"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Plotter:\n\n def _scale_coords(self, subplots: list[dict], df: DataFrame) -> DataFrame:\n # TODO stricter type on subplots\n\n coord_cols = [c for c in df if re.match(r\"^[xy]\\D*$\", c)]\n out_df = (\n df\n .copy(deep=False)\n .drop(coord_cols, axis=1)\n .reindex(df.columns, axis=1) # So unscaled columns retain their place\n )\n\n for view in subplots:\n view_df = self._filter_subplot_data(df, view)\n axes_df = view_df[coord_cols]\n with pd.option_context(\"mode.use_inf_as_null\", True):\n axes_df = axes_df.dropna()\n for var, values in axes_df.items():\n scale = view[f\"{var[0]}scale\"]\n out_df.loc[values.index, var] = scale(values)\n\n return out_df", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._unscale_coords_Plotter._unscale_coords.return.out_df": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._unscale_coords_Plotter._unscale_coords.return.out_df", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1173, "end_line": 1203, "span_ids": ["Plotter._unscale_coords"], "tokens": 304}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Plotter:\n\n def _unscale_coords(\n self, subplots: list[dict], df: DataFrame, orient: str,\n ) -> DataFrame:\n # TODO do we still have numbers in the variable name at this point?\n coord_cols = [c for c in df if re.match(r\"^[xy]\\D*$\", c)]\n drop_cols = [*coord_cols, \"width\"] if \"width\" in df else coord_cols\n out_df = (\n df\n .drop(drop_cols, axis=1)\n .reindex(df.columns, axis=1) # So unscaled columns retain their place\n .copy(deep=False)\n )\n\n for view in subplots:\n view_df = self._filter_subplot_data(df, view)\n axes_df = view_df[coord_cols]\n for var, values in axes_df.items():\n\n axis = getattr(view[\"ax\"], f\"{var[0]}axis\")\n # TODO see https://github.com/matplotlib/matplotlib/issues/22713\n transform = axis.get_transform().inverted().transform\n inverted = transform(values)\n out_df.loc[values.index, var] = inverted\n\n if var == orient and \"width\" in view_df:\n width = view_df[\"width\"]\n out_df.loc[values.index, \"width\"] = (\n transform(values + width / 2) - transform(values - width / 2)\n )\n\n return out_df", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._generate_pairings_Plotter._generate_pairings.for_x_y_in_iter_axes_.yield_subplots_out_df_s": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._generate_pairings_Plotter._generate_pairings.for_x_y_in_iter_axes_.yield_subplots_out_df_s", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1205, "end_line": 1245, "span_ids": ["Plotter._generate_pairings"], "tokens": 331}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Plotter:\n\n def _generate_pairings(\n self, data: PlotData, pair_variables: dict,\n ) -> Generator[\n tuple[list[dict], DataFrame, dict[str, Scale]], None, None\n ]:\n # TODO retype return with subplot_spec or similar\n\n iter_axes = itertools.product(*[\n pair_variables.get(axis, [axis]) for axis in \"xy\"\n ])\n\n for x, y in iter_axes:\n\n subplots = []\n for view in self._subplots:\n if (view[\"x\"] == x) and (view[\"y\"] == y):\n subplots.append(view)\n\n if data.frame.empty and data.frames:\n out_df = data.frames[(x, y)].copy()\n elif not pair_variables:\n out_df = data.frame.copy()\n else:\n if data.frame.empty and data.frames:\n out_df = data.frames[(x, y)].copy()\n else:\n out_df = data.frame.copy()\n\n scales = self._scales.copy()\n if x in out_df:\n scales[\"x\"] = self._scales[x]\n if y in out_df:\n scales[\"y\"] = self._scales[y]\n\n for axis, var in zip(\"xy\", (x, y)):\n if axis != var:\n out_df = out_df.rename(columns={var: axis})\n cols = [col for col in out_df if re.match(rf\"{axis}\\d+\", col)]\n out_df = out_df.drop(cols, axis=1)\n\n yield subplots, out_df, scales", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._get_subplot_index_Plotter._filter_subplot_data.return.df_keep_rows_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._get_subplot_index_Plotter._filter_subplot_data.return.df_keep_rows_", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1247, "end_line": 1267, "span_ids": ["Plotter._get_subplot_index", "Plotter._filter_subplot_data"], "tokens": 176}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Plotter:\n\n def _get_subplot_index(self, df: DataFrame, subplot: dict) -> DataFrame:\n\n dims = df.columns.intersection([\"col\", \"row\"])\n if dims.empty:\n return df.index\n\n keep_rows = pd.Series(True, df.index, dtype=bool)\n for dim in dims:\n keep_rows &= df[dim] == subplot[dim]\n return df.index[keep_rows]\n\n def _filter_subplot_data(self, df: DataFrame, subplot: dict) -> DataFrame:\n # TODO note redundancies with preceding function ... needs refactoring\n dims = df.columns.intersection([\"col\", \"row\"])\n if dims.empty:\n return df\n\n keep_rows = pd.Series(True, df.index, dtype=bool)\n for dim in dims:\n keep_rows &= df[dim] == subplot[dim]\n return df[keep_rows]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._setup_split_generator_Plotter._setup_split_generator.return.split_generator": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._setup_split_generator_Plotter._setup_split_generator.return.split_generator", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1472, "end_line": 1545, "span_ids": ["Plotter._setup_split_generator"], "tokens": 612}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Plotter:\n\n def _setup_split_generator(\n self, grouping_vars: list[str], df: DataFrame, subplots: list[dict[str, Any]],\n ) -> Callable[[], Generator]:\n\n allow_empty = False # TODO will need to recreate previous categorical plots\n\n grouping_keys = []\n grouping_vars = [\n v for v in grouping_vars if v in df and v not in [\"col\", \"row\"]\n ]\n for var in grouping_vars:\n order = getattr(self._scales[var], \"order\", None)\n if order is None:\n order = categorical_order(df[var])\n grouping_keys.append(order)\n\n def split_generator(keep_na=False) -> Generator:\n\n for view in subplots:\n\n axes_df = self._filter_subplot_data(df, view)\n\n with pd.option_context(\"mode.use_inf_as_null\", True):\n if keep_na:\n # The simpler thing to do would be x.dropna().reindex(x.index).\n # But that doesn't work with the way that the subset iteration\n # is written below, which assumes data for grouping vars.\n # Matplotlib (usually?) masks nan data, so this should \"work\".\n # Downstream code can also drop these rows, at some speed cost.\n present = axes_df.notna().all(axis=1)\n nulled = {}\n for axis in \"xy\":\n if axis in axes_df:\n nulled[axis] = axes_df[axis].where(present)\n axes_df = axes_df.assign(**nulled)\n else:\n axes_df = axes_df.dropna()\n\n subplot_keys = {}\n for dim in [\"col\", \"row\"]:\n if view[dim] is not None:\n subplot_keys[dim] = view[dim]\n\n if not grouping_vars or not any(grouping_keys):\n yield subplot_keys, axes_df.copy(), view[\"ax\"]\n continue\n\n grouped_df = axes_df.groupby(grouping_vars, sort=False, as_index=False)\n\n for key in itertools.product(*grouping_keys):\n\n # Pandas fails with singleton tuple inputs\n pd_key = key[0] if len(key) == 1 else key\n\n try:\n df_subset = grouped_df.get_group(pd_key)\n except KeyError:\n # TODO (from initial work on categorical plots refactor)\n # We are adding this to allow backwards compatability\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 df_subset = axes_df.loc[[]]\n\n if df_subset.empty and not allow_empty:\n continue\n\n sub_vars = dict(zip(grouping_vars, key))\n sub_vars.update(subplot_keys)\n\n # TODO need copy(deep=...) policy (here, above, anywhere else?)\n yield sub_vars, df_subset.copy(), view[\"ax\"]\n\n return split_generator", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._update_legend_contents_Plotter._update_legend_contents.self__legend_contents_ext": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._update_legend_contents_Plotter._update_legend_contents.self__legend_contents_ext", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1547, "end_line": 1589, "span_ids": ["Plotter._update_legend_contents"], "tokens": 342}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Plotter:\n\n def _update_legend_contents(\n self,\n p: Plot,\n mark: Mark,\n data: PlotData,\n scales: dict[str, Scale],\n ) -> None:\n \"\"\"Add legend artists / labels for one layer in the plot.\"\"\"\n if data.frame.empty and data.frames:\n legend_vars = set()\n for frame in data.frames.values():\n legend_vars.update(frame.columns.intersection(scales))\n else:\n legend_vars = data.frame.columns.intersection(scales)\n\n # First pass: Identify the values that will be shown for each variable\n schema: list[tuple[\n tuple[str, str | int], list[str], tuple[list, list[str]]\n ]] = []\n schema = []\n for var in legend_vars:\n var_legend = scales[var]._legend\n if var_legend is not None:\n values, labels = var_legend\n for (_, part_id), part_vars, _ in schema:\n if data.ids[var] == part_id:\n # Allow multiple plot semantics to represent same data variable\n part_vars.append(var)\n break\n else:\n title = self._resolve_label(p, var, data.names[var])\n entry = (title, data.ids[var]), [var], (values, labels)\n schema.append(entry)\n\n # Second pass, generate an artist corresponding to each value\n contents = []\n for key, variables, (values, labels) in schema:\n artists = []\n for val in values:\n artists.append(mark._legend_artist(variables, val, scales))\n contents.append((key, artists, labels))\n\n self._legend_contents.extend(contents)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_from___future___import_an_MarkerPattern.Union_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_from___future___import_an_MarkerPattern.Union_", "embedding": null, "metadata": {"file_path": "seaborn/_core/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 39, "span_ids": ["impl:2", "impl", "imports", "imports:15"], "tokens": 253}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from __future__ import annotations\nimport itertools\nimport warnings\n\nimport numpy as np\nfrom pandas import Series\nimport matplotlib as mpl\nfrom matplotlib.colors import to_rgb, to_rgba, to_rgba_array\nfrom matplotlib.path import Path\n\nfrom seaborn._core.scales import Scale, Nominal, Continuous, Temporal\nfrom seaborn._core.rules import categorical_order, variable_type\nfrom seaborn._compat import MarkerStyle\nfrom seaborn.palettes import QUAL_PALETTES, color_palette, blend_palette\nfrom seaborn.utils import get_color_cycle\n\nfrom typing import Any, Callable, Tuple, List, Union, Optional\n\ntry:\n from numpy.typing import ArrayLike\nexcept ImportError:\n # numpy<1.20.0 (Jan 2021)\n ArrayLike = Any\n\nRGBTuple = Tuple[float, float, float]\nRGBATuple = Tuple[float, float, float, float]\nColorSpec = Union[RGBTuple, RGBATuple, str]\n\nDashPattern = Tuple[float, ...]\nDashPatternWithOffset = Tuple[float, Optional[DashPattern]]\n\nMarkerPattern = Union[\n float,\n str,\n Tuple[int, int, float],\n List[Tuple[float, float]],\n Path,\n MarkerStyle,\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py___Property.__init__.self.variable.variable": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py___Property.__init__.self.variable.variable", "embedding": null, "metadata": {"file_path": "seaborn/_core/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 42, "end_line": 60, "span_ids": ["impl:2", "Property"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# =================================================================================== #\n# Base classes\n# =================================================================================== #\n\n\nclass Property:\n \"\"\"Base class for visual properties that can be set directly or be data scaling.\"\"\"\n\n # When True, scales for this property will populate the legend by default\n legend = False\n\n # When True, scales for this property normalize data to [0, 1] before mapping\n normed = False\n\n def __init__(self, variable: str | None = None):\n \"\"\"Initialize the property with the name of the corresponding plot variable.\"\"\"\n if not variable:\n variable = self.__class__.__name__.lower()\n self.variable = variable", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Property.default_scale_Property.default_scale.if_var_type_numeric_.else_.return.Nominal_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Property.default_scale_Property.default_scale.if_var_type_numeric_.else_.return.Nominal_", "embedding": null, "metadata": {"file_path": "seaborn/_core/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 62, "end_line": 76, "span_ids": ["Property.default_scale"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Property:\n\n def default_scale(self, data: Series) -> Scale:\n \"\"\"Given data, initialize appropriate scale class.\"\"\"\n # TODO allow variable_type to be \"boolean\" if that's a scale?\n # TODO how will this handle data with units that can be treated as numeric\n # if passed through a registered matplotlib converter?\n var_type = variable_type(data, boolean_type=\"numeric\")\n if var_type == \"numeric\":\n return Continuous()\n elif var_type == \"datetime\":\n return Temporal()\n # TODO others\n # time-based (TimeStamp, TimeDelta, Period)\n # boolean scale?\n else:\n return Nominal()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Property.infer_scale_Property.infer_scale.if_isinstance_arg_str_.else_.raise_TypeError_msg_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Property.infer_scale_Property.infer_scale.if_isinstance_arg_str_.else_.raise_TypeError_msg_", "embedding": null, "metadata": {"file_path": "seaborn/_core/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 78, "end_line": 96, "span_ids": ["Property.infer_scale"], "tokens": 243}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Property:\n\n def infer_scale(self, arg: Any, data: Series) -> Scale:\n \"\"\"Given data and a scaling argument, initialize appropriate scale class.\"\"\"\n # TODO put these somewhere external for validation\n # TODO putting this here won't pick it up if subclasses define infer_scale\n # (e.g. color). How best to handle that? One option is to call super after\n # handling property-specific possibilities (e.g. for color check that the\n # arg is not a valid palette name) but that could get tricky.\n trans_args = [\"log\", \"symlog\", \"logit\", \"pow\", \"sqrt\"]\n if isinstance(arg, str):\n if any(arg.startswith(k) for k in trans_args):\n # TODO validate numeric type? That should happen centrally somewhere\n return Continuous(trans=arg)\n else:\n msg = f\"Unknown magic arg for {self.variable} scale: '{arg}'.\"\n raise ValueError(msg)\n else:\n arg_type = type(arg).__name__\n msg = f\"Magic arg for {self.variable} scale must be str, not {arg_type}.\"\n raise TypeError(msg)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Property.get_mapping_Property._check_dict_entries.if_missing_.raise_ValueError_err_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Property.get_mapping_Property._check_dict_entries.if_missing_.raise_ValueError_err_", "embedding": null, "metadata": {"file_path": "seaborn/_core/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 98, "end_line": 116, "span_ids": ["Property._check_dict_entries", "Property.get_mapping", "Property.standardize"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Property:\n\n def get_mapping(\n self, scale: Scale, data: Series\n ) -> Callable[[ArrayLike], ArrayLike]:\n \"\"\"Return a function that maps from data domain to property range.\"\"\"\n def identity(x):\n return x\n return identity\n\n def standardize(self, val: Any) -> Any:\n \"\"\"Coerce flexible property value to standardized representation.\"\"\"\n return val\n\n def _check_dict_entries(self, levels: list, values: dict) -> None:\n \"\"\"Input check when values are provided as a dictionary.\"\"\"\n missing = set(levels) - set(values)\n if missing:\n formatted = \", \".join(map(repr, sorted(missing, key=str)))\n err = f\"No entry in {self.variable} dictionary for {formatted}\"\n raise ValueError(err)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Property._check_list_length_Coordinate.normed.False": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Property._check_list_length_Coordinate.normed.False", "embedding": null, "metadata": {"file_path": "seaborn/_core/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 118, "end_line": 151, "span_ids": ["Coordinate", "Property._check_list_length"], "tokens": 254}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Property:\n\n def _check_list_length(self, levels: list, values: list) -> list:\n \"\"\"Input check when values are provided as a list.\"\"\"\n message = \"\"\n if len(levels) > len(values):\n message = \" \".join([\n f\"\\nThe {self.variable} list has fewer values ({len(values)})\",\n f\"than needed ({len(levels)}) and will cycle, which may\",\n \"produce an uninterpretable plot.\"\n ])\n values = [x for _, x in zip(levels, itertools.cycle(values))]\n\n elif len(values) > len(levels):\n message = \" \".join([\n f\"The {self.variable} list has more values ({len(values)})\",\n f\"than needed ({len(levels)}), which may not be intended.\",\n ])\n values = values[:len(levels)]\n\n # TODO look into custom PlotSpecWarning with better formatting\n if message:\n warnings.warn(message, UserWarning)\n\n return values\n\n\n# =================================================================================== #\n# Properties relating to spatial position of marks on the plotting axes\n# =================================================================================== #\n\n\nclass Coordinate(Property):\n \"\"\"The position of visual marks with respect to the axes of the plot.\"\"\"\n legend = False\n normed = False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_None_6_IntervalProperty.infer_scale.if_isinstance_arg_list_.else_.return.Continuous_arg_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_None_6_IntervalProperty.infer_scale.if_isinstance_arg_list_.else_.return.Continuous_arg_", "embedding": null, "metadata": {"file_path": "seaborn/_core/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 154, "end_line": 192, "span_ids": ["Coordinate", "IntervalProperty._inverse", "IntervalProperty._forward", "IntervalProperty.default_range", "IntervalProperty.infer_scale", "IntervalProperty"], "tokens": 280}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# =================================================================================== #\n# Properties with numeric values where scale range can be defined as an interval\n# =================================================================================== #\n\n\nclass IntervalProperty(Property):\n \"\"\"A numeric property where scale range can be defined as an interval.\"\"\"\n legend = True\n normed = True\n\n _default_range: tuple[float, float] = (0, 1)\n\n @property\n def default_range(self) -> tuple[float, float]:\n \"\"\"Min and max values used by default for semantic mapping.\"\"\"\n return self._default_range\n\n def _forward(self, values: ArrayLike) -> ArrayLike:\n \"\"\"Transform applied to native values before linear mapping into interval.\"\"\"\n return values\n\n def _inverse(self, values: ArrayLike) -> ArrayLike:\n \"\"\"Transform applied to results of mapping that returns to native values.\"\"\"\n return values\n\n def infer_scale(self, arg: Any, data: Series) -> Scale:\n \"\"\"Given data and a scaling argument, initialize appropriate scale class.\"\"\"\n\n # TODO infer continuous based on log/sqrt etc?\n\n if isinstance(arg, (list, dict)):\n return Nominal(arg)\n elif variable_type(data) == \"categorical\":\n return Nominal(arg)\n elif variable_type(data) == \"datetime\":\n return Temporal(arg)\n # TODO other variable types\n else:\n return Continuous(arg)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_IntervalProperty.get_mapping_IntervalProperty.get_mapping.return.mapping": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_IntervalProperty.get_mapping_IntervalProperty.get_mapping.return.mapping", "embedding": null, "metadata": {"file_path": "seaborn/_core/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 194, "end_line": 220, "span_ids": ["IntervalProperty.get_mapping"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IntervalProperty(Property):\n\n def get_mapping(\n self, scale: Scale, data: ArrayLike\n ) -> Callable[[ArrayLike], ArrayLike]:\n \"\"\"Return a function that maps from data domain to property range.\"\"\"\n if isinstance(scale, Nominal):\n return self._get_categorical_mapping(scale, data)\n\n if scale.values is None:\n vmin, vmax = self._forward(self.default_range)\n elif isinstance(scale.values, tuple) and len(scale.values) == 2:\n vmin, vmax = self._forward(scale.values)\n else:\n if isinstance(scale.values, tuple):\n actual = f\"{len(scale.values)}-tuple\"\n else:\n actual = str(type(scale.values))\n scale_class = scale.__class__.__name__\n err = \" \".join([\n f\"Values for {self.variable} variables with {scale_class} scale\",\n f\"must be 2-tuple; not {actual}.\",\n ])\n raise TypeError(err)\n\n def mapping(x):\n return self._inverse(np.multiply(x, vmax - vmin) + vmin)\n\n return mapping", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_IntervalProperty._get_categorical_mapping_IntervalProperty._get_categorical_mapping.return.mapping": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_IntervalProperty._get_categorical_mapping_IntervalProperty._get_categorical_mapping.return.mapping", "embedding": null, "metadata": {"file_path": "seaborn/_core/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 222, "end_line": 256, "span_ids": ["IntervalProperty._get_categorical_mapping"], "tokens": 299}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IntervalProperty(Property):\n\n def _get_categorical_mapping(\n self, scale: Nominal, data: ArrayLike\n ) -> Callable[[ArrayLike], ArrayLike]:\n \"\"\"Identify evenly-spaced values using interval or explicit mapping.\"\"\"\n levels = categorical_order(data, scale.order)\n\n if isinstance(scale.values, dict):\n self._check_dict_entries(levels, scale.values)\n values = [scale.values[x] for x in levels]\n elif isinstance(scale.values, list):\n values = self._check_list_length(levels, scale.values)\n else:\n if scale.values is None:\n vmin, vmax = self.default_range\n elif isinstance(scale.values, tuple):\n vmin, vmax = scale.values\n else:\n scale_class = scale.__class__.__name__\n err = \" \".join([\n f\"Values for {self.variable} variables with {scale_class} scale\",\n f\"must be a dict, list or tuple; not {type(scale.values)}\",\n ])\n raise TypeError(err)\n\n vmin, vmax = self._forward([vmin, vmax])\n values = self._inverse(np.linspace(vmax, vmin, len(levels)))\n\n def mapping(x):\n ixs = np.asarray(x, np.intp)\n out = np.full(len(x), np.nan)\n use = np.isfinite(x)\n out[use] = np.take(values, ixs[use])\n return out\n\n return mapping", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_None_9_ObjectProperty.infer_scale.return.Nominal_arg_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_None_9_ObjectProperty.infer_scale.return.Nominal_arg_", "embedding": null, "metadata": {"file_path": "seaborn/_core/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 304, "end_line": 325, "span_ids": ["ObjectProperty.infer_scale", "ObjectProperty.default_scale", "ObjectProperty._default_values", "Alpha", "ObjectProperty"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# =================================================================================== #\n# Properties defined by arbitrary objects with inherently nominal scaling\n# =================================================================================== #\n\n\nclass ObjectProperty(Property):\n \"\"\"A property defined by arbitrary an object, with inherently nominal scaling.\"\"\"\n legend = True\n normed = False\n\n # Object representing null data, should appear invisible when drawn by matplotlib\n # Note that we now drop nulls in Plot._plot_layer and thus may not need this\n null_value: Any = None\n\n def _default_values(self, n: int) -> list:\n raise NotImplementedError()\n\n def default_scale(self, data: Series) -> Nominal:\n return Nominal()\n\n def infer_scale(self, arg: Any, data: Series) -> Nominal:\n return Nominal(arg)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_ObjectProperty.get_mapping_ObjectProperty.get_mapping.return.mapping": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_ObjectProperty.get_mapping_ObjectProperty.get_mapping.return.mapping", "embedding": null, "metadata": {"file_path": "seaborn/_core/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 324, "end_line": 355, "span_ids": ["ObjectProperty.get_mapping"], "tokens": 254}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ObjectProperty(Property):\n\n def get_mapping(\n self, scale: Scale, data: Series,\n ) -> Callable[[ArrayLike], list]:\n \"\"\"Define mapping as lookup into list of object values.\"\"\"\n order = getattr(scale, \"order\", None)\n levels = categorical_order(data, order)\n n = len(levels)\n\n if isinstance(scale.values, dict):\n self._check_dict_entries(levels, scale.values)\n values = [scale.values[x] for x in levels]\n elif isinstance(scale.values, list):\n values = self._check_list_length(levels, scale.values)\n elif scale.values is None:\n values = self._default_values(n)\n else:\n msg = \" \".join([\n f\"Scale values for a {self.variable} variable must be provided\",\n f\"in a dict or list; not {type(scale.values)}.\"\n ])\n raise TypeError(msg)\n\n values = [self.standardize(x) for x in values]\n\n def mapping(x):\n ixs = np.asarray(x, np.intp)\n return [\n values[ix] if np.isfinite(x_i) else self.null_value\n for x_i, ix in zip(x, ixs)\n ]\n\n return mapping", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Marker_Marker._default_values.return.markers": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Marker_Marker._default_values.return.markers", "embedding": null, "metadata": {"file_path": "seaborn/_core/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 361, "end_line": 402, "span_ids": ["Marker.standardize", "Marker._default_values", "Marker"], "tokens": 362}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Marker(ObjectProperty):\n \"\"\"Shape of points in scatter-type marks or lines with data points marked.\"\"\"\n null_value = MarkerStyle(\"\")\n\n # TODO should we have named marker \"palettes\"? (e.g. see d3 options)\n\n # TODO need some sort of \"require_scale\" functionality\n # to raise when we get the wrong kind explicitly specified\n\n def standardize(self, val: MarkerPattern) -> MarkerStyle:\n return MarkerStyle(val)\n\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 # 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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_LineStyle_LineStyle._default_values.return._self__get_dash_pattern_x": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_LineStyle_LineStyle._default_values.return._self__get_dash_pattern_x", "embedding": null, "metadata": {"file_path": "seaborn/_core/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 405, "end_line": 453, "span_ids": ["LineStyle._default_values", "LineStyle.standardize", "LineStyle"], "tokens": 411}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LineStyle(ObjectProperty):\n \"\"\"Dash pattern for line-type marks.\"\"\"\n null_value = \"\"\n\n def standardize(self, val: str | DashPattern) -> DashPatternWithOffset:\n return self._get_dash_pattern(val)\n\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 # 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]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_LineStyle._get_dash_pattern_LineStyle._get_dash_pattern.return.offset_dashes": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_LineStyle._get_dash_pattern_LineStyle._get_dash_pattern.return.offset_dashes", "embedding": null, "metadata": {"file_path": "seaborn/_core/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 455, "end_line": 499, "span_ids": ["LineStyle._get_dash_pattern"], "tokens": 403}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LineStyle(ObjectProperty):\n\n @staticmethod\n def _get_dash_pattern(style: str | DashPattern) -> DashPatternWithOffset:\n \"\"\"Convert linestyle arguments to dash pattern with offset.\"\"\"\n # Copied and modified from Matplotlib 3.4\n # go from short hand -> full strings\n ls_mapper = {\"-\": \"solid\", \"--\": \"dashed\", \"-.\": \"dashdot\", \":\": \"dotted\"}\n if isinstance(style, str):\n style = ls_mapper.get(style, style)\n # un-dashed styles\n if style in [\"solid\", \"none\", \"None\"]:\n offset = 0\n dashes = None\n # dashed styles\n elif style in [\"dashed\", \"dashdot\", \"dotted\"]:\n offset = 0\n dashes = tuple(mpl.rcParams[f\"lines.{style}_pattern\"])\n else:\n options = [*ls_mapper.values(), *ls_mapper.keys()]\n msg = f\"Linestyle string must be one of {options}, not {repr(style)}.\"\n raise ValueError(msg)\n\n elif isinstance(style, tuple):\n if len(style) > 1 and isinstance(style[1], tuple):\n offset, dashes = style\n elif len(style) > 1 and style[1] is None:\n offset, dashes = style\n else:\n offset = 0\n dashes = style\n else:\n val_type = type(style).__name__\n msg = f\"Linestyle must be str or tuple, not {val_type}.\"\n raise TypeError(msg)\n\n # Normalize offset to be positive and shorter than the dash cycle\n if dashes is not None:\n try:\n dsum = sum(dashes)\n except TypeError as err:\n msg = f\"Invalid dash pattern: {dashes}\"\n raise TypeError(msg) from err\n if dsum:\n offset %= dsum\n\n return offset, dashes", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_None_12_Color._standardize_color_sequence.if_needs_alpha_.else_.return.to_rgba_array_colors_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_None_12_Color._standardize_color_sequence.if_needs_alpha_.else_.return.to_rgba_array_colors_", "embedding": null, "metadata": {"file_path": "seaborn/_core/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 502, "end_line": 533, "span_ids": ["Color._standardize_color_sequence", "Color", "Color.standardize", "LineStyle._get_dash_pattern"], "tokens": 247}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# =================================================================================== #\n# Properties with RGB(A) color values\n# =================================================================================== #\n\n\nclass Color(Property):\n \"\"\"Color, as RGB(A), scalable with nominal palettes or continuous gradients.\"\"\"\n legend = True\n normed = True\n\n def standardize(self, val: ColorSpec) -> RGBTuple | RGBATuple:\n # Return color with alpha channel only if the input spec has it\n # This is so that RGBA colors can override the Alpha property\n if to_rgba(val) != to_rgba(val, 1):\n return to_rgba(val)\n else:\n return to_rgb(val)\n\n def _standardize_color_sequence(self, colors: ArrayLike) -> ArrayLike:\n \"\"\"Convert color sequence to RGB(A) array, preserving but not adding alpha.\"\"\"\n def has_alpha(x):\n return to_rgba(x) != to_rgba(x, 1)\n\n if isinstance(colors, np.ndarray):\n needs_alpha = colors.shape[1] == 4\n else:\n needs_alpha = any(has_alpha(x) for x in colors)\n\n if needs_alpha:\n return to_rgba_array(colors)\n else:\n return to_rgba_array(colors)[:, :3]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Color.infer_scale_Color.infer_scale.if_arg_in_QUAL_PALETTES_.else_.return.Nominal_arg_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Color.infer_scale_Color.infer_scale.if_arg_in_QUAL_PALETTES_.else_.return.Nominal_arg_", "embedding": null, "metadata": {"file_path": "seaborn/_core/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 532, "end_line": 572, "span_ids": ["Color.infer_scale"], "tokens": 325}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Color(Property):\n\n def infer_scale(self, arg: Any, data: Series) -> Scale:\n # TODO when inferring Continuous without data, verify type\n\n # TODO need to rethink the variable type system\n # (e.g. boolean, ordered categories as Ordinal, etc)..\n var_type = variable_type(data, boolean_type=\"categorical\")\n\n if isinstance(arg, (dict, list)):\n return Nominal(arg)\n\n if isinstance(arg, tuple):\n if var_type == \"categorical\":\n # TODO It seems reasonable to allow a gradient mapping for nominal\n # scale but it also feels \"technically\" wrong. Should this infer\n # Ordinal with categorical data and, if so, verify orderedness?\n return Nominal(arg)\n return Continuous(arg)\n\n if callable(arg):\n return Continuous(arg)\n\n # TODO Do we accept str like \"log\", \"pow\", etc. for semantics?\n\n # TODO what about\n # - Temporal? (i.e. datetime)\n # - Boolean?\n\n if not isinstance(arg, str):\n msg = \" \".join([\n f\"A single scale argument for {self.variable} variables must be\",\n f\"a string, dict, tuple, list, or callable, not {type(arg)}.\"\n ])\n raise TypeError(msg)\n\n if arg in QUAL_PALETTES:\n return Nominal(arg)\n elif var_type == \"numeric\":\n return Continuous(arg)\n # TODO implement scales for date variables and any others.\n else:\n return Nominal(arg)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Color._get_categorical_mapping_Color._get_categorical_mapping.return.mapping": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Color._get_categorical_mapping_Color._get_categorical_mapping.return.mapping", "embedding": null, "metadata": {"file_path": "seaborn/_core/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 577, "end_line": 617, "span_ids": ["Color._get_categorical_mapping"], "tokens": 355}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Color(Property):\n\n def _get_categorical_mapping(self, scale, data):\n \"\"\"Define mapping as lookup in list of discrete color values.\"\"\"\n levels = categorical_order(data, scale.order)\n n = len(levels)\n values = scale.values\n\n if isinstance(values, dict):\n self._check_dict_entries(levels, values)\n # TODO where to ensure that dict values have consistent representation?\n colors = [values[x] for x in levels]\n elif isinstance(values, list):\n colors = self._check_list_length(levels, scale.values)\n elif isinstance(values, tuple):\n colors = blend_palette(values, n)\n elif isinstance(values, str):\n colors = color_palette(values, n)\n elif values is None:\n if n <= len(get_color_cycle()):\n # Use current (global) default palette\n colors = color_palette(n_colors=n)\n else:\n colors = color_palette(\"husl\", n)\n else:\n scale_class = scale.__class__.__name__\n msg = \" \".join([\n f\"Scale values for {self.variable} with a {scale_class} mapping\",\n f\"must be string, list, tuple, or dict; not {type(scale.values)}.\"\n ])\n raise TypeError(msg)\n\n # If color specified here has alpha channel, it will override alpha property\n colors = self._standardize_color_sequence(colors)\n\n def mapping(x):\n ixs = np.asarray(x, np.intp)\n use = np.isfinite(x)\n out = np.full((len(ixs), colors.shape[1]), np.nan)\n out[use] = np.take(colors, ixs[use], axis=0)\n return out\n\n return mapping", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Color.get_mapping_Color.get_mapping.return._mapping": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Color.get_mapping_Color.get_mapping.return._mapping", "embedding": null, "metadata": {"file_path": "seaborn/_core/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 616, "end_line": 655, "span_ids": ["Color.get_mapping"], "tokens": 376}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Color(Property):\n\n def get_mapping(\n self, scale: Scale, data: Series\n ) -> Callable[[ArrayLike], ArrayLike]:\n \"\"\"Return a function that maps from data domain to color values.\"\"\"\n # TODO what is best way to do this conditional?\n # Should it be class-based or should classes have behavioral attributes?\n if isinstance(scale, Nominal):\n return self._get_categorical_mapping(scale, data)\n\n if scale.values is None:\n # TODO Rethink best default continuous color gradient\n mapping = color_palette(\"ch:\", as_cmap=True)\n elif isinstance(scale.values, tuple):\n # TODO blend_palette will strip alpha, but we should support\n # interpolation on all four channels\n mapping = blend_palette(scale.values, as_cmap=True)\n elif isinstance(scale.values, str):\n # TODO for matplotlib colormaps this will clip extremes, which is\n # different from what using the named colormap directly would do\n # This may or may not be desireable.\n mapping = color_palette(scale.values, as_cmap=True)\n elif callable(scale.values):\n mapping = scale.values\n else:\n scale_class = scale.__class__.__name__\n msg = \" \".join([\n f\"Scale values for {self.variable} with a {scale_class} mapping\",\n f\"must be string, tuple, or callable; not {type(scale.values)}.\"\n ])\n raise TypeError(msg)\n\n def _mapping(x):\n # Remove alpha channel so it does not override alpha property downstream\n # TODO this will need to be more flexible to support RGBA tuples (see above)\n invalid = ~np.isfinite(x)\n out = mapping(x)[:, :3]\n out[invalid] = np.nan\n return out\n\n return _mapping", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_None_15_Fill.infer_scale.return.Nominal_arg_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_None_15_Fill.infer_scale.return.Nominal_arg_", "embedding": null, "metadata": {"file_path": "seaborn/_core/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 658, "end_line": 693, "span_ids": ["Color.get_mapping", "Fill.standardize", "Fill.infer_scale", "Fill.default_scale", "Fill", "Fill._default_values"], "tokens": 310}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# =================================================================================== #\n# Properties that can take only two states\n# =================================================================================== #\n\n\nclass Fill(Property):\n \"\"\"Boolean property of points/bars/patches that can be solid or outlined.\"\"\"\n legend = True\n normed = False\n\n # TODO default to Nominal scale always?\n # Actually this will just not work with Continuous (except 0/1), suggesting we need\n # an abstraction for failing gracefully on bad Property <> Scale interactions\n\n def standardize(self, val: Any) -> bool:\n return bool(val)\n\n def _default_values(self, n: int) -> list:\n \"\"\"Return a list of n values, alternating True and False.\"\"\"\n if n > 2:\n msg = \" \".join([\n f\"The variable assigned to {self.variable} has more than two levels,\",\n f\"so {self.variable} values will cycle and may be uninterpretable\",\n ])\n # TODO fire in a \"nice\" way (see above)\n warnings.warn(msg, UserWarning)\n return [x for x, _ in zip(itertools.cycle([True, False]), range(n))]\n\n def default_scale(self, data: Series) -> Nominal:\n \"\"\"Given data, initialize appropriate scale class.\"\"\"\n return Nominal()\n\n def infer_scale(self, arg: Any, data: Series) -> Scale:\n \"\"\"Given data and a scaling argument, initialize appropriate scale class.\"\"\"\n # TODO infer Boolean where possible?\n return Nominal(arg)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Fill.get_mapping_Fill.get_mapping.return.mapping": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_Fill.get_mapping_Fill.get_mapping.return.mapping", "embedding": null, "metadata": {"file_path": "seaborn/_core/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 695, "end_line": 727, "span_ids": ["Fill.get_mapping"], "tokens": 321}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Fill(Property):\n\n def get_mapping(\n self, scale: Scale, data: Series\n ) -> Callable[[ArrayLike], ArrayLike]:\n \"\"\"Return a function that maps each data value to True or False.\"\"\"\n # TODO categorical_order is going to return [False, True] for booleans,\n # and [0, 1] for binary, but the default values order is [True, False].\n # We should special case this to handle it properly, or change\n # categorical_order to not \"sort\" booleans. Note that we need to sync with\n # what's going to happen upstream in the scale, so we can't just do it here.\n order = getattr(scale, \"order\", None)\n levels = categorical_order(data, order)\n\n if isinstance(scale.values, list):\n values = [bool(x) for x in scale.values]\n elif isinstance(scale.values, dict):\n values = [bool(scale.values[x]) for x in levels]\n elif scale.values is None:\n values = self._default_values(len(levels))\n else:\n msg = \" \".join([\n f\"Scale values for {self.variable} must be passed in\",\n f\"a list or dict; not {type(scale.values)}.\"\n ])\n raise TypeError(msg)\n\n def mapping(x):\n ixs = np.asarray(x, np.intp)\n return [\n values[ix] if np.isfinite(x_i) else False\n for x_i, ix in zip(x, ixs)\n ]\n\n return mapping", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_None_18_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_None_18_", "embedding": null, "metadata": {"file_path": "seaborn/_core/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 733, "end_line": 767, "span_ids": ["impl:17", "Fill.get_mapping"], "tokens": 224}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# =================================================================================== #\n# Enumeration of properties for use by Plot and Mark classes\n# =================================================================================== #\n# TODO turn this into a property registry with hooks, etc.\n# TODO Users do not interact directly with properties, so how to document them?\n\n\nPROPERTY_CLASSES = {\n \"x\": Coordinate,\n \"y\": Coordinate,\n \"color\": Color,\n \"alpha\": Alpha,\n \"fill\": Fill,\n \"marker\": Marker,\n \"pointsize\": PointSize,\n \"stroke\": Stroke,\n \"linewidth\": LineWidth,\n \"linestyle\": LineStyle,\n \"fillcolor\": Color,\n \"fillalpha\": Alpha,\n \"edgewidth\": EdgeWidth,\n \"edgestyle\": LineStyle,\n \"edgecolor\": Color,\n \"edgealpha\": Alpha,\n \"xmin\": Coordinate,\n \"xmax\": Coordinate,\n \"ymin\": Coordinate,\n \"ymax\": Coordinate,\n \"group\": Property,\n # TODO pattern?\n # TODO gradient?\n}\n\nPROPERTIES = {var: cls(var) for var, cls in PROPERTY_CLASSES.items()}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/rules.py_from___future___import_an_VarType.__eq__.return.self_data_other": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/rules.py_from___future___import_an_VarType.__eq__.return.self_data_other", "embedding": null, "metadata": {"file_path": "seaborn/_core/rules.py", "file_name": "rules.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 35, "span_ids": ["impl", "imports:9", "imports", "VarType", "VarType.__eq__"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from __future__ import annotations\n\nimport warnings\nfrom collections import UserString\nfrom numbers import Number\nfrom datetime import datetime\n\nimport numpy as np\nimport pandas as pd\n\nfrom typing import TYPE_CHECKING\nif TYPE_CHECKING:\n from typing import Literal\n from pandas import Series\n\n\nclass VarType(UserString):\n \"\"\"\n Prevent comparisons elsewhere in the library from using the wrong name.\n\n Errors are simple assertions because users should not be able to trigger\n them. If that changes, they should be more verbose.\n\n \"\"\"\n # TODO VarType is an awfully overloaded name, but so is DataType ...\n # TODO adding unknown because we are using this in for scales, is that right?\n allowed = \"numeric\", \"datetime\", \"categorical\", \"unknown\"\n\n def __init__(self, data):\n assert data in self.allowed, data\n super().__init__(data)\n\n def __eq__(self, other):\n assert other in self.allowed, other\n return self.data == other", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/rules.py_variable_type_variable_type.return.VarType_categorical_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/rules.py_variable_type_variable_type.return.VarType_categorical_", "embedding": null, "metadata": {"file_path": "seaborn/_core/rules.py", "file_name": "rules.py", "file_type": "text/x-python", "category": "implementation", "start_line": 38, "end_line": 122, "span_ids": ["variable_type"], "tokens": 654}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def variable_type(\n vector: Series,\n boolean_type: Literal[\"numeric\", \"categorical\"] = \"numeric\",\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 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\n # If a categorical dtype is set, infer categorical\n if pd.api.types.is_categorical_dtype(vector):\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 # 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 np.isin(vector, [0, 1, np.nan]).all():\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\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/rules.py_categorical_order_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/rules.py_categorical_order_", "embedding": null, "metadata": {"file_path": "seaborn/_core/rules.py", "file_name": "rules.py", "file_type": "text/x-python", "category": "implementation", "start_line": 125, "end_line": 154, "span_ids": ["categorical_order"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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 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(order) == \"numeric\":\n order.sort()\n\n return order", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_from___future___import_an_if_TYPE_CHECKING_.Pipeline.Sequence_Optional_Callabl": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_from___future___import_an_if_TYPE_CHECKING_.Pipeline.Sequence_Optional_Callabl", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 48, "span_ids": ["impl:2", "impl", "imports", "imports:17"], "tokens": 258}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from __future__ import annotations\nimport re\nfrom copy import copy\nfrom collections.abc import Sequence\nfrom dataclasses import dataclass\nfrom functools import partial\nfrom typing import Any, Callable, Tuple, Optional, Union, ClassVar\n\nimport numpy as np\nimport matplotlib as mpl\nfrom matplotlib.ticker import (\n Locator,\n Formatter,\n AutoLocator,\n AutoMinorLocator,\n FixedLocator,\n LinearLocator,\n LogLocator,\n SymmetricalLogLocator,\n MaxNLocator,\n MultipleLocator,\n EngFormatter,\n FuncFormatter,\n LogFormatterSciNotation,\n ScalarFormatter,\n StrMethodFormatter,\n)\nfrom matplotlib.dates import (\n AutoDateLocator,\n AutoDateFormatter,\n ConciseDateFormatter,\n)\nfrom matplotlib.axis import Axis\nfrom matplotlib.scale import ScaleBase\nfrom pandas import Series\n\nfrom seaborn._core.rules import categorical_order\n\nfrom typing import TYPE_CHECKING\nif TYPE_CHECKING:\n from seaborn._core.properties import Property\n from numpy.typing import ArrayLike\n\n Transforms = Tuple[\n Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]\n ]\n\n Pipeline = Sequence[Optional[Callable[[Union[Series, ArrayLike]], ArrayLike]]]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_PseudoAxis.update_units_PseudoAxis.update_units.if_self_converter_is_not_._self_set_default_interv": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_PseudoAxis.update_units_PseudoAxis.update_units.if_self_converter_is_not_._self_set_default_interv", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 838, "end_line": 854, "span_ids": ["PseudoAxis.update_units"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PseudoAxis:\n\n def update_units(self, x):\n \"\"\"Pass units to the internal converter, potentially updating its mapping.\"\"\"\n self.converter = mpl.units.registry.get_converter(x)\n if self.converter is not None:\n self.converter.default_units(x, self)\n\n info = self.converter.axisinfo(self.units, self)\n\n if info is None:\n return\n if info.majloc is not None:\n self.set_major_locator(info.majloc)\n if info.majfmt is not None:\n self.set_major_formatter(info.majfmt)\n\n # This is in matplotlib method; do we need this?\n # self.set_default_intervals()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_PseudoAxis.convert_units_PseudoAxis.get_majorticklocs.return.self_major_locator_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_PseudoAxis.convert_units_PseudoAxis.get_majorticklocs.return.self_major_locator_", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 856, "end_line": 873, "span_ids": ["PseudoAxis.get_scale", "PseudoAxis.convert_units", "PseudoAxis.get_majorticklocs"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PseudoAxis:\n\n def convert_units(self, x):\n \"\"\"Return a numeric representation of the input data.\"\"\"\n if np.issubdtype(np.asarray(x).dtype, np.number):\n return x\n elif self.converter is None:\n return x\n return self.converter.convert(x, self.units, self)\n\n def get_scale(self):\n # Note that matplotlib actually returns a string here!\n # (e.g., with a log scale, axis.get_scale() returns \"log\")\n # Currently we just hit it with minor ticks where it checks for\n # scale == \"log\". I'm not sure how you'd actually use log-scale\n # minor \"ticks\" in a legend context, so this is fine....\n return self.scale\n\n def get_majorticklocs(self):\n return self.major.locator()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py__make_log_transforms__make_log_transforms.return.log_exp": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py__make_log_transforms__make_log_transforms.return.log_exp", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 681, "end_line": 702, "span_ids": ["_make_log_transforms"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _make_log_transforms(base: float | None = None) -> Transforms:\n\n if base is None:\n fs = np.log, np.exp\n elif base == 2:\n fs = np.log2, partial(np.power, 2)\n elif base == 10:\n fs = np.log10, partial(np.power, 10)\n else:\n def forward(x):\n return np.log(x) / np.log(base)\n fs = forward, partial(np.power, base)\n\n def log(x):\n with np.errstate(invalid=\"ignore\", divide=\"ignore\"):\n return fs[0](x)\n\n def exp(x):\n with np.errstate(invalid=\"ignore\", divide=\"ignore\"):\n return fs[1](x)\n\n return log, exp", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py__make_symlog_transforms__make_symlog_transforms.return.symlog_symexp": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py__make_symlog_transforms__make_symlog_transforms.return.symlog_symexp", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 705, "end_line": 722, "span_ids": ["_make_symlog_transforms"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _make_symlog_transforms(c: float = 1, base: float = 10) -> Transforms:\n\n # From https://iopscience.iop.org/article/10.1088/0957-0233/24/2/027001\n\n # Note: currently not using base because we only get\n # one parameter from the string, and are using c (this is consistent with d3)\n\n log, exp = _make_log_transforms(base)\n\n def symlog(x):\n with np.errstate(invalid=\"ignore\", divide=\"ignore\"):\n return np.sign(x) * log(1 + np.abs(np.divide(x, c)))\n\n def symexp(x):\n with np.errstate(invalid=\"ignore\", divide=\"ignore\"):\n return np.sign(x) * c * (exp(np.abs(x)) - 1)\n\n return symlog, symexp", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py__make_sqrt_transforms_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py__make_sqrt_transforms_", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 725, "end_line": 745, "span_ids": ["_make_sqrt_transforms", "_make_power_transforms"], "tokens": 113}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _make_sqrt_transforms() -> Transforms:\n\n def sqrt(x):\n return np.sign(x) * np.sqrt(np.abs(x))\n\n def square(x):\n return np.sign(x) * np.square(x)\n\n return sqrt, square\n\n\ndef _make_power_transforms(exp: float) -> Transforms:\n\n def forward(x):\n return np.sign(x) * np.power(np.abs(x), exp)\n\n def inverse(x):\n return np.sign(x) * np.power(np.abs(x), 1 / exp)\n\n return forward, inverse", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/subplots.py_from___future___import_an_Subplots.__init__.self__determine_axis_shar": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/subplots.py_from___future___import_an_Subplots.__init__.self__determine_axis_shar", "embedding": null, "metadata": {"file_path": "seaborn/_core/subplots.py", "file_name": "subplots.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 44, "span_ids": ["imports:9", "impl", "Subplots", "imports"], "tokens": 274}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from __future__ import annotations\nfrom collections.abc import Generator\n\nimport numpy as np\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\n\nfrom matplotlib.axes import Axes\nfrom matplotlib.figure import Figure\nfrom typing import TYPE_CHECKING\nif TYPE_CHECKING: # TODO move to seaborn._core.typing?\n from seaborn._core.plot import FacetSpec, PairSpec\n from matplotlib.figure import SubFigure\n\n\nclass Subplots:\n \"\"\"\n Interface for creating and using matplotlib subplots based on seaborn parameters.\n\n Parameters\n ----------\n subplot_spec : dict\n Keyword args for :meth:`matplotlib.figure.Figure.subplots`.\n facet_spec : dict\n Parameters that control subplot faceting.\n pair_spec : dict\n Parameters that control subplot pairing.\n data : PlotData\n Data used to define figure setup.\n\n \"\"\"\n def __init__(\n self,\n subplot_spec: dict, # TODO define as TypedDict\n facet_spec: FacetSpec,\n pair_spec: PairSpec,\n ):\n\n self.subplot_spec = subplot_spec\n\n self._check_dimension_uniqueness(facet_spec, pair_spec)\n self._determine_grid_dimensions(facet_spec, pair_spec)\n self._handle_wrapping(facet_spec, pair_spec)\n self._determine_axis_sharing(pair_spec)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/subplots.py_Subplots._check_dimension_uniqueness_Subplots._check_dimension_uniqueness.if_err_is_not_None_._TODO_what_err_class_De": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/subplots.py_Subplots._check_dimension_uniqueness_Subplots._check_dimension_uniqueness.if_err_is_not_None_._TODO_what_err_class_De", "embedding": null, "metadata": {"file_path": "seaborn/_core/subplots.py", "file_name": "subplots.py", "file_type": "text/x-python", "category": "implementation", "start_line": 47, "end_line": 77, "span_ids": ["Subplots._check_dimension_uniqueness"], "tokens": 376}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Subplots:\n\n def _check_dimension_uniqueness(\n self, facet_spec: FacetSpec, pair_spec: PairSpec\n ) -> None:\n \"\"\"Reject specs that pair and facet on (or wrap to) same figure dimension.\"\"\"\n err = None\n\n facet_vars = facet_spec.get(\"variables\", {})\n\n if facet_spec.get(\"wrap\") and {\"col\", \"row\"} <= set(facet_vars):\n err = \"Cannot wrap facets when specifying both `col` and `row`.\"\n elif (\n pair_spec.get(\"wrap\")\n and pair_spec.get(\"cross\", True)\n and len(pair_spec.get(\"structure\", {}).get(\"x\", [])) > 1\n and len(pair_spec.get(\"structure\", {}).get(\"y\", [])) > 1\n ):\n err = \"Cannot wrap subplots when pairing on both `x` and `y`.\"\n\n collisions = {\"x\": [\"columns\", \"rows\"], \"y\": [\"rows\", \"columns\"]}\n for pair_axis, (multi_dim, wrap_dim) in collisions.items():\n if pair_axis not in pair_spec.get(\"structure\", {}):\n continue\n elif multi_dim[:3] in facet_vars:\n err = f\"Cannot facet the {multi_dim} while pairing on `{pair_axis}``.\"\n elif wrap_dim[:3] in facet_vars and facet_spec.get(\"wrap\"):\n err = f\"Cannot wrap the {wrap_dim} while pairing on `{pair_axis}``.\"\n elif wrap_dim[:3] in facet_vars and pair_spec.get(\"wrap\"):\n err = f\"Cannot wrap the {multi_dim} while faceting the {wrap_dim}.\"\n\n if err is not None:\n raise RuntimeError(err) # TODO what err class? Define PlotSpecError?", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/subplots.py_Subplots._determine_grid_dimensions_Subplots._determine_grid_dimensions.self.n_subplots.self_subplot_spec_ncols_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/subplots.py_Subplots._determine_grid_dimensions_Subplots._determine_grid_dimensions.self.n_subplots.self_subplot_spec_ncols_", "embedding": null, "metadata": {"file_path": "seaborn/_core/subplots.py", "file_name": "subplots.py", "file_type": "text/x-python", "category": "implementation", "start_line": 79, "end_line": 101, "span_ids": ["Subplots._determine_grid_dimensions"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Subplots:\n\n def _determine_grid_dimensions(\n self, facet_spec: FacetSpec, pair_spec: PairSpec\n ) -> None:\n \"\"\"Parse faceting and pairing information to define figure structure.\"\"\"\n self.grid_dimensions: dict[str, list] = {}\n for dim, axis in zip([\"col\", \"row\"], [\"x\", \"y\"]):\n\n facet_vars = facet_spec.get(\"variables\", {})\n if dim in facet_vars:\n self.grid_dimensions[dim] = facet_spec[\"structure\"][dim]\n elif axis in pair_spec.get(\"structure\", {}):\n self.grid_dimensions[dim] = [\n None for _ in pair_spec.get(\"structure\", {})[axis]\n ]\n else:\n self.grid_dimensions[dim] = [None]\n\n self.subplot_spec[f\"n{dim}s\"] = len(self.grid_dimensions[dim])\n\n if not pair_spec.get(\"cross\", True):\n self.subplot_spec[\"nrows\"] = 1\n\n self.n_subplots = self.subplot_spec[\"ncols\"] * self.subplot_spec[\"nrows\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/subplots.py_Subplots._handle_wrapping_Subplots._handle_wrapping.self.wrap_dim.wrap_dim": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/subplots.py_Subplots._handle_wrapping_Subplots._handle_wrapping.self.wrap_dim.wrap_dim", "embedding": null, "metadata": {"file_path": "seaborn/_core/subplots.py", "file_name": "subplots.py", "file_type": "text/x-python", "category": "implementation", "start_line": 103, "end_line": 120, "span_ids": ["Subplots._handle_wrapping"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Subplots:\n\n def _handle_wrapping(\n self, facet_spec: FacetSpec, pair_spec: PairSpec\n ) -> None:\n \"\"\"Update figure structure parameters based on facet/pair wrapping.\"\"\"\n self.wrap = wrap = facet_spec.get(\"wrap\") or pair_spec.get(\"wrap\")\n if not wrap:\n return\n\n wrap_dim = \"row\" if self.subplot_spec[\"nrows\"] > 1 else \"col\"\n flow_dim = {\"row\": \"col\", \"col\": \"row\"}[wrap_dim]\n n_subplots = self.subplot_spec[f\"n{wrap_dim}s\"]\n flow = int(np.ceil(n_subplots / wrap))\n\n if wrap < self.subplot_spec[f\"n{wrap_dim}s\"]:\n self.subplot_spec[f\"n{wrap_dim}s\"] = wrap\n self.subplot_spec[f\"n{flow_dim}s\"] = flow\n self.n_subplots = n_subplots\n self.wrap_dim = wrap_dim", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/subplots.py_Subplots._determine_axis_sharing_Subplots._determine_axis_sharing.for_axis_in_xy_.if_key_not_in_self_subplo.self_subplot_spec_key_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/subplots.py_Subplots._determine_axis_sharing_Subplots._determine_axis_sharing.for_axis_in_xy_.if_key_not_in_self_subplo.self_subplot_spec_key_", "embedding": null, "metadata": {"file_path": "seaborn/_core/subplots.py", "file_name": "subplots.py", "file_type": "text/x-python", "category": "implementation", "start_line": 121, "end_line": 140, "span_ids": ["Subplots._determine_axis_sharing"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Subplots:\n\n def _determine_axis_sharing(self, pair_spec: PairSpec) -> None:\n \"\"\"Update subplot spec with default or specified axis sharing parameters.\"\"\"\n axis_to_dim = {\"x\": \"col\", \"y\": \"row\"}\n key: str\n val: str | bool\n for axis in \"xy\":\n key = f\"share{axis}\"\n # Always use user-specified value, if present\n if key not in self.subplot_spec:\n if axis in pair_spec.get(\"structure\", {}):\n # Paired axes are shared along one dimension by default\n if self.wrap is None and pair_spec.get(\"cross\", True):\n val = axis_to_dim[axis]\n else:\n val = False\n else:\n # This will pick up faceted plots, as well as single subplot\n # figures, where the value doesn't really matter\n val = True\n self.subplot_spec[key] = val", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/subplots.py_Subplots.init_figure_Subplots.init_figure.self._subplot_list._": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/subplots.py_Subplots.init_figure_Subplots.init_figure.self._subplot_list._", "embedding": null, "metadata": {"file_path": "seaborn/_core/subplots.py", "file_name": "subplots.py", "file_type": "text/x-python", "category": "implementation", "start_line": 143, "end_line": 221, "span_ids": ["Subplots.init_figure"], "tokens": 614}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Subplots:\n\n def init_figure(\n self,\n pair_spec: PairSpec,\n pyplot: bool = False,\n figure_kws: dict | None = None,\n target: Axes | Figure | SubFigure = None,\n ) -> Figure:\n \"\"\"Initialize matplotlib objects and add seaborn-relevant metadata.\"\"\"\n # TODO reduce need to pass pair_spec here?\n\n if figure_kws is None:\n figure_kws = {}\n\n if isinstance(target, mpl.axes.Axes):\n\n if max(self.subplot_spec[\"nrows\"], self.subplot_spec[\"ncols\"]) > 1:\n err = \" \".join([\n \"Cannot create multiple subplots after calling `Plot.on` with\",\n f\"a {mpl.axes.Axes} object.\",\n ])\n try:\n err += f\" You may want to use a {mpl.figure.SubFigure} instead.\"\n except AttributeError: # SubFigure added in mpl 3.4\n pass\n raise RuntimeError(err)\n\n self._subplot_list = [{\n \"ax\": target,\n \"left\": True,\n \"right\": True,\n \"top\": True,\n \"bottom\": True,\n \"col\": None,\n \"row\": None,\n \"x\": \"x\",\n \"y\": \"y\",\n }]\n self._figure = target.figure\n return self._figure\n\n elif (\n hasattr(mpl.figure, \"SubFigure\") # Added in mpl 3.4\n and isinstance(target, mpl.figure.SubFigure)\n ):\n figure = target.figure\n elif isinstance(target, mpl.figure.Figure):\n figure = target\n else:\n if pyplot:\n figure = plt.figure(**figure_kws)\n else:\n figure = mpl.figure.Figure(**figure_kws)\n target = figure\n self._figure = figure\n\n axs = target.subplots(**self.subplot_spec, squeeze=False)\n\n if self.wrap:\n # Remove unused Axes and flatten the rest into a (2D) vector\n axs_flat = axs.ravel({\"col\": \"C\", \"row\": \"F\"}[self.wrap_dim])\n axs, extra = np.split(axs_flat, [self.n_subplots])\n for ax in extra:\n ax.remove()\n if self.wrap_dim == \"col\":\n axs = axs[np.newaxis, :]\n else:\n axs = axs[:, np.newaxis]\n\n # Get i, j coordinates for each Axes object\n # Note that i, j are with respect to faceting/pairing,\n # not the subplot grid itself, (which only matters in the case of wrapping).\n iter_axs: np.ndenumerate | zip\n if not pair_spec.get(\"cross\", True):\n indices = np.arange(self.n_subplots)\n iter_axs = zip(zip(indices, indices), axs.flat)\n else:\n iter_axs = np.ndenumerate(axs)\n\n self._subplot_list = []\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/subplots.py_Subplots.init_figure.for_i_j_ax_in_iter_ax_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/subplots.py_Subplots.init_figure.for_i_j_ax_in_iter_ax_", "embedding": null, "metadata": {"file_path": "seaborn/_core/subplots.py", "file_name": "subplots.py", "file_type": "text/x-python", "category": "implementation", "start_line": 222, "end_line": 271, "span_ids": ["Subplots.__iter__", "Subplots.__len__", "Subplots.init_figure"], "tokens": 534}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Subplots:\n\n def init_figure(\n self,\n pair_spec: PairSpec,\n pyplot: bool = False,\n figure_kws: dict | None = None,\n target: Axes | Figure | SubFigure = None,\n ) -> Figure:\n # ... other code\n for (i, j), ax in iter_axs:\n\n info = {\"ax\": ax}\n\n nrows, ncols = self.subplot_spec[\"nrows\"], self.subplot_spec[\"ncols\"]\n if not self.wrap:\n info[\"left\"] = j % ncols == 0\n info[\"right\"] = (j + 1) % ncols == 0\n info[\"top\"] = i == 0\n info[\"bottom\"] = i == nrows - 1\n elif self.wrap_dim == \"col\":\n info[\"left\"] = j % ncols == 0\n info[\"right\"] = ((j + 1) % ncols == 0) or ((j + 1) == self.n_subplots)\n info[\"top\"] = j < ncols\n info[\"bottom\"] = j >= (self.n_subplots - ncols)\n elif self.wrap_dim == \"row\":\n info[\"left\"] = i < nrows\n info[\"right\"] = i >= self.n_subplots - nrows\n info[\"top\"] = i % nrows == 0\n info[\"bottom\"] = ((i + 1) % nrows == 0) or ((i + 1) == self.n_subplots)\n\n if not pair_spec.get(\"cross\", True):\n info[\"top\"] = j < ncols\n info[\"bottom\"] = j >= self.n_subplots - ncols\n\n for dim in [\"row\", \"col\"]:\n idx = {\"row\": i, \"col\": j}[dim]\n info[dim] = self.grid_dimensions[dim][idx]\n\n for axis in \"xy\":\n\n idx = {\"x\": j, \"y\": i}[axis]\n if axis in pair_spec.get(\"structure\", {}):\n key = f\"{axis}{idx}\"\n else:\n key = axis\n info[axis] = key\n\n self._subplot_list.append(info)\n\n return figure\n\n def __iter__(self) -> Generator[dict, None, None]: # TODO TypedDict?\n \"\"\"Yield each subplot dictionary with Axes object and metadata.\"\"\"\n yield from self._subplot_list\n\n def __len__(self) -> int:\n \"\"\"Return the number of subplots in this figure.\"\"\"\n return len(self._subplot_list)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/typing.py_from___future___import_an_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/typing.py_from___future___import_an_", "embedding": null, "metadata": {"file_path": "seaborn/_core/typing.py", "file_name": "typing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 25, "span_ids": ["impl", "imports"], "tokens": 251}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from __future__ import annotations\n\nfrom typing import Any, Optional, Union, Mapping, Tuple, List, Dict\nfrom collections.abc import Hashable, Iterable\nfrom numpy import ndarray # TODO use ArrayLike?\nfrom pandas import DataFrame, Series, Index\nfrom matplotlib.colors import Colormap, Normalize\n\nVector = Union[Series, Index, ndarray]\nPaletteSpec = Union[str, list, dict, Colormap, None]\nVariableSpec = Union[Hashable, Vector, None]\nVariableSpecList = Union[List[VariableSpec], Index, None]\n# TODO can we better unify the VarType object and the VariableType alias?\nDataSource = Union[DataFrame, Mapping[Hashable, Vector], None]\n\nOrderSpec = Union[Iterable, None] # TODO technically str is iterable\nNormSpec = Union[Tuple[Optional[float], Optional[float]], Normalize, None]\n\n# TODO for discrete mappings, it would be ideal to use a parameterized type\n# as the dict values / list entries should be of specific type(s) for each method\nDiscreteValueSpec = Union[dict, list, None]\nContinuousValueSpec = Union[\n Tuple[float, float], List[float], Dict[Any, float], None,\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_decorators.py_from_inspect_import_signa_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_decorators.py_from_inspect_import_signa_", "embedding": null, "metadata": {"file_path": "seaborn/_decorators.py", "file_name": "_decorators.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 17, "span_ids": ["share_init_params_with_map", "imports"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from inspect import signature\n\n\ndef share_init_params_with_map(cls):\n \"\"\"Make cls.map a classmethod with same signature as cls.__init__.\"\"\"\n map_sig = signature(cls.map)\n init_sig = signature(cls.__init__)\n\n new = [v for k, v in init_sig.parameters.items() if k != \"self\"]\n new.insert(0, map_sig.parameters[\"cls\"])\n cls.map.__signature__ = map_sig.replace(parameters=new)\n cls.map.__doc__ = cls.__init__.__doc__\n\n cls.map = classmethod(cls.map)\n\n return cls", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_docstrings.py_re_DocstringComponents.__init__.self.entries.entries": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_docstrings.py_re_DocstringComponents.__init__.self.entries.entries", "embedding": null, "metadata": {"file_path": "seaborn/_docstrings.py", "file_name": "_docstrings.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 23, "span_ids": ["DocstringComponents", "imports"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import re\nimport pydoc\nfrom .external.docscrape import NumpyDocString\n\n\nclass DocstringComponents:\n\n regexp = re.compile(r\"\\n((\\n|.)+)\\n\\s*\", re.MULTILINE)\n\n def __init__(self, comp_dict, strip_whitespace=True):\n \"\"\"Read entries from a dict, optionally stripping outer whitespace.\"\"\"\n if strip_whitespace:\n entries = {}\n for key, val in comp_dict.items():\n m = re.match(self.regexp, val)\n if m is None:\n entries[key] = val\n else:\n entries[key] = m.group(1)\n else:\n entries = comp_dict.copy()\n\n self.entries = entries", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_docstrings.py_DocstringComponents.__getattr___DocstringComponents.__getattr__.if_attr_in_self_entries_.else_.try_.except_AttributeError_as_.if___debug___.else_.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_docstrings.py_DocstringComponents.__getattr___DocstringComponents.__getattr__.if_attr_in_self_entries_.else_.try_.except_AttributeError_as_.if___debug___.else_.pass", "embedding": null, "metadata": {"file_path": "seaborn/_docstrings.py", "file_name": "_docstrings.py", "file_type": "text/x-python", "category": "implementation", "start_line": 25, "end_line": 41, "span_ids": ["DocstringComponents.__getattr__"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DocstringComponents:\n\n def __getattr__(self, attr):\n \"\"\"Provide dot access to entries for clean raw docstrings.\"\"\"\n if attr in self.entries:\n return self.entries[attr]\n else:\n try:\n return self.__getattribute__(attr)\n except AttributeError as err:\n # If Python is run with -OO, it will strip docstrings and our lookup\n # from self.entries will fail. We check for __debug__, which is actually\n # set to False by -O (it is True for normal execution).\n # But we only want to see an error when building the docs;\n # not something users should see, so this slight inconsistency is fine.\n if __debug__:\n raise err\n else:\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_docstrings.py_DocstringComponents.from_nested_components_DocstringComponents.from_function_params.return.cls_comp_dict_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_docstrings.py_DocstringComponents.from_nested_components_DocstringComponents.from_function_params.return.cls_comp_dict_", "embedding": null, "metadata": {"file_path": "seaborn/_docstrings.py", "file_name": "_docstrings.py", "file_type": "text/x-python", "category": "implementation", "start_line": 43, "end_line": 59, "span_ids": ["DocstringComponents.from_nested_components", "DocstringComponents.from_function_params"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DocstringComponents:\n\n @classmethod\n def from_nested_components(cls, **kwargs):\n \"\"\"Add multiple sub-sets of components.\"\"\"\n return cls(kwargs, strip_whitespace=False)\n\n @classmethod\n def from_function_params(cls, func):\n \"\"\"Use the numpydoc parser to extract components from existing func.\"\"\"\n params = NumpyDocString(pydoc.getdoc(func))[\"Parameters\"]\n comp_dict = {}\n for p in params:\n name = p.name\n type = p.type\n desc = \"\\n \".join(p.desc)\n comp_dict[name] = f\"{name} : {type}\\n {desc}\"\n\n return cls(comp_dict)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_docstrings.py__TODO_is_vector_the_be__core_returns.dict_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_docstrings.py__TODO_is_vector_the_be__core_returns.dict_", "embedding": null, "metadata": {"file_path": "seaborn/_docstrings.py", "file_name": "_docstrings.py", "file_type": "text/x-python", "category": "implementation", "start_line": 62, "end_line": 134, "span_ids": ["impl", "DocstringComponents.from_function_params"], "tokens": 611}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# TODO is \"vector\" the best term here? We mean to imply 1D data with a variety\n# of types?\n\n# TODO now that we can parse numpydoc style strings, do we need to define dicts\n# of docstring components, or just write out a docstring?\n\n\n_core_params = dict(\n data=\"\"\"\ndata : :class:`pandas.DataFrame`, :class:`numpy.ndarray`, mapping, or sequence\n Input data structure. Either a long-form collection of vectors that can be\n assigned to named variables or a wide-form dataset that will be internally\n reshaped.\n \"\"\", # TODO add link to user guide narrative when exists\n xy=\"\"\"\nx, y : vectors or keys in ``data``\n Variables that specify positions on the x and y axes.\n \"\"\",\n hue=\"\"\"\nhue : vector or key in ``data``\n Semantic variable that is mapped to determine the color of plot elements.\n \"\"\",\n palette=\"\"\"\npalette : string, list, dict, or :class:`matplotlib.colors.Colormap`\n Method for choosing the colors to use when mapping the ``hue`` semantic.\n String values are passed to :func:`color_palette`. List or dict values\n imply categorical mapping, while a colormap object implies numeric mapping.\n \"\"\", # noqa: E501\n hue_order=\"\"\"\nhue_order : vector of strings\n Specify the order of processing and plotting for categorical levels of the\n ``hue`` semantic.\n \"\"\",\n hue_norm=\"\"\"\nhue_norm : tuple or :class:`matplotlib.colors.Normalize`\n Either a pair of values that set the normalization range in data units\n or an object that will map from data units into a [0, 1] interval. Usage\n implies numeric mapping.\n \"\"\",\n color=\"\"\"\ncolor : :mod:`matplotlib color `\n Single color specification for when hue mapping is not used. Otherwise, the\n plot will try to hook into the matplotlib property cycle.\n \"\"\",\n ax=\"\"\"\nax : :class:`matplotlib.axes.Axes`\n Pre-existing axes for the plot. Otherwise, call :func:`matplotlib.pyplot.gca`\n internally.\n \"\"\", # noqa: E501\n)\n\n\n_core_returns = dict(\n ax=\"\"\"\n:class:`matplotlib.axes.Axes`\n The matplotlib axes containing the plot.\n \"\"\",\n facetgrid=\"\"\"\n:class:`FacetGrid`\n An object managing one or more subplots that correspond to conditional data\n subsets with convenient methods for batch-setting of axes attributes.\n \"\"\",\n jointgrid=\"\"\"\n:class:`JointGrid`\n An object managing multiple subplots that correspond to joint and marginal axes\n for plotting a bivariate relationship or distribution.\n \"\"\",\n pairgrid=\"\"\"\n:class:`PairGrid`\n An object managing multiple subplots that correspond to joint and marginal axes\n for pairwise combinations of multiple variables in a dataset.\n \"\"\",\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_docstrings.py__seealso_blurbs_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_docstrings.py__seealso_blurbs_", "embedding": null, "metadata": {"file_path": "seaborn/_docstrings.py", "file_name": "_docstrings.py", "file_type": "text/x-python", "category": "implementation", "start_line": 137, "end_line": 199, "span_ids": ["impl:5"], "tokens": 393}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "_seealso_blurbs = dict(\n\n # Relational plots\n scatterplot=\"\"\"\nscatterplot : Plot data using points.\n \"\"\",\n lineplot=\"\"\"\nlineplot : Plot data using lines.\n \"\"\",\n\n # Distribution plots\n displot=\"\"\"\ndisplot : Figure-level interface to distribution plot functions.\n \"\"\",\n histplot=\"\"\"\nhistplot : Plot a histogram of binned counts with optional normalization or smoothing.\n \"\"\",\n kdeplot=\"\"\"\nkdeplot : Plot univariate or bivariate distributions using kernel density estimation.\n \"\"\",\n ecdfplot=\"\"\"\necdfplot : Plot empirical cumulative distribution functions.\n \"\"\",\n rugplot=\"\"\"\nrugplot : Plot a tick at each observation value along the x and/or y axes.\n \"\"\",\n\n # Categorical plots\n stripplot=\"\"\"\nstripplot : Plot a categorical scatter with jitter.\n \"\"\",\n swarmplot=\"\"\"\nswarmplot : Plot a categorical scatter with non-overlapping points.\n \"\"\",\n violinplot=\"\"\"\nviolinplot : Draw an enhanced boxplot using kernel density estimation.\n \"\"\",\n pointplot=\"\"\"\npointplot : Plot point estimates and CIs using markers and lines.\n \"\"\",\n\n # Multiples\n jointplot=\"\"\"\njointplot : Draw a bivariate plot with univariate marginal distributions.\n \"\"\",\n pairplot=\"\"\"\njointplot : Draw multiple bivariate plots with univariate marginal distributions.\n \"\"\",\n jointgrid=\"\"\"\nJointGrid : Set up a figure with joint and marginal views on bivariate data.\n \"\"\",\n pairgrid=\"\"\"\nPairGrid : Set up a figure with joint and marginal views on multiple variables.\n \"\"\",\n)\n\n\n_core_docs = dict(\n params=DocstringComponents(_core_params),\n returns=DocstringComponents(_core_returns),\n seealso=DocstringComponents(_seealso_blurbs),\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/area.py_Area_Area._standardize_coordinate_parameters.return.data_rename_columns_bas": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/area.py_Area_Area._standardize_coordinate_parameters.return.data_rename_columns_bas", "embedding": null, "metadata": {"file_path": "seaborn/_marks/area.py", "file_name": "area.py", "file_type": "text/x-python", "category": "implementation", "start_line": 89, "end_line": 117, "span_ids": ["Area", "Area._standardize_coordinate_parameters"], "tokens": 246}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@document_properties\n@dataclass\nclass Area(AreaBase, Mark):\n \"\"\"\n A fill mark drawn from a baseline to data values.\n\n See also\n --------\n Band : A fill mark representing an interval between values.\n\n Examples\n --------\n .. include:: ../docstrings/objects.Area.rst\n\n \"\"\"\n color: MappableColor = Mappable(\"C0\", )\n alpha: MappableFloat = Mappable(.2, )\n fill: MappableBool = Mappable(True, )\n edgecolor: MappableColor = Mappable(depend=\"color\")\n edgealpha: MappableFloat = Mappable(1, )\n edgewidth: MappableFloat = Mappable(rc=\"patch.linewidth\", )\n edgestyle: MappableStyle = Mappable(\"-\", )\n\n # TODO should this be settable / mappable?\n baseline: MappableFloat = Mappable(0, grouping=False)\n\n def _standardize_coordinate_parameters(self, data, orient):\n dv = {\"x\": \"y\", \"y\": \"x\"}[orient]\n return data.rename(columns={\"baseline\": f\"{dv}min\", dv: f\"{dv}max\"})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/base.py_from___future___import_an_Mappable.default.return.mpl_rcParams_get_self__rc": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/base.py_from___future___import_an_Mappable.default.return.mpl_rcParams_get_self__rc", "embedding": null, "metadata": {"file_path": "seaborn/_marks/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 90, "span_ids": ["Mappable.__repr__", "Mappable.grouping", "Mappable", "imports", "Mappable.default", "Mappable.depend"], "tokens": 544}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from __future__ import annotations\nfrom dataclasses import dataclass, fields, field\nimport textwrap\nfrom typing import Any, Callable, Union\nfrom collections.abc import Generator\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib as mpl\n\nfrom numpy import ndarray\nfrom pandas import DataFrame\nfrom matplotlib.artist import Artist\n\nfrom seaborn._core.scales import Scale\nfrom seaborn._core.properties import (\n PROPERTIES,\n Property,\n RGBATuple,\n DashPattern,\n DashPatternWithOffset,\n)\n\n\nclass Mappable:\n def __init__(\n self,\n val: Any = None,\n depend: str | None = None,\n rc: str | None = None,\n auto: bool = False,\n grouping: bool = True,\n ):\n \"\"\"\n Property that can be mapped from data or set directly, with flexible defaults.\n\n Parameters\n ----------\n val : Any\n Use this value as the default.\n depend : str\n Use the value of this feature as the default.\n rc : str\n Use the value of this rcParam as the default.\n auto : bool\n The default value will depend on other parameters at compile time.\n grouping : bool\n If True, use the mapped variable to define groups.\n\n \"\"\"\n if depend is not None:\n assert depend in PROPERTIES\n if rc is not None:\n assert rc in mpl.rcParams\n\n self._val = val\n self._rc = rc\n self._depend = depend\n self._auto = auto\n self._grouping = grouping\n\n def __repr__(self):\n \"\"\"Nice formatting for when object appears in Mark init signature.\"\"\"\n if self._val is not None:\n s = f\"<{repr(self._val)}>\"\n elif self._depend is not None:\n s = f\"\"\n elif self._rc is not None:\n s = f\"\"\n elif self._auto:\n s = \"\"\n else:\n s = \"\"\n return s\n\n @property\n def depend(self) -> Any:\n \"\"\"Return the name of the feature to source a default value from.\"\"\"\n return self._depend\n\n @property\n def grouping(self) -> bool:\n return self._grouping\n\n @property\n def default(self) -> Any:\n \"\"\"Get the default value for this feature, or access the relevant rcParam.\"\"\"\n if self._val is not None:\n return self._val\n return mpl.rcParams.get(self._rc)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/base.py__TODO_where_is_the_right_Mark._TODO_make_this_method_p": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/base.py__TODO_where_is_the_right_Mark._TODO_make_this_method_p", "embedding": null, "metadata": {"file_path": "seaborn/_marks/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 93, "end_line": 124, "span_ids": ["Mark", "impl", "Mark._grouping_props", "Mappable.default", "Mark._mappable_props"], "tokens": 231}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# TODO where is the right place to put this kind of type aliasing?\n\nMappableBool = Union[bool, Mappable]\nMappableString = Union[str, Mappable]\nMappableFloat = Union[float, Mappable]\nMappableColor = Union[str, tuple, Mappable]\nMappableStyle = Union[str, DashPattern, DashPatternWithOffset, Mappable]\n\n\n@dataclass\nclass Mark:\n \"\"\"Base class for objects that visually represent data.\"\"\"\n\n artist_kws: dict = field(default_factory=dict)\n\n @property\n def _mappable_props(self):\n return {\n f.name: getattr(self, f.name) for f in fields(self)\n if isinstance(f.default, Mappable)\n }\n\n @property\n def _grouping_props(self):\n # TODO does it make sense to have variation within a Mark's\n # properties about whether they are grouping?\n return [\n f.name for f in fields(self)\n if isinstance(f.default, Mappable) and f.default.grouping\n ]\n\n # TODO make this method private? Would extender every need to call directly?", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/base.py_Mark._resolve_Mark._resolve.return.default": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/base.py_Mark._resolve_Mark._resolve.return.default", "embedding": null, "metadata": {"file_path": "seaborn/_marks/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 112, "end_line": 177, "span_ids": ["Mark._resolve"], "tokens": 509}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Mark:\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 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 feature = scales[name](data[name])\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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/base.py_Mark._infer_orient_resolve_properties.return.props": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/base.py_Mark._infer_orient_resolve_properties.return.props", "embedding": null, "metadata": {"file_path": "seaborn/_marks/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 192, "end_line": 231, "span_ids": ["Mark._plot", "Mark._infer_orient", "Mark._legend_artist", "resolve_properties"], "tokens": 301}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Mark:\n\n def _infer_orient(self, scales: dict) -> str: # TODO type scales\n\n # TODO The original version of this (in seaborn._oldcore) did more checking.\n # Paring that down here for the prototype to see what restrictions make sense.\n\n # TODO rethink this to map from scale type to \"DV priority\" and use that?\n # e.g. Nominal > Discrete > Continuous\n\n x = 0 if \"x\" not in scales else scales[\"x\"]._priority\n y = 0 if \"y\" not in scales else scales[\"y\"]._priority\n\n if y > x:\n return \"y\"\n else:\n return \"x\"\n\n def _plot(\n self,\n split_generator: Callable[[], Generator],\n scales: dict[str, Scale],\n orient: str,\n ) -> None:\n \"\"\"Main interface for creating a plot.\"\"\"\n raise NotImplementedError()\n\n def _legend_artist(\n self, variables: list[str], value: Any, scales: dict[str, Scale],\n ) -> Artist:\n # TODO return some sensible default?\n raise NotImplementedError\n\n\ndef resolve_properties(\n mark: Mark, data: DataFrame, scales: dict[str, Scale]\n) -> dict[str, Any]:\n\n props = {\n name: mark._resolve(data, name, scales) for name in mark._mappable_props\n }\n return props", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_warnings__check_argument": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_warnings__check_argument", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 26, "span_ids": ["imports"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import warnings\nimport itertools\nfrom copy import copy\nfrom functools import partial\nfrom collections import UserString\nfrom collections.abc import Iterable, Sequence, Mapping\nfrom numbers import Number\nfrom datetime import datetime\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib as mpl\n\nfrom ._decorators import (\n share_init_params_with_map,\n)\nfrom .external.version import Version\nfrom .palettes import (\n QUAL_PALETTES,\n color_palette,\n)\nfrom .utils import (\n _check_argument,\n get_color_cycle,\n remove_na,\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_HueMapping_HueMapping.__init__.if_data_isna_all_.else_.self.cmap.cmap": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_HueMapping_HueMapping.__init__.if_data_isna_all_.else_.self.cmap.cmap", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 70, "end_line": 144, "span_ids": ["HueMapping"], "tokens": 507}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@share_init_params_with_map\nclass HueMapping(SemanticMapping):\n \"\"\"Mapping that sets artist colors according to data values.\"\"\"\n # A specification of the colors that should appear in the plot\n palette = None\n\n # An object that normalizes data values to [0, 1] range for color mapping\n norm = None\n\n # A continuous colormap object for interpolating in a numeric context\n cmap = None\n\n def __init__(\n self, plotter, palette=None, order=None, norm=None,\n ):\n \"\"\"Map the levels of the `hue` variable to distinct colors.\n\n Parameters\n ----------\n # TODO add generic parameters\n\n \"\"\"\n super().__init__(plotter)\n\n data = plotter.plot_data.get(\"hue\", pd.Series(dtype=float))\n\n if data.isna().all():\n if palette is not None:\n msg = \"Ignoring `palette` because no `hue` variable has been assigned.\"\n warnings.warn(msg, stacklevel=4)\n else:\n\n map_type = self.infer_map_type(\n palette, norm, plotter.input_format, plotter.var_types[\"hue\"]\n )\n\n # Our goal is to end up with a dictionary mapping every unique\n # value in `data` to a color. We will also keep track of the\n # metadata about this mapping we will need for, e.g., a legend\n\n # --- Option 1: numeric mapping with a matplotlib colormap\n\n if map_type == \"numeric\":\n\n data = pd.to_numeric(data)\n levels, lookup_table, norm, cmap = self.numeric_mapping(\n data, palette, norm,\n )\n\n # --- Option 2: categorical mapping using seaborn palette\n\n elif map_type == \"categorical\":\n\n cmap = norm = None\n levels, lookup_table = self.categorical_mapping(\n data, palette, order,\n )\n\n # --- Option 3: datetime mapping\n\n else:\n # TODO this needs actual implementation\n cmap = norm = None\n levels, lookup_table = self.categorical_mapping(\n # Casting data to list to handle differences in the way\n # pandas and numpy represent datetime64 data\n list(data), palette, order,\n )\n\n self.map_type = map_type\n self.lookup_table = lookup_table\n self.palette = palette\n self.levels = levels\n self.norm = norm\n self.cmap = cmap", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_HueMapping.numeric_mapping_HueMapping.numeric_mapping.return.levels_lookup_table_nor": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_HueMapping.numeric_mapping_HueMapping.numeric_mapping.return.levels_lookup_table_nor", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 219, "end_line": 260, "span_ids": ["HueMapping.numeric_mapping"], "tokens": 339}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@share_init_params_with_map\nclass HueMapping(SemanticMapping):\n\n def numeric_mapping(self, data, palette, norm):\n \"\"\"Determine colors when the hue variable is quantitative.\"\"\"\n if isinstance(palette, dict):\n\n # The presence of a norm object overrides a dictionary of hues\n # in specifying a numeric mapping, so we need to process it here.\n levels = list(sorted(palette))\n colors = [palette[k] for k in sorted(palette)]\n cmap = mpl.colors.ListedColormap(colors)\n lookup_table = palette.copy()\n\n else:\n\n # The levels are the sorted unique values in the data\n levels = list(np.sort(remove_na(data.unique())))\n\n # --- Sort out the colormap to use from the palette argument\n\n # Default numeric palette is our default cubehelix palette\n # TODO do we want to do something complicated to ensure contrast?\n palette = \"ch:\" if palette is None else palette\n\n if isinstance(palette, mpl.colors.Colormap):\n cmap = palette\n else:\n cmap = color_palette(palette, as_cmap=True)\n\n # Now sort out the data normalization\n if norm is None:\n norm = mpl.colors.Normalize()\n elif isinstance(norm, tuple):\n norm = mpl.colors.Normalize(*norm)\n elif not isinstance(norm, mpl.colors.Normalize):\n err = \"``hue_norm`` must be None, tuple, or Normalize object.\"\n raise ValueError(err)\n\n if not norm.scaled():\n norm(np.asarray(data.dropna()))\n\n lookup_table = dict(zip(levels, cmap(norm(levels))))\n\n return levels, lookup_table, norm, cmap", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_SizeMapping_SizeMapping._lookup_single.return.value": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_SizeMapping_SizeMapping._lookup_single.return.value", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 263, "end_line": 345, "span_ids": ["SizeMapping.infer_map_type", "SizeMapping._lookup_single", "SizeMapping"], "tokens": 494}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@share_init_params_with_map\nclass SizeMapping(SemanticMapping):\n \"\"\"Mapping that sets artist sizes according to data values.\"\"\"\n # An object that normalizes data values to [0, 1] range\n norm = None\n\n def __init__(\n self, plotter, sizes=None, order=None, norm=None,\n ):\n \"\"\"Map the levels of the `size` variable to distinct values.\n\n Parameters\n ----------\n # TODO add generic parameters\n\n \"\"\"\n super().__init__(plotter)\n\n data = plotter.plot_data.get(\"size\", pd.Series(dtype=float))\n\n if data.notna().any():\n\n map_type = self.infer_map_type(\n norm, sizes, plotter.var_types[\"size\"]\n )\n\n # --- Option 1: numeric mapping\n\n if map_type == \"numeric\":\n\n levels, lookup_table, norm, size_range = self.numeric_mapping(\n data, sizes, norm,\n )\n\n # --- Option 2: categorical mapping\n\n elif map_type == \"categorical\":\n\n levels, lookup_table = self.categorical_mapping(\n data, sizes, order,\n )\n size_range = None\n\n # --- Option 3: datetime mapping\n\n # TODO this needs an actual implementation\n else:\n\n levels, lookup_table = self.categorical_mapping(\n # Casting data to list to handle differences in the way\n # pandas and numpy represent datetime64 data\n list(data), sizes, order,\n )\n size_range = None\n\n self.map_type = map_type\n self.levels = levels\n self.norm = norm\n self.sizes = sizes\n self.size_range = size_range\n self.lookup_table = lookup_table\n\n def infer_map_type(self, norm, sizes, var_type):\n\n if norm is not None:\n map_type = \"numeric\"\n elif isinstance(sizes, (dict, list)):\n map_type = \"categorical\"\n else:\n map_type = var_type\n\n return map_type\n\n def _lookup_single(self, key):\n\n try:\n value = self.lookup_table[key]\n except KeyError:\n normed = self.norm(key)\n if np.ma.is_masked(normed):\n normed = np.nan\n value = self.size_range[0] + normed * np.ptp(self.size_range)\n return value", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_SizeMapping.categorical_mapping_SizeMapping.categorical_mapping.return.levels_lookup_table": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_SizeMapping.categorical_mapping_SizeMapping.categorical_mapping.return.levels_lookup_table", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 375, "end_line": 431, "span_ids": ["SizeMapping.categorical_mapping"], "tokens": 486}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@share_init_params_with_map\nclass SizeMapping(SemanticMapping):\n\n def categorical_mapping(self, data, sizes, order):\n\n levels = categorical_order(data, order)\n\n if isinstance(sizes, dict):\n\n # Dict inputs map existing data values to the size attribute\n missing = set(levels) - set(sizes)\n if any(missing):\n err = f\"Missing sizes for the following levels: {missing}\"\n raise ValueError(err)\n lookup_table = sizes.copy()\n\n elif isinstance(sizes, list):\n\n # List inputs give size values in the same order as the levels\n sizes = self._check_list_length(levels, sizes, \"sizes\")\n lookup_table = dict(zip(levels, sizes))\n\n else:\n\n if isinstance(sizes, tuple):\n\n # Tuple input sets the min, max size values\n if len(sizes) != 2:\n err = \"A `sizes` tuple must have only 2 values\"\n raise ValueError(err)\n\n elif sizes is not None:\n\n err = f\"Value for `sizes` not understood: {sizes}\"\n raise ValueError(err)\n\n else:\n\n # Otherwise, we need to get the min, max size values from\n # the plotter object we are attached to.\n\n # TODO this is going to cause us trouble later, because we\n # want to restructure things so that the plotter is generic\n # across the visual representation of the data. But at this\n # point, we don't know the visual representation. Likely we\n # want to change the logic of this Mapping so that it gives\n # points on a normalized range that then gets un-normalized\n # when we know what we're drawing. But given the way the\n # package works now, this way is cleanest.\n sizes = self.plotter._default_size_range\n\n # For categorical sizes, use regularly-spaced linear steps\n # between the minimum and maximum sizes. Then reverse the\n # ramp so that the largest value is used for the first entry\n # in size_order, etc. This is because \"ordered\" categories\n # are often though to go in decreasing priority.\n sizes = np.linspace(*sizes, len(levels))[::-1]\n lookup_table = dict(zip(levels, sizes))\n\n return levels, lookup_table", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_SizeMapping.numeric_mapping_SizeMapping.numeric_mapping.return.levels_lookup_table_nor": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_SizeMapping.numeric_mapping_SizeMapping.numeric_mapping.return.levels_lookup_table_nor", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 408, "end_line": 485, "span_ids": ["SizeMapping.numeric_mapping"], "tokens": 654}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@share_init_params_with_map\nclass SizeMapping(SemanticMapping):\n\n def numeric_mapping(self, data, sizes, norm):\n\n if isinstance(sizes, dict):\n # The presence of a norm object overrides a dictionary of sizes\n # in specifying a numeric mapping, so we need to process it\n # dictionary here\n levels = list(np.sort(list(sizes)))\n size_values = sizes.values()\n size_range = min(size_values), max(size_values)\n\n else:\n\n # The levels here will be the unique values in the data\n levels = list(np.sort(remove_na(data.unique())))\n\n if isinstance(sizes, tuple):\n\n # For numeric inputs, the size can be parametrized by\n # the minimum and maximum artist values to map to. The\n # norm object that gets set up next specifies how to\n # do the mapping.\n\n if len(sizes) != 2:\n err = \"A `sizes` tuple must have only 2 values\"\n raise ValueError(err)\n\n size_range = sizes\n\n elif sizes is not None:\n\n err = f\"Value for `sizes` not understood: {sizes}\"\n raise ValueError(err)\n\n else:\n\n # When not provided, we get the size range from the plotter\n # object we are attached to. See the note in the categorical\n # method about how this is suboptimal for future development.\n size_range = self.plotter._default_size_range\n\n # Now that we know the minimum and maximum sizes that will get drawn,\n # we need to map the data values that we have into that range. We will\n # use a matplotlib Normalize class, which is typically used for numeric\n # color mapping but works fine here too. It takes data values and maps\n # them into a [0, 1] interval, potentially nonlinear-ly.\n\n if norm is None:\n # Default is a linear function between the min and max data values\n norm = mpl.colors.Normalize()\n elif isinstance(norm, tuple):\n # It is also possible to give different limits in data space\n norm = mpl.colors.Normalize(*norm)\n elif not isinstance(norm, mpl.colors.Normalize):\n err = f\"Value for size `norm` parameter not understood: {norm}\"\n raise ValueError(err)\n else:\n # If provided with Normalize object, copy it so we can modify\n norm = copy(norm)\n\n # Set the mapping so all output values are in [0, 1]\n norm.clip = True\n\n # If the input range is not set, use the full range of the data\n if not norm.scaled():\n norm(levels)\n\n # Map from data values to [0, 1] range\n sizes_scaled = norm(levels)\n\n # Now map from the scaled range into the artist units\n if isinstance(sizes, dict):\n lookup_table = sizes\n else:\n lo, hi = size_range\n sizes = lo + sizes_scaled * (hi - lo)\n lookup_table = dict(zip(levels, sizes))\n\n return levels, lookup_table, norm, size_range", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_StyleMapping_StyleMapping._lookup_single.return.value": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_StyleMapping_StyleMapping._lookup_single.return.value", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 488, "end_line": 561, "span_ids": ["StyleMapping._lookup_single", "StyleMapping"], "tokens": 534}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@share_init_params_with_map\nclass StyleMapping(SemanticMapping):\n \"\"\"Mapping that sets artist style according to data values.\"\"\"\n\n # Style mapping is always treated as categorical\n map_type = \"categorical\"\n\n def __init__(\n self, plotter, markers=None, dashes=None, order=None,\n ):\n \"\"\"Map the levels of the `style` variable to distinct values.\n\n Parameters\n ----------\n # TODO add generic parameters\n\n \"\"\"\n super().__init__(plotter)\n\n data = plotter.plot_data.get(\"style\", pd.Series(dtype=float))\n\n if data.notna().any():\n\n # Cast to list to handle numpy/pandas datetime quirks\n if variable_type(data) == \"datetime\":\n data = list(data)\n\n # Find ordered unique values\n levels = categorical_order(data, order)\n\n markers = self._map_attributes(\n markers, levels, unique_markers(len(levels)), \"markers\",\n )\n dashes = self._map_attributes(\n dashes, levels, unique_dashes(len(levels)), \"dashes\",\n )\n\n # Build the paths matplotlib will use to draw the markers\n paths = {}\n filled_markers = []\n for k, m in markers.items():\n if not isinstance(m, mpl.markers.MarkerStyle):\n m = mpl.markers.MarkerStyle(m)\n paths[k] = m.get_path().transformed(m.get_transform())\n filled_markers.append(m.is_filled())\n\n # Mixture of filled and unfilled markers will show line art markers\n # in the edge color, which defaults to white. This can be handled,\n # but there would be additional complexity with specifying the\n # weight of the line art markers without overwhelming the filled\n # ones with the edges. So for now, we will disallow mixtures.\n if any(filled_markers) and not all(filled_markers):\n err = \"Filled and line art markers cannot be mixed\"\n raise ValueError(err)\n\n lookup_table = {}\n for key in levels:\n lookup_table[key] = {}\n if markers:\n lookup_table[key][\"marker\"] = markers[key]\n lookup_table[key][\"path\"] = paths[key]\n if dashes:\n lookup_table[key][\"dashes\"] = dashes[key]\n\n self.levels = levels\n self.lookup_table = lookup_table\n\n def _lookup_single(self, key, attr=None):\n \"\"\"Get attribute(s) for a given data point.\"\"\"\n if attr is None:\n value = self.lookup_table[key]\n else:\n value = self.lookup_table[key][attr]\n return value", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_StyleMapping._map_attributes_StyleMapping._map_attributes.return.lookup_table": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_StyleMapping._map_attributes_StyleMapping._map_attributes.return.lookup_table", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 588, "end_line": 607, "span_ids": ["StyleMapping._map_attributes"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@share_init_params_with_map\nclass StyleMapping(SemanticMapping):\n\n def _map_attributes(self, arg, levels, defaults, attr):\n \"\"\"Handle the specification for a given style attribute.\"\"\"\n if arg is True:\n lookup_table = dict(zip(levels, defaults))\n elif isinstance(arg, dict):\n missing = set(levels) - set(arg)\n if missing:\n err = f\"These `{attr}` levels are missing values: {missing}\"\n raise ValueError(err)\n lookup_table = arg\n elif isinstance(arg, Sequence):\n arg = self._check_list_length(levels, arg, attr)\n lookup_table = dict(zip(levels, arg))\n elif arg:\n err = f\"This `{attr}` argument was not understood: {arg}\"\n raise ValueError(err)\n else:\n lookup_table = {}\n\n return lookup_table", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py___VectorPlotter.has_xy_data.return.bool_x_y_set_sel": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py___VectorPlotter.has_xy_data.return.bool_x_y_set_sel", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 610, "end_line": 666, "span_ids": ["VectorPlotter.has_xy_data", "VectorPlotter", "StyleMapping._map_attributes", "VectorPlotter.get_semantics"], "tokens": 478}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# =========================================================================== #\n\n\nclass VectorPlotter:\n \"\"\"Base class for objects underlying *plot functions.\"\"\"\n\n _semantic_mappings = {\n \"hue\": HueMapping,\n \"size\": SizeMapping,\n \"style\": StyleMapping,\n }\n\n # TODO units is another example of a non-mapping \"semantic\"\n # we need a general name for this and separate handling\n semantics = \"x\", \"y\", \"hue\", \"size\", \"style\", \"units\"\n wide_structure = {\n \"x\": \"@index\", \"y\": \"@values\", \"hue\": \"@columns\", \"style\": \"@columns\",\n }\n flat_structure = {\"x\": \"@index\", \"y\": \"@values\"}\n\n _default_size_range = 1, 2 # Unused but needed in tests, ugh\n\n def __init__(self, data=None, variables={}):\n\n self._var_levels = {}\n # var_ordered is relevant only for categorical axis variables, and may\n # be better handled by an internal axis information object that tracks\n # such information and is set up by the scale_* methods. The analogous\n # information for numeric axes would be information about log scales.\n self._var_ordered = {\"x\": False, \"y\": False} # alt., used DefaultDict\n self.assign_variables(data, variables)\n\n for var, cls in self._semantic_mappings.items():\n\n # Create the mapping function\n map_func = partial(cls.map, plotter=self)\n setattr(self, f\"map_{var}\", map_func)\n\n # Call the mapping function to initialize with default values\n getattr(self, f\"map_{var}\")()\n\n @classmethod\n def get_semantics(cls, kwargs, semantics=None):\n \"\"\"Subset a dictionary arguments with known semantic variables.\"\"\"\n # TODO this should be get_variables since we have included x and y\n if semantics is None:\n semantics = cls.semantics\n variables = {}\n for key, val in kwargs.items():\n if key in semantics and val is not None:\n variables[key] = val\n return variables\n\n @property\n def has_xy_data(self):\n \"\"\"Return True at least one of x or y is defined.\"\"\"\n return bool({\"x\", \"y\"} & set(self.variables))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter.var_levels_VectorPlotter.var_levels.return.self__var_levels": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter.var_levels_VectorPlotter.var_levels.return.self__var_levels", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 645, "end_line": 664, "span_ids": ["VectorPlotter.var_levels"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VectorPlotter:\n\n @property\n def var_levels(self):\n \"\"\"Property interface to ordered list of variables levels.\n\n Each time it's accessed, it updates the var_levels dictionary with the\n list of levels in the current semantic mappers. But it also allows the\n dictionary to persist, so it can be used to set levels by a key. This is\n used to track the list of col/row levels using an attached FacetGrid\n object, but it's kind of messy and ideally fixed by improving the\n faceting logic so it interfaces better with the modern approach to\n tracking plot variables.\n\n \"\"\"\n for var in self.variables:\n try:\n map_obj = getattr(self, f\"_{var}_map\")\n self._var_levels[var] = map_obj.levels\n except AttributeError:\n pass\n return self._var_levels", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter.assign_variables_VectorPlotter.assign_variables.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter.assign_variables_VectorPlotter.assign_variables.return.self", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 666, "end_line": 692, "span_ids": ["VectorPlotter.assign_variables"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VectorPlotter:\n\n def assign_variables(self, data=None, variables={}):\n \"\"\"Define plot variables, optionally using lookup from `data`.\"\"\"\n x = variables.get(\"x\", None)\n y = variables.get(\"y\", None)\n\n if x is None and y is None:\n self.input_format = \"wide\"\n plot_data, variables = self._assign_variables_wideform(\n data, **variables,\n )\n else:\n self.input_format = \"long\"\n plot_data, variables = self._assign_variables_longform(\n data, **variables,\n )\n\n self.plot_data = plot_data\n self.variables = variables\n self.var_types = {\n v: variable_type(\n plot_data[v],\n boolean_type=\"numeric\" if v in \"xy\" else \"categorical\"\n )\n for v in variables\n }\n\n return self", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._assign_variables_wideform_VectorPlotter._assign_variables_wideform.flat.not_any_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._assign_variables_wideform_VectorPlotter._assign_variables_wideform.flat.not_any_", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 694, "end_line": 735, "span_ids": ["VectorPlotter._assign_variables_wideform"], "tokens": 382}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VectorPlotter:\n\n def _assign_variables_wideform(self, data=None, **kwargs):\n \"\"\"Define plot variables given wide-form data.\n\n Parameters\n ----------\n data : flat vector or collection of vectors\n Data can be a vector or mapping that is coerceable to a Series\n or a sequence- or mapping-based collection of such vectors, or a\n rectangular numpy array, or a Pandas DataFrame.\n kwargs : variable -> data mappings\n Behavior with keyword arguments is currently undefined.\n\n Returns\n -------\n plot_data : :class:`pandas.DataFrame`\n Long-form data object mapping seaborn variables (x, y, hue, ...)\n to data vectors.\n variables : dict\n Keys are defined seaborn variables; values are names inferred from\n the inputs (or None when no name can be determined).\n\n \"\"\"\n # Raise if semantic or other variables are assigned in wide-form mode\n assigned = [k for k, v in kwargs.items() if v is not None]\n if any(assigned):\n s = \"s\" if len(assigned) > 1 else \"\"\n err = f\"The following variable{s} cannot be assigned with wide-form data: \"\n err += \", \".join(f\"`{v}`\" for v in assigned)\n raise ValueError(err)\n\n # Determine if the data object actually has any data in it\n empty = data is None or not len(data)\n\n # Then, determine if we have \"flat\" data (a single vector)\n if isinstance(data, dict):\n values = data.values()\n else:\n values = np.atleast_1d(np.asarray(data, dtype=object))\n flat = not any(\n isinstance(v, Iterable) and not isinstance(v, (str, bytes))\n for v in values\n )\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._assign_variables_wideform.if_empty__VectorPlotter._assign_variables_wideform.return.plot_data_variables": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._assign_variables_wideform.if_empty__VectorPlotter._assign_variables_wideform.return.plot_data_variables", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 737, "end_line": 834, "span_ids": ["VectorPlotter._assign_variables_wideform"], "tokens": 787}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VectorPlotter:\n\n def _assign_variables_wideform(self, data=None, **kwargs):\n # ... other code\n\n if empty:\n\n # Make an object with the structure of plot_data, but empty\n plot_data = pd.DataFrame()\n variables = {}\n\n elif flat:\n\n # Handle flat data by converting to pandas Series and using the\n # index and/or values to define x and/or y\n # (Could be accomplished with a more general to_series() interface)\n flat_data = pd.Series(data).copy()\n names = {\n \"@values\": flat_data.name,\n \"@index\": flat_data.index.name\n }\n\n plot_data = {}\n variables = {}\n\n for var in [\"x\", \"y\"]:\n if var in self.flat_structure:\n attr = self.flat_structure[var]\n plot_data[var] = getattr(flat_data, attr[1:])\n variables[var] = names[self.flat_structure[var]]\n\n plot_data = pd.DataFrame(plot_data)\n\n else:\n\n # Otherwise assume we have some collection of vectors.\n\n # Handle Python sequences such that entries end up in the columns,\n # not in the rows, of the intermediate wide DataFrame.\n # One way to accomplish this is to convert to a dict of Series.\n if isinstance(data, Sequence):\n data_dict = {}\n for i, var in enumerate(data):\n key = getattr(var, \"name\", i)\n # TODO is there a safer/more generic way to ensure Series?\n # sort of like np.asarray, but for pandas?\n data_dict[key] = pd.Series(var)\n\n data = data_dict\n\n # Pandas requires that dict values either be Series objects\n # or all have the same length, but we want to allow \"ragged\" inputs\n if isinstance(data, Mapping):\n data = {key: pd.Series(val) for key, val in data.items()}\n\n # Otherwise, delegate to the pandas DataFrame constructor\n # This is where we'd prefer to use a general interface that says\n # \"give me this data as a pandas DataFrame\", so we can accept\n # DataFrame objects from other libraries\n wide_data = pd.DataFrame(data, copy=True)\n\n # At this point we should reduce the dataframe to numeric cols\n numeric_cols = [\n k for k, v in wide_data.items() if variable_type(v) == \"numeric\"\n ]\n wide_data = wide_data[numeric_cols]\n\n # Now melt the data to long form\n melt_kws = {\"var_name\": \"@columns\", \"value_name\": \"@values\"}\n use_index = \"@index\" in self.wide_structure.values()\n if use_index:\n melt_kws[\"id_vars\"] = \"@index\"\n try:\n orig_categories = wide_data.columns.categories\n orig_ordered = wide_data.columns.ordered\n wide_data.columns = wide_data.columns.add_categories(\"@index\")\n except AttributeError:\n category_columns = False\n else:\n category_columns = True\n wide_data[\"@index\"] = wide_data.index.to_series()\n\n plot_data = wide_data.melt(**melt_kws)\n\n if use_index and category_columns:\n plot_data[\"@columns\"] = pd.Categorical(plot_data[\"@columns\"],\n orig_categories,\n orig_ordered)\n\n # Assign names corresponding to plot semantics\n for var, attr in self.wide_structure.items():\n plot_data[var] = plot_data[attr]\n\n # Define the variable names\n variables = {}\n for var, attr in self.wide_structure.items():\n obj = getattr(wide_data, attr[1:])\n variables[var] = getattr(obj, \"name\", None)\n\n # Remove redundant columns from plot_data\n plot_data = plot_data[list(variables)]\n\n return plot_data, variables", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._assign_variables_longform_VectorPlotter._assign_variables_longform.return.plot_data_variables": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._assign_variables_longform_VectorPlotter._assign_variables_longform.return.plot_data_variables", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 836, "end_line": 948, "span_ids": ["VectorPlotter._assign_variables_longform"], "tokens": 875}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VectorPlotter:\n\n def _assign_variables_longform(self, data=None, **kwargs):\n \"\"\"Define plot variables given long-form data and/or vector inputs.\n\n Parameters\n ----------\n data : dict-like collection of vectors\n Input data where variable names map to vector values.\n kwargs : variable -> data mappings\n Keys are seaborn variables (x, y, hue, ...) and values are vectors\n in any format that can construct a :class:`pandas.DataFrame` or\n names of columns or index levels in ``data``.\n\n Returns\n -------\n plot_data : :class:`pandas.DataFrame`\n Long-form data object mapping seaborn variables (x, y, hue, ...)\n to data vectors.\n variables : dict\n Keys are defined seaborn variables; values are names inferred from\n the inputs (or None when no name can be determined).\n\n Raises\n ------\n ValueError\n When variables are strings that don't appear in ``data``.\n\n \"\"\"\n plot_data = {}\n variables = {}\n\n # Data is optional; all variables can be defined as vectors\n if data is None:\n data = {}\n\n # TODO should we try a data.to_dict() or similar here to more\n # generally accept objects with that interface?\n # Note that dict(df) also works for pandas, and gives us what we\n # want, whereas DataFrame.to_dict() gives a nested dict instead of\n # a dict of series.\n\n # Variables can also be extracted from the index attribute\n # TODO is this the most general way to enable it?\n # There is no index.to_dict on multiindex, unfortunately\n try:\n index = data.index.to_frame()\n except AttributeError:\n index = {}\n\n # The caller will determine the order of variables in plot_data\n for key, val in kwargs.items():\n\n # First try to treat the argument as a key for the data collection.\n # But be flexible about what can be used as a key.\n # Usually it will be a string, but allow numbers or tuples too when\n # taking from the main data object. Only allow strings to reference\n # fields in the index, because otherwise there is too much ambiguity.\n try:\n val_as_data_key = (\n val in data\n or (isinstance(val, (str, bytes)) and val in index)\n )\n except (KeyError, TypeError):\n val_as_data_key = False\n\n if val_as_data_key:\n\n # We know that __getitem__ will work\n\n if val in data:\n plot_data[key] = data[val]\n elif val in index:\n plot_data[key] = index[val]\n variables[key] = val\n\n elif isinstance(val, (str, bytes)):\n\n # This looks like a column name but we don't know what it means!\n\n err = f\"Could not interpret value `{val}` for parameter `{key}`\"\n raise ValueError(err)\n\n else:\n\n # Otherwise, assume the value is itself data\n\n # Raise when data object is present and a vector can't matched\n if isinstance(data, pd.DataFrame) and not isinstance(val, pd.Series):\n if np.ndim(val) and len(data) != len(val):\n val_cls = val.__class__.__name__\n err = (\n f\"Length of {val_cls} vectors must match length of `data`\"\n f\" when both are used, but `data` has length {len(data)}\"\n f\" and the vector passed to `{key}` has length {len(val)}.\"\n )\n raise ValueError(err)\n\n plot_data[key] = val\n\n # Try to infer the name of the variable\n variables[key] = getattr(val, \"name\", None)\n\n # Construct a tidy plot DataFrame. This will convert a number of\n # types automatically, aligning on index in case of pandas objects\n plot_data = pd.DataFrame(plot_data)\n\n # Reduce the variables dictionary to fields with valid data\n variables = {\n var: name\n for var, name in variables.items()\n if plot_data[var].notnull().any()\n }\n\n return plot_data, variables", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter.iter_data_VectorPlotter.iter_data.None_4.for_axis_in_x_y_.if_self_var_types_axis_.None_1.levels_axis_np_log10_l": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter.iter_data_VectorPlotter.iter_data.None_4.for_axis_in_x_y_.if_self_var_types_axis_.None_1.levels_axis_np_log10_l", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 950, "end_line": 1030, "span_ids": ["VectorPlotter.iter_data"], "tokens": 662}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VectorPlotter:\n\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 # 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 = [\n var for var in grouping_vars if var in self.variables\n ]\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 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 converter = self.converters[axis].iloc[0]\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 elif self.var_types[axis] == \"datetime\":\n levels[axis] = mpl.dates.date2num(levels[axis])\n elif self.var_types[axis] == \"numeric\" and self._log_scaled(axis):\n levels[axis] = np.log10(levels[axis])\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter.iter_data.if_grouping_vars__VectorPlotter.iter_data.if_grouping_vars_.else_.yield_data_copy_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter.iter_data.if_grouping_vars__VectorPlotter.iter_data.if_grouping_vars_.else_.yield_data_copy_", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1032, "end_line": 1069, "span_ids": ["VectorPlotter.iter_data"], "tokens": 278}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VectorPlotter:\n\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 # ... other code\n\n if grouping_vars:\n\n grouped_data = data.groupby(\n grouping_vars, sort=False, as_index=False\n )\n\n grouping_keys = []\n for var in grouping_vars:\n grouping_keys.append(levels.get(var, []))\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 # Pandas fails with singleton tuple inputs\n pd_key = key[0] if len(key) == 1 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()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter.comp_data_VectorPlotter.comp_data.return.self__comp_data": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter.comp_data_VectorPlotter.comp_data.return.self__comp_data", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1071, "end_line": 1115, "span_ids": ["VectorPlotter.comp_data"], "tokens": 372}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VectorPlotter:\n\n @property\n def comp_data(self):\n \"\"\"Dataframe with numeric x and y, after unit conversion and log scaling.\"\"\"\n if not hasattr(self, \"ax\"):\n # Probably a good idea, but will need a bunch of tests updated\n # Most of these tests should just use the external interface\n # Then this can be re-enabled.\n # raise AttributeError(\"No Axes attached to plotter\")\n return self.plot_data\n\n if not hasattr(self, \"_comp_data\"):\n\n comp_data = (\n self.plot_data\n .copy(deep=False)\n .drop([\"x\", \"y\"], axis=1, errors=\"ignore\")\n )\n\n for var in \"yx\":\n if var not in self.variables:\n continue\n\n parts = []\n grouped = self.plot_data[var].groupby(self.converters[var], sort=False)\n for converter, orig in grouped:\n with pd.option_context('mode.use_inf_as_null', True):\n orig = orig.dropna()\n if var in self.var_levels:\n # TODO this should happen in some centralized location\n # it is similar to GH2419, but more complicated because\n # supporting `order` in categorical plots is tricky\n orig = orig[orig.isin(self.var_levels[var])]\n comp = pd.to_numeric(converter.convert_units(orig))\n if converter.get_scale() == \"log\":\n comp = np.log10(comp)\n parts.append(pd.Series(comp, orig.index, name=orig.name))\n if parts:\n comp_col = pd.concat(parts)\n else:\n comp_col = pd.Series(dtype=float, name=var)\n comp_data.insert(0, var, comp_col)\n\n self._comp_data = comp_data\n\n return self._comp_data", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._get_axes_VectorPlotter._get_axes.if_row_is_not_None_and_co.else_.return.self_ax": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._get_axes_VectorPlotter._get_axes.if_row_is_not_None_and_co.else_.return.self_ax", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1117, "end_line": 1130, "span_ids": ["VectorPlotter._get_axes"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VectorPlotter:\n\n def _get_axes(self, sub_vars):\n \"\"\"Return an Axes object based on existence of row/col variables.\"\"\"\n row = sub_vars.get(\"row\", None)\n col = sub_vars.get(\"col\", None)\n if row is not None and col is not None:\n return self.facets.axes_dict[(row, col)]\n elif row is not None:\n return self.facets.axes_dict[row]\n elif col is not None:\n return self.facets.axes_dict[col]\n elif self.ax is None:\n return self.facets.ax\n else:\n return self.ax", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._attach_VectorPlotter._attach.self.converters._": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._attach_VectorPlotter._attach.self.converters._", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1132, "end_line": 1194, "span_ids": ["VectorPlotter._attach"], "tokens": 531}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VectorPlotter:\n\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 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 # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._attach.None_3_VectorPlotter._attach._TODO_Add_axes_labels": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._attach.None_3_VectorPlotter._attach._TODO_Add_axes_labels", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1195, "end_line": 1276, "span_ids": ["VectorPlotter._attach"], "tokens": 812}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VectorPlotter:\n\n def _attach(\n self,\n obj,\n allowed_types=None,\n log_scale=None,\n ):\n # ... other code\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 \"x\" in self.variables else False\n scaley = log_scale if \"y\" in self.variables 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\")\n else:\n if Version(mpl.__version__) >= Version(\"3.3\"):\n set_scale(\"log\", base=scale)\n else:\n set_scale(\"log\", **{f\"base{axis}\": scale})\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 try:\n ax.yaxis.set_inverted(True)\n except AttributeError: # mpl < 3.1\n if not ax.yaxis_inverted():\n ax.invert_yaxis()\n\n # TODO -- Add axes labels", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._log_scaled_VectorPlotter._log_scaled.return.any_log_scaled_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._log_scaled_VectorPlotter._log_scaled.return.any_log_scaled_", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1278, "end_line": 1296, "span_ids": ["VectorPlotter._log_scaled"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VectorPlotter:\n\n def _log_scaled(self, axis):\n \"\"\"Return True if specified axis is log scaled on all attached axes.\"\"\"\n if not hasattr(self, \"ax\"):\n return False\n\n if self.ax is None:\n axes_list = self.facets.axes.flatten()\n else:\n axes_list = [self.ax]\n\n log_scaled = []\n for ax in axes_list:\n data_axis = getattr(ax, f\"{axis}axis\")\n log_scaled.append(data_axis.get_scale() == \"log\")\n\n if any(log_scaled) and not all(log_scaled):\n raise RuntimeError(\"Axis scaling is not consistent\")\n\n return any(log_scaled)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._add_axis_labels_VectorPlotter._add_axis_labels.if_not_ax_get_ylabel_.ax_set_ylabel_self_variab": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._add_axis_labels_VectorPlotter._add_axis_labels.if_not_ax_get_ylabel_.ax_set_ylabel_self_variab", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1298, "end_line": 1309, "span_ids": ["VectorPlotter._add_axis_labels"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VectorPlotter:\n\n def _add_axis_labels(self, ax, default_x=\"\", default_y=\"\"):\n \"\"\"Add axis labels if not present, set visibility to match ticklabels.\"\"\"\n # TODO ax could default to None and use attached axes if present\n # but what to do about the case of facets? Currently using FacetGrid's\n # set_axis_labels method, which doesn't add labels to the interior even\n # when the axes are not shared. Maybe that makes sense?\n if not ax.get_xlabel():\n x_visible = any(t.get_visible() for t in ax.get_xticklabels())\n ax.set_xlabel(self.variables.get(\"x\", default_x), visible=x_visible)\n if not ax.get_ylabel():\n y_visible = any(t.get_visible() for t in ax.get_yticklabels())\n ax.set_ylabel(self.variables.get(\"y\", default_y), visible=y_visible)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._XXX_If_the_scale__meth_VectorPlotter.scale_datetime.raise_NotImplementedError": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter._XXX_If_the_scale__meth_VectorPlotter.scale_datetime.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1311, "end_line": 1334, "span_ids": ["VectorPlotter._add_axis_labels", "VectorPlotter.scale_native", "VectorPlotter.scale_numeric", "VectorPlotter.scale_datetime"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VectorPlotter:\n\n # XXX If the scale_* methods are going to modify the plot_data structure, they\n # can't be called twice. That means that if they are called twice, they should\n # raise. Alternatively, we could store an original version of plot_data and each\n # time they are called they operate on the store, not the current state.\n\n def scale_native(self, axis, *args, **kwargs):\n\n # Default, defer to matplotlib\n\n raise NotImplementedError\n\n def scale_numeric(self, axis, *args, **kwargs):\n\n # Feels needed to completeness, what should it do?\n # Perhaps handle log scaling? Set the ticker/formatter/limits?\n\n raise NotImplementedError\n\n def scale_datetime(self, axis, *args, **kwargs):\n\n # Use pd.to_datetime to convert strings or numbers to datetime objects\n # Note, use day-resolution for numeric->datetime to match matplotlib\n\n raise NotImplementedError", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter.scale_categorical_VectorPlotter.scale_categorical.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VectorPlotter.scale_categorical_VectorPlotter.scale_categorical.return.self", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1336, "end_line": 1427, "span_ids": ["VectorPlotter.scale_categorical"], "tokens": 929}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VectorPlotter:\n\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 # 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\n cat_data = self.plot_data[axis]\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))\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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VariableType_VariableType.__eq__.return.self_data_other": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_VariableType_VariableType.__eq__.return.self_data_other", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1430, "end_line": 1447, "span_ids": ["VariableType", "VariableType.__eq__"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VariableType(UserString):\n \"\"\"\n Prevent comparisons elsewhere in the library from using the wrong name.\n\n Errors are simple assertions because users should not be able to trigger\n them. If that changes, they should be more verbose.\n\n \"\"\"\n # TODO we can replace this with typing.Literal on Python 3.8+\n allowed = \"numeric\", \"datetime\", \"categorical\"\n\n def __init__(self, data):\n assert data in self.allowed, data\n super().__init__(data)\n\n def __eq__(self, other):\n assert other in self.allowed, other\n return self.data == other", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_variable_type_variable_type.return.VariableType_categorical": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_variable_type_variable_type.return.VariableType_categorical", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1450, "end_line": 1530, "span_ids": ["variable_type"], "tokens": 622}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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\n # If a categorical dtype is set, infer categorical\n if pd.api.types.is_categorical_dtype(vector):\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 # 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 if np.isin(vector, [0, 1, np.nan]).all():\n return VariableType(boolean_type)\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\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_infer_orient_infer_orient.if_x_is_None_.else_.return._v_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_infer_orient_infer_orient.if_x_is_None_.else_.return._v_", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1533, "end_line": 1612, "span_ids": ["infer_orient"], "tokens": 632}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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, which must start with \"v\" or \"h\" if not None.\n require_numeric : bool\n If set, raise when the implied dependent variable is not numeric.\n\n Returns\n -------\n orient : \"v\" or \"h\"\n\n Raises\n ------\n ValueError: When `orient` is not None and does not start with \"h\" or \"v\"\n TypeError: When dependent variable is not numeric, with `require_numeric`\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 \"v\"\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 \"h\"\n\n elif str(orient).startswith(\"v\"):\n if require_numeric and y_type != \"numeric\":\n raise TypeError(nonnumeric_dv_error.format(\"Vertical\", \"y\"))\n return \"v\"\n\n elif str(orient).startswith(\"h\"):\n if require_numeric and x_type != \"numeric\":\n raise TypeError(nonnumeric_dv_error.format(\"Horizontal\", \"x\"))\n return \"h\"\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 \"h\"\n\n elif x_type != \"numeric\" and y_type == \"numeric\":\n return \"v\"\n\n elif x_type == \"numeric\" and y_type != \"numeric\":\n return \"h\"\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 \"v\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_unique_dashes_unique_dashes.return.dashes_n_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_unique_dashes_unique_dashes.return.dashes_n_", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1615, "end_line": 1663, "span_ids": ["unique_dashes"], "tokens": 343}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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 # 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]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_unique_markers_unique_markers.return.markers_n_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_unique_markers_unique_markers.return.markers_n_", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1666, "end_line": 1709, "span_ids": ["unique_markers"], "tokens": 292}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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 # 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]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_categorical_order_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_categorical_order_", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1712, "end_line": 1749, "span_ids": ["categorical_order"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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 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 try:\n order = vector.unique()\n except AttributeError:\n order = pd.unique(vector)\n\n if variable_type(vector) == \"numeric\":\n order = np.sort(order)\n\n order = filter(pd.notnull, order)\n return list(order)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py__Statistical_transforma__check_argument": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py__Statistical_transforma__check_argument", "embedding": null, "metadata": {"file_path": "seaborn/_statistics.py", "file_name": "_statistics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 38, "span_ids": ["impl", "imports:5", "imports:6", "impl:2", "docstring", "imports:4", "imports", "impl:5"], "tokens": 340}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Statistical transformations for visualization.\n\nThis module is currently private, but is being written to eventually form part\nof the public API.\n\nThe classes should behave roughly in the style of scikit-learn.\n\n- All data-independent parameters should be passed to the class constructor.\n- Each class should implement a default transformation that is exposed through\n __call__. These are currently written for vector arguments, but I think\n consuming a whole `plot_data` DataFrame and return it with transformed\n variables would make more sense.\n- Some class have data-dependent preprocessing that should be cached and used\n multiple times (think defining histogram bins off all data and then counting\n observations within each bin multiple times per data subsets). These currently\n have unique names, but it would be good to have a common name. Not quite\n `fit`, but something similar.\n- Alternatively, the transform interface could take some information about grouping\n variables and do a groupby internally.\n- Some classes should define alternate transforms that might make the most sense\n with a different function. For example, KDE usually evaluates the distribution\n on a regular grid, but it would be useful for it to transform at the actual\n datapoints. Then again, this could be controlled by a parameter at the time of\n class instantiation.\n\n\"\"\"\nfrom numbers import Number\nimport numpy as np\nimport pandas as pd\ntry:\n from scipy.stats import gaussian_kde\n _no_scipy = False\nexcept ImportError:\n from .external.kde import gaussian_kde\n _no_scipy = True\n\nfrom .algorithms import bootstrap\nfrom .utils import _check_argument", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_KDE_KDE.__init__.self.support.None": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_KDE_KDE.__init__.self.support.None", "embedding": null, "metadata": {"file_path": "seaborn/_statistics.py", "file_name": "_statistics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 41, "end_line": 87, "span_ids": ["KDE"], "tokens": 342}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class KDE:\n \"\"\"Univariate and bivariate kernel density estimator.\"\"\"\n def __init__(\n self, *,\n bw_method=None,\n bw_adjust=1,\n gridsize=200,\n cut=3,\n clip=None,\n cumulative=False,\n ):\n \"\"\"Initialize the estimator with its parameters.\n\n Parameters\n ----------\n bw_method : string, scalar, or callable, optional\n Method for determining the smoothing bandwidth to use; passed to\n :class:`scipy.stats.gaussian_kde`.\n bw_adjust : number, optional\n Factor that multiplicatively scales the value chosen using\n ``bw_method``. Increasing will make the curve smoother. See Notes.\n gridsize : int, optional\n Number of points on each dimension of the evaluation grid.\n cut : number, optional\n Factor, multiplied by the smoothing bandwidth, that determines how\n far the evaluation grid extends past the extreme datapoints. When\n set to 0, truncate the curve at the data limits.\n clip : pair of numbers or None, or a pair of such pairs\n Do not evaluate the density outside of these limits.\n cumulative : bool, optional\n If True, estimate a cumulative distribution function. Requires scipy.\n\n \"\"\"\n if clip is None:\n clip = None, None\n\n self.bw_method = bw_method\n self.bw_adjust = bw_adjust\n self.gridsize = gridsize\n self.cut = cut\n self.clip = clip\n self.cumulative = cumulative\n\n if cumulative and _no_scipy:\n raise RuntimeError(\"Cumulative KDE evaluation requires scipy\")\n\n self.support = None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_KDE._define_support_grid_KDE._define_support_univariate.return.grid": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_KDE._define_support_grid_KDE._define_support_univariate.return.grid", "embedding": null, "metadata": {"file_path": "seaborn/_statistics.py", "file_name": "_statistics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 89, "end_line": 104, "span_ids": ["KDE._define_support_grid", "KDE._define_support_univariate"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class KDE:\n\n def _define_support_grid(self, x, bw, cut, clip, gridsize):\n \"\"\"Create the grid of evaluation points depending for vector x.\"\"\"\n clip_lo = -np.inf if clip[0] is None else clip[0]\n clip_hi = +np.inf if clip[1] is None else clip[1]\n gridmin = max(x.min() - bw * cut, clip_lo)\n gridmax = min(x.max() + bw * cut, clip_hi)\n return np.linspace(gridmin, gridmax, gridsize)\n\n def _define_support_univariate(self, x, weights):\n \"\"\"Create a 1D grid of evaluation points.\"\"\"\n kde = self._fit(x, weights)\n bw = np.sqrt(kde.covariance.squeeze())\n grid = self._define_support_grid(\n x, bw, self.cut, self.clip, self.gridsize\n )\n return grid", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_KDE._define_support_bivariate_KDE._define_support_bivariate.return.grid1_grid2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_KDE._define_support_bivariate_KDE._define_support_bivariate.return.grid1_grid2", "embedding": null, "metadata": {"file_path": "seaborn/_statistics.py", "file_name": "_statistics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 106, "end_line": 122, "span_ids": ["KDE._define_support_bivariate"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class KDE:\n\n def _define_support_bivariate(self, x1, x2, weights):\n \"\"\"Create a 2D grid of evaluation points.\"\"\"\n clip = self.clip\n if clip[0] is None or np.isscalar(clip[0]):\n clip = (clip, clip)\n\n kde = self._fit([x1, x2], weights)\n bw = np.sqrt(np.diag(kde.covariance).squeeze())\n\n grid1 = self._define_support_grid(\n x1, bw[0], self.cut, clip[0], self.gridsize\n )\n grid2 = self._define_support_grid(\n x2, bw[1], self.cut, clip[1], self.gridsize\n )\n\n return grid1, grid2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_KDE.define_support_KDE._fit.return.kde": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_KDE.define_support_KDE._fit.return.kde", "embedding": null, "metadata": {"file_path": "seaborn/_statistics.py", "file_name": "_statistics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 124, "end_line": 145, "span_ids": ["KDE._fit", "KDE.define_support"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class KDE:\n\n def define_support(self, x1, x2=None, weights=None, cache=True):\n \"\"\"Create the evaluation grid for a given data set.\"\"\"\n if x2 is None:\n support = self._define_support_univariate(x1, weights)\n else:\n support = self._define_support_bivariate(x1, x2, weights)\n\n if cache:\n self.support = support\n\n return support\n\n def _fit(self, fit_data, weights=None):\n \"\"\"Fit the scipy kde while adding bw_adjust logic and version check.\"\"\"\n fit_kws = {\"bw_method\": self.bw_method}\n if weights is not None:\n fit_kws[\"weights\"] = weights\n\n kde = gaussian_kde(fit_data, **fit_kws)\n kde.set_bandwidth(kde.factor * self.bw_adjust)\n\n return kde", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_KDE._eval_univariate_KDE._eval_univariate.return.density_support": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_KDE._eval_univariate_KDE._eval_univariate.return.density_support", "embedding": null, "metadata": {"file_path": "seaborn/_statistics.py", "file_name": "_statistics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 147, "end_line": 163, "span_ids": ["KDE._eval_univariate"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class KDE:\n\n def _eval_univariate(self, x, weights=None):\n \"\"\"Fit and evaluate a univariate on univariate data.\"\"\"\n support = self.support\n if support is None:\n support = self.define_support(x, cache=False)\n\n kde = self._fit(x, weights)\n\n if self.cumulative:\n s_0 = support[0]\n density = np.array([\n kde.integrate_box_1d(s_0, s_i) for s_i in support\n ])\n else:\n density = kde(support)\n\n return density, support", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_KDE._eval_bivariate_KDE.__call__.if_x2_is_None_.else_.return.self__eval_bivariate_x1_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_KDE._eval_bivariate_KDE.__call__.if_x2_is_None_.else_.return.self__eval_bivariate_x1_", "embedding": null, "metadata": {"file_path": "seaborn/_statistics.py", "file_name": "_statistics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 165, "end_line": 194, "span_ids": ["KDE._eval_bivariate", "KDE.__call__"], "tokens": 268}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class KDE:\n\n def _eval_bivariate(self, x1, x2, weights=None):\n \"\"\"Fit and evaluate a univariate on bivariate data.\"\"\"\n support = self.support\n if support is None:\n support = self.define_support(x1, x2, cache=False)\n\n kde = self._fit([x1, x2], weights)\n\n if self.cumulative:\n\n grid1, grid2 = support\n density = np.zeros((grid1.size, grid2.size))\n p0 = grid1.min(), grid2.min()\n for i, xi in enumerate(grid1):\n for j, xj in enumerate(grid2):\n density[i, j] = kde.integrate_box(p0, (xi, xj))\n\n else:\n\n xx1, xx2 = np.meshgrid(*support)\n density = kde([xx1.ravel(), xx2.ravel()]).reshape(xx1.shape)\n\n return density, support\n\n def __call__(self, x1, x2=None, weights=None):\n \"\"\"Fit and evaluate on univariate or bivariate data.\"\"\"\n if x2 is None:\n return self._eval_univariate(x1, weights)\n else:\n return self._eval_bivariate(x1, x2, weights)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_Histogram_Histogram.__init__.self.bin_kws.None": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_Histogram_Histogram.__init__.self.bin_kws.None", "embedding": null, "metadata": {"file_path": "seaborn/_statistics.py", "file_name": "_statistics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 197, "end_line": 250, "span_ids": ["Histogram"], "tokens": 433}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Histogram:\n \"\"\"Univariate and bivariate histogram estimator.\"\"\"\n def __init__(\n self,\n stat=\"count\",\n bins=\"auto\",\n binwidth=None,\n binrange=None,\n discrete=False,\n cumulative=False,\n ):\n \"\"\"Initialize the estimator with its parameters.\n\n Parameters\n ----------\n stat : str\n Aggregate statistic to compute in each bin.\n\n - `count`: show the number of observations in each bin\n - `frequency`: show the number of observations divided by the bin width\n - `probability` or `proportion`: normalize such that bar heights sum to 1\n - `percent`: normalize such that bar heights sum to 100\n - `density`: normalize such that the total area of the histogram equals 1\n\n bins : str, number, vector, or a pair of such values\n Generic bin parameter that can be the name of a reference rule,\n the number of bins, or the breaks of the bins.\n Passed to :func:`numpy.histogram_bin_edges`.\n binwidth : number or pair of numbers\n Width of each bin, overrides ``bins`` but can be used with\n ``binrange``.\n binrange : pair of numbers or a pair of pairs\n Lowest and highest value for bin edges; can be used either\n with ``bins`` or ``binwidth``. Defaults to data extremes.\n discrete : bool or pair of bools\n If True, set ``binwidth`` and ``binrange`` such that bin\n edges cover integer values in the dataset.\n cumulative : bool\n If True, return the cumulative statistic.\n\n \"\"\"\n stat_choices = [\n \"count\", \"frequency\", \"density\", \"probability\", \"proportion\", \"percent\",\n ]\n _check_argument(\"stat\", stat_choices, stat)\n\n self.stat = stat\n self.bins = bins\n self.binwidth = binwidth\n self.binrange = binrange\n self.discrete = discrete\n self.cumulative = cumulative\n\n self.bin_kws = None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_Histogram._define_bin_edges_Histogram._define_bin_edges.return.bin_edges": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_Histogram._define_bin_edges_Histogram._define_bin_edges.return.bin_edges", "embedding": null, "metadata": {"file_path": "seaborn/_statistics.py", "file_name": "_statistics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 252, "end_line": 271, "span_ids": ["Histogram._define_bin_edges"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Histogram:\n\n def _define_bin_edges(self, x, weights, bins, binwidth, binrange, discrete):\n \"\"\"Inner function that takes bin parameters as arguments.\"\"\"\n if binrange is None:\n start, stop = x.min(), x.max()\n else:\n start, stop = binrange\n\n if discrete:\n bin_edges = np.arange(start - .5, stop + 1.5)\n elif binwidth is not None:\n step = binwidth\n bin_edges = np.arange(start, stop + step, step)\n # Handle roundoff error (maybe there is a less clumsy way?)\n if bin_edges.max() < stop or len(bin_edges) < 2:\n bin_edges = np.append(bin_edges, bin_edges.max() + step)\n else:\n bin_edges = np.histogram_bin_edges(\n x, bins, binrange, weights,\n )\n return bin_edges", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_Histogram.define_bin_params_Histogram.define_bin_params.return.bin_kws": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_Histogram.define_bin_params_Histogram.define_bin_params.return.bin_kws", "embedding": null, "metadata": {"file_path": "seaborn/_statistics.py", "file_name": "_statistics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 273, "end_line": 331, "span_ids": ["Histogram.define_bin_params"], "tokens": 402}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Histogram:\n\n def define_bin_params(self, x1, x2=None, weights=None, cache=True):\n \"\"\"Given data, return numpy.histogram parameters to define bins.\"\"\"\n if x2 is None:\n\n bin_edges = self._define_bin_edges(\n x1, weights, self.bins, self.binwidth, self.binrange, self.discrete,\n )\n\n if isinstance(self.bins, (str, Number)):\n n_bins = len(bin_edges) - 1\n bin_range = bin_edges.min(), bin_edges.max()\n bin_kws = dict(bins=n_bins, range=bin_range)\n else:\n bin_kws = dict(bins=bin_edges)\n\n else:\n\n bin_edges = []\n for i, x in enumerate([x1, x2]):\n\n # Resolve out whether bin parameters are shared\n # or specific to each variable\n\n bins = self.bins\n if not bins or isinstance(bins, (str, Number)):\n pass\n elif isinstance(bins[i], str):\n bins = bins[i]\n elif len(bins) == 2:\n bins = bins[i]\n\n binwidth = self.binwidth\n if binwidth is None:\n pass\n elif not isinstance(binwidth, Number):\n binwidth = binwidth[i]\n\n binrange = self.binrange\n if binrange is None:\n pass\n elif not isinstance(binrange[0], Number):\n binrange = binrange[i]\n\n discrete = self.discrete\n if not isinstance(discrete, bool):\n discrete = discrete[i]\n\n # Define the bins for this variable\n\n bin_edges.append(self._define_bin_edges(\n x, weights, bins, binwidth, binrange, discrete,\n ))\n\n bin_kws = dict(bins=tuple(bin_edges))\n\n if cache:\n self.bin_kws = bin_kws\n\n return bin_kws", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_Histogram._eval_bivariate_Histogram._eval_bivariate.return.hist_bin_edges": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_Histogram._eval_bivariate_Histogram._eval_bivariate.return.hist_bin_edges", "embedding": null, "metadata": {"file_path": "seaborn/_statistics.py", "file_name": "_statistics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 333, "end_line": 363, "span_ids": ["Histogram._eval_bivariate"], "tokens": 262}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Histogram:\n\n def _eval_bivariate(self, x1, x2, weights):\n \"\"\"Inner function for histogram of two variables.\"\"\"\n bin_kws = self.bin_kws\n if bin_kws is None:\n bin_kws = self.define_bin_params(x1, x2, cache=False)\n\n density = self.stat == \"density\"\n\n hist, *bin_edges = np.histogram2d(\n x1, x2, **bin_kws, weights=weights, density=density\n )\n\n area = np.outer(\n np.diff(bin_edges[0]),\n np.diff(bin_edges[1]),\n )\n\n if self.stat == \"probability\" or self.stat == \"proportion\":\n hist = hist.astype(float) / hist.sum()\n elif self.stat == \"percent\":\n hist = hist.astype(float) / hist.sum() * 100\n elif self.stat == \"frequency\":\n hist = hist.astype(float) / area\n\n if self.cumulative:\n if self.stat in [\"density\", \"frequency\"]:\n hist = (hist * area).cumsum(axis=0).cumsum(axis=1)\n else:\n hist = hist.cumsum(axis=0).cumsum(axis=1)\n\n return hist, bin_edges", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_Histogram._eval_univariate_Histogram.__call__.if_x2_is_None_.else_.return.self__eval_bivariate_x1_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_Histogram._eval_univariate_Histogram.__call__.if_x2_is_None_.else_.return.self__eval_bivariate_x1_", "embedding": null, "metadata": {"file_path": "seaborn/_statistics.py", "file_name": "_statistics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 365, "end_line": 396, "span_ids": ["Histogram._eval_univariate", "Histogram.__call__"], "tokens": 282}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Histogram:\n\n def _eval_univariate(self, x, weights):\n \"\"\"Inner function for histogram of one variable.\"\"\"\n bin_kws = self.bin_kws\n if bin_kws is None:\n bin_kws = self.define_bin_params(x, weights=weights, cache=False)\n\n density = self.stat == \"density\"\n hist, bin_edges = np.histogram(\n x, **bin_kws, weights=weights, density=density,\n )\n\n if self.stat == \"probability\" or self.stat == \"proportion\":\n hist = hist.astype(float) / hist.sum()\n elif self.stat == \"percent\":\n hist = hist.astype(float) / hist.sum() * 100\n elif self.stat == \"frequency\":\n hist = hist.astype(float) / np.diff(bin_edges)\n\n if self.cumulative:\n if self.stat in [\"density\", \"frequency\"]:\n hist = (hist * np.diff(bin_edges)).cumsum()\n else:\n hist = hist.cumsum()\n\n return hist, bin_edges\n\n def __call__(self, x1, x2=None, weights=None):\n \"\"\"Count the occurrences in each bin, maybe normalize.\"\"\"\n if x2 is None:\n return self._eval_univariate(x1, weights)\n else:\n return self._eval_bivariate(x1, x2, weights)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_ECDF_ECDF.__call__.if_x2_is_None_.else_.return.self__eval_bivariate_x1_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_ECDF_ECDF.__call__.if_x2_is_None_.else_.return.self__eval_bivariate_x1_", "embedding": null, "metadata": {"file_path": "seaborn/_statistics.py", "file_name": "_statistics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 399, "end_line": 449, "span_ids": ["ECDF._eval_univariate", "ECDF.__call__", "ECDF._eval_bivariate", "ECDF"], "tokens": 363}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ECDF:\n \"\"\"Univariate empirical cumulative distribution estimator.\"\"\"\n def __init__(self, stat=\"proportion\", complementary=False):\n \"\"\"Initialize the class with its parameters\n\n Parameters\n ----------\n stat : {{\"proportion\", \"count\"}}\n Distribution statistic to compute.\n complementary : bool\n If True, use the complementary CDF (1 - CDF)\n\n \"\"\"\n _check_argument(\"stat\", [\"count\", \"proportion\"], stat)\n self.stat = stat\n self.complementary = complementary\n\n def _eval_bivariate(self, x1, x2, weights):\n \"\"\"Inner function for ECDF of two variables.\"\"\"\n raise NotImplementedError(\"Bivariate ECDF is not implemented\")\n\n def _eval_univariate(self, x, weights):\n \"\"\"Inner function for ECDF of one variable.\"\"\"\n sorter = x.argsort()\n x = x[sorter]\n weights = weights[sorter]\n y = weights.cumsum()\n\n if self.stat == \"proportion\":\n y = y / y.max()\n\n x = np.r_[-np.inf, x]\n y = np.r_[0, y]\n\n if self.complementary:\n y = y.max() - y\n\n return y, x\n\n def __call__(self, x1, x2=None, weights=None):\n \"\"\"Return proportion or count of observations below each sorted datapoint.\"\"\"\n x1 = np.asarray(x1)\n if weights is None:\n weights = np.ones_like(x1)\n else:\n weights = np.asarray(weights)\n\n if x2 is None:\n return self._eval_univariate(x1, weights)\n else:\n return self._eval_bivariate(x1, x2, weights)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_EstimateAggregator_EstimateAggregator.__init__.self.boot_kws.boot_kws": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_EstimateAggregator_EstimateAggregator.__init__.self.boot_kws.boot_kws", "embedding": null, "metadata": {"file_path": "seaborn/_statistics.py", "file_name": "_statistics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 452, "end_line": 476, "span_ids": ["EstimateAggregator"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EstimateAggregator:\n\n def __init__(self, estimator, errorbar=None, **boot_kws):\n \"\"\"\n Data aggregator that produces an estimate and error bar interval.\n\n Parameters\n ----------\n estimator : callable or string\n Function (or method name) that maps a vector to a scalar.\n errorbar : string, (string, number) tuple, or callable\n Name of errorbar method (either \"ci\", \"pi\", \"se\", or \"sd\"), or a tuple\n with a method name and a level parameter, or a function that maps from a\n vector to a (min, max) interval.\n boot_kws\n Additional keywords are passed to bootstrap when error_method is \"ci\".\n\n \"\"\"\n self.estimator = estimator\n\n method, level = _validate_errorbar_arg(errorbar)\n self.error_method = method\n self.error_level = level\n\n self.boot_kws = boot_kws", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_EstimateAggregator.__call___EstimateAggregator.__call__.return.pd_Series_var_estimate_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py_EstimateAggregator.__call___EstimateAggregator.__call__.return.pd_Series_var_estimate_", "embedding": null, "metadata": {"file_path": "seaborn/_statistics.py", "file_name": "_statistics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 478, "end_line": 514, "span_ids": ["EstimateAggregator.__call__"], "tokens": 379}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EstimateAggregator:\n\n def __call__(self, data, var):\n \"\"\"Aggregate over `var` column of `data` with estimate and error interval.\"\"\"\n vals = data[var]\n if callable(self.estimator):\n # You would think we could pass to vals.agg, and yet:\n # https://github.com/mwaskom/seaborn/issues/2943\n estimate = self.estimator(vals)\n else:\n estimate = vals.agg(self.estimator)\n\n # Options that produce no error bars\n if self.error_method is None:\n err_min = err_max = np.nan\n elif len(data) <= 1:\n err_min = err_max = np.nan\n\n # Generic errorbars from user-supplied function\n elif callable(self.error_method):\n err_min, err_max = self.error_method(vals)\n\n # Parametric options\n elif self.error_method == \"sd\":\n half_interval = vals.std() * self.error_level\n err_min, err_max = estimate - half_interval, estimate + half_interval\n elif self.error_method == \"se\":\n half_interval = vals.sem() * self.error_level\n err_min, err_max = estimate - half_interval, estimate + half_interval\n\n # Nonparametric options\n elif self.error_method == \"pi\":\n err_min, err_max = _percentile_interval(vals, self.error_level)\n elif self.error_method == \"ci\":\n units = data.get(\"units\", None)\n boots = bootstrap(vals, units=units, func=self.estimator, **self.boot_kws)\n err_min, err_max = _percentile_interval(boots, self.error_level)\n\n return pd.Series({var: estimate, f\"{var}min\": err_min, f\"{var}max\": err_max})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py__percentile_interval_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_statistics.py__percentile_interval_", "embedding": null, "metadata": {"file_path": "seaborn/_statistics.py", "file_name": "_statistics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 517, "end_line": 553, "span_ids": ["_validate_errorbar_arg", "_percentile_interval"], "tokens": 257}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _percentile_interval(data, width):\n \"\"\"Return a percentile interval from data of a given width.\"\"\"\n edge = (100 - width) / 2\n percentiles = edge, 100 - edge\n return np.nanpercentile(data, percentiles)\n\n\ndef _validate_errorbar_arg(arg):\n \"\"\"Check type and value of errorbar argument and assign default level.\"\"\"\n DEFAULT_LEVELS = {\n \"ci\": 95,\n \"pi\": 95,\n \"se\": 1,\n \"sd\": 1,\n }\n\n usage = \"`errorbar` must be a callable, string, or (string, number) tuple\"\n\n if arg is None:\n return None, None\n elif callable(arg):\n return arg, None\n elif isinstance(arg, str):\n method = arg\n level = DEFAULT_LEVELS.get(method, None)\n else:\n try:\n method, level = arg\n except (ValueError, TypeError) as err:\n raise err.__class__(usage) from err\n\n _check_argument(\"errorbar\", list(DEFAULT_LEVELS), method)\n if level is not None and not isinstance(level, Number):\n raise TypeError(usage)\n\n return method, level", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/aggregation.py_from___future___import_an_Agg.__call__.return.res": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/aggregation.py_from___future___import_an_Agg.__call__.return.res", "embedding": null, "metadata": {"file_path": "seaborn/_stats/aggregation.py", "file_name": "aggregation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 42, "span_ids": ["Agg", "Agg.__call__", "imports"], "tokens": 250}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from __future__ import annotations\nfrom dataclasses import dataclass\nfrom typing import ClassVar, Callable\n\nimport pandas as pd\nfrom pandas import DataFrame\n\nfrom seaborn._core.scales import Scale\nfrom seaborn._core.groupby import GroupBy\nfrom seaborn._stats.base import Stat\nfrom seaborn._statistics import EstimateAggregator\n\nfrom seaborn._core.typing import Vector\n\n\n@dataclass\nclass Agg(Stat):\n \"\"\"\n Aggregate data along the value axis using given method.\n\n Parameters\n ----------\n func : str or callable\n Name of a :class:`pandas.Series` method or a vector -> scalar function.\n\n \"\"\"\n func: str | Callable[[Vector], float] = \"mean\"\n\n group_by_orient: ClassVar[bool] = True\n\n def __call__(\n self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n ) -> DataFrame:\n\n var = {\"x\": \"y\", \"y\": \"x\"}.get(orient)\n res = (\n groupby\n .agg(data, {var: self.func})\n .dropna()\n .reset_index(drop=True)\n )\n return res", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/base.py__Base_module_for_statis_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/base.py__Base_module_for_statis_", "embedding": null, "metadata": {"file_path": "seaborn/_stats/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 40, "span_ids": ["imports:5", "impl", "docstring", "Stat.__call__", "imports", "Stat"], "tokens": 293}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Base module for statistical transformations.\"\"\"\nfrom __future__ import annotations\nfrom dataclasses import dataclass\nfrom typing import ClassVar\n\nfrom typing import TYPE_CHECKING\nif TYPE_CHECKING:\n from pandas import DataFrame\n from seaborn._core.groupby import GroupBy\n from seaborn._core.scales import Scale\n\n\n@dataclass\nclass Stat:\n \"\"\"Base class for objects that apply statistical transformations.\"\"\"\n\n # The class supports a partial-function application pattern. The object is\n # initialized with desired parameters and the result is a callable that\n # accepts and returns dataframes.\n\n # The statistical transformation logic should not add any state to the instance\n # beyond what is defined with the initialization parameters.\n\n # Subclasses can declare whether the orient dimension should be used in grouping\n # TODO consider whether this should be a parameter. Motivating example:\n # use the same KDE class violin plots and univariate density estimation.\n # In the former case, we would expect separate densities for each unique\n # value on the orient axis, but we would not in the latter case.\n group_by_orient: ClassVar[bool] = False\n\n def __call__(\n self,\n data: DataFrame,\n groupby: GroupBy,\n orient: str,\n scales: dict[str, Scale],\n ) -> DataFrame:\n \"\"\"Apply statistical transform to data subgroups and return combined result.\"\"\"\n return data", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/regression.py_from___future___import_an_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/regression.py_from___future___import_an_", "embedding": null, "metadata": {"file_path": "seaborn/_stats/regression.py", "file_name": "regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 48, "span_ids": ["OLSFit", "PolyFit._fit_predict", "imports", "PolyFit.__call__", "PolyFit"], "tokens": 298}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from __future__ import annotations\nfrom dataclasses import dataclass\n\nimport numpy as np\nimport pandas as pd\n\nfrom seaborn._stats.base import Stat\n\n\n@dataclass\nclass PolyFit(Stat):\n \"\"\"\n Fit a polynomial of the given order and resample data onto predicted curve.\n \"\"\"\n # This is a provisional class that is useful for building out functionality.\n # It may or may not change substantially in form or dissappear as we think\n # through the organization of the stats subpackage.\n\n order: int = 2\n gridsize: int = 100\n\n def _fit_predict(self, data):\n\n x = data[\"x\"]\n y = data[\"y\"]\n if x.nunique() <= self.order:\n # TODO warn?\n xx = yy = []\n else:\n p = np.polyfit(x, y, self.order)\n xx = np.linspace(x.min(), x.max(), self.gridsize)\n yy = np.polyval(p, xx)\n\n return pd.DataFrame(dict(x=xx, y=yy))\n\n # TODO we should have a way of identifying the method that will be applied\n # and then only define __call__ on a base-class of stats with this pattern\n\n def __call__(self, data, groupby, orient, scales):\n\n return groupby.apply(data, self._fit_predict)\n\n\n@dataclass\nclass OLSFit(Stat):\n\n ...", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_testing.py_np_assert_artists_equal.for_a1_a2_in_zip_list1_.for_key_in_USE_PROPS_.if_key_paths_.else_.assert_v1_v2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_testing.py_np_assert_artists_equal.for_a1_a2_in_zip_list1_.for_key_in_USE_PROPS_.if_key_paths_.else_.assert_v1_v2", "embedding": null, "metadata": {"file_path": "seaborn/_testing.py", "file_name": "_testing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 47, "span_ids": ["impl", "assert_artists_equal", "imports"], "tokens": 305}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nimport matplotlib as mpl\nfrom matplotlib.colors import to_rgb, to_rgba\nfrom numpy.testing import assert_array_equal\n\n\nUSE_PROPS = [\n \"alpha\",\n \"edgecolor\",\n \"facecolor\",\n \"fill\",\n \"hatch\",\n \"height\",\n \"linestyle\",\n \"linewidth\",\n \"paths\",\n \"xy\",\n \"xydata\",\n \"sizes\",\n \"zorder\",\n]\n\n\ndef assert_artists_equal(list1, list2):\n\n assert len(list1) == len(list2)\n for a1, a2 in zip(list1, list2):\n assert a1.__class__ == a2.__class__\n prop1 = a1.properties()\n prop2 = a2.properties()\n for key in USE_PROPS:\n if key not in prop1:\n continue\n v1 = prop1[key]\n v2 = prop2[key]\n if key == \"paths\":\n for p1, p2 in zip(v1, v2):\n assert_array_equal(p1.vertices, p2.vertices)\n assert_array_equal(p1.codes, p2.codes)\n elif key == \"color\":\n v1 = mpl.colors.to_rgba(v1)\n v2 = mpl.colors.to_rgba(v2)\n assert v1 == v2\n elif isinstance(v1, np.ndarray):\n assert_array_equal(v1, v2)\n else:\n assert v1 == v2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_testing.py_assert_legends_equal_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_testing.py_assert_legends_equal_", "embedding": null, "metadata": {"file_path": "seaborn/_testing.py", "file_name": "_testing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 50, "end_line": 91, "span_ids": ["assert_colors_equal", "assert_plots_equal", "assert_legends_equal"], "tokens": 292}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def assert_legends_equal(leg1, leg2):\n\n assert leg1.get_title().get_text() == leg2.get_title().get_text()\n for t1, t2 in zip(leg1.get_texts(), leg2.get_texts()):\n assert t1.get_text() == t2.get_text()\n\n assert_artists_equal(\n leg1.get_patches(), leg2.get_patches(),\n )\n assert_artists_equal(\n leg1.get_lines(), leg2.get_lines(),\n )\n\n\ndef assert_plots_equal(ax1, ax2, labels=True):\n\n assert_artists_equal(ax1.patches, ax2.patches)\n assert_artists_equal(ax1.lines, ax2.lines)\n assert_artists_equal(ax1.collections, ax2.collections)\n\n if labels:\n assert ax1.get_xlabel() == ax2.get_xlabel()\n assert ax1.get_ylabel() == ax2.get_ylabel()\n\n\ndef assert_colors_equal(a, b, check_alpha=True):\n\n def handle_array(x):\n\n if isinstance(x, np.ndarray):\n if x.ndim > 1:\n x = np.unique(x, axis=0).squeeze()\n if x.ndim > 1:\n raise ValueError(\"Color arrays must be 1 dimensional\")\n return x\n\n a = handle_array(a)\n b = handle_array(b)\n\n f = to_rgba if check_alpha else to_rgb\n assert f(a) == f(b)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/algorithms.py__Algorithms_to_support__bootstrap.return.np_array_boot_dist_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/algorithms.py__Algorithms_to_support__bootstrap.return.np_array_boot_dist_", "embedding": null, "metadata": {"file_path": "seaborn/algorithms.py", "file_name": "algorithms.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 99, "span_ids": ["bootstrap", "docstring", "imports"], "tokens": 749}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Algorithms to support fitting routines in seaborn plotting functions.\"\"\"\nimport numbers\nimport numpy as np\nimport warnings\n\n\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 # 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 rng = _handle_random_seed(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)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/algorithms.py__structured_bootstrap__structured_bootstrap.return.np_array_boot_dist_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/algorithms.py__structured_bootstrap__structured_bootstrap.return.np_array_boot_dist_", "embedding": null, "metadata": {"file_path": "seaborn/algorithms.py", "file_name": "algorithms.py", "file_type": "text/x-python", "category": "implementation", "start_line": 102, "end_line": 118, "span_ids": ["_structured_bootstrap"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _structured_bootstrap(args, n_boot, units, func, func_kwargs, integers):\n \"\"\"Resample units instead of datapoints.\"\"\"\n unique_units = np.unique(units)\n n_units = len(unique_units)\n\n args = [[a[units == unit] for unit in unique_units] for a in args]\n\n boot_dist = []\n for i in range(int(n_boot)):\n resampler = integers(0, n_units, n_units, dtype=np.intp)\n sample = [[a[i] for i in resampler] for a in args]\n lengths = map(len, sample[0])\n resampler = [integers(0, n, n, dtype=np.intp) for n in lengths]\n sample = [[c.take(r, axis=0) for c, r in zip(a, resampler)] for a in sample]\n sample = list(map(np.concatenate, sample))\n boot_dist.append(func(*sample, **func_kwargs))\n return np.array(boot_dist)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/algorithms.py__handle_random_seed_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/algorithms.py__handle_random_seed_", "embedding": null, "metadata": {"file_path": "seaborn/algorithms.py", "file_name": "algorithms.py", "file_type": "text/x-python", "category": "implementation", "start_line": 121, "end_line": 143, "span_ids": ["_handle_random_seed"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _handle_random_seed(seed=None):\n \"\"\"Given a seed in one of many formats, return a random number generator.\n\n Generalizes across the numpy 1.17 changes, preferring newer functionality.\n\n \"\"\"\n if isinstance(seed, np.random.RandomState):\n rng = seed\n else:\n try:\n # General interface for seeding on numpy >= 1.17\n rng = np.random.default_rng(seed)\n except AttributeError:\n # We are on numpy < 1.17, handle options ourselves\n if isinstance(seed, (numbers.Integral, np.integer)):\n rng = np.random.RandomState(seed)\n elif seed is None:\n rng = np.random.RandomState()\n else:\n err = \"{} cannot be used to seed the random number generator\"\n raise ValueError(err.format(seed))\n return rng", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_from___future___import_an__param_docs.DocstringComponents_from_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_from___future___import_an__param_docs.DocstringComponents_from_", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 29, "span_ids": ["impl", "imports"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from __future__ import annotations\nfrom itertools import product\nfrom inspect import signature\nimport warnings\nfrom textwrap import dedent\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\n\nfrom ._oldcore import VectorPlotter, variable_type, categorical_order\nfrom ._compat import share_axis\nfrom . import utils\nfrom .utils import (\n adjust_legend_subtitles, _check_argument, _draw_figure, _disable_autolayout\n)\nfrom .palettes import color_palette, blend_palette\nfrom ._docstrings import (\n DocstringComponents,\n _core_docs,\n)\n\n__all__ = [\"FacetGrid\", \"PairGrid\", \"JointGrid\", \"pairplot\", \"jointplot\"]\n\n\n_param_docs = DocstringComponents.from_nested_components(\n core=_core_docs[\"params\"],\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_Grid.add_legend_Grid.add_legend.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_Grid.add_legend_Grid.add_legend.return.self", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 88, "end_line": 190, "span_ids": ["Grid.add_legend"], "tokens": 820}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Grid(_BaseGrid):\n\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 # 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(l, blank_handle) for l 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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_Grid._update_legend_data_Grid._update_legend_data.ax.legend_.None": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_Grid._update_legend_data_Grid._update_legend_data.ax.legend_.None", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 192, "end_line": 209, "span_ids": ["Grid._update_legend_data"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Grid(_BaseGrid):\n\n def _update_legend_data(self, ax):\n \"\"\"Extract the legend data from an axes object and save it.\"\"\"\n data = {}\n\n # Get data directly from the legend, which is necessary\n # for newer functions that don't add labeled proxy artists\n if ax.legend_ is not None and self._extract_legend_handles:\n handles = ax.legend_.legendHandles\n labels = [t.get_text() for t in ax.legend_.texts]\n data.update({l: h for h, l in zip(handles, labels)})\n\n handles, labels = ax.get_legend_handles_labels()\n data.update({l: h for h, l in zip(handles, labels)})\n\n self._legend_data.update(data)\n\n # Now clear the legend\n ax.legend_ = None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py__facet_docs__facet_docs.dict_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py__facet_docs__facet_docs.dict_", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 250, "end_line": 306, "span_ids": ["impl:5"], "tokens": 503}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "_facet_docs = dict(\n\n data=dedent(\"\"\"\\\n data : DataFrame\n Tidy (\"long-form\") dataframe where each column is a variable and each\n row is an observation.\\\n \"\"\"),\n rowcol=dedent(\"\"\"\\\n row, col : vectors or keys in ``data``\n Variables that define subsets to plot on different facets.\\\n \"\"\"),\n rowcol_order=dedent(\"\"\"\\\n {row,col}_order : vector of strings\n Specify the order in which levels of the ``row`` and/or ``col`` variables\n appear in the grid of subplots.\\\n \"\"\"),\n col_wrap=dedent(\"\"\"\\\n col_wrap : int\n \"Wrap\" the column variable at this width, so that the column facets\n span multiple rows. Incompatible with a ``row`` facet.\\\n \"\"\"),\n share_xy=dedent(\"\"\"\\\n share{x,y} : bool, 'col', or 'row' optional\n If true, the facets will share y axes across columns and/or x axes\n across rows.\\\n \"\"\"),\n height=dedent(\"\"\"\\\n height : scalar\n Height (in inches) of each facet. See also: ``aspect``.\\\n \"\"\"),\n aspect=dedent(\"\"\"\\\n aspect : scalar\n Aspect ratio of each facet, so that ``aspect * height`` gives the width\n of each facet in inches.\\\n \"\"\"),\n palette=dedent(\"\"\"\\\n palette : palette name, list, or dict\n Colors to use for the different levels of the ``hue`` variable. Should\n be something that can be interpreted by :func:`color_palette`, or a\n dictionary mapping hue levels to matplotlib colors.\\\n \"\"\"),\n legend_out=dedent(\"\"\"\\\n legend_out : bool\n If ``True``, the figure size will be extended, and the legend will be\n drawn outside the plot on the center right.\\\n \"\"\"),\n margin_titles=dedent(\"\"\"\\\n margin_titles : bool\n If ``True``, the titles for the row variable are drawn to the right of\n the last column. This option is experimental and may not work in all\n cases.\\\n \"\"\"),\n facet_kws=dedent(\"\"\"\\\n facet_kws : dict\n Additional parameters passed to :class:`FacetGrid`.\n \"\"\"),\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid_FacetGrid.__init__.if_sharey_in_True_row_.for_ax_in_self__not_left_.ax_yaxis_label_set_visibl": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid_FacetGrid.__init__.if_sharey_in_True_row_.for_ax_in_self__not_left_.ax_yaxis_label_set_visibl", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 363, "end_line": 543, "span_ids": ["FacetGrid"], "tokens": 1452}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FacetGrid(Grid):\n \"\"\"Multi-plot grid for plotting conditional relationships.\"\"\"\n\n def __init__(\n self, data, *,\n row=None, col=None, hue=None, col_wrap=None,\n sharex=True, sharey=True, height=3, aspect=1, palette=None,\n row_order=None, col_order=None, hue_order=None, hue_kws=None,\n dropna=False, legend_out=True, despine=True,\n margin_titles=False, xlim=None, ylim=None, subplot_kws=None,\n gridspec_kws=None,\n ):\n\n super().__init__()\n\n # Determine the hue facet layer information\n hue_var = hue\n if hue is None:\n hue_names = None\n else:\n hue_names = categorical_order(data[hue], hue_order)\n\n colors = self._get_palette(data, hue, hue_order, palette)\n\n # Set up the lists of names for the row and column facet variables\n if row is None:\n row_names = []\n else:\n row_names = categorical_order(data[row], row_order)\n\n if col is None:\n col_names = []\n else:\n col_names = categorical_order(data[col], col_order)\n\n # Additional dict of kwarg -> list of values for mapping the hue var\n hue_kws = hue_kws if hue_kws is not None else {}\n\n # Make a boolean mask that is True anywhere there is an NA\n # value in one of the faceting variables, but only if dropna is True\n none_na = np.zeros(len(data), bool)\n if dropna:\n row_na = none_na if row is None else data[row].isnull()\n col_na = none_na if col is None else data[col].isnull()\n hue_na = none_na if hue is None else data[hue].isnull()\n not_na = ~(row_na | col_na | hue_na)\n else:\n not_na = ~none_na\n\n # Compute the grid shape\n ncol = 1 if col is None else len(col_names)\n nrow = 1 if row is None else len(row_names)\n self._n_facets = ncol * nrow\n\n self._col_wrap = col_wrap\n if col_wrap is not None:\n if row is not None:\n err = \"Cannot use `row` and `col_wrap` together.\"\n raise ValueError(err)\n ncol = col_wrap\n nrow = int(np.ceil(len(col_names) / col_wrap))\n self._ncol = ncol\n self._nrow = nrow\n\n # Calculate the base figure size\n # This can get stretched later by a legend\n # TODO this doesn't account for axis labels\n figsize = (ncol * height * aspect, nrow * height)\n\n # Validate some inputs\n if col_wrap is not None:\n margin_titles = False\n\n # Build the subplot keyword dictionary\n subplot_kws = {} if subplot_kws is None else subplot_kws.copy()\n gridspec_kws = {} if gridspec_kws is None else gridspec_kws.copy()\n if xlim is not None:\n subplot_kws[\"xlim\"] = xlim\n if ylim is not None:\n subplot_kws[\"ylim\"] = ylim\n\n # --- Initialize the subplot grid\n\n with _disable_autolayout():\n fig = plt.figure(figsize=figsize)\n\n if col_wrap is None:\n\n kwargs = dict(squeeze=False,\n sharex=sharex, sharey=sharey,\n subplot_kw=subplot_kws,\n gridspec_kw=gridspec_kws)\n\n axes = fig.subplots(nrow, ncol, **kwargs)\n\n if col is None and row is None:\n axes_dict = {}\n elif col is None:\n axes_dict = dict(zip(row_names, axes.flat))\n elif row is None:\n axes_dict = dict(zip(col_names, axes.flat))\n else:\n facet_product = product(row_names, col_names)\n axes_dict = dict(zip(facet_product, axes.flat))\n\n else:\n\n # If wrapping the col variable we need to make the grid ourselves\n if gridspec_kws:\n warnings.warn(\"`gridspec_kws` ignored when using `col_wrap`\")\n\n n_axes = len(col_names)\n axes = np.empty(n_axes, object)\n axes[0] = fig.add_subplot(nrow, ncol, 1, **subplot_kws)\n if sharex:\n subplot_kws[\"sharex\"] = axes[0]\n if sharey:\n subplot_kws[\"sharey\"] = axes[0]\n for i in range(1, n_axes):\n axes[i] = fig.add_subplot(nrow, ncol, i + 1, **subplot_kws)\n\n axes_dict = dict(zip(col_names, axes))\n\n # --- Set up the class attributes\n\n # Attributes that are part of the public API but accessed through\n # a property so that Sphinx adds them to the auto class doc\n self._figure = fig\n self._axes = axes\n self._axes_dict = axes_dict\n self._legend = None\n\n # Public attributes that aren't explicitly documented\n # (It's not obvious that having them be public was a good idea)\n self.data = data\n self.row_names = row_names\n self.col_names = col_names\n self.hue_names = hue_names\n self.hue_kws = hue_kws\n\n # Next the private variables\n self._nrow = nrow\n self._row_var = row\n self._ncol = ncol\n self._col_var = col\n\n self._margin_titles = margin_titles\n self._margin_titles_texts = []\n self._col_wrap = col_wrap\n self._hue_var = hue_var\n self._colors = colors\n self._legend_out = legend_out\n self._legend_data = {}\n self._x_var = None\n self._y_var = None\n self._sharex = sharex\n self._sharey = sharey\n self._dropna = dropna\n self._not_na = not_na\n\n # --- Make the axes look good\n\n self.set_titles()\n self.tight_layout()\n\n if despine:\n self.despine()\n\n if sharex in [True, 'col']:\n for ax in self._not_bottom_axes:\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 if sharey in [True, 'row']:\n for ax in self._not_left_axes:\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)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid.__init__.__doc___FacetGrid.__init__.__doc__.dedent_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid.__init__.__doc___FacetGrid.__init__.__doc__.dedent_", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 499, "end_line": 589, "span_ids": ["FacetGrid"], "tokens": 906}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FacetGrid(Grid):\n\n __init__.__doc__ = dedent(\"\"\"\\\n Initialize the matplotlib figure and FacetGrid object.\n\n This class maps a dataset onto multiple axes arrayed in a grid of rows\n and columns that correspond to *levels* of variables in the dataset.\n The plots it produces are often called \"lattice\", \"trellis\", or\n \"small-multiple\" graphics.\n\n It can also represent levels of a third variable with the ``hue``\n parameter, which plots different subsets of data in different colors.\n This uses color to resolve elements on a third dimension, but only\n draws subsets on top of each other and will not tailor the ``hue``\n parameter for the specific visualization the way that axes-level\n functions that accept ``hue`` will.\n\n The basic workflow is to initialize the :class:`FacetGrid` object with\n the dataset and the variables that are used to structure the grid. Then\n one or more plotting functions can be applied to each subset by calling\n :meth:`FacetGrid.map` or :meth:`FacetGrid.map_dataframe`. Finally, the\n plot can be tweaked with other methods to do things like change the\n axis labels, use different ticks, or add a legend. See the detailed\n code examples below for more information.\n\n .. warning::\n\n When using seaborn functions that infer semantic mappings from a\n dataset, care must be taken to synchronize those mappings across\n facets (e.g., by defining the ``hue`` mapping with a palette dict or\n setting the data type of the variables to ``category``). In most cases,\n it will be better to use a figure-level function (e.g. :func:`relplot`\n or :func:`catplot`) than to use :class:`FacetGrid` directly.\n\n See the :ref:`tutorial ` for more information.\n\n Parameters\n ----------\n {data}\n row, col, hue : strings\n Variables that define subsets of the data, which will be drawn on\n separate facets in the grid. See the ``{{var}}_order`` parameters to\n control the order of levels of this variable.\n {col_wrap}\n {share_xy}\n {height}\n {aspect}\n {palette}\n {{row,col,hue}}_order : lists\n Order for the levels of the faceting variables. By default, this\n will be the order that the levels appear in ``data`` or, if the\n variables are pandas categoricals, the category order.\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 {legend_out}\n despine : boolean\n Remove the top and right spines from the plots.\n {margin_titles}\n {{x, y}}lim: tuples\n Limits for each of the axes on each facet (only relevant when\n share{{x, y}} is True).\n subplot_kws : dict\n Dictionary of keyword arguments passed to matplotlib subplot(s)\n methods.\n gridspec_kws : dict\n Dictionary of keyword arguments passed to\n :class:`matplotlib.gridspec.GridSpec`\n (via :meth:`matplotlib.figure.Figure.subplots`).\n Ignored if ``col_wrap`` is not ``None``.\n\n See Also\n --------\n PairGrid : Subplot grid for plotting pairwise relationships\n relplot : Combine a relational plot and a :class:`FacetGrid`\n displot : Combine a distribution plot and a :class:`FacetGrid`\n catplot : Combine a categorical plot and a :class:`FacetGrid`\n lmplot : Combine a regression plot and a :class:`FacetGrid`\n\n Examples\n --------\n\n .. note::\n\n These examples use seaborn functions to demonstrate some of the\n advanced features of the class, but in most cases you will want\n to use figue-level functions (e.g. :func:`displot`, :func:`relplot`)\n to make the plots shown here.\n\n .. include:: ../docstrings/FacetGrid.rst\n\n \"\"\").format(**_facet_docs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid.facet_data_FacetGrid.facet_data.for_i_row_j_col_.yield_i_j_k_data_ijk": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid.facet_data_FacetGrid.facet_data.for_i_row_j_col_.yield_i_j_k_data_ijk", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 591, "end_line": 629, "span_ids": ["FacetGrid.facet_data"], "tokens": 356}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FacetGrid(Grid):\n\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 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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid.map_FacetGrid.map.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid.map_FacetGrid.map.return.self", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 631, "end_line": 711, "span_ids": ["FacetGrid.map"], "tokens": 672}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FacetGrid(Grid):\n\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 # 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.iteritems()]\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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid.map_dataframe_FacetGrid.map_dataframe.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid.map_dataframe_FacetGrid.map_dataframe.return.self", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 713, "end_line": 782, "span_ids": ["FacetGrid.map_dataframe"], "tokens": 593}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FacetGrid(Grid):\n\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\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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid._facet_color_FacetGrid._facet_plot.self__update_legend_data_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid._facet_color_FacetGrid._facet_plot.self__update_legend_data_", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 784, "end_line": 805, "span_ids": ["FacetGrid._facet_color", "FacetGrid._facet_plot"], "tokens": 176}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FacetGrid(Grid):\n\n def _facet_color(self, hue_index, kw_color):\n\n color = self._colors[hue_index]\n if kw_color is not None:\n return kw_color\n elif color is not None:\n return color\n\n def _facet_plot(self, func, ax, plot_args, plot_kwargs):\n\n # Draw the plot\n if str(func.__module__).startswith(\"seaborn\"):\n plot_kwargs = plot_kwargs.copy()\n semantics = [\"x\", \"y\", \"hue\", \"size\", \"style\"]\n for key, val in zip(semantics, plot_args):\n plot_kwargs[key] = val\n plot_args = []\n plot_kwargs[\"ax\"] = ax\n func(*plot_args, **plot_kwargs)\n\n # Sort out the supporting information\n self._update_legend_data(ax)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid._finalize_grid_FacetGrid.set_ylabels.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid._finalize_grid_FacetGrid.set_ylabels.return.self", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 807, "end_line": 862, "span_ids": ["FacetGrid.set_axis_labels", "FacetGrid._finalize_grid", "FacetGrid.facet_axis", "FacetGrid.set_xlabels", "FacetGrid.set_ylabels", "FacetGrid.despine"], "tokens": 464}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FacetGrid(Grid):\n\n def _finalize_grid(self, axlabels):\n \"\"\"Finalize the annotations and layout.\"\"\"\n self.set_axis_labels(*axlabels)\n self.tight_layout()\n\n def facet_axis(self, row_i, col_j, modify_state=True):\n \"\"\"Make the axis identified by these indices active and return it.\"\"\"\n\n # Calculate the actual indices of the axes to plot on\n if self._col_wrap is not None:\n ax = self.axes.flat[col_j]\n else:\n ax = self.axes[row_i, col_j]\n\n # Get a reference to the axes object we want, and make it active\n if modify_state:\n plt.sca(ax)\n return ax\n\n def despine(self, **kwargs):\n \"\"\"Remove axis spines from the facets.\"\"\"\n utils.despine(self._figure, **kwargs)\n return self\n\n def set_axis_labels(self, x_var=None, y_var=None, clear_inner=True, **kwargs):\n \"\"\"Set axis labels on the left column and bottom row of the grid.\"\"\"\n if x_var is not None:\n self._x_var = x_var\n self.set_xlabels(x_var, clear_inner=clear_inner, **kwargs)\n if y_var is not None:\n self._y_var = y_var\n self.set_ylabels(y_var, clear_inner=clear_inner, **kwargs)\n\n return self\n\n def set_xlabels(self, label=None, clear_inner=True, **kwargs):\n \"\"\"Label the x axis on the bottom row of the grid.\"\"\"\n if label is None:\n label = self._x_var\n for ax in self._bottom_axes:\n ax.set_xlabel(label, **kwargs)\n if clear_inner:\n for ax in self._not_bottom_axes:\n ax.set_xlabel(\"\")\n return self\n\n def set_ylabels(self, label=None, clear_inner=True, **kwargs):\n \"\"\"Label the y axis on the left column of the grid.\"\"\"\n if label is None:\n label = self._y_var\n for ax in self._left_axes:\n ax.set_ylabel(label, **kwargs)\n if clear_inner:\n for ax in self._not_left_axes:\n ax.set_ylabel(\"\")\n return self", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid.set_xticklabels_FacetGrid.set_yticklabels.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid.set_xticklabels_FacetGrid.set_yticklabels.return.self", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 864, "end_line": 890, "span_ids": ["FacetGrid.set_yticklabels", "FacetGrid.set_xticklabels"], "tokens": 257}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FacetGrid(Grid):\n\n def set_xticklabels(self, labels=None, step=None, **kwargs):\n \"\"\"Set x axis tick labels of the grid.\"\"\"\n for ax in self.axes.flat:\n curr_ticks = ax.get_xticks()\n ax.set_xticks(curr_ticks)\n if labels is None:\n curr_labels = [l.get_text() for l in ax.get_xticklabels()]\n if step is not None:\n xticks = ax.get_xticks()[::step]\n curr_labels = curr_labels[::step]\n ax.set_xticks(xticks)\n ax.set_xticklabels(curr_labels, **kwargs)\n else:\n ax.set_xticklabels(labels, **kwargs)\n return self\n\n def set_yticklabels(self, labels=None, **kwargs):\n \"\"\"Set y axis tick labels on the left column of the grid.\"\"\"\n for ax in self.axes.flat:\n curr_ticks = ax.get_yticks()\n ax.set_yticks(curr_ticks)\n if labels is None:\n curr_labels = [l.get_text() for l in ax.get_yticklabels()]\n ax.set_yticklabels(curr_labels, **kwargs)\n else:\n ax.set_yticklabels(labels, **kwargs)\n return self", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid.set_titles_FacetGrid.set_titles.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid.set_titles_FacetGrid.set_titles.return.self", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 892, "end_line": 982, "span_ids": ["FacetGrid.set_titles"], "tokens": 802}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FacetGrid(Grid):\n\n def set_titles(self, template=None, row_template=None, col_template=None,\n **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 row 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 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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid._Properties_that__FacetGrid._Private_properti": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid._Properties_that__FacetGrid._Private_properti", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1016, "end_line": 1045, "span_ids": ["FacetGrid.axes", "FacetGrid.ax", "FacetGrid.axes_dict", "FacetGrid.refline"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FacetGrid(Grid):\n\n # ------ Properties that are part of the public API and documented by Sphinx\n\n @property\n def axes(self):\n \"\"\"An array of the :class:`matplotlib.axes.Axes` objects in the grid.\"\"\"\n return self._axes\n\n @property\n def ax(self):\n \"\"\"The :class:`matplotlib.axes.Axes` when no faceting variables are assigned.\"\"\"\n if self.axes.shape == (1, 1):\n return self.axes[0, 0]\n else:\n err = (\n \"Use the `.axes` attribute when facet variables are assigned.\"\n )\n raise AttributeError(err)\n\n @property\n def axes_dict(self):\n \"\"\"A mapping of facet names to corresponding :class:`matplotlib.axes.Axes`.\n\n If only one of ``row`` or ``col`` is assigned, each key is a string\n representing a level of that variable. If both facet dimensions are\n assigned, each key is a ``({row_level}, {col_level})`` tuple.\n\n \"\"\"\n return self._axes_dict\n\n # ------ Private properties, that require some computation to get", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid._inner_axes_FacetGrid._inner_axes.if_self__col_wrap_is_None.else_.return.np_array_axes_object_fl": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid._inner_axes_FacetGrid._inner_axes.if_self__col_wrap_is_None.else_.return.np_array_axes_object_fl", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1047, "end_line": 1063, "span_ids": ["FacetGrid._inner_axes"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FacetGrid(Grid):\n\n @property\n def _inner_axes(self):\n \"\"\"Return a flat array of the inner axes.\"\"\"\n if self._col_wrap is None:\n return self.axes[:-1, 1:].flat\n else:\n axes = []\n n_empty = self._nrow * self._ncol - self._n_facets\n for i, ax in enumerate(self.axes):\n append = (\n i % self._ncol\n and i < (self._ncol * (self._nrow - 1))\n and i < (self._ncol * (self._nrow - 1) - n_empty)\n )\n if append:\n axes.append(ax)\n return np.array(axes, object).flat", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid._left_axes_FacetGrid._not_left_axes.if_self__col_wrap_is_None.else_.return.np_array_axes_object_fl": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid._left_axes_FacetGrid._not_left_axes.if_self__col_wrap_is_None.else_.return.np_array_axes_object_fl", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1065, "end_line": 1087, "span_ids": ["FacetGrid._left_axes", "FacetGrid._not_left_axes"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FacetGrid(Grid):\n\n @property\n def _left_axes(self):\n \"\"\"Return a flat array of the left column of axes.\"\"\"\n if self._col_wrap is None:\n return self.axes[:, 0].flat\n else:\n axes = []\n for i, ax in enumerate(self.axes):\n if not i % self._ncol:\n axes.append(ax)\n return np.array(axes, object).flat\n\n @property\n def _not_left_axes(self):\n \"\"\"Return a flat array of axes that aren't on the left column.\"\"\"\n if self._col_wrap is None:\n return self.axes[:, 1:].flat\n else:\n axes = []\n for i, ax in enumerate(self.axes):\n if i % self._ncol:\n axes.append(ax)\n return np.array(axes, object).flat", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid._bottom_axes_FacetGrid._bottom_axes.if_self__col_wrap_is_None.else_.return.np_array_axes_object_fl": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid._bottom_axes_FacetGrid._bottom_axes.if_self__col_wrap_is_None.else_.return.np_array_axes_object_fl", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1089, "end_line": 1104, "span_ids": ["FacetGrid._bottom_axes"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FacetGrid(Grid):\n\n @property\n def _bottom_axes(self):\n \"\"\"Return a flat array of the bottom row of axes.\"\"\"\n if self._col_wrap is None:\n return self.axes[-1, :].flat\n else:\n axes = []\n n_empty = self._nrow * self._ncol - self._n_facets\n for i, ax in enumerate(self.axes):\n append = (\n i >= (self._ncol * (self._nrow - 1))\n or i >= (self._ncol * (self._nrow - 1) - n_empty)\n )\n if append:\n axes.append(ax)\n return np.array(axes, object).flat", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid._not_bottom_axes_FacetGrid._not_bottom_axes.if_self__col_wrap_is_None.else_.return.np_array_axes_object_fl": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid._not_bottom_axes_FacetGrid._not_bottom_axes.if_self__col_wrap_is_None.else_.return.np_array_axes_object_fl", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1106, "end_line": 1121, "span_ids": ["FacetGrid._not_bottom_axes"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FacetGrid(Grid):\n\n @property\n def _not_bottom_axes(self):\n \"\"\"Return a flat array of axes that aren't on the bottom row.\"\"\"\n if self._col_wrap is None:\n return self.axes[:-1, :].flat\n else:\n axes = []\n n_empty = self._nrow * self._ncol - self._n_facets\n for i, ax in enumerate(self.axes):\n append = (\n i < (self._ncol * (self._nrow - 1))\n and i < (self._ncol * (self._nrow - 1) - n_empty)\n )\n if append:\n axes.append(ax)\n return np.array(axes, object).flat", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid_PairGrid._Subplot_grid_for_plott": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid_PairGrid._Subplot_grid_for_plott", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1172, "end_line": 1185, "span_ids": ["PairGrid"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PairGrid(Grid):\n \"\"\"Subplot grid for plotting pairwise relationships in a dataset.\n\n This object maps each variable in a dataset onto a column and row in a\n grid of multiple axes. Different axes-level plotting functions can be\n used to draw bivariate plots in the upper and lower triangles, and the\n marginal distribution of each variable can be shown on the diagonal.\n\n Several different common plots can be generated in a single line using\n :func:`pairplot`. Use :class:`PairGrid` when you need more flexibility.\n\n See the :ref:`tutorial ` for more information.\n\n \"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid.__init___PairGrid.__init__.self_tight_layout_pad_lay": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid.__init___PairGrid.__init__.self_tight_layout_pad_lay", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1186, "end_line": 1358, "span_ids": ["PairGrid"], "tokens": 1502}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PairGrid(Grid):\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\n super().__init__()\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)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid.map_PairGrid.map.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid.map_PairGrid.map.return.self", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1320, "end_line": 1335, "span_ids": ["PairGrid.map"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PairGrid(Grid):\n\n def map(self, func, **kwargs):\n \"\"\"Plot with the same function in every subplot.\n\n Parameters\n ----------\n func : callable plotting function\n Must take x, y arrays as positional arguments and draw onto the\n \"currently active\" matplotlib Axes. Also needs to accept kwargs\n called ``color`` and ``label``.\n\n \"\"\"\n row_indices, col_indices = np.indices(self.axes.shape)\n indices = zip(row_indices.flat, col_indices.flat)\n self._map_bivariate(func, indices, **kwargs)\n\n return self", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid.map_lower_PairGrid.map_lower.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid.map_lower_PairGrid.map_lower.return.self", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1337, "end_line": 1350, "span_ids": ["PairGrid.map_lower"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PairGrid(Grid):\n\n def map_lower(self, func, **kwargs):\n \"\"\"Plot with a bivariate function on the lower diagonal subplots.\n\n Parameters\n ----------\n func : callable plotting function\n Must take x, y arrays as positional arguments and draw onto the\n \"currently active\" matplotlib Axes. Also needs to accept kwargs\n called ``color`` and ``label``.\n\n \"\"\"\n indices = zip(*np.tril_indices_from(self.axes, -1))\n self._map_bivariate(func, indices, **kwargs)\n return self", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid.map_upper_PairGrid.map_upper.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid.map_upper_PairGrid.map_upper.return.self", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1352, "end_line": 1365, "span_ids": ["PairGrid.map_upper"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PairGrid(Grid):\n\n def map_upper(self, func, **kwargs):\n \"\"\"Plot with a bivariate function on the upper diagonal subplots.\n\n Parameters\n ----------\n func : callable plotting function\n Must take x, y arrays as positional arguments and draw onto the\n \"currently active\" matplotlib Axes. Also needs to accept kwargs\n called ``color`` and ``label``.\n\n \"\"\"\n indices = zip(*np.triu_indices_from(self.axes, 1))\n self._map_bivariate(func, indices, **kwargs)\n return self", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid.map_offdiag_PairGrid.map_offdiag.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid.map_offdiag_PairGrid.map_offdiag.return.self", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1367, "end_line": 1389, "span_ids": ["PairGrid.map_offdiag"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PairGrid(Grid):\n\n def map_offdiag(self, func, **kwargs):\n \"\"\"Plot with a bivariate function on the off-diagonal subplots.\n\n Parameters\n ----------\n func : callable plotting function\n Must take x, y arrays as positional arguments and draw onto the\n \"currently active\" matplotlib Axes. Also needs to accept kwargs\n called ``color`` and ``label``.\n\n \"\"\"\n if self.square_grid:\n self.map_lower(func, **kwargs)\n if not self._corner:\n self.map_upper(func, **kwargs)\n else:\n indices = []\n for i, (y_var) in enumerate(self.y_vars):\n for j, (x_var) in enumerate(self.x_vars):\n if x_var != y_var:\n indices.append((i, j))\n self._map_bivariate(func, indices, **kwargs)\n return self", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid.map_diag_PairGrid.map_diag.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid.map_diag_PairGrid.map_diag.return.self", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1431, "end_line": 1511, "span_ids": ["PairGrid.map_diag"], "tokens": 616}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PairGrid(Grid):\n\n def map_diag(self, func, **kwargs):\n \"\"\"Plot with a univariate function on each diagonal subplot.\n\n Parameters\n ----------\n func : callable plotting function\n Must take an x array as a positional argument and draw onto the\n \"currently active\" matplotlib Axes. Also needs to accept kwargs\n called ``color`` and ``label``.\n\n \"\"\"\n # Add special diagonal axes for the univariate plot\n if self.diag_axes is None:\n diag_vars = []\n diag_axes = []\n for i, y_var in enumerate(self.y_vars):\n for j, x_var in enumerate(self.x_vars):\n if x_var == y_var:\n\n # Make the density axes\n diag_vars.append(x_var)\n ax = self.axes[i, j]\n diag_ax = ax.twinx()\n diag_ax.set_axis_off()\n diag_axes.append(diag_ax)\n\n # Work around matplotlib bug\n # https://github.com/matplotlib/matplotlib/issues/15188\n if not plt.rcParams.get(\"ytick.left\", True):\n for tick in ax.yaxis.majorTicks:\n tick.tick1line.set_visible(False)\n\n # Remove main y axis from density axes in a corner plot\n if self._corner:\n ax.yaxis.set_visible(False)\n if self._despine:\n utils.despine(ax=ax, left=True)\n # TODO add optional density ticks (on the right)\n # when drawing a corner plot?\n\n if self.diag_sharey and diag_axes:\n for ax in diag_axes[1:]:\n share_axis(diag_axes[0], ax, \"y\")\n\n self.diag_vars = np.array(diag_vars, np.object_)\n self.diag_axes = np.array(diag_axes, np.object_)\n\n if \"hue\" not in signature(func).parameters:\n return self._map_diag_iter_hue(func, **kwargs)\n\n # Loop over diagonal variables and axes, making one plot in each\n for var, ax in zip(self.diag_vars, self.diag_axes):\n\n plot_kwargs = kwargs.copy()\n if str(func.__module__).startswith(\"seaborn\"):\n plot_kwargs[\"ax\"] = ax\n else:\n plt.sca(ax)\n\n vector = self.data[var]\n if self._hue_var is not None:\n hue = self.data[self._hue_var]\n else:\n hue = None\n\n if self._dropna:\n not_na = vector.notna()\n if hue is not None:\n not_na &= hue.notna()\n vector = vector[not_na]\n if hue is not None:\n hue = hue[not_na]\n\n plot_kwargs.setdefault(\"hue\", hue)\n plot_kwargs.setdefault(\"hue_order\", self._hue_order)\n plot_kwargs.setdefault(\"palette\", self._orig_palette)\n func(x=vector, **plot_kwargs)\n ax.legend_ = None\n\n self._add_axis_labels()\n return self", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid._map_diag_iter_hue_PairGrid._map_diag_iter_hue.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid._map_diag_iter_hue_PairGrid._map_diag_iter_hue.return.self", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1476, "end_line": 1513, "span_ids": ["PairGrid._map_diag_iter_hue"], "tokens": 279}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PairGrid(Grid):\n\n def _map_diag_iter_hue(self, func, **kwargs):\n \"\"\"Put marginal plot on each diagonal axes, iterating over hue.\"\"\"\n # Plot on each of the diagonal axes\n fixed_color = kwargs.pop(\"color\", None)\n\n for var, ax in zip(self.diag_vars, self.diag_axes):\n hue_grouped = self.data[var].groupby(self.hue_vals)\n\n plot_kwargs = kwargs.copy()\n if str(func.__module__).startswith(\"seaborn\"):\n plot_kwargs[\"ax\"] = ax\n else:\n plt.sca(ax)\n\n for k, label_k in enumerate(self._hue_order):\n\n # Attempt to get data for this level, allowing for empty\n try:\n data_k = hue_grouped.get_group(label_k)\n except KeyError:\n data_k = pd.Series([], dtype=float)\n\n if fixed_color is None:\n color = self.palette[k]\n else:\n color = fixed_color\n\n if self._dropna:\n data_k = utils.remove_na(data_k)\n\n if str(func.__module__).startswith(\"seaborn\"):\n func(x=data_k, label=label_k, color=color, **plot_kwargs)\n else:\n func(data_k, label=label_k, color=color, **plot_kwargs)\n\n self._add_axis_labels()\n\n return self", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid._map_bivariate_PairGrid._map_bivariate.if_hue_in_signature_fun.self.hue_names.list_self__legend_data_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid._map_bivariate_PairGrid._map_bivariate.if_hue_in_signature_fun.self.hue_names.list_self__legend_data_", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1515, "end_line": 1535, "span_ids": ["PairGrid._map_bivariate"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PairGrid(Grid):\n\n def _map_bivariate(self, func, indices, **kwargs):\n \"\"\"Draw a bivariate plot on the indicated axes.\"\"\"\n # This is a hack to handle the fact that new distribution plots don't add\n # their artists onto the axes. This is probably superior in general, but\n # we'll need a better way to handle it in the axisgrid functions.\n from .distributions import histplot, kdeplot\n if func is histplot or func is kdeplot:\n self._extract_legend_handles = True\n\n kws = kwargs.copy() # Use copy as we insert other kwargs\n for i, j in indices:\n x_var = self.x_vars[j]\n y_var = self.y_vars[i]\n ax = self.axes[i, j]\n if ax is None: # i.e. we are in corner mode\n continue\n self._plot_bivariate(x_var, y_var, ax, func, **kws)\n self._add_axis_labels()\n\n if \"hue\" in signature(func).parameters:\n self.hue_names = list(self._legend_data)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid._plot_bivariate_PairGrid._plot_bivariate.self__update_legend_data_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid._plot_bivariate_PairGrid._plot_bivariate.self__update_legend_data_", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1537, "end_line": 1574, "span_ids": ["PairGrid._plot_bivariate"], "tokens": 290}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PairGrid(Grid):\n\n def _plot_bivariate(self, x_var, y_var, ax, func, **kwargs):\n \"\"\"Draw a bivariate plot on the specified axes.\"\"\"\n if \"hue\" not in signature(func).parameters:\n self._plot_bivariate_iter_hue(x_var, y_var, ax, func, **kwargs)\n return\n\n kwargs = kwargs.copy()\n if str(func.__module__).startswith(\"seaborn\"):\n kwargs[\"ax\"] = ax\n else:\n plt.sca(ax)\n\n if x_var == y_var:\n axes_vars = [x_var]\n else:\n axes_vars = [x_var, y_var]\n\n if self._hue_var is not None and self._hue_var not in axes_vars:\n axes_vars.append(self._hue_var)\n\n data = self.data[axes_vars]\n if self._dropna:\n data = data.dropna()\n\n x = data[x_var]\n y = data[y_var]\n if self._hue_var is None:\n hue = None\n else:\n hue = data.get(self._hue_var)\n\n if \"hue\" not in kwargs:\n kwargs.update({\n \"hue\": hue, \"hue_order\": self._hue_order, \"palette\": self._orig_palette,\n })\n func(x=x, y=y, **kwargs)\n\n self._update_legend_data(ax)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid._plot_bivariate_iter_hue_PairGrid._plot_bivariate_iter_hue.self__update_legend_data_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid._plot_bivariate_iter_hue_PairGrid._plot_bivariate_iter_hue.self__update_legend_data_", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1576, "end_line": 1618, "span_ids": ["PairGrid._plot_bivariate_iter_hue"], "tokens": 327}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PairGrid(Grid):\n\n def _plot_bivariate_iter_hue(self, x_var, y_var, ax, func, **kwargs):\n \"\"\"Draw a bivariate plot while iterating over hue subsets.\"\"\"\n kwargs = kwargs.copy()\n if str(func.__module__).startswith(\"seaborn\"):\n kwargs[\"ax\"] = ax\n else:\n plt.sca(ax)\n\n if x_var == y_var:\n axes_vars = [x_var]\n else:\n axes_vars = [x_var, y_var]\n\n hue_grouped = self.data.groupby(self.hue_vals)\n for k, label_k in enumerate(self._hue_order):\n\n kws = kwargs.copy()\n\n # Attempt to get data for this level, allowing for empty\n try:\n data_k = hue_grouped.get_group(label_k)\n except KeyError:\n data_k = pd.DataFrame(columns=axes_vars,\n dtype=float)\n\n if self._dropna:\n data_k = data_k[axes_vars].dropna()\n\n x = data_k[x_var]\n y = data_k[y_var]\n\n for kw, val_list in self.hue_kws.items():\n kws[kw] = val_list[k]\n kws.setdefault(\"color\", self.palette[k])\n if self._hue_var is not None:\n kws[\"label\"] = label_k\n\n if str(func.__module__).startswith(\"seaborn\"):\n func(x=x, y=y, **kws)\n else:\n func(x, y, **kws)\n\n self._update_legend_data(ax)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid._add_axis_labels_PairGrid._find_numeric_cols.return.numeric_cols": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_PairGrid._add_axis_labels_PairGrid._find_numeric_cols.return.numeric_cols", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1657, "end_line": 1670, "span_ids": ["PairGrid._find_numeric_cols", "PairGrid._add_axis_labels"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PairGrid(Grid):\n\n def _add_axis_labels(self):\n \"\"\"Add labels to the left and bottom Axes.\"\"\"\n for ax, label in zip(self.axes[-1, :], self.x_vars):\n ax.set_xlabel(label)\n for ax, label in zip(self.axes[:, 0], self.y_vars):\n ax.set_ylabel(label)\n\n def _find_numeric_cols(self, data):\n \"\"\"Find which variables in a DataFrame are numeric.\"\"\"\n numeric_cols = []\n for col in data:\n if variable_type(data[col]) == \"numeric\":\n numeric_cols.append(col)\n return numeric_cols", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_JointGrid_JointGrid.__init__.f_subplots_adjust_hspace_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_JointGrid_JointGrid.__init__.f_subplots_adjust_hspace_", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1673, "end_line": 1761, "span_ids": ["JointGrid.__init__.get_var", "JointGrid"], "tokens": 855}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JointGrid(_BaseGrid):\n \"\"\"Grid for drawing a bivariate plot with marginal univariate plots.\n\n Many plots can be drawn by using the figure-level interface :func:`jointplot`.\n Use this class directly when you need more flexibility.\n\n \"\"\"\n\n def __init__(\n self, data=None, *,\n x=None, y=None, hue=None,\n height=6, ratio=5, space=.2,\n palette=None, hue_order=None, hue_norm=None,\n dropna=False, xlim=None, ylim=None, marginal_ticks=False,\n ):\n\n # Set up the subplot grid\n f = plt.figure(figsize=(height, height))\n gs = plt.GridSpec(ratio + 1, ratio + 1)\n\n ax_joint = f.add_subplot(gs[1:, :-1])\n ax_marg_x = f.add_subplot(gs[0, :-1], sharex=ax_joint)\n ax_marg_y = f.add_subplot(gs[1:, -1], sharey=ax_joint)\n\n self._figure = f\n self.ax_joint = ax_joint\n self.ax_marg_x = ax_marg_x\n self.ax_marg_y = ax_marg_y\n\n # Turn off tick visibility for the measure axis on the marginal plots\n plt.setp(ax_marg_x.get_xticklabels(), visible=False)\n plt.setp(ax_marg_y.get_yticklabels(), visible=False)\n plt.setp(ax_marg_x.get_xticklabels(minor=True), visible=False)\n plt.setp(ax_marg_y.get_yticklabels(minor=True), visible=False)\n\n # Turn off the ticks on the density axis for the marginal plots\n if not marginal_ticks:\n plt.setp(ax_marg_x.yaxis.get_majorticklines(), visible=False)\n plt.setp(ax_marg_x.yaxis.get_minorticklines(), visible=False)\n plt.setp(ax_marg_y.xaxis.get_majorticklines(), visible=False)\n plt.setp(ax_marg_y.xaxis.get_minorticklines(), visible=False)\n plt.setp(ax_marg_x.get_yticklabels(), visible=False)\n plt.setp(ax_marg_y.get_xticklabels(), visible=False)\n plt.setp(ax_marg_x.get_yticklabels(minor=True), visible=False)\n plt.setp(ax_marg_y.get_xticklabels(minor=True), visible=False)\n ax_marg_x.yaxis.grid(False)\n ax_marg_y.xaxis.grid(False)\n\n # Process the input variables\n p = VectorPlotter(data=data, variables=dict(x=x, y=y, hue=hue))\n plot_data = p.plot_data.loc[:, p.plot_data.notna().any()]\n\n # Possibly drop NA\n if dropna:\n plot_data = plot_data.dropna()\n\n def get_var(var):\n vector = plot_data.get(var, None)\n if vector is not None:\n vector = vector.rename(p.variables.get(var, None))\n return vector\n\n self.x = get_var(\"x\")\n self.y = get_var(\"y\")\n self.hue = get_var(\"hue\")\n\n for axis in \"xy\":\n name = p.variables.get(axis, None)\n if name is not None:\n getattr(ax_joint, f\"set_{axis}label\")(name)\n\n if xlim is not None:\n ax_joint.set_xlim(xlim)\n if ylim is not None:\n ax_joint.set_ylim(ylim)\n\n # Store the semantic mapping parameters for axes-level functions\n self._hue_params = dict(palette=palette, hue_order=hue_order, hue_norm=hue_norm)\n\n # Make the grid look nice\n utils.despine(f)\n if not marginal_ticks:\n utils.despine(ax=ax_marg_x, left=True)\n utils.despine(ax=ax_marg_y, bottom=True)\n for axes in [ax_marg_x, ax_marg_y]:\n for axis in [axes.xaxis, axes.yaxis]:\n axis.label.set_visible(False)\n f.tight_layout()\n f.subplots_adjust(hspace=space, wspace=space)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_JointGrid._inject_kwargs_JointGrid.plot.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_JointGrid._inject_kwargs_JointGrid.plot.return.self", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1734, "end_line": 1765, "span_ids": ["JointGrid.plot", "JointGrid._inject_kwargs"], "tokens": 256}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JointGrid(_BaseGrid):\n\n def _inject_kwargs(self, func, kws, params):\n \"\"\"Add params to kws if they are accepted by func.\"\"\"\n func_params = signature(func).parameters\n for key, val in params.items():\n if key in func_params:\n kws.setdefault(key, val)\n\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 self.plot_marginals(marginal_func, **kwargs)\n self.plot_joint(joint_func, **kwargs)\n return self", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_JointGrid.plot_joint_JointGrid.plot_joint.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_JointGrid.plot_joint_JointGrid.plot_joint.return.self", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1767, "end_line": 1801, "span_ids": ["JointGrid.plot_joint"], "tokens": 277}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JointGrid(_BaseGrid):\n\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 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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_JointGrid.plot_marginals_JointGrid.plot_marginals.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_JointGrid.plot_marginals_JointGrid.plot_marginals.return.self", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1803, "end_line": 1862, "span_ids": ["JointGrid.plot_marginals"], "tokens": 493}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JointGrid(_BaseGrid):\n\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 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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_JointGrid.refline_JointGrid.refline.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_JointGrid.refline_JointGrid.refline.return.self", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1864, "end_line": 1906, "span_ids": ["JointGrid.refline"], "tokens": 342}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JointGrid(_BaseGrid):\n\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 `\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 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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_JointGrid.set_axis_labels_JointGrid.set_axis_labels.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_JointGrid.set_axis_labels_JointGrid.set_axis_labels.return.self", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1908, "end_line": 1929, "span_ids": ["JointGrid.set_axis_labels"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class JointGrid(_BaseGrid):\n\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 self.ax_joint.set_xlabel(xlabel, **kwargs)\n self.ax_joint.set_ylabel(ylabel, **kwargs)\n return self", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_JointGrid.__init__.__doc___JointGrid.__init__.__doc__._": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_JointGrid.__init__.__doc___JointGrid.__init__.__doc__._", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1932, "end_line": 1973, "span_ids": ["impl:7"], "tokens": 273}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "JointGrid.__init__.__doc__ = \"\"\"\\\nSet up the grid of subplots and store data internally for easy plotting.\n\nParameters\n----------\n{params.core.data}\n{params.core.xy}\nheight : number\n Size of each side of the figure in inches (it will be square).\nratio : number\n Ratio of joint axes height to marginal axes height.\nspace : number\n Space between the joint and marginal axes\ndropna : bool\n If True, remove missing observations before plotting.\n{{x, y}}lim : pairs of numbers\n Set axis limits to these values before plotting.\nmarginal_ticks : bool\n If False, suppress ticks on the count/density axis of the marginal plots.\n{params.core.hue}\n Note: unlike in :class:`FacetGrid` or :class:`PairGrid`, the axes-level\n functions must support ``hue`` to use it in :class:`JointGrid`.\n{params.core.palette}\n{params.core.hue_order}\n{params.core.hue_norm}\n\nSee Also\n--------\n{seealso.jointplot}\n{seealso.pairgrid}\n{seealso.pairplot}\n\nExamples\n--------\n\n.. include:: ../docstrings/JointGrid.rst\n\n\"\"\".format(\n params=_param_docs,\n returns=_core_docs[\"returns\"],\n seealso=_core_docs[\"seealso\"],\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_pairplot_pairplot._Plot_pairwise_relation": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_pairplot_pairplot._Plot_pairwise_relation", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1976, "end_line": 2057, "span_ids": ["pairplot"], "tokens": 804}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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 # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_pairplot._Avoid_circular_import_pairplot.if_diag_kind_is_not_None_.else_.plotter.grid_map": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_pairplot._Avoid_circular_import_pairplot.if_diag_kind_is_not_None_.else_.plotter.grid_map", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2058, "end_line": 2125, "span_ids": ["pairplot"], "tokens": 726}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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 # 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 # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_pairplot.if_kind_scatter__pairplot.return.grid": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_pairplot.if_kind_scatter__pairplot.return.grid", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2127, "end_line": 2147, "span_ids": ["pairplot"], "tokens": 257}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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 # ... other code\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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_jointplot_jointplot._Plot_the_data_using_the": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_jointplot_jointplot._Plot_the_data_using_the", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2179, "end_line": 2251, "span_ids": ["jointplot"], "tokens": 714}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def jointplot(\n data=None, *, x=None, y=None, hue=None, kind=\"scatter\",\n height=6, ratio=5, space=.2, dropna=False, xlim=None, ylim=None,\n color=None, palette=None, hue_order=None, hue_norm=None, marginal_ticks=False,\n joint_kws=None, marginal_kws=None,\n **kwargs\n):\n # Avoid circular imports\n from .relational import scatterplot\n from .regression import regplot, residplot\n from .distributions import histplot, kdeplot, _freedman_diaconis_bins\n\n if kwargs.pop(\"ax\", None) is not None:\n msg = \"Ignoring `ax`; jointplot is a figure-level function.\"\n warnings.warn(msg, UserWarning, stacklevel=2)\n\n # Set up empty default kwarg dicts\n joint_kws = {} if joint_kws is None else joint_kws.copy()\n joint_kws.update(kwargs)\n marginal_kws = {} if marginal_kws is None else marginal_kws.copy()\n\n # Handle deprecations of distplot-specific kwargs\n distplot_keys = [\n \"rug\", \"fit\", \"hist_kws\", \"norm_hist\" \"hist_kws\", \"rug_kws\",\n ]\n unused_keys = []\n for key in distplot_keys:\n if key in marginal_kws:\n unused_keys.append(key)\n marginal_kws.pop(key)\n if unused_keys and kind != \"kde\":\n msg = (\n \"The marginal plotting function has changed to `histplot`,\"\n \" which does not accept the following argument(s): {}.\"\n ).format(\", \".join(unused_keys))\n warnings.warn(msg, UserWarning)\n\n # Validate the plot kind\n plot_kinds = [\"scatter\", \"hist\", \"hex\", \"kde\", \"reg\", \"resid\"]\n _check_argument(\"kind\", plot_kinds, kind)\n\n # Raise early if using `hue` with a kind that does not support it\n if hue is not None and kind in [\"hex\", \"reg\", \"resid\"]:\n msg = (\n f\"Use of `hue` with `kind='{kind}'` is not currently supported.\"\n )\n raise ValueError(msg)\n\n # Make a colormap based off the plot color\n # (Currently used only for kind=\"hex\")\n if color is None:\n color = \"C0\"\n color_rgb = mpl.colors.colorConverter.to_rgb(color)\n colors = [utils.set_hls_values(color_rgb, l=l) # noqa\n for l in np.linspace(1, 0, 12)]\n cmap = blend_palette(colors, as_cmap=True)\n\n # Matplotlib's hexbin plot is not na-robust\n if kind == \"hex\":\n dropna = True\n\n # Initialize the JointGrid object\n grid = JointGrid(\n data=data, x=x, y=y, hue=hue,\n palette=palette, hue_order=hue_order, hue_norm=hue_norm,\n dropna=dropna, height=height, ratio=ratio, space=space,\n xlim=xlim, ylim=ylim, marginal_ticks=marginal_ticks,\n )\n\n if grid.hue is not None:\n marginal_kws.setdefault(\"legend\", False)\n\n # Plot the data using the grid\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_jointplot.if_kind_startswith_scatt_jointplot.return.grid": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_jointplot.if_kind_startswith_scatt_jointplot.return.grid", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2252, "end_line": 2339, "span_ids": ["jointplot"], "tokens": 841}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def jointplot(\n data=None, *, x=None, y=None, hue=None, kind=\"scatter\",\n height=6, ratio=5, space=.2, dropna=False, xlim=None, ylim=None,\n color=None, palette=None, hue_order=None, hue_norm=None, marginal_ticks=False,\n joint_kws=None, marginal_kws=None,\n **kwargs\n):\n # ... other code\n if kind.startswith(\"scatter\"):\n\n joint_kws.setdefault(\"color\", color)\n grid.plot_joint(scatterplot, **joint_kws)\n\n if grid.hue is None:\n marg_func = histplot\n else:\n marg_func = kdeplot\n marginal_kws.setdefault(\"warn_singular\", False)\n marginal_kws.setdefault(\"fill\", True)\n\n marginal_kws.setdefault(\"color\", color)\n grid.plot_marginals(marg_func, **marginal_kws)\n\n elif kind.startswith(\"hist\"):\n\n # TODO process pair parameters for bins, etc. and pass\n # to both joint and marginal plots\n\n joint_kws.setdefault(\"color\", color)\n grid.plot_joint(histplot, **joint_kws)\n\n marginal_kws.setdefault(\"kde\", False)\n marginal_kws.setdefault(\"color\", color)\n\n marg_x_kws = marginal_kws.copy()\n marg_y_kws = marginal_kws.copy()\n\n pair_keys = \"bins\", \"binwidth\", \"binrange\"\n for key in pair_keys:\n if isinstance(joint_kws.get(key), tuple):\n x_val, y_val = joint_kws[key]\n marg_x_kws.setdefault(key, x_val)\n marg_y_kws.setdefault(key, y_val)\n\n histplot(data=data, x=x, hue=hue, **marg_x_kws, ax=grid.ax_marg_x)\n histplot(data=data, y=y, hue=hue, **marg_y_kws, ax=grid.ax_marg_y)\n\n elif kind.startswith(\"kde\"):\n\n joint_kws.setdefault(\"color\", color)\n joint_kws.setdefault(\"warn_singular\", False)\n grid.plot_joint(kdeplot, **joint_kws)\n\n marginal_kws.setdefault(\"color\", color)\n if \"fill\" in joint_kws:\n marginal_kws.setdefault(\"fill\", joint_kws[\"fill\"])\n\n grid.plot_marginals(kdeplot, **marginal_kws)\n\n elif kind.startswith(\"hex\"):\n\n x_bins = min(_freedman_diaconis_bins(grid.x), 50)\n y_bins = min(_freedman_diaconis_bins(grid.y), 50)\n gridsize = int(np.mean([x_bins, y_bins]))\n\n joint_kws.setdefault(\"gridsize\", gridsize)\n joint_kws.setdefault(\"cmap\", cmap)\n grid.plot_joint(plt.hexbin, **joint_kws)\n\n marginal_kws.setdefault(\"kde\", False)\n marginal_kws.setdefault(\"color\", color)\n grid.plot_marginals(histplot, **marginal_kws)\n\n elif kind.startswith(\"reg\"):\n\n marginal_kws.setdefault(\"color\", color)\n marginal_kws.setdefault(\"kde\", True)\n grid.plot_marginals(histplot, **marginal_kws)\n\n joint_kws.setdefault(\"color\", color)\n grid.plot_joint(regplot, **joint_kws)\n\n elif kind.startswith(\"resid\"):\n\n joint_kws.setdefault(\"color\", color)\n grid.plot_joint(residplot, **joint_kws)\n\n x, y = grid.ax_joint.collections[0].get_offsets().T\n marginal_kws.setdefault(\"color\", color)\n histplot(x=x, hue=hue, ax=grid.ax_marg_x, **marginal_kws)\n histplot(y=y, hue=hue, ax=grid.ax_marg_y, **marginal_kws)\n\n # Make the main axes active in the matplotlib state machine\n plt.sca(grid.ax_joint)\n\n return grid", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_jointplot.__doc___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_jointplot.__doc___", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2313, "end_line": 2372, "span_ids": ["impl:9"], "tokens": 413}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "jointplot.__doc__ = \"\"\"\\\nDraw a plot of two variables with bivariate and univariate graphs.\n\nThis function provides a convenient interface to the :class:`JointGrid`\nclass, with several canned plot kinds. This is intended to be a fairly\nlightweight wrapper; if you need more flexibility, you should use\n:class:`JointGrid` directly.\n\nParameters\n----------\n{params.core.data}\n{params.core.xy}\n{params.core.hue}\n Semantic variable that is mapped to determine the color of plot elements.\nkind : {{ \"scatter\" | \"kde\" | \"hist\" | \"hex\" | \"reg\" | \"resid\" }}\n Kind of plot to draw. See the examples for references to the underlying functions.\nheight : numeric\n Size of the figure (it will be square).\nratio : numeric\n Ratio of joint axes height to marginal axes height.\nspace : numeric\n Space between the joint and marginal axes\ndropna : bool\n If True, remove observations that are missing from ``x`` and ``y``.\n{{x, y}}lim : pairs of numbers\n Axis limits to set before plotting.\n{params.core.color}\n{params.core.palette}\n{params.core.hue_order}\n{params.core.hue_norm}\nmarginal_ticks : bool\n If False, suppress ticks on the count/density axis of the marginal plots.\n{{joint, marginal}}_kws : dicts\n Additional keyword arguments for the plot components.\nkwargs\n Additional keyword arguments are passed to the function used to\n draw the plot on the joint Axes, superseding items in the\n ``joint_kws`` dictionary.\n\nReturns\n-------\n{returns.jointgrid}\n\nSee Also\n--------\n{seealso.jointgrid}\n{seealso.pairgrid}\n{seealso.pairplot}\n\nExamples\n--------\n\n.. include:: ../docstrings/jointplot.rst\n\n\"\"\".format(\n params=_param_docs,\n returns=_core_docs[\"returns\"],\n seealso=_core_docs[\"seealso\"],\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_from_textwrap_import_dede___all__._": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_from_textwrap_import_dede___all__._", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 39, "span_ids": ["impl", "impl:2", "imports:9", "imports:10", "impl:7", "imports", "imports:8", "impl:5"], "tokens": 252}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from textwrap import dedent\nfrom numbers import Number\nimport warnings\nfrom colorsys import rgb_to_hls\nfrom functools import partial\n\nimport numpy as np\nimport pandas as pd\ntry:\n from scipy.stats import gaussian_kde\n _no_scipy = False\nexcept ImportError:\n from .external.kde import gaussian_kde\n _no_scipy = True\n\nimport matplotlib as mpl\nfrom matplotlib.collections import PatchCollection\nimport matplotlib.patches as Patches\nimport matplotlib.pyplot as plt\n\nfrom seaborn._oldcore import (\n variable_type,\n infer_orient,\n categorical_order,\n)\nfrom seaborn.relational import _RelationalPlotter\nfrom seaborn import utils\nfrom seaborn.utils import remove_na, _normal_quantile_func, _draw_figure, _default_color\nfrom seaborn._statistics import EstimateAggregator\nfrom seaborn.palettes import color_palette, husl_palette, light_palette, dark_palette\nfrom seaborn.axisgrid import FacetGrid, _facet_docs\n\n\n__all__ = [\n \"catplot\",\n \"stripplot\", \"swarmplot\",\n \"boxplot\", \"violinplot\", \"boxenplot\",\n \"pointplot\", \"barplot\", \"countplot\",\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__Subclassing__Relational__CategoricalPlotterNew.__init__.self_var_levels_self_cat_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__Subclassing__Relational__CategoricalPlotterNew.__init__.self_var_levels_self_cat_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 42, "end_line": 119, "span_ids": ["impl:7", "_CategoricalPlotterNew"], "tokens": 762}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Subclassing _RelationalPlotter for the legend machinery,\n# but probably should move that more centrally\nclass _CategoricalPlotterNew(_RelationalPlotter):\n\n semantics = \"x\", \"y\", \"hue\", \"units\"\n\n wide_structure = {\"x\": \"@columns\", \"y\": \"@values\", \"hue\": \"@columns\"}\n\n # flat_structure = {\"x\": \"@values\", \"y\": \"@values\"}\n flat_structure = {\"y\": \"@values\"}\n\n _legend_func = \"scatter\"\n _legend_attributes = [\"color\"]\n\n def __init__(\n self,\n data=None,\n variables={},\n order=None,\n orient=None,\n require_numeric=False,\n legend=\"auto\",\n ):\n\n super().__init__(data=data, variables=variables)\n\n # This method takes care of some bookkeeping that is necessary because the\n # original categorical plots (prior to the 2021 refactor) had some rules that\n # don't fit exactly into the logic of _core. It may be wise to have a second\n # round of refactoring that moves the logic deeper, but this will keep things\n # relatively sensible for now.\n\n # For wide data, orient determines assignment to x/y differently from the\n # wide_structure rules in _core. If we do decide to make orient part of the\n # _core variable assignment, we'll want to figure out how to express that.\n if self.input_format == \"wide\" and orient == \"h\":\n self.plot_data = self.plot_data.rename(columns={\"x\": \"y\", \"y\": \"x\"})\n orig_variables = set(self.variables)\n orig_x = self.variables.pop(\"x\", None)\n orig_y = self.variables.pop(\"y\", None)\n orig_x_type = self.var_types.pop(\"x\", None)\n orig_y_type = self.var_types.pop(\"y\", None)\n if \"x\" in orig_variables:\n self.variables[\"y\"] = orig_x\n self.var_types[\"y\"] = orig_x_type\n if \"y\" in orig_variables:\n self.variables[\"x\"] = orig_y\n self.var_types[\"x\"] = orig_y_type\n\n # The concept of an \"orientation\" is important to the original categorical\n # plots, but there's no provision for it in _core, so we need to do it here.\n # Note that it could be useful for the other functions in at least two ways\n # (orienting a univariate distribution plot from long-form data and selecting\n # the aggregation axis in lineplot), so we may want to eventually refactor it.\n self.orient = infer_orient(\n x=self.plot_data.get(\"x\", None),\n y=self.plot_data.get(\"y\", None),\n orient=orient,\n require_numeric=require_numeric,\n )\n\n self.legend = legend\n\n # Short-circuit in the case of an empty plot\n if not self.has_xy_data:\n return\n\n # Categorical plots can be \"univariate\" in which case they get an anonymous\n # category label on the opposite axis. Note: this duplicates code in the core\n # scale_categorical function. We need to do it here because of the next line.\n if self.cat_axis not in self.variables:\n self.variables[self.cat_axis] = None\n self.var_types[self.cat_axis] = \"categorical\"\n self.plot_data[self.cat_axis] = \"\"\n\n # Categorical variables have discrete levels that we need to track\n cat_levels = categorical_order(self.plot_data[self.cat_axis], order)\n self.var_levels[self.cat_axis] = cat_levels", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotterNew._hue_backcompat__CategoricalPlotterNew._hue_backcompat.return.palette_hue_order": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotterNew._hue_backcompat__CategoricalPlotterNew._hue_backcompat.return.palette_hue_order", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 121, "end_line": 168, "span_ids": ["_CategoricalPlotterNew._hue_backcompat"], "tokens": 557}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _CategoricalPlotterNew(_RelationalPlotter):\n\n def _hue_backcompat(self, color, palette, hue_order, force_hue=False):\n \"\"\"Implement backwards compatibility for hue parametrization.\n\n Note: the force_hue parameter is used so that functions can be shown to\n pass existing tests during refactoring and then tested for new behavior.\n It can be removed after completion of the work.\n\n \"\"\"\n # The original categorical functions applied a palette to the categorical axis\n # by default. We want to require an explicit hue mapping, to be more consistent\n # with how things work elsewhere now. I don't think there's any good way to\n # do this gently -- because it's triggered by the default value of hue=None,\n # users would always get a warning, unless we introduce some sentinel \"default\"\n # argument for this change. That's possible, but asking users to set `hue=None`\n # on every call is annoying.\n # We are keeping the logic for implementing the old behavior in with the current\n # system so that (a) we can punt on that decision and (b) we can ensure that\n # refactored code passes old tests.\n default_behavior = color is None or palette is not None\n if force_hue and \"hue\" not in self.variables and default_behavior:\n self._redundant_hue = True\n self.plot_data[\"hue\"] = self.plot_data[self.cat_axis]\n self.variables[\"hue\"] = self.variables[self.cat_axis]\n self.var_types[\"hue\"] = \"categorical\"\n hue_order = self.var_levels[self.cat_axis]\n\n # Because we convert the categorical axis variable to string,\n # we need to update a dictionary palette too\n if isinstance(palette, dict):\n palette = {str(k): v for k, v in palette.items()}\n\n else:\n self._redundant_hue = False\n\n # Previously, categorical plots had a trick where color= could seed the palette.\n # Because that's an explicit parameterization, we are going to give it one\n # release cycle with a warning before removing.\n if \"hue\" in self.variables and palette is None and color is not None:\n if not isinstance(color, str):\n color = mpl.colors.to_hex(color)\n palette = f\"dark:{color}\"\n msg = (\n \"Setting a gradient palette using color= is deprecated and will be \"\n f\"removed in version 0.13. Set `palette='{palette}'` for same effect.\"\n )\n warnings.warn(msg, FutureWarning)\n\n return palette, hue_order", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotterNew._palette_without_hue_backcompat__CategoricalPlotterNew._palette_without_hue_backcompat.return.hue_order": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotterNew._palette_without_hue_backcompat__CategoricalPlotterNew._palette_without_hue_backcompat.return.hue_order", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 170, "end_line": 180, "span_ids": ["_CategoricalPlotterNew._palette_without_hue_backcompat"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _CategoricalPlotterNew(_RelationalPlotter):\n\n def _palette_without_hue_backcompat(self, palette, hue_order):\n \"\"\"Provide one cycle where palette= implies hue= when not provided\"\"\"\n if \"hue\" not in self.variables and palette is not None:\n msg = \"Passing `palette` without assigning `hue` is deprecated.\"\n warnings.warn(msg, FutureWarning, stacklevel=3)\n self.legend = False\n self.plot_data[\"hue\"] = self.plot_data[self.cat_axis]\n self.variables[\"hue\"] = self.variables.get(self.cat_axis)\n self.var_types[\"hue\"] = self.var_types.get(self.cat_axis)\n hue_order = self.var_levels.get(self.cat_axis)\n return hue_order", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotterNew.cat_axis__CategoricalPlotterNew._get_gray.return._lum_lum_lum_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotterNew.cat_axis__CategoricalPlotterNew._get_gray.return._lum_lum_lum_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 182, "end_line": 193, "span_ids": ["_CategoricalPlotterNew._get_gray", "_CategoricalPlotterNew.cat_axis"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _CategoricalPlotterNew(_RelationalPlotter):\n\n @property\n def cat_axis(self):\n return {\"v\": \"x\", \"h\": \"y\"}[self.orient]\n\n def _get_gray(self, colors):\n \"\"\"Get a grayscale value that looks good with color.\"\"\"\n if not len(colors):\n return None\n unique_colors = np.unique(colors, axis=0)\n light_vals = [rgb_to_hls(*rgb[:3])[1] for rgb in unique_colors]\n lum = min(light_vals) * .6\n return (lum, lum, lum)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotterNew._adjust_cat_axis__CategoricalPlotterNew._adjust_cat_axis.if_axis_x_.else_.ax_set_ylim_n_5_5_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotterNew._adjust_cat_axis__CategoricalPlotterNew._adjust_cat_axis.if_axis_x_.else_.ax_set_ylim_n_5_5_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 195, "end_line": 224, "span_ids": ["_CategoricalPlotterNew._adjust_cat_axis"], "tokens": 370}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _CategoricalPlotterNew(_RelationalPlotter):\n\n def _adjust_cat_axis(self, ax, axis):\n \"\"\"Set ticks and limits for a categorical variable.\"\"\"\n # Note: in theory, this could happen in _attach for all categorical axes\n # But two reasons not to do that:\n # - If it happens before plotting, autoscaling messes up the plot limits\n # - It would change existing plots from other seaborn functions\n if self.var_types[axis] != \"categorical\":\n return\n\n # If both x/y data are empty, the correct way to set up the plot is\n # somewhat undefined; because we don't add null category data to the plot in\n # this case we don't *have* a categorical axis (yet), so best to just bail.\n if self.plot_data[axis].empty:\n return\n\n # We can infer the total number of categories (including those from previous\n # plots that are not part of the plot we are currently making) from the number\n # of ticks, which matplotlib sets up while doing unit conversion. This feels\n # slightly risky, as if we are relying on something that may be a matplotlib\n # implementation detail. But I cannot think of a better way to keep track of\n # the state from previous categorical calls (see GH2516 for context)\n n = len(getattr(ax, f\"get_{axis}ticks\")())\n\n if axis == \"x\":\n ax.xaxis.grid(False)\n ax.set_xlim(-.5, n - .5, auto=None)\n else:\n ax.yaxis.grid(False)\n # Note limits that correspond to previously-inverted y axis\n ax.set_ylim(n - .5, -.5, auto=None)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotterNew._native_width__CategoricalPlotterNew._with_no_observations": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotterNew._native_width__CategoricalPlotterNew._with_no_observations", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 226, "end_line": 253, "span_ids": ["_CategoricalPlotterNew._native_width", "_CategoricalPlotterNew._nested_offsets"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _CategoricalPlotterNew(_RelationalPlotter):\n\n @property\n def _native_width(self):\n \"\"\"Return unit of width separating categories on native numeric scale.\"\"\"\n unique_values = np.unique(self.comp_data[self.cat_axis])\n if len(unique_values) > 1:\n native_width = np.nanmin(np.diff(unique_values))\n else:\n native_width = 1\n return native_width\n\n def _nested_offsets(self, width, dodge):\n \"\"\"Return offsets for each hue level for dodged plots.\"\"\"\n offsets = None\n if \"hue\" in self.variables:\n n_levels = len(self._hue_map.levels)\n if dodge:\n each_width = width / n_levels\n offsets = np.linspace(0, width - each_width, n_levels)\n offsets -= offsets.mean()\n else:\n offsets = np.zeros(n_levels)\n return offsets\n\n # Note that the plotting methods here aim (in most cases) to produce the\n # exact same artists as the original (pre 0.12) version of the code, so\n # there is some weirdness that might not otherwise be clean or make sense in\n # this context, such as adding empty artists for combinations of variables\n # with no observations", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotterNew.plot_strips__CategoricalPlotterNew.plot_strips.if_show_legend_.if_handles_.ax_legend_title_self_lege": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotterNew.plot_strips__CategoricalPlotterNew.plot_strips.if_show_legend_.if_handles_.ax_legend_title_self_lege", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 255, "end_line": 319, "span_ids": ["_CategoricalPlotterNew.plot_strips"], "tokens": 501}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _CategoricalPlotterNew(_RelationalPlotter):\n\n def plot_strips(\n self,\n jitter,\n dodge,\n color,\n edgecolor,\n plot_kws,\n ):\n\n width = .8 * self._native_width\n offsets = self._nested_offsets(width, dodge)\n\n if jitter is True:\n jlim = 0.1\n else:\n jlim = float(jitter)\n if \"hue\" in self.variables and dodge:\n jlim /= len(self._hue_map.levels)\n jlim *= self._native_width\n jitterer = partial(np.random.uniform, low=-jlim, high=+jlim)\n\n iter_vars = [self.cat_axis]\n if dodge:\n iter_vars.append(\"hue\")\n\n ax = self.ax\n dodge_move = jitter_move = 0\n\n for sub_vars, sub_data in self.iter_data(iter_vars,\n from_comp_data=True,\n allow_empty=True):\n if offsets is not None and (offsets != 0).any():\n dodge_move = offsets[sub_data[\"hue\"].map(self._hue_map.levels.index)]\n\n jitter_move = jitterer(size=len(sub_data)) if len(sub_data) > 1 else 0\n\n adjusted_data = sub_data[self.cat_axis] + dodge_move + jitter_move\n sub_data.loc[:, self.cat_axis] = adjusted_data\n\n for var in \"xy\":\n if self._log_scaled(var):\n sub_data[var] = np.power(10, sub_data[var])\n\n ax = self._get_axes(sub_vars)\n points = ax.scatter(sub_data[\"x\"], sub_data[\"y\"], color=color, **plot_kws)\n\n if \"hue\" in self.variables:\n points.set_facecolors(self._hue_map(sub_data[\"hue\"]))\n\n if edgecolor == \"gray\": # XXX TODO change to \"auto\"\n points.set_edgecolors(self._get_gray(points.get_facecolors()))\n else:\n points.set_edgecolors(edgecolor)\n\n # Finalize the axes details\n if self.legend == \"auto\":\n show_legend = not self._redundant_hue and self.input_format != \"wide\"\n else:\n show_legend = bool(self.legend)\n\n if show_legend:\n self.add_legend_data(ax)\n handles, _ = ax.get_legend_handles_labels()\n if handles:\n ax.legend(title=self.legend_title)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotterNew.plot_swarms__CategoricalFacetPlotter.semantics._CategoricalPlotterNew_se": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotterNew.plot_swarms__CategoricalFacetPlotter.semantics._CategoricalPlotterNew_se", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 321, "end_line": 416, "span_ids": ["_CategoricalPlotterNew.plot_swarms", "_CategoricalFacetPlotter"], "tokens": 720}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _CategoricalPlotterNew(_RelationalPlotter):\n\n def plot_swarms(\n self,\n dodge,\n color,\n edgecolor,\n warn_thresh,\n plot_kws,\n ):\n\n width = .8 * self._native_width\n offsets = self._nested_offsets(width, dodge)\n\n iter_vars = [self.cat_axis]\n if dodge:\n iter_vars.append(\"hue\")\n\n ax = self.ax\n point_collections = {}\n dodge_move = 0\n\n for sub_vars, sub_data in self.iter_data(iter_vars,\n from_comp_data=True,\n allow_empty=True):\n\n if offsets is not None:\n dodge_move = offsets[sub_data[\"hue\"].map(self._hue_map.levels.index)]\n\n if not sub_data.empty:\n sub_data.loc[:, self.cat_axis] = sub_data[self.cat_axis] + dodge_move\n\n for var in \"xy\":\n if self._log_scaled(var):\n sub_data[var] = np.power(10, sub_data[var])\n\n ax = self._get_axes(sub_vars)\n points = ax.scatter(sub_data[\"x\"], sub_data[\"y\"], color=color, **plot_kws)\n\n if \"hue\" in self.variables:\n points.set_facecolors(self._hue_map(sub_data[\"hue\"]))\n\n if edgecolor == \"gray\": # XXX TODO change to \"auto\"\n points.set_edgecolors(self._get_gray(points.get_facecolors()))\n else:\n points.set_edgecolors(edgecolor)\n\n if not sub_data.empty:\n point_collections[(ax, sub_data[self.cat_axis].iloc[0])] = points\n\n beeswarm = Beeswarm(\n width=width, orient=self.orient, warn_thresh=warn_thresh,\n )\n for (ax, center), points in point_collections.items():\n if points.get_offsets().shape[0] > 1:\n\n def draw(points, renderer, *, center=center):\n\n beeswarm(points, center)\n\n if self.orient == \"h\":\n scalex = False\n scaley = ax.get_autoscaley_on()\n else:\n scalex = ax.get_autoscalex_on()\n scaley = False\n\n # This prevents us from undoing the nice categorical axis limits\n # set in _adjust_cat_axis, because that method currently leave\n # the autoscale flag in its original setting. It may be better\n # to disable autoscaling there to avoid needing to do this.\n fixed_scale = self.var_types[self.cat_axis] == \"categorical\"\n ax.update_datalim(points.get_datalim(ax.transData))\n if not fixed_scale and (scalex or scaley):\n ax.autoscale_view(scalex=scalex, scaley=scaley)\n\n super(points.__class__, points).draw(renderer)\n\n points.draw = draw.__get__(points)\n\n _draw_figure(ax.figure)\n\n # Finalize the axes details\n if self.legend == \"auto\":\n show_legend = not self._redundant_hue and self.input_format != \"wide\"\n else:\n show_legend = bool(self.legend)\n\n if show_legend:\n self.add_legend_data(ax)\n handles, _ = ax.get_legend_handles_labels()\n if handles:\n ax.legend(title=self.legend_title)\n\n\nclass _CategoricalFacetPlotter(_CategoricalPlotterNew):\n\n semantics = _CategoricalPlotterNew.semantics + (\"col\", \"row\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotter__CategoricalPlotter.establish_variables.self.plot_units.plot_units": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotter__CategoricalPlotter.establish_variables.self.plot_units.plot_units", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 419, "end_line": 628, "span_ids": ["_CategoricalPlotter.establish_variables", "_CategoricalPlotter"], "tokens": 1386}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _CategoricalPlotter:\n\n width = .8\n default_palette = \"light\"\n require_numeric = True\n\n def establish_variables(self, x=None, y=None, hue=None, data=None,\n orient=None, order=None, hue_order=None,\n units=None):\n \"\"\"Convert input specification into a common representation.\"\"\"\n # Option 1:\n # We are plotting a wide-form dataset\n # -----------------------------------\n if x is None and y is None:\n\n # Do a sanity check on the inputs\n if hue is not None:\n error = \"Cannot use `hue` without `x` and `y`\"\n raise ValueError(error)\n\n # No hue grouping with wide inputs\n plot_hues = None\n hue_title = None\n hue_names = None\n\n # No statistical units with wide inputs\n plot_units = None\n\n # We also won't get a axes labels here\n value_label = None\n group_label = None\n\n # Option 1a:\n # The input data is a Pandas DataFrame\n # ------------------------------------\n\n if isinstance(data, pd.DataFrame):\n\n # Order the data correctly\n if order is None:\n order = []\n # Reduce to just numeric columns\n for col in data:\n if variable_type(data[col]) == \"numeric\":\n order.append(col)\n plot_data = data[order]\n group_names = order\n group_label = data.columns.name\n\n # Convert to a list of arrays, the common representation\n iter_data = plot_data.iteritems()\n plot_data = [np.asarray(s, float) for k, s in iter_data]\n\n # Option 1b:\n # The input data is an array or list\n # ----------------------------------\n\n else:\n\n # We can't reorder the data\n if order is not None:\n error = \"Input data must be a pandas object to reorder\"\n raise ValueError(error)\n\n # The input data is an array\n if hasattr(data, \"shape\"):\n if len(data.shape) == 1:\n if np.isscalar(data[0]):\n plot_data = [data]\n else:\n plot_data = list(data)\n elif len(data.shape) == 2:\n nr, nc = data.shape\n if nr == 1 or nc == 1:\n plot_data = [data.ravel()]\n else:\n plot_data = [data[:, i] for i in range(nc)]\n else:\n error = (\"Input `data` can have no \"\n \"more than 2 dimensions\")\n raise ValueError(error)\n\n # Check if `data` is None to let us bail out here (for testing)\n elif data is None:\n plot_data = [[]]\n\n # The input data is a flat list\n elif np.isscalar(data[0]):\n plot_data = [data]\n\n # The input data is a nested list\n # This will catch some things that might fail later\n # but exhaustive checks are hard\n else:\n plot_data = data\n\n # Convert to a list of arrays, the common representation\n plot_data = [np.asarray(d, float) for d in plot_data]\n\n # The group names will just be numeric indices\n group_names = list(range(len(plot_data)))\n\n # Figure out the plotting orientation\n orient = \"h\" if str(orient).startswith(\"h\") else \"v\"\n\n # Option 2:\n # We are plotting a long-form dataset\n # -----------------------------------\n\n else:\n\n # See if we need to get variables from `data`\n if data is not None:\n x = data.get(x, x)\n y = data.get(y, y)\n hue = data.get(hue, hue)\n units = data.get(units, units)\n\n # Validate the inputs\n for var in [x, y, hue, units]:\n if isinstance(var, str):\n err = f\"Could not interpret input '{var}'\"\n raise ValueError(err)\n\n # Figure out the plotting orientation\n orient = infer_orient(\n x, y, orient, require_numeric=self.require_numeric\n )\n\n # Option 2a:\n # We are plotting a single set of data\n # ------------------------------------\n if x is None or y is None:\n\n # Determine where the data are\n vals = y if x is None else x\n\n # Put them into the common representation\n plot_data = [np.asarray(vals)]\n\n # Get a label for the value axis\n if hasattr(vals, \"name\"):\n value_label = vals.name\n else:\n value_label = None\n\n # This plot will not have group labels or hue nesting\n groups = None\n group_label = None\n group_names = []\n plot_hues = None\n hue_names = None\n hue_title = None\n plot_units = None\n\n # Option 2b:\n # We are grouping the data values by another variable\n # ---------------------------------------------------\n else:\n\n # Determine which role each variable will play\n if orient == \"v\":\n vals, groups = y, x\n else:\n vals, groups = x, y\n\n # Get the categorical axis label\n group_label = None\n if hasattr(groups, \"name\"):\n group_label = groups.name\n\n # Get the order on the categorical axis\n group_names = categorical_order(groups, order)\n\n # Group the numeric data\n plot_data, value_label = self._group_longform(vals, groups,\n group_names)\n\n # Now handle the hue levels for nested ordering\n if hue is None:\n plot_hues = None\n hue_title = None\n hue_names = None\n else:\n\n # Get the order of the hue levels\n hue_names = categorical_order(hue, hue_order)\n\n # Group the hue data\n plot_hues, hue_title = self._group_longform(hue, groups,\n group_names)\n\n # Now handle the units for nested observations\n if units is None:\n plot_units = None\n else:\n plot_units, _ = self._group_longform(units, groups,\n group_names)\n\n # Assign object attributes\n # ------------------------\n self.orient = orient\n self.plot_data = plot_data\n self.group_label = group_label\n self.value_label = value_label\n self.group_names = group_names\n self.plot_hues = plot_hues\n self.hue_title = hue_title\n self.hue_names = hue_names\n self.plot_units = plot_units", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotter._group_longform__CategoricalPlotter._group_longform.return.out_data_label": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotter._group_longform__CategoricalPlotter._group_longform.return.out_data_label", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 630, "end_line": 653, "span_ids": ["_CategoricalPlotter._group_longform"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _CategoricalPlotter:\n\n def _group_longform(self, vals, grouper, order):\n \"\"\"Group a long-form variable by another with correct order.\"\"\"\n # Ensure that the groupby will work\n if not isinstance(vals, pd.Series):\n if isinstance(grouper, pd.Series):\n index = grouper.index\n else:\n index = None\n vals = pd.Series(vals, index=index)\n\n # Group the val data\n grouped_vals = vals.groupby(grouper)\n out_data = []\n for g in order:\n try:\n g_vals = grouped_vals.get_group(g)\n except KeyError:\n g_vals = np.array([])\n out_data.append(g_vals)\n\n # Get the vals axis label\n label = vals.name\n\n return out_data, label", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotter.establish_colors__CategoricalPlotter.establish_colors.self.gray.gray": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotter.establish_colors__CategoricalPlotter.establish_colors.self.gray.gray", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 655, "end_line": 712, "span_ids": ["_CategoricalPlotter.establish_colors"], "tokens": 492}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _CategoricalPlotter:\n\n def establish_colors(self, color, palette, saturation):\n \"\"\"Get a list of colors for the main component of the plots.\"\"\"\n if self.hue_names is None:\n n_colors = len(self.plot_data)\n else:\n n_colors = len(self.hue_names)\n\n # Determine the main colors\n if color is None and palette is None:\n # Determine whether the current palette will have enough values\n # If not, we'll default to the husl palette so each is distinct\n current_palette = utils.get_color_cycle()\n if n_colors <= len(current_palette):\n colors = color_palette(n_colors=n_colors)\n else:\n colors = husl_palette(n_colors, l=.7) # noqa\n\n elif palette is None:\n # When passing a specific color, the interpretation depends\n # on whether there is a hue variable or not.\n # If so, we will make a blend palette so that the different\n # levels have some amount of variation.\n if self.hue_names is None:\n colors = [color] * n_colors\n else:\n if self.default_palette == \"light\":\n colors = light_palette(color, n_colors)\n elif self.default_palette == \"dark\":\n colors = dark_palette(color, n_colors)\n else:\n raise RuntimeError(\"No default palette specified\")\n else:\n\n # Let `palette` be a dict mapping level to color\n if isinstance(palette, dict):\n if self.hue_names is None:\n levels = self.group_names\n else:\n levels = self.hue_names\n palette = [palette[l] for l in levels]\n\n colors = color_palette(palette, n_colors)\n\n # Desaturate a bit because these are patches\n if saturation < 1:\n colors = color_palette(colors, desat=saturation)\n\n # Convert the colors to a common representations\n rgb_colors = color_palette(colors)\n\n # Determine the gray color to use for the lines framing the plot\n light_vals = [rgb_to_hls(*c)[1] for c in rgb_colors]\n lum = min(light_vals) * .6\n gray = mpl.colors.rgb2hex((lum, lum, lum))\n\n # Assign object attributes\n self.colors = rgb_colors\n self.gray = gray", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotter.hue_offsets__CategoricalPlotter.nested_width.return.width": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotter.hue_offsets__CategoricalPlotter.nested_width.return.width", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 714, "end_line": 734, "span_ids": ["_CategoricalPlotter.nested_width", "_CategoricalPlotter.hue_offsets"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _CategoricalPlotter:\n\n @property\n def hue_offsets(self):\n \"\"\"A list of center positions for plots when hue nesting is used.\"\"\"\n n_levels = len(self.hue_names)\n if self.dodge:\n each_width = self.width / n_levels\n offsets = np.linspace(0, self.width - each_width, n_levels)\n offsets -= offsets.mean()\n else:\n offsets = np.zeros(n_levels)\n\n return offsets\n\n @property\n def nested_width(self):\n \"\"\"A float with the width of plot elements when hue nesting is used.\"\"\"\n if self.dodge:\n width = self.width / len(self.hue_names) * .98\n else:\n width = self.width\n return width", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotter.annotate_axes__CategoricalPlotter.add_legend_data.ax_add_patch_rect_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalPlotter.annotate_axes__CategoricalPlotter.add_legend_data.ax_add_patch_rect_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 736, "end_line": 776, "span_ids": ["_CategoricalPlotter.annotate_axes", "_CategoricalPlotter.add_legend_data"], "tokens": 337}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _CategoricalPlotter:\n\n def annotate_axes(self, ax):\n \"\"\"Add descriptive labels to an Axes object.\"\"\"\n if self.orient == \"v\":\n xlabel, ylabel = self.group_label, self.value_label\n else:\n xlabel, ylabel = self.value_label, self.group_label\n\n if xlabel is not None:\n ax.set_xlabel(xlabel)\n if ylabel is not None:\n ax.set_ylabel(ylabel)\n\n group_names = self.group_names\n if not group_names:\n group_names = [\"\" for _ in range(len(self.plot_data))]\n\n if self.orient == \"v\":\n ax.set_xticks(np.arange(len(self.plot_data)))\n ax.set_xticklabels(group_names)\n else:\n ax.set_yticks(np.arange(len(self.plot_data)))\n ax.set_yticklabels(group_names)\n\n if self.orient == \"v\":\n ax.xaxis.grid(False)\n ax.set_xlim(-.5, len(self.plot_data) - .5, auto=None)\n else:\n ax.yaxis.grid(False)\n ax.set_ylim(-.5, len(self.plot_data) - .5, auto=None)\n\n if self.hue_names is not None:\n ax.legend(loc=\"best\", title=self.hue_title)\n\n def add_legend_data(self, ax, color, label):\n \"\"\"Add a dummy patch object so we can get legend data.\"\"\"\n rect = plt.Rectangle([0, 0], 0, 0,\n linewidth=self.linewidth / 2,\n edgecolor=self.gray,\n facecolor=color,\n label=label)\n ax.add_patch(rect)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__BoxPlotter__BoxPlotter.__init__.self.linewidth.linewidth": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__BoxPlotter__BoxPlotter.__init__.self.linewidth.linewidth", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 779, "end_line": 794, "span_ids": ["_BoxPlotter"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _BoxPlotter(_CategoricalPlotter):\n\n def __init__(self, x, y, hue, data, order, hue_order,\n orient, color, palette, saturation,\n width, dodge, fliersize, linewidth):\n\n self.establish_variables(x, y, hue, data, orient, order, hue_order)\n self.establish_colors(color, palette, saturation)\n\n self.dodge = dodge\n self.width = width\n self.fliersize = fliersize\n\n if linewidth is None:\n linewidth = mpl.rcParams[\"lines.linewidth\"]\n self.linewidth = linewidth", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__BoxPlotter.draw_boxplot__BoxPlotter.draw_boxplot.for_i_group_data_in_enum.if_self_plot_hues_is_None.else_.for_j_hue_level_in_enume._Add_legend_data_but_ju": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__BoxPlotter.draw_boxplot__BoxPlotter.draw_boxplot.for_i_group_data_in_enum.if_self_plot_hues_is_None.else_.for_j_hue_level_in_enume._Add_legend_data_but_ju", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 796, "end_line": 856, "span_ids": ["_BoxPlotter.draw_boxplot"], "tokens": 453}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _BoxPlotter(_CategoricalPlotter):\n\n def draw_boxplot(self, ax, kws):\n \"\"\"Use matplotlib to draw a boxplot on an Axes.\"\"\"\n vert = self.orient == \"v\"\n\n props = {}\n for obj in [\"box\", \"whisker\", \"cap\", \"median\", \"flier\"]:\n props[obj] = kws.pop(obj + \"props\", {})\n\n for i, group_data in enumerate(self.plot_data):\n\n if self.plot_hues is None:\n\n # Handle case where there is data at this level\n if group_data.size == 0:\n continue\n\n # Draw a single box or a set of boxes\n # with a single level of grouping\n box_data = np.asarray(remove_na(group_data))\n\n # Handle case where there is no non-null data\n if box_data.size == 0:\n continue\n\n artist_dict = ax.boxplot(box_data,\n vert=vert,\n patch_artist=True,\n positions=[i],\n widths=self.width,\n **kws)\n color = self.colors[i]\n self.restyle_boxplot(artist_dict, color, props)\n else:\n # Draw nested groups of boxes\n offsets = self.hue_offsets\n for j, hue_level in enumerate(self.hue_names):\n\n # Add a legend for this hue level\n if not i:\n self.add_legend_data(ax, self.colors[j], hue_level)\n\n # Handle case where there is data at this level\n if group_data.size == 0:\n continue\n\n hue_mask = self.plot_hues[i] == hue_level\n box_data = np.asarray(remove_na(group_data[hue_mask]))\n\n # Handle case where there is no non-null data\n if box_data.size == 0:\n continue\n\n center = i + offsets[j]\n artist_dict = ax.boxplot(box_data,\n vert=vert,\n patch_artist=True,\n positions=[center],\n widths=self.nested_width,\n **kws)\n self.restyle_boxplot(artist_dict, self.colors[j], props)\n # Add legend data, but just for one set of boxes", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__BoxPlotter.restyle_boxplot__BoxPlotter.plot.if_self_orient_h_.ax_invert_yaxis_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__BoxPlotter.restyle_boxplot__BoxPlotter.plot.if_self_orient_h_.ax_invert_yaxis_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 858, "end_line": 891, "span_ids": ["_BoxPlotter.restyle_boxplot", "_BoxPlotter.plot"], "tokens": 281}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _BoxPlotter(_CategoricalPlotter):\n\n def restyle_boxplot(self, artist_dict, color, props):\n \"\"\"Take a drawn matplotlib boxplot and make it look nice.\"\"\"\n for box in artist_dict[\"boxes\"]:\n box.update(dict(facecolor=color,\n zorder=.9,\n edgecolor=self.gray,\n linewidth=self.linewidth))\n box.update(props[\"box\"])\n for whisk in artist_dict[\"whiskers\"]:\n whisk.update(dict(color=self.gray,\n linewidth=self.linewidth,\n linestyle=\"-\"))\n whisk.update(props[\"whisker\"])\n for cap in artist_dict[\"caps\"]:\n cap.update(dict(color=self.gray,\n linewidth=self.linewidth))\n cap.update(props[\"cap\"])\n for med in artist_dict[\"medians\"]:\n med.update(dict(color=self.gray,\n linewidth=self.linewidth))\n med.update(props[\"median\"])\n for fly in artist_dict[\"fliers\"]:\n fly.update(dict(markerfacecolor=self.gray,\n marker=\"d\",\n markeredgecolor=self.gray,\n markersize=self.fliersize))\n fly.update(props[\"flier\"])\n\n def plot(self, ax, boxplot_kws):\n \"\"\"Make the plot.\"\"\"\n self.draw_boxplot(ax, boxplot_kws)\n self.annotate_axes(ax)\n if self.orient == \"h\":\n ax.invert_yaxis()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter__ViolinPlotter.__init__.self.linewidth.linewidth": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter__ViolinPlotter.__init__.self.linewidth.linewidth", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 894, "end_line": 925, "span_ids": ["_ViolinPlotter"], "tokens": 273}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _ViolinPlotter(_CategoricalPlotter):\n\n def __init__(self, x, y, hue, data, order, hue_order,\n bw, cut, scale, scale_hue, gridsize,\n width, inner, split, dodge, orient, linewidth,\n color, palette, saturation):\n\n self.establish_variables(x, y, hue, data, orient, order, hue_order)\n self.establish_colors(color, palette, saturation)\n self.estimate_densities(bw, cut, scale, scale_hue, gridsize)\n\n self.gridsize = gridsize\n self.width = width\n self.dodge = dodge\n\n if inner is not None:\n if not any([inner.startswith(\"quart\"),\n inner.startswith(\"box\"),\n inner.startswith(\"stick\"),\n inner.startswith(\"point\")]):\n err = f\"Inner style '{inner}' not recognized\"\n raise ValueError(err)\n self.inner = inner\n\n if split and self.hue_names is not None and len(self.hue_names) != 2:\n msg = \"There must be exactly two hue levels to use `split`.'\"\n raise ValueError(msg)\n self.split = split\n\n if linewidth is None:\n linewidth = mpl.rcParams[\"lines.linewidth\"]\n self.linewidth = linewidth", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.estimate_densities__ViolinPlotter.estimate_densities._Scale_the_height_of_the": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.estimate_densities__ViolinPlotter.estimate_densities._Scale_the_height_of_the", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 927, "end_line": 1031, "span_ids": ["_ViolinPlotter.estimate_densities"], "tokens": 867}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _ViolinPlotter(_CategoricalPlotter):\n\n def estimate_densities(self, bw, cut, scale, scale_hue, gridsize):\n \"\"\"Find the support and density for all of the data.\"\"\"\n # Initialize data structures to keep track of plotting data\n if self.hue_names is None:\n support = []\n density = []\n counts = np.zeros(len(self.plot_data))\n max_density = np.zeros(len(self.plot_data))\n else:\n support = [[] for _ in self.plot_data]\n density = [[] for _ in self.plot_data]\n size = len(self.group_names), len(self.hue_names)\n counts = np.zeros(size)\n max_density = np.zeros(size)\n\n for i, group_data in enumerate(self.plot_data):\n\n # Option 1: we have a single level of grouping\n # --------------------------------------------\n\n if self.plot_hues is None:\n\n # Strip missing datapoints\n kde_data = remove_na(group_data)\n\n # Handle special case of no data at this level\n if kde_data.size == 0:\n support.append(np.array([]))\n density.append(np.array([1.]))\n counts[i] = 0\n max_density[i] = 0\n continue\n\n # Handle special case of a single unique datapoint\n elif np.unique(kde_data).size == 1:\n support.append(np.unique(kde_data))\n density.append(np.array([1.]))\n counts[i] = 1\n max_density[i] = 0\n continue\n\n # Fit the KDE and get the used bandwidth size\n kde, bw_used = self.fit_kde(kde_data, bw)\n\n # Determine the support grid and get the density over it\n support_i = self.kde_support(kde_data, bw_used, cut, gridsize)\n density_i = kde.evaluate(support_i)\n\n # Update the data structures with these results\n support.append(support_i)\n density.append(density_i)\n counts[i] = kde_data.size\n max_density[i] = density_i.max()\n\n # Option 2: we have nested grouping by a hue variable\n # ---------------------------------------------------\n\n else:\n for j, hue_level in enumerate(self.hue_names):\n\n # Handle special case of no data at this category level\n if not group_data.size:\n support[i].append(np.array([]))\n density[i].append(np.array([1.]))\n counts[i, j] = 0\n max_density[i, j] = 0\n continue\n\n # Select out the observations for this hue level\n hue_mask = self.plot_hues[i] == hue_level\n\n # Strip missing datapoints\n kde_data = remove_na(group_data[hue_mask])\n\n # Handle special case of no data at this level\n if kde_data.size == 0:\n support[i].append(np.array([]))\n density[i].append(np.array([1.]))\n counts[i, j] = 0\n max_density[i, j] = 0\n continue\n\n # Handle special case of a single unique datapoint\n elif np.unique(kde_data).size == 1:\n support[i].append(np.unique(kde_data))\n density[i].append(np.array([1.]))\n counts[i, j] = 1\n max_density[i, j] = 0\n continue\n\n # Fit the KDE and get the used bandwidth size\n kde, bw_used = self.fit_kde(kde_data, bw)\n\n # Determine the support grid and get the density over it\n support_ij = self.kde_support(kde_data, bw_used,\n cut, gridsize)\n density_ij = kde.evaluate(support_ij)\n\n # Update the data structures with these results\n support[i].append(support_ij)\n density[i].append(density_ij)\n counts[i, j] = kde_data.size\n max_density[i, j] = density_ij.max()\n\n # Scale the height of the density curve.\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.estimate_densities._For_a_violinplot_the_de__ViolinPlotter.estimate_densities.self.density.density": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.estimate_densities._For_a_violinplot_the_de__ViolinPlotter.estimate_densities.self.density.density", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1032, "end_line": 1050, "span_ids": ["_ViolinPlotter.estimate_densities"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _ViolinPlotter(_CategoricalPlotter):\n\n def estimate_densities(self, bw, cut, scale, scale_hue, gridsize):\n # For a violinplot the density is non-quantitative.\n # The objective here is to scale the curves relative to 1 so that\n # they can be multiplied by the width parameter during plotting.\n\n if scale == \"area\":\n self.scale_area(density, max_density, scale_hue)\n\n elif scale == \"width\":\n self.scale_width(density)\n\n elif scale == \"count\":\n self.scale_count(density, counts, scale_hue)\n\n else:\n raise ValueError(f\"scale method '{scale}' not recognized\")\n\n # Set object attributes that will be used while plotting\n self.support = support\n self.density = density", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.fit_kde__ViolinPlotter.kde_support.return.np_linspace_support_min_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.fit_kde__ViolinPlotter.kde_support.return.np_linspace_support_min_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1052, "end_line": 1071, "span_ids": ["_ViolinPlotter.fit_kde", "_ViolinPlotter.kde_support"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _ViolinPlotter(_CategoricalPlotter):\n\n def fit_kde(self, x, bw):\n \"\"\"Estimate a KDE for a vector of data with flexible bandwidth.\"\"\"\n kde = gaussian_kde(x, bw)\n\n # Extract the numeric bandwidth from the KDE object\n bw_used = kde.factor\n\n # At this point, bw will be a numeric scale factor.\n # To get the actual bandwidth of the kernel, we multiple by the\n # unbiased standard deviation of the data, which we will use\n # elsewhere to compute the range of the support.\n bw_used = bw_used * x.std(ddof=1)\n\n return kde, bw_used\n\n def kde_support(self, x, bw, cut, gridsize):\n \"\"\"Define a grid of support for the violin.\"\"\"\n support_min = x.min() - bw * cut\n support_max = x.max() + bw * cut\n return np.linspace(support_min, support_max, gridsize)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.scale_area__ViolinPlotter.scale_width.if_self_hue_names_is_None.else_.for_group_in_density_.for_d_in_group_.d_d_max_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.scale_area__ViolinPlotter.scale_width.if_self_hue_names_is_None.else_.for_group_in_density_.for_d_in_group_.d_d_max_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1073, "end_line": 1103, "span_ids": ["_ViolinPlotter.scale_area", "_ViolinPlotter.scale_width"], "tokens": 225}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _ViolinPlotter(_CategoricalPlotter):\n\n def scale_area(self, density, max_density, scale_hue):\n \"\"\"Scale the relative area under the KDE curve.\n\n This essentially preserves the \"standard\" KDE scaling, but the\n resulting maximum density will be 1 so that the curve can be\n properly multiplied by the violin width.\n\n \"\"\"\n if self.hue_names is None:\n for d in density:\n if d.size > 1:\n d /= max_density.max()\n else:\n for i, group in enumerate(density):\n for d in group:\n if scale_hue:\n max = max_density[i].max()\n else:\n max = max_density.max()\n if d.size > 1:\n d /= max\n\n def scale_width(self, density):\n \"\"\"Scale each density curve to the same height.\"\"\"\n if self.hue_names is None:\n for d in density:\n d /= d.max()\n else:\n for group in density:\n for d in group:\n d /= d.max()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.scale_count__ViolinPlotter.dwidth.if_self_hue_names_is_None.else_.return.self_width_2_len_sel": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.scale_count__ViolinPlotter.dwidth.if_self_hue_names_is_None.else_.return.self_width_2_len_sel", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1105, "end_line": 1136, "span_ids": ["_ViolinPlotter.scale_count", "_ViolinPlotter.dwidth"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _ViolinPlotter(_CategoricalPlotter):\n\n def scale_count(self, density, counts, scale_hue):\n \"\"\"Scale each density curve by the number of observations.\"\"\"\n if self.hue_names is None:\n if counts.max() == 0:\n d = 0\n else:\n for count, d in zip(counts, density):\n d /= d.max()\n d *= count / counts.max()\n else:\n for i, group in enumerate(density):\n for j, d in enumerate(group):\n if counts[i].max() == 0:\n d = 0\n else:\n count = counts[i, j]\n if scale_hue:\n scaler = count / counts[i].max()\n else:\n scaler = count / counts.max()\n d /= d.max()\n d *= scaler\n\n @property\n def dwidth(self):\n\n if self.hue_names is None or not self.dodge:\n return self.width / 2\n elif self.split:\n return self.width / 2\n else:\n return self.width / (2 * len(self.hue_names))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.draw_violins__ViolinPlotter.draw_violins.for_i_group_data_in_enum.if_self_plot_hues_is_None.else_.for_j_hue_level_in_enume.if_self_split_.else_.if_self_inner_startswith_.None_2.self_draw_points_ax_viol": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.draw_violins__ViolinPlotter.draw_violins.for_i_group_data_in_enum.if_self_plot_hues_is_None.else_.for_j_hue_level_in_enume.if_self_split_.else_.if_self_inner_startswith_.None_2.self_draw_points_ax_viol", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1138, "end_line": 1311, "span_ids": ["_ViolinPlotter.draw_violins"], "tokens": 1218}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _ViolinPlotter(_CategoricalPlotter):\n\n def draw_violins(self, ax):\n \"\"\"Draw the violins onto `ax`.\"\"\"\n fill_func = ax.fill_betweenx if self.orient == \"v\" else ax.fill_between\n for i, group_data in enumerate(self.plot_data):\n\n kws = dict(edgecolor=self.gray, linewidth=self.linewidth)\n\n # Option 1: we have a single level of grouping\n # --------------------------------------------\n\n if self.plot_hues is None:\n\n support, density = self.support[i], self.density[i]\n\n # Handle special case of no observations in this bin\n if support.size == 0:\n continue\n\n # Handle special case of a single observation\n elif support.size == 1:\n val = support.item()\n d = density.item()\n self.draw_single_observation(ax, i, val, d)\n continue\n\n # Draw the violin for this group\n grid = np.ones(self.gridsize) * i\n fill_func(support,\n grid - density * self.dwidth,\n grid + density * self.dwidth,\n facecolor=self.colors[i],\n **kws)\n\n # Draw the interior representation of the data\n if self.inner is None:\n continue\n\n # Get a nan-free vector of datapoints\n violin_data = remove_na(group_data)\n\n # Draw box and whisker information\n if self.inner.startswith(\"box\"):\n self.draw_box_lines(ax, violin_data, i)\n\n # Draw quartile lines\n elif self.inner.startswith(\"quart\"):\n self.draw_quartiles(ax, violin_data, support, density, i)\n\n # Draw stick observations\n elif self.inner.startswith(\"stick\"):\n self.draw_stick_lines(ax, violin_data, support, density, i)\n\n # Draw point observations\n elif self.inner.startswith(\"point\"):\n self.draw_points(ax, violin_data, i)\n\n # Option 2: we have nested grouping by a hue variable\n # ---------------------------------------------------\n\n else:\n offsets = self.hue_offsets\n for j, hue_level in enumerate(self.hue_names):\n\n support, density = self.support[i][j], self.density[i][j]\n kws[\"facecolor\"] = self.colors[j]\n\n # Add legend data, but just for one set of violins\n if not i:\n self.add_legend_data(ax, self.colors[j], hue_level)\n\n # Handle the special case where we have no observations\n if support.size == 0:\n continue\n\n # Handle the special case where we have one observation\n elif support.size == 1:\n val = support.item()\n d = density.item()\n if self.split:\n d = d / 2\n at_group = i + offsets[j]\n self.draw_single_observation(ax, at_group, val, d)\n continue\n\n # Option 2a: we are drawing a single split violin\n # -----------------------------------------------\n\n if self.split:\n\n grid = np.ones(self.gridsize) * i\n if j:\n fill_func(support,\n grid,\n grid + density * self.dwidth,\n **kws)\n else:\n fill_func(support,\n grid - density * self.dwidth,\n grid,\n **kws)\n\n # Draw the interior representation of the data\n if self.inner is None:\n continue\n\n # Get a nan-free vector of datapoints\n hue_mask = self.plot_hues[i] == hue_level\n violin_data = remove_na(group_data[hue_mask])\n\n # Draw quartile lines\n if self.inner.startswith(\"quart\"):\n self.draw_quartiles(ax, violin_data,\n support, density, i,\n [\"left\", \"right\"][j])\n\n # Draw stick observations\n elif self.inner.startswith(\"stick\"):\n self.draw_stick_lines(ax, violin_data,\n support, density, i,\n [\"left\", \"right\"][j])\n\n # The box and point interior plots are drawn for\n # all data at the group level, so we just do that once\n if j and any(self.plot_hues[0] == hue_level):\n continue\n\n # Get the whole vector for this group level\n violin_data = remove_na(group_data)\n\n # Draw box and whisker information\n if self.inner.startswith(\"box\"):\n self.draw_box_lines(ax, violin_data, i)\n\n # Draw point observations\n elif self.inner.startswith(\"point\"):\n self.draw_points(ax, violin_data, i)\n\n # Option 2b: we are drawing full nested violins\n # -----------------------------------------------\n\n else:\n grid = np.ones(self.gridsize) * (i + offsets[j])\n fill_func(support,\n grid - density * self.dwidth,\n grid + density * self.dwidth,\n **kws)\n\n # Draw the interior representation\n if self.inner is None:\n continue\n\n # Get a nan-free vector of datapoints\n hue_mask = self.plot_hues[i] == hue_level\n violin_data = remove_na(group_data[hue_mask])\n\n # Draw box and whisker information\n if self.inner.startswith(\"box\"):\n self.draw_box_lines(ax, violin_data, i + offsets[j])\n\n # Draw quartile lines\n elif self.inner.startswith(\"quart\"):\n self.draw_quartiles(ax, violin_data,\n support, density,\n i + offsets[j])\n\n # Draw stick observations\n elif self.inner.startswith(\"stick\"):\n self.draw_stick_lines(ax, violin_data,\n support, density,\n i + offsets[j])\n\n # Draw point observations\n elif self.inner.startswith(\"point\"):\n self.draw_points(ax, violin_data, i + offsets[j])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.draw_single_observation__ViolinPlotter.draw_single_observation.if_self_orient_v_.else_.ax_plot_at_quant_at_qua": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.draw_single_observation__ViolinPlotter.draw_single_observation.if_self_orient_v_.else_.ax_plot_at_quant_at_qua", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1313, "end_line": 1325, "span_ids": ["_ViolinPlotter.draw_single_observation"], "tokens": 133}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _ViolinPlotter(_CategoricalPlotter):\n\n def draw_single_observation(self, ax, at_group, at_quant, density):\n \"\"\"Draw a line to mark a single observation.\"\"\"\n d_width = density * self.dwidth\n if self.orient == \"v\":\n ax.plot([at_group - d_width, at_group + d_width],\n [at_quant, at_quant],\n color=self.gray,\n linewidth=self.linewidth)\n else:\n ax.plot([at_quant, at_quant],\n [at_group - d_width, at_group + d_width],\n color=self.gray,\n linewidth=self.linewidth)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.draw_box_lines__ViolinPlotter.draw_box_lines.if_self_orient_v_.else_.ax_scatter_q50_center_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.draw_box_lines__ViolinPlotter.draw_box_lines.if_self_orient_v_.else_.ax_scatter_q50_center_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1327, "end_line": 1359, "span_ids": ["_ViolinPlotter.draw_box_lines"], "tokens": 326}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _ViolinPlotter(_CategoricalPlotter):\n\n def draw_box_lines(self, ax, data, center):\n \"\"\"Draw boxplot information at center of the density.\"\"\"\n # Compute the boxplot statistics\n q25, q50, q75 = np.percentile(data, [25, 50, 75])\n whisker_lim = 1.5 * (q75 - q25)\n h1 = np.min(data[data >= (q25 - whisker_lim)])\n h2 = np.max(data[data <= (q75 + whisker_lim)])\n\n # Draw a boxplot using lines and a point\n if self.orient == \"v\":\n ax.plot([center, center], [h1, h2],\n linewidth=self.linewidth,\n color=self.gray)\n ax.plot([center, center], [q25, q75],\n linewidth=self.linewidth * 3,\n color=self.gray)\n ax.scatter(center, q50,\n zorder=3,\n color=\"white\",\n edgecolor=self.gray,\n s=np.square(self.linewidth * 2))\n else:\n ax.plot([h1, h2], [center, center],\n linewidth=self.linewidth,\n color=self.gray)\n ax.plot([q25, q75], [center, center],\n linewidth=self.linewidth * 3,\n color=self.gray)\n ax.scatter(q50, center,\n zorder=3,\n color=\"white\",\n edgecolor=self.gray,\n s=np.square(self.linewidth * 2))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.draw_quartiles__ViolinPlotter.draw_quartiles.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.draw_quartiles__ViolinPlotter.draw_quartiles.None_2", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1361, "end_line": 1373, "span_ids": ["_ViolinPlotter.draw_quartiles"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _ViolinPlotter(_CategoricalPlotter):\n\n def draw_quartiles(self, ax, data, support, density, center, split=False):\n \"\"\"Draw the quartiles as lines at width of density.\"\"\"\n q25, q50, q75 = np.percentile(data, [25, 50, 75])\n\n self.draw_to_density(ax, center, q25, support, density, split,\n linewidth=self.linewidth,\n dashes=[self.linewidth * 1.5] * 2)\n self.draw_to_density(ax, center, q50, support, density, split,\n linewidth=self.linewidth,\n dashes=[self.linewidth * 3] * 2)\n self.draw_to_density(ax, center, q75, support, density, split,\n linewidth=self.linewidth,\n dashes=[self.linewidth * 1.5] * 2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.draw_points__ViolinPlotter.draw_stick_lines.for_val_in_data_.self_draw_to_density_ax_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.draw_points__ViolinPlotter.draw_stick_lines.for_val_in_data_.self_draw_to_density_ax_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1375, "end_line": 1393, "span_ids": ["_ViolinPlotter.draw_points", "_ViolinPlotter.draw_stick_lines"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _ViolinPlotter(_CategoricalPlotter):\n\n def draw_points(self, ax, data, center):\n \"\"\"Draw individual observations as points at middle of the violin.\"\"\"\n kws = dict(s=np.square(self.linewidth * 2),\n color=self.gray,\n edgecolor=self.gray)\n\n grid = np.ones(len(data)) * center\n\n if self.orient == \"v\":\n ax.scatter(grid, data, **kws)\n else:\n ax.scatter(data, grid, **kws)\n\n def draw_stick_lines(self, ax, data, support, density,\n center, split=False):\n \"\"\"Draw individual observations as sticks at width of density.\"\"\"\n for val in data:\n self.draw_to_density(ax, center, val, support, density, split,\n linewidth=self.linewidth * .5)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.draw_to_density__ViolinPlotter.plot.if_self_orient_h_.ax_invert_yaxis_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__ViolinPlotter.draw_to_density__ViolinPlotter.plot.if_self_orient_h_.ax_invert_yaxis_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1395, "end_line": 1422, "span_ids": ["_ViolinPlotter.plot", "_ViolinPlotter.draw_to_density"], "tokens": 295}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _ViolinPlotter(_CategoricalPlotter):\n\n def draw_to_density(self, ax, center, val, support, density, split, **kws):\n \"\"\"Draw a line orthogonal to the value axis at width of density.\"\"\"\n idx = np.argmin(np.abs(support - val))\n width = self.dwidth * density[idx] * .99\n\n kws[\"color\"] = self.gray\n\n if self.orient == \"v\":\n if split == \"left\":\n ax.plot([center - width, center], [val, val], **kws)\n elif split == \"right\":\n ax.plot([center, center + width], [val, val], **kws)\n else:\n ax.plot([center - width, center + width], [val, val], **kws)\n else:\n if split == \"left\":\n ax.plot([val, val], [center - width, center], **kws)\n elif split == \"right\":\n ax.plot([val, val], [center, center + width], **kws)\n else:\n ax.plot([val, val], [center - width, center + width], **kws)\n\n def plot(self, ax):\n \"\"\"Make the violin plot.\"\"\"\n self.draw_violins(ax)\n self.annotate_axes(ax)\n if self.orient == \"h\":\n ax.invert_yaxis()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalStatPlotter__CategoricalStatPlotter.estimate_statistic.self.confint.np_array_confint_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalStatPlotter__CategoricalStatPlotter.estimate_statistic.self.confint.np_array_confint_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1425, "end_line": 1492, "span_ids": ["_CategoricalStatPlotter", "_CategoricalStatPlotter.estimate_statistic", "_CategoricalStatPlotter.nested_width"], "tokens": 490}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _CategoricalStatPlotter(_CategoricalPlotter):\n\n require_numeric = True\n\n @property\n def nested_width(self):\n \"\"\"A float with the width of plot elements when hue nesting is used.\"\"\"\n if self.dodge:\n width = self.width / len(self.hue_names)\n else:\n width = self.width\n return width\n\n def estimate_statistic(self, estimator, errorbar, n_boot, seed):\n\n if self.hue_names is None:\n statistic = []\n confint = []\n else:\n statistic = [[] for _ in self.plot_data]\n confint = [[] for _ in self.plot_data]\n\n var = {\"v\": \"y\", \"h\": \"x\"}[self.orient]\n\n agg = EstimateAggregator(estimator, errorbar, n_boot=n_boot, seed=seed)\n\n for i, group_data in enumerate(self.plot_data):\n\n # Option 1: we have a single layer of grouping\n # --------------------------------------------\n if self.plot_hues is None:\n\n df = pd.DataFrame({var: group_data})\n if self.plot_units is not None:\n df[\"units\"] = self.plot_units[i]\n\n res = agg(df, var)\n\n statistic.append(res[var])\n if errorbar is not None:\n confint.append((res[f\"{var}min\"], res[f\"{var}max\"]))\n\n # Option 2: we are grouping by a hue layer\n # ----------------------------------------\n\n else:\n for hue_level in self.hue_names:\n\n if not self.plot_hues[i].size:\n statistic[i].append(np.nan)\n if errorbar is not None:\n confint[i].append((np.nan, np.nan))\n continue\n\n hue_mask = self.plot_hues[i] == hue_level\n df = pd.DataFrame({var: group_data[hue_mask]})\n if self.plot_units is not None:\n df[\"units\"] = self.plot_units[i][hue_mask]\n\n res = agg(df, var)\n\n statistic[i].append(res[var])\n if errorbar is not None:\n confint[i].append((res[f\"{var}min\"], res[f\"{var}max\"]))\n\n # Save the resulting values for plotting\n self.statistic = np.array(statistic)\n self.confint = np.array(confint)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalStatPlotter.draw_confints__CategoricalStatPlotter.draw_confints.for_at_ci_low_ci_high_.if_self_orient_v_.else_.if_capsize_is_not_None_.ax_plot_ci_high_ci_high": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CategoricalStatPlotter.draw_confints__CategoricalStatPlotter.draw_confints.for_at_ci_low_ci_high_.if_self_orient_v_.else_.if_capsize_is_not_None_.ax_plot_ci_high_ci_high", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1545, "end_line": 1571, "span_ids": ["_CategoricalStatPlotter.draw_confints"], "tokens": 322}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _CategoricalStatPlotter(_CategoricalPlotter):\n\n def draw_confints(self, ax, at_group, confint, colors,\n errwidth=None, capsize=None, **kws):\n\n if errwidth is not None:\n kws.setdefault(\"lw\", errwidth)\n else:\n kws.setdefault(\"lw\", mpl.rcParams[\"lines.linewidth\"] * 1.8)\n\n for at, (ci_low, ci_high), color in zip(at_group,\n confint,\n colors):\n if self.orient == \"v\":\n ax.plot([at, at], [ci_low, ci_high], color=color, **kws)\n if capsize is not None:\n ax.plot([at - capsize / 2, at + capsize / 2],\n [ci_low, ci_low], color=color, **kws)\n ax.plot([at - capsize / 2, at + capsize / 2],\n [ci_high, ci_high], color=color, **kws)\n else:\n ax.plot([ci_low, ci_high], [at, at], color=color, **kws)\n if capsize is not None:\n ax.plot([ci_low, ci_low],\n [at - capsize / 2, at + capsize / 2],\n color=color, **kws)\n ax.plot([ci_high, ci_high],\n [at - capsize / 2, at + capsize / 2],\n color=color, **kws)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__BarPlotter__BarPlotter.__init__.self.capsize.capsize": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__BarPlotter__BarPlotter.__init__.self.capsize.capsize", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1523, "end_line": 1540, "span_ids": ["_BarPlotter"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _BarPlotter(_CategoricalStatPlotter):\n\n def __init__(self, x, y, hue, data, order, hue_order,\n estimator, errorbar, n_boot, units, seed,\n orient, color, palette, saturation, width,\n errcolor, errwidth, capsize, dodge):\n \"\"\"Initialize the plotter.\"\"\"\n self.establish_variables(x, y, hue, data, orient,\n order, hue_order, units)\n self.establish_colors(color, palette, saturation)\n self.estimate_statistic(estimator, errorbar, n_boot, seed)\n\n self.dodge = dodge\n self.width = width\n\n self.errcolor = errcolor\n self.errwidth = errwidth\n self.capsize = capsize", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__BarPlotter.draw_bars__BarPlotter.plot.if_self_orient_h_.ax_invert_yaxis_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__BarPlotter.draw_bars__BarPlotter.plot.if_self_orient_h_.ax_invert_yaxis_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1593, "end_line": 1640, "span_ids": ["_BarPlotter.plot", "_BarPlotter.draw_bars"], "tokens": 357}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _BarPlotter(_CategoricalStatPlotter):\n\n def draw_bars(self, ax, kws):\n \"\"\"Draw the bars onto `ax`.\"\"\"\n # Get the right matplotlib function depending on the orientation\n barfunc = ax.bar if self.orient == \"v\" else ax.barh\n barpos = np.arange(len(self.statistic))\n\n if self.plot_hues is None:\n\n # Draw the bars\n barfunc(barpos, self.statistic, self.width,\n color=self.colors, align=\"center\", **kws)\n\n # Draw the confidence intervals\n errcolors = [self.errcolor] * len(barpos)\n self.draw_confints(ax,\n barpos,\n self.confint,\n errcolors,\n self.errwidth,\n self.capsize)\n\n else:\n\n for j, hue_level in enumerate(self.hue_names):\n\n # Draw the bars\n offpos = barpos + self.hue_offsets[j]\n barfunc(offpos, self.statistic[:, j], self.nested_width,\n color=self.colors[j], align=\"center\",\n label=hue_level, **kws)\n\n # Draw the confidence intervals\n if self.confint.size:\n confint = self.confint[:, j]\n errcolors = [self.errcolor] * len(offpos)\n self.draw_confints(ax,\n offpos,\n confint,\n errcolors,\n self.errwidth,\n self.capsize)\n\n def plot(self, ax, bar_kws):\n \"\"\"Make the plot.\"\"\"\n self.draw_bars(ax, bar_kws)\n self.annotate_axes(ax)\n if self.orient == \"h\":\n ax.invert_yaxis()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__PointPlotter__PointPlotter.hue_offsets.return.offset": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__PointPlotter__PointPlotter.hue_offsets.return.offset", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1592, "end_line": 1643, "span_ids": ["_PointPlotter.hue_offsets", "_PointPlotter"], "tokens": 446}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _PointPlotter(_CategoricalStatPlotter):\n\n default_palette = \"dark\"\n\n def __init__(self, x, y, hue, data, order, hue_order,\n estimator, errorbar, n_boot, units, seed,\n markers, linestyles, dodge, join, scale,\n orient, color, palette, errwidth=None, capsize=None):\n \"\"\"Initialize the plotter.\"\"\"\n self.establish_variables(x, y, hue, data, orient,\n order, hue_order, units)\n self.establish_colors(color, palette, 1)\n self.estimate_statistic(estimator, errorbar, n_boot, seed)\n\n # Override the default palette for single-color plots\n if hue is None and color is None and palette is None:\n self.colors = [color_palette()[0]] * len(self.colors)\n\n # Don't join single-layer plots with different colors\n if hue is None and palette is not None:\n join = False\n\n # Use a good default for `dodge=True`\n if dodge is True and self.hue_names is not None:\n dodge = .025 * len(self.hue_names)\n\n # Make sure we have a marker for each hue level\n if isinstance(markers, str):\n markers = [markers] * len(self.colors)\n self.markers = markers\n\n # Make sure we have a line style for each hue level\n if isinstance(linestyles, str):\n linestyles = [linestyles] * len(self.colors)\n self.linestyles = linestyles\n\n # Set the other plot components\n self.dodge = dodge\n self.join = join\n self.scale = scale\n self.errwidth = errwidth\n self.capsize = capsize\n\n @property\n def hue_offsets(self):\n \"\"\"Offsets relative to the center position for each hue level.\"\"\"\n if self.dodge:\n offset = np.linspace(0, self.dodge, len(self.hue_names))\n offset -= offset.mean()\n else:\n offset = np.zeros(len(self.hue_names))\n return offset", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__PointPlotter.draw_points__PointPlotter.plot.if_self_orient_h_.ax_invert_yaxis_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__PointPlotter.draw_points__PointPlotter.plot.if_self_orient_h_.ax_invert_yaxis_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1697, "end_line": 1789, "span_ids": ["_PointPlotter.draw_points", "_PointPlotter.plot"], "tokens": 745}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _PointPlotter(_CategoricalStatPlotter):\n\n def draw_points(self, ax):\n \"\"\"Draw the main data components of the plot.\"\"\"\n # Get the center positions on the categorical axis\n pointpos = np.arange(len(self.statistic))\n\n # Get the size of the plot elements\n lw = mpl.rcParams[\"lines.linewidth\"] * 1.8 * self.scale\n mew = lw * .75\n markersize = np.pi * np.square(lw) * 2\n\n if self.plot_hues is None:\n\n # Draw lines joining each estimate point\n if self.join:\n color = self.colors[0]\n ls = self.linestyles[0]\n if self.orient == \"h\":\n ax.plot(self.statistic, pointpos,\n color=color, ls=ls, lw=lw)\n else:\n ax.plot(pointpos, self.statistic,\n color=color, ls=ls, lw=lw)\n\n # Draw the confidence intervals\n self.draw_confints(ax, pointpos, self.confint, self.colors,\n self.errwidth, self.capsize)\n\n # Draw the estimate points\n marker = self.markers[0]\n colors = [mpl.colors.colorConverter.to_rgb(c) for c in self.colors]\n if self.orient == \"h\":\n x, y = self.statistic, pointpos\n else:\n x, y = pointpos, self.statistic\n ax.scatter(x, y,\n linewidth=mew, marker=marker, s=markersize,\n facecolor=colors, edgecolor=colors)\n\n else:\n\n offsets = self.hue_offsets\n for j, hue_level in enumerate(self.hue_names):\n\n # Determine the values to plot for this level\n statistic = self.statistic[:, j]\n\n # Determine the position on the categorical and z axes\n offpos = pointpos + offsets[j]\n z = j + 1\n\n # Draw lines joining each estimate point\n if self.join:\n color = self.colors[j]\n ls = self.linestyles[j]\n if self.orient == \"h\":\n ax.plot(statistic, offpos, color=color,\n zorder=z, ls=ls, lw=lw)\n else:\n ax.plot(offpos, statistic, color=color,\n zorder=z, ls=ls, lw=lw)\n\n # Draw the confidence intervals\n if self.confint.size:\n confint = self.confint[:, j]\n errcolors = [self.colors[j]] * len(offpos)\n self.draw_confints(ax, offpos, confint, errcolors,\n self.errwidth, self.capsize,\n zorder=z)\n\n # Draw the estimate points\n n_points = len(remove_na(offpos))\n marker = self.markers[j]\n color = mpl.colors.colorConverter.to_rgb(self.colors[j])\n\n if self.orient == \"h\":\n x, y = statistic, offpos\n else:\n x, y = offpos, statistic\n\n if not len(remove_na(statistic)):\n x = y = [np.nan] * n_points\n\n ax.scatter(x, y, label=hue_level,\n facecolor=color, edgecolor=color,\n linewidth=mew, marker=marker, s=markersize,\n zorder=z)\n\n def plot(self, ax):\n \"\"\"Make the plot.\"\"\"\n self.draw_points(ax)\n self.annotate_axes(ax)\n if self.orient == \"h\":\n ax.invert_yaxis()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CountPlotter__LVPlotter.__init__.self_establish_colors_col": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__CountPlotter__LVPlotter.__init__.self_establish_colors_col", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1792, "end_line": 1837, "span_ids": ["_CountPlotter", "_LVPlotter"], "tokens": 400}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _CountPlotter(_BarPlotter):\n require_numeric = False\n\n\nclass _LVPlotter(_CategoricalPlotter):\n\n def __init__(self, x, y, hue, data, order, hue_order,\n orient, color, palette, saturation,\n width, dodge, k_depth, linewidth, scale, outlier_prop,\n trust_alpha, showfliers=True):\n\n self.width = width\n self.dodge = dodge\n self.saturation = saturation\n\n k_depth_methods = ['proportion', 'tukey', 'trustworthy', 'full']\n if not (k_depth in k_depth_methods or isinstance(k_depth, Number)):\n msg = (f'k_depth must be one of {k_depth_methods} or a number, '\n f'but {k_depth} was passed.')\n raise ValueError(msg)\n self.k_depth = k_depth\n\n if linewidth is None:\n linewidth = mpl.rcParams[\"lines.linewidth\"]\n self.linewidth = linewidth\n\n scales = ['linear', 'exponential', 'area']\n if scale not in scales:\n msg = f'scale must be one of {scales}, but {scale} was passed.'\n raise ValueError(msg)\n self.scale = scale\n\n if ((outlier_prop > 1) or (outlier_prop <= 0)):\n msg = f'outlier_prop {outlier_prop} not in range (0, 1]'\n raise ValueError(msg)\n self.outlier_prop = outlier_prop\n\n if not 0 < trust_alpha < 1:\n msg = f'trust_alpha {trust_alpha} not in range (0, 1)'\n raise ValueError(msg)\n self.trust_alpha = trust_alpha\n\n self.showfliers = showfliers\n\n self.establish_variables(x, y, hue, data, orient, order, hue_order)\n self.establish_colors(color, palette, saturation)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__LVPlotter._lv_box_ends__LVPlotter._lv_box_ends.return.box_ends_k": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__LVPlotter._lv_box_ends__LVPlotter._lv_box_ends.return.box_ends_k", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1839, "end_line": 1875, "span_ids": ["_LVPlotter._lv_box_ends"], "tokens": 479}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _LVPlotter(_CategoricalPlotter):\n\n def _lv_box_ends(self, vals):\n \"\"\"Get the number of data points and calculate `depth` of\n letter-value plot.\"\"\"\n vals = np.asarray(vals)\n # Remove infinite values while handling a 'object' dtype\n # that can come from pd.Float64Dtype() input\n with pd.option_context('mode.use_inf_as_null', True):\n vals = vals[~pd.isnull(vals)]\n n = len(vals)\n p = self.outlier_prop\n\n # Select the depth, i.e. number of boxes to draw, based on the method\n if self.k_depth == 'full':\n # extend boxes to 100% of the data\n k = int(np.log2(n)) + 1\n elif self.k_depth == 'tukey':\n # This results with 5-8 points in each tail\n k = int(np.log2(n)) - 3\n elif self.k_depth == 'proportion':\n k = int(np.log2(n)) - int(np.log2(n * p)) + 1\n elif self.k_depth == 'trustworthy':\n point_conf = 2 * _normal_quantile_func(1 - self.trust_alpha / 2) ** 2\n k = int(np.log2(n / point_conf)) + 1\n else:\n k = int(self.k_depth) # allow having k as input\n # If the number happens to be less than 1, set k to 1\n if k < 1:\n k = 1\n\n # Calculate the upper end for each of the k boxes\n upper = [100 * (1 - 0.5 ** (i + 1)) for i in range(k, 0, -1)]\n # Calculate the lower end for each of the k boxes\n lower = [100 * (0.5 ** (i + 1)) for i in range(k, 0, -1)]\n # Stitch the box ends together\n percentile_ends = [(i, j) for i, j in zip(lower, upper)]\n box_ends = [np.percentile(vals, q) for q in percentile_ends]\n return box_ends, k", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__LVPlotter._lv_outliers__LVPlotter._lv_outliers.return.np_concatenate_lower_out": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__LVPlotter._lv_outliers__LVPlotter._lv_outliers.return.np_concatenate_lower_out", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1877, "end_line": 1884, "span_ids": ["_LVPlotter._lv_outliers"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _LVPlotter(_CategoricalPlotter):\n\n def _lv_outliers(self, vals, k):\n \"\"\"Find the outliers based on the letter value depth.\"\"\"\n box_edge = 0.5 ** (k + 1)\n perc_ends = (100 * box_edge, 100 * (1 - box_edge))\n edges = np.percentile(vals, perc_ends)\n lower_out = vals[np.where(vals < edges[0])[0]]\n upper_out = vals[np.where(vals > edges[1])[0]]\n return np.concatenate((lower_out, upper_out))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__LVPlotter._width_functions__LVPlotter._width_functions.return.width_functions_width_fun": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__LVPlotter._width_functions__LVPlotter._width_functions.return.width_functions_width_fun", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1886, "end_line": 1891, "span_ids": ["_LVPlotter._width_functions"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _LVPlotter(_CategoricalPlotter):\n\n def _width_functions(self, width_func):\n # Dictionary of functions for computing the width of the boxes\n width_functions = {'linear': lambda h, i, k: (i + 1.) / k,\n 'exponential': lambda h, i, k: 2**(-k + i - 1),\n 'area': lambda h, i, k: (1 - 2**(-k + i - 2)) / h}\n return width_functions[width_func]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__LVPlotter.draw_letter_value_plot__categorical_docs_update_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__LVPlotter.draw_letter_value_plot__categorical_docs_update_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1977, "end_line": 2220, "span_ids": ["_LVPlotter.draw_letter_value_plot", "_LVPlotter.plot", "impl:9", "impl:11"], "tokens": 539}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _LVPlotter(_CategoricalPlotter):\n\n def draw_letter_value_plot(self, ax, box_kws=None, flier_kws=None,\n line_kws=None):\n \"\"\"Use matplotlib to draw a letter value plot on an Axes.\"\"\"\n\n for i, group_data in enumerate(self.plot_data):\n\n if self.plot_hues is None:\n\n # Handle case where there is data at this level\n if group_data.size == 0:\n continue\n\n # Draw a single box or a set of boxes\n # with a single level of grouping\n box_data = remove_na(group_data)\n\n # Handle case where there is no non-null data\n if box_data.size == 0:\n continue\n\n color = self.colors[i]\n\n self._lvplot(box_data,\n positions=[i],\n color=color,\n widths=self.width,\n ax=ax,\n box_kws=box_kws,\n flier_kws=flier_kws,\n line_kws=line_kws)\n\n else:\n # Draw nested groups of boxes\n offsets = self.hue_offsets\n for j, hue_level in enumerate(self.hue_names):\n\n # Add a legend for this hue level\n if not i:\n self.add_legend_data(ax, self.colors[j], hue_level)\n\n # Handle case where there is data at this level\n if group_data.size == 0:\n continue\n\n hue_mask = self.plot_hues[i] == hue_level\n box_data = remove_na(group_data[hue_mask])\n\n # Handle case where there is no non-null data\n if box_data.size == 0:\n continue\n\n color = self.colors[j]\n center = i + offsets[j]\n self._lvplot(box_data,\n positions=[center],\n color=color,\n widths=self.nested_width,\n ax=ax,\n box_kws=box_kws,\n flier_kws=flier_kws,\n line_kws=line_kws)\n\n # Autoscale the values axis to make sure all patches are visible\n ax.autoscale_view(scalex=self.orient == \"h\", scaley=self.orient == \"v\")\n\n def plot(self, ax, box_kws, flier_kws, line_kws):\n \"\"\"Make the plot.\"\"\"\n self.draw_letter_value_plot(ax, box_kws, flier_kws, line_kws)\n self.annotate_axes(ax)\n if self.orient == \"h\":\n ax.invert_yaxis()\n\n\n_categorical_docs =\n # ... other code\n\n_categorical_docs.update(_facet_docs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_boxplot_boxplot.return.ax": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_boxplot_boxplot.return.ax", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2223, "end_line": 2239, "span_ids": ["boxplot"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def boxplot(\n data=None, *, x=None, y=None, hue=None, order=None, hue_order=None,\n orient=None, color=None, palette=None, saturation=.75, width=.8,\n dodge=True, fliersize=5, linewidth=None, whis=1.5, ax=None,\n **kwargs\n):\n\n plotter = _BoxPlotter(x, y, hue, data, order, hue_order,\n orient, color, palette, saturation,\n width, dodge, fliersize, linewidth)\n\n if ax is None:\n ax = plt.gca()\n kwargs.update(dict(whis=whis))\n\n plotter.plot(ax, kwargs)\n return ax", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_boxplot.__doc___boxplot.__doc__.dedent_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_boxplot.__doc___boxplot.__doc__.dedent_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2242, "end_line": 2293, "span_ids": ["impl:12"], "tokens": 347}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "boxplot.__doc__ = dedent(\"\"\"\\\n Draw a box plot to show distributions with respect to categories.\n\n A box plot (or box-and-whisker plot) shows the distribution of quantitative\n data in a way that facilitates comparisons between variables or across\n levels of a categorical variable. The box shows the quartiles of the\n dataset while the whiskers extend to show the rest of the distribution,\n except for points that are determined to be \"outliers\" using a method\n that is a function of the inter-quartile range.\n\n {categorical_narrative}\n\n Parameters\n ----------\n {categorical_data}\n {input_params}\n {order_vars}\n {orient}\n {color}\n {palette}\n {saturation}\n {width}\n {dodge}\n fliersize : float, optional\n Size of the markers used to indicate outlier observations.\n {linewidth}\n whis : float, optional\n Maximum length of the plot whiskers as proportion of the\n interquartile range. Whiskers extend to the furthest datapoint\n within that range. More extreme points are marked as outliers.\n {ax_in}\n kwargs : key, value mappings\n Other keyword arguments are passed through to\n :meth:`matplotlib.axes.Axes.boxplot`.\n\n Returns\n -------\n {ax_out}\n\n See Also\n --------\n {violinplot}\n {stripplot}\n {swarmplot}\n {catplot}\n\n Examples\n --------\n\n .. include:: ../docstrings/boxplot.rst\n\n \"\"\").format(**_categorical_docs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_violinplot_violinplot.return.ax": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_violinplot_violinplot.return.ax", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2392, "end_line": 2409, "span_ids": ["violinplot"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def violinplot(\n data=None, *, x=None, y=None, hue=None, order=None, hue_order=None,\n bw=\"scott\", cut=2, scale=\"area\", scale_hue=True, gridsize=100,\n width=.8, inner=\"box\", split=False, dodge=True, orient=None,\n linewidth=None, color=None, palette=None, saturation=.75,\n ax=None, **kwargs,\n):\n\n plotter = _ViolinPlotter(x, y, hue, data, order, hue_order,\n bw, cut, scale, scale_hue, gridsize,\n width, inner, split, dodge, orient, linewidth,\n color, palette, saturation)\n\n if ax is None:\n ax = plt.gca()\n\n plotter.plot(ax)\n return ax", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_boxenplot.__doc___boxenplot.__doc__.dedent_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_boxenplot.__doc___boxenplot.__doc__.dedent_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2418, "end_line": 2491, "span_ids": ["impl:16"], "tokens": 670}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "boxenplot.__doc__ = dedent(\"\"\"\\\n Draw an enhanced box plot for larger datasets.\n\n This style of plot was originally named a \"letter value\" plot because it\n shows a large number of quantiles that are defined as \"letter values\". It\n is similar to a box plot in plotting a nonparametric representation of a\n distribution in which all features correspond to actual observations. By\n plotting more quantiles, it provides more information about the shape of\n the distribution, particularly in the tails. For a more extensive\n explanation, you can read the paper that introduced the plot:\n https://vita.had.co.nz/papers/letter-value-plot.html\n\n {categorical_narrative}\n\n Parameters\n ----------\n {categorical_data}\n {input_params}\n {order_vars}\n {orient}\n {color}\n {palette}\n {saturation}\n {width}\n {dodge}\n k_depth : {{\"tukey\", \"proportion\", \"trustworthy\", \"full\"}} or scalar\n The number of boxes, and by extension number of percentiles, to draw.\n All methods are detailed in Wickham's paper. Each makes different\n assumptions about the number of outliers and leverages different\n statistical properties. If \"proportion\", draw no more than\n `outlier_prop` extreme observations. If \"full\", draw `log(n)+1` boxes.\n {linewidth}\n scale : {{\"exponential\", \"linear\", \"area\"}}, optional\n Method to use for the width of the letter value boxes. All give similar\n results visually. \"linear\" reduces the width by a constant linear\n factor, \"exponential\" uses the proportion of data not covered, \"area\"\n is proportional to the percentage of data covered.\n outlier_prop : float, optional\n Proportion of data believed to be outliers. Must be in the range\n (0, 1]. Used to determine the number of boxes to plot when\n `k_depth=\"proportion\"`.\n trust_alpha : float, optional\n Confidence level for a box to be plotted. Used to determine the\n number of boxes to plot when `k_depth=\"trustworthy\"`. Must be in the\n range (0, 1).\n showfliers : bool, optional\n If False, suppress the plotting of outliers.\n {ax_in}\n box_kws: dict, optional\n Keyword arguments for the box artists; passed to\n :class:`matplotlib.patches.Rectangle`.\n line_kws: dict, optional\n Keyword arguments for the line denoting the median; passed to\n :meth:`matplotlib.axes.Axes.plot`.\n flier_kws: dict, optional\n Keyword arguments for the scatter denoting the outlier observations;\n passed to :meth:`matplotlib.axes.Axes.scatter`.\n\n Returns\n -------\n {ax_out}\n\n See Also\n --------\n {violinplot}\n {boxplot}\n {catplot}\n\n Examples\n --------\n\n .. include:: ../docstrings/boxenplot.rst\n\n \"\"\").format(**_categorical_docs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_stripplot_stripplot.return.ax": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_stripplot_stripplot.return.ax", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2494, "end_line": 2550, "span_ids": ["stripplot"], "tokens": 421}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def stripplot(\n data=None, *, x=None, y=None, hue=None, order=None, hue_order=None,\n jitter=True, dodge=False, orient=None, color=None, palette=None,\n size=5, edgecolor=\"gray\", linewidth=0,\n hue_norm=None, native_scale=False, formatter=None, legend=\"auto\",\n ax=None, **kwargs\n):\n\n p = _CategoricalPlotterNew(\n data=data,\n variables=_CategoricalPlotterNew.get_semantics(locals()),\n order=order,\n orient=orient,\n require_numeric=False,\n legend=legend,\n )\n\n if ax is None:\n ax = plt.gca()\n\n if p.var_types.get(p.cat_axis) == \"categorical\" or not native_scale:\n p.scale_categorical(p.cat_axis, order=order, formatter=formatter)\n\n p._attach(ax)\n\n hue_order = p._palette_without_hue_backcompat(palette, hue_order)\n palette, hue_order = p._hue_backcompat(color, palette, hue_order)\n\n color = _default_color(ax.scatter, hue, color, kwargs)\n\n p.map_hue(palette=palette, order=hue_order, norm=hue_norm)\n\n # XXX Copying possibly bad default decisions from original code for now\n kwargs.setdefault(\"zorder\", 3)\n size = kwargs.get(\"s\", size)\n\n kwargs.update(dict(\n s=size ** 2,\n edgecolor=edgecolor,\n linewidth=linewidth)\n )\n\n p.plot_strips(\n jitter=jitter,\n dodge=dodge,\n color=color,\n edgecolor=edgecolor,\n plot_kws=kwargs,\n )\n\n # XXX this happens inside a plotting method in the distribution plots\n # but maybe it's better out here? Alternatively, we have an open issue\n # suggesting that _attach could add default axes labels, which seems smart.\n p._add_axis_labels(ax)\n p._adjust_cat_axis(ax, axis=p.cat_axis)\n\n return ax", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_stripplot.__doc___stripplot.__doc__.dedent_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_stripplot.__doc___stripplot.__doc__.dedent_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2553, "end_line": 2612, "span_ids": ["impl:18"], "tokens": 444}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "stripplot.__doc__ = dedent(\"\"\"\\\n Draw a categorical scatterplot using jitter to reduce overplotting.\n\n A strip plot can be drawn on its own, but it is also a good complement\n to a box or violin plot in cases where you want to show all observations\n along with some representation of the underlying distribution.\n\n {new_categorical_narrative}\n\n Parameters\n ----------\n {input_params}\n {categorical_data}\n {order_vars}\n jitter : float, ``True``/``1`` is special-cased, optional\n Amount of jitter (only along the categorical axis) to apply. This\n can be useful when you have many points and they overlap, so that\n it is easier to see the distribution. You can specify the amount\n of jitter (half the width of the uniform random variable support),\n or just use ``True`` for a good default.\n dodge : bool, optional\n When using ``hue`` nesting, setting this to ``True`` will separate\n the strips for different hue levels along the categorical axis.\n Otherwise, the points for each level will be plotted on top of\n each other.\n {orient}\n {color}\n {palette}\n size : float, optional\n Radius of the markers, in points.\n edgecolor : matplotlib color, \"gray\" is special-cased, optional\n Color of the lines around each point. If you pass ``\"gray\"``, the\n brightness is determined by the color palette used for the body\n of the points.\n {linewidth}\n {native_scale}\n {formatter}\n {legend}\n {ax_in}\n kwargs : key, value mappings\n Other keyword arguments are passed through to\n :meth:`matplotlib.axes.Axes.scatter`.\n\n Returns\n -------\n {ax_out}\n\n See Also\n --------\n {swarmplot}\n {boxplot}\n {violinplot}\n {catplot}\n\n Examples\n --------\n\n .. include:: ../docstrings/stripplot.rst\n\n \"\"\").format(**_categorical_docs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_swarmplot_swarmplot.return.ax": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_swarmplot_swarmplot.return.ax", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2615, "end_line": 2673, "span_ids": ["swarmplot"], "tokens": 398}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def swarmplot(\n data=None, *, x=None, y=None, hue=None, order=None, hue_order=None,\n dodge=False, orient=None, color=None, palette=None,\n size=5, edgecolor=\"gray\", linewidth=0, hue_norm=None,\n native_scale=False, formatter=None, legend=\"auto\", warn_thresh=.05,\n ax=None, **kwargs\n):\n\n p = _CategoricalPlotterNew(\n data=data,\n variables=_CategoricalPlotterNew.get_semantics(locals()),\n order=order,\n orient=orient,\n require_numeric=False,\n legend=legend,\n )\n\n if ax is None:\n ax = plt.gca()\n\n if p.var_types.get(p.cat_axis) == \"categorical\" or not native_scale:\n p.scale_categorical(p.cat_axis, order=order, formatter=formatter)\n\n p._attach(ax)\n\n if not p.has_xy_data:\n return ax\n\n hue_order = p._palette_without_hue_backcompat(palette, hue_order)\n palette, hue_order = p._hue_backcompat(color, palette, hue_order)\n\n color = _default_color(ax.scatter, hue, color, kwargs)\n\n p.map_hue(palette=palette, order=hue_order, norm=hue_norm)\n\n # XXX Copying possibly bad default decisions from original code for now\n kwargs.setdefault(\"zorder\", 3)\n size = kwargs.get(\"s\", size)\n\n if linewidth is None:\n linewidth = size / 10\n\n kwargs.update(dict(\n s=size ** 2,\n linewidth=linewidth,\n ))\n\n p.plot_swarms(\n dodge=dodge,\n color=color,\n edgecolor=edgecolor,\n warn_thresh=warn_thresh,\n plot_kws=kwargs,\n )\n\n p._add_axis_labels(ax)\n p._adjust_cat_axis(ax, axis=p.cat_axis)\n\n return ax", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_swarmplot.__doc___swarmplot.__doc__.dedent_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_swarmplot.__doc___swarmplot.__doc__.dedent_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2676, "end_line": 2734, "span_ids": ["impl:20"], "tokens": 424}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "swarmplot.__doc__ = dedent(\"\"\"\\\n Draw a categorical scatterplot with points adjusted to be non-overlapping.\n\n This function is similar to :func:`stripplot`, but the points are adjusted\n (only along the categorical axis) so that they don't overlap. This gives a\n better representation of the distribution of values, but it does not scale\n well to large numbers of observations. This style of plot is sometimes\n called a \"beeswarm\".\n\n A swarm plot can be drawn on its own, but it is also a good complement\n to a box or violin plot in cases where you want to show all observations\n along with some representation of the underlying distribution.\n\n {new_categorical_narrative}\n\n Parameters\n ----------\n {categorical_data}\n {input_params}\n {order_vars}\n dodge : bool, optional\n When using ``hue`` nesting, setting this to ``True`` will separate\n the strips for different hue levels along the categorical axis.\n Otherwise, the points for each level will be plotted in one swarm.\n {orient}\n {color}\n {palette}\n size : float, optional\n Radius of the markers, in points.\n edgecolor : matplotlib color, \"gray\" is special-cased, optional\n Color of the lines around each point. If you pass ``\"gray\"``, the\n brightness is determined by the color palette used for the body\n of the points.\n {linewidth}\n {native_scale}\n {formatter}\n {legend}\n {ax_in}\n kwargs : key, value mappings\n Other keyword arguments are passed through to\n :meth:`matplotlib.axes.Axes.scatter`.\n\n Returns\n -------\n {ax_out}\n\n See Also\n --------\n {boxplot}\n {violinplot}\n {stripplot}\n {catplot}\n\n Examples\n --------\n\n .. include:: ../docstrings/swarmplot.rst\n\n \"\"\").format(**_categorical_docs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_barplot_barplot.return.ax": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_barplot_barplot.return.ax", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2737, "end_line": 2762, "span_ids": ["barplot"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def barplot(\n data=None, *, x=None, y=None, hue=None, order=None, hue_order=None,\n estimator=\"mean\", errorbar=(\"ci\", 95), n_boot=1000, units=None, seed=None,\n orient=None, color=None, palette=None, saturation=.75, width=.8,\n errcolor=\".26\", errwidth=None, capsize=None, dodge=True, ci=\"deprecated\",\n ax=None,\n **kwargs,\n):\n\n errorbar = utils._deprecate_ci(errorbar, ci)\n\n # Be backwards compatible with len passed directly, which\n # does not work in Series.agg (maybe a pandas bug?)\n if estimator is len:\n estimator = \"size\"\n\n plotter = _BarPlotter(x, y, hue, data, order, hue_order,\n estimator, errorbar, n_boot, units, seed,\n orient, color, palette, saturation,\n width, errcolor, errwidth, capsize, dodge)\n\n if ax is None:\n ax = plt.gca()\n\n plotter.plot(ax, kwargs)\n return ax", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_barplot.__doc___barplot.__doc__.dedent_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_barplot.__doc___barplot.__doc__.dedent_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2765, "end_line": 2824, "span_ids": ["impl:22"], "tokens": 387}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "barplot.__doc__ = dedent(\"\"\"\\\n Show point estimates and errors as rectangular bars.\n\n A bar plot represents an estimate of central tendency for a numeric\n variable with the height of each rectangle and provides some indication of\n the uncertainty around that estimate using error bars. Bar plots include 0\n in the quantitative axis range, and they are a good choice when 0 is a\n meaningful value for the quantitative variable, and you want to make\n comparisons against it.\n\n For datasets where 0 is not a meaningful value, a point plot will allow you\n to focus on differences between levels of one or more categorical\n variables.\n\n It is also important to keep in mind that a bar plot shows only the mean\n (or other estimator) value, but in many cases it may be more informative to\n show the distribution of values at each level of the categorical variables.\n In that case, other approaches such as a box or violin plot may be more\n appropriate.\n\n {categorical_narrative}\n\n Parameters\n ----------\n {categorical_data}\n {input_params}\n {order_vars}\n {stat_api_params}\n {orient}\n {color}\n {palette}\n {saturation}\n {width}\n errcolor : matplotlib color\n Color used for the error bar lines.\n {errwidth}\n {capsize}\n {dodge}\n {ax_in}\n kwargs : key, value mappings\n Other keyword arguments are passed through to\n :meth:`matplotlib.axes.Axes.bar`.\n\n Returns\n -------\n {ax_out}\n\n See Also\n --------\n {countplot}\n {pointplot}\n {catplot}\n\n Examples\n --------\n\n .. include:: ../docstrings/barplot.rst\n\n\n \"\"\").format(**_categorical_docs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_pointplot_pointplot.return.ax": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_pointplot_pointplot.return.ax", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2827, "end_line": 2846, "span_ids": ["pointplot"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def pointplot(\n data=None, *, x=None, y=None, hue=None, order=None, hue_order=None,\n estimator=\"mean\", errorbar=(\"ci\", 95), n_boot=1000, units=None, seed=None,\n markers=\"o\", linestyles=\"-\", dodge=False, join=True, scale=1,\n orient=None, color=None, palette=None, errwidth=None, ci=\"deprecated\",\n capsize=None, ax=None,\n):\n\n errorbar = utils._deprecate_ci(errorbar, ci)\n\n plotter = _PointPlotter(x, y, hue, data, order, hue_order,\n estimator, errorbar, n_boot, units, seed,\n markers, linestyles, dodge, join, scale,\n orient, color, palette, errwidth, capsize)\n\n if ax is None:\n ax = plt.gca()\n\n plotter.plot(ax)\n return ax", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_pointplot.__doc___pointplot.__doc__.dedent_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_pointplot.__doc___pointplot.__doc__.dedent_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2849, "end_line": 2912, "span_ids": ["impl:24"], "tokens": 476}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "pointplot.__doc__ = dedent(\"\"\"\\\n Show point estimates and errors using dot marks.\n\n A point plot represents an estimate of central tendency for a numeric\n variable by the position of the dot and provides some indication of the\n uncertainty around that estimate using error bars.\n\n Point plots can be more useful than bar plots for focusing comparisons\n between different levels of one or more categorical variables. They are\n particularly adept at showing interactions: how the relationship between\n levels of one categorical variable changes across levels of a second\n categorical variable. The lines that join each point from the same `hue`\n level allow interactions to be judged by differences in slope, which is\n easier for the eyes than comparing the heights of several groups of points\n or bars.\n\n It is important to keep in mind that a point plot shows only the mean (or\n other estimator) value, but in many cases it may be more informative to\n show the distribution of values at each level of the categorical variables.\n In that case, other approaches such as a box or violin plot may be more\n appropriate.\n\n {categorical_narrative}\n\n Parameters\n ----------\n {categorical_data}\n {input_params}\n {order_vars}\n {stat_api_params}\n markers : string or list of strings, optional\n Markers to use for each of the ``hue`` levels.\n linestyles : string or list of strings, optional\n Line styles to use for each of the ``hue`` levels.\n dodge : bool or float, optional\n Amount to separate the points for each level of the ``hue`` variable\n along the categorical axis.\n join : bool, optional\n If ``True``, lines will be drawn between point estimates at the same\n ``hue`` level.\n scale : float, optional\n Scale factor for the plot elements.\n {orient}\n {color}\n {palette}\n {errwidth}\n {capsize}\n {ax_in}\n\n Returns\n -------\n {ax_out}\n\n See Also\n --------\n {barplot}\n {catplot}\n\n Examples\n --------\n\n .. include:: ../docstrings/pointplot.rst\n\n \"\"\").format(**_categorical_docs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_countplot_countplot.return.ax": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_countplot_countplot.return.ax", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2915, "end_line": 2952, "span_ids": ["countplot"], "tokens": 267}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def countplot(\n data=None, *, x=None, y=None, hue=None, order=None, hue_order=None,\n orient=None, color=None, palette=None, saturation=.75, width=.8,\n dodge=True, ax=None, **kwargs\n):\n\n estimator = \"size\"\n errorbar = None\n n_boot = 0\n units = None\n seed = None\n errcolor = None\n errwidth = None\n capsize = None\n\n if x is None and y is not None:\n orient = \"h\"\n x = y\n elif y is None and x is not None:\n orient = \"v\"\n y = x\n elif x is not None and y is not None:\n raise ValueError(\"Cannot pass values for both `x` and `y`\")\n\n plotter = _CountPlotter(\n x, y, hue, data, order, hue_order,\n estimator, errorbar, n_boot, units, seed,\n orient, color, palette, saturation,\n width, errcolor, errwidth, capsize, dodge\n )\n\n plotter.value_label = \"count\"\n\n if ax is None:\n ax = plt.gca()\n\n plotter.plot(ax, kwargs)\n return ax", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_countplot.__doc___countplot.__doc__.dedent_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_countplot.__doc___countplot.__doc__.dedent_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2955, "end_line": 2996, "span_ids": ["impl:26"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "countplot.__doc__ = dedent(\"\"\"\\\n Show the counts of observations in each categorical bin using bars.\n\n A count plot can be thought of as a histogram across a categorical, instead\n of quantitative, variable. The basic API and options are identical to those\n for :func:`barplot`, so you can compare counts across nested variables.\n\n Note that the newer :func:`histplot` function offers more functionality, although\n its default behavior is somewhat different.\n\n {categorical_narrative}\n\n Parameters\n ----------\n {categorical_data}\n {input_params}\n {order_vars}\n {orient}\n {color}\n {palette}\n {saturation}\n {dodge}\n {ax_in}\n kwargs : key, value mappings\n Other keyword arguments are passed through to\n :meth:`matplotlib.axes.Axes.bar`.\n\n Returns\n -------\n {ax_out}\n\n See Also\n --------\n {barplot}\n {catplot}\n\n Examples\n --------\n\n .. include:: ../docstrings/countplot.rst\n\n \"\"\").format(**_categorical_docs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_catplot_catplot.refactored_kinds._strip_swarm_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_catplot_catplot.refactored_kinds._strip_swarm_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2999, "end_line": 3024, "span_ids": ["catplot"], "tokens": 269}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def catplot(\n data=None, *, x=None, y=None, hue=None, row=None, col=None,\n col_wrap=None, estimator=\"mean\", errorbar=(\"ci\", 95), n_boot=1000,\n units=None, seed=None, order=None, hue_order=None, row_order=None,\n col_order=None, height=5, aspect=1, kind=\"strip\", native_scale=False,\n formatter=None, orient=None, color=None, palette=None, hue_norm=None,\n legend=\"auto\", legend_out=True, sharex=True, sharey=True,\n margin_titles=False, facet_kws=None, ci=\"deprecated\",\n **kwargs\n):\n\n # Determine the plotting function\n try:\n plot_func = globals()[kind + \"plot\"]\n except KeyError:\n err = f\"Plot kind '{kind}' is not recognized\"\n raise ValueError(err)\n\n # Check for attempt to plot onto specific axes and warn\n if \"ax\" in kwargs:\n msg = (\"catplot is a figure-level function and does not accept \"\n f\"target axes. You may wish to try {kind}plot\")\n warnings.warn(msg, UserWarning)\n kwargs.pop(\"ax\")\n\n refactored_kinds = [\"strip\", \"swarm\"]\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_catplot.if_kind_in_refactored_kin_catplot.if_kind_in_refactored_kin.return.g": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_catplot.if_kind_in_refactored_kin_catplot.if_kind_in_refactored_kin.return.g", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3025, "end_line": 3149, "span_ids": ["catplot"], "tokens": 1122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def catplot(\n data=None, *, x=None, y=None, hue=None, row=None, col=None,\n col_wrap=None, estimator=\"mean\", errorbar=(\"ci\", 95), n_boot=1000,\n units=None, seed=None, order=None, hue_order=None, row_order=None,\n col_order=None, height=5, aspect=1, kind=\"strip\", native_scale=False,\n formatter=None, orient=None, color=None, palette=None, hue_norm=None,\n legend=\"auto\", legend_out=True, sharex=True, sharey=True,\n margin_titles=False, facet_kws=None, ci=\"deprecated\",\n **kwargs\n):\n # ... other code\n if kind in refactored_kinds:\n\n p = _CategoricalFacetPlotter(\n data=data,\n variables=_CategoricalFacetPlotter.get_semantics(locals()),\n order=order,\n orient=orient,\n require_numeric=False,\n legend=legend,\n )\n\n # XXX Copying a fair amount from displot, which is not ideal\n\n for var in [\"row\", \"col\"]:\n # Handle faceting variables that lack name information\n if var in p.variables and p.variables[var] is None:\n p.variables[var] = f\"_{var}_\"\n\n # Adapt the plot_data dataframe for use with FacetGrid\n data = p.plot_data.rename(columns=p.variables)\n data = data.loc[:, ~data.columns.duplicated()]\n\n col_name = p.variables.get(\"col\", None)\n row_name = p.variables.get(\"row\", None)\n\n if facet_kws is None:\n facet_kws = {}\n\n g = FacetGrid(\n data=data, row=row_name, col=col_name,\n col_wrap=col_wrap, row_order=row_order,\n col_order=col_order, height=height,\n sharex=sharex, sharey=sharey,\n aspect=aspect,\n **facet_kws,\n )\n\n # Capture this here because scale_categorical is going to insert a (null)\n # x variable even if it is empty. It's not clear whether that needs to\n # happen or if disabling that is the cleaner solution.\n has_xy_data = p.has_xy_data\n\n if not native_scale or p.var_types[p.cat_axis] == \"categorical\":\n p.scale_categorical(p.cat_axis, order=order, formatter=formatter)\n\n p._attach(g)\n\n if not has_xy_data:\n return g\n\n hue_order = p._palette_without_hue_backcompat(palette, hue_order)\n palette, hue_order = p._hue_backcompat(color, palette, hue_order)\n p.map_hue(palette=palette, order=hue_order, norm=hue_norm)\n\n # Set a default color\n # Otherwise each artist will be plotted separately and trip the color cycle\n if hue is None and color is None:\n color = \"C0\"\n\n if kind == \"strip\":\n\n # TODO get these defaults programmatically?\n jitter = kwargs.pop(\"jitter\", True)\n dodge = kwargs.pop(\"dodge\", False)\n edgecolor = kwargs.pop(\"edgecolor\", \"gray\") # XXX TODO default\n\n plot_kws = kwargs.copy()\n\n # XXX Copying possibly bad default decisions from original code for now\n plot_kws.setdefault(\"zorder\", 3)\n plot_kws.setdefault(\"s\", plot_kws.pop(\"size\", 5) ** 2)\n plot_kws.setdefault(\"linewidth\", 0)\n\n p.plot_strips(\n jitter=jitter,\n dodge=dodge,\n color=color,\n edgecolor=edgecolor,\n plot_kws=plot_kws,\n )\n\n elif kind == \"swarm\":\n\n # TODO get these defaults programmatically?\n dodge = kwargs.pop(\"dodge\", False)\n edgecolor = kwargs.pop(\"edgecolor\", \"gray\") # XXX TODO default\n warn_thresh = kwargs.pop(\"warn_thresh\", .05)\n\n plot_kws = kwargs.copy()\n\n # XXX Copying possibly bad default decisions from original code for now\n plot_kws.setdefault(\"zorder\", 3)\n plot_kws.setdefault(\"s\", plot_kws.pop(\"size\", 5) ** 2)\n\n if plot_kws.setdefault(\"linewidth\", 0) is None:\n plot_kws[\"linewidth\"] = np.sqrt(plot_kws[\"s\"]) / 10\n\n p.plot_swarms(\n dodge=dodge,\n color=color,\n edgecolor=edgecolor,\n warn_thresh=warn_thresh,\n plot_kws=plot_kws,\n )\n\n # XXX best way to do this housekeeping?\n for ax in g.axes.flat:\n p._adjust_cat_axis(ax, axis=p.cat_axis)\n\n g.set_axis_labels(\n p.variables.get(\"x\", None),\n p.variables.get(\"y\", None),\n )\n g.set_titles()\n g.tight_layout()\n\n # XXX Hack to get the legend data in the right place\n for ax in g.axes.flat:\n g._update_legend_data(ax)\n ax.legend_ = None\n\n if legend and (hue is not None) and (hue not in [x, row, col]):\n g.add_legend(title=hue, label_order=hue_order)\n\n return g\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_catplot._Don_t_allow_usage_of_fo_catplot.facet_kws._if_facet_kws_is_None_e": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_catplot._Don_t_allow_usage_of_fo_catplot.facet_kws._if_facet_kws_is_None_e", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3151, "end_line": 3212, "span_ids": ["catplot"], "tokens": 748}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def catplot(\n data=None, *, x=None, y=None, hue=None, row=None, col=None,\n col_wrap=None, estimator=\"mean\", errorbar=(\"ci\", 95), n_boot=1000,\n units=None, seed=None, order=None, hue_order=None, row_order=None,\n col_order=None, height=5, aspect=1, kind=\"strip\", native_scale=False,\n formatter=None, orient=None, color=None, palette=None, hue_norm=None,\n legend=\"auto\", legend_out=True, sharex=True, sharey=True,\n margin_titles=False, facet_kws=None, ci=\"deprecated\",\n **kwargs\n):\n\n # Don't allow usage of forthcoming functionality\n if native_scale is True:\n err = f\"native_scale not yet implemented for `kind={kind}`\"\n raise ValueError(err)\n if formatter is not None:\n err = f\"formatter not yet implemented for `kind={kind}`\"\n raise ValueError(err)\n\n # Alias the input variables to determine categorical order and palette\n # correctly in the case of a count plot\n if kind == \"count\":\n if x is None and y is not None:\n x_, y_, orient = y, y, \"h\"\n elif y is None and x is not None:\n x_, y_, orient = x, x, \"v\"\n else:\n raise ValueError(\"Either `x` or `y` must be None for kind='count'\")\n else:\n x_, y_ = x, y\n\n # Determine the order for the whole dataset, which will be used in all\n # facets to ensure representation of all data in the final plot\n plotter_class = {\n \"box\": _BoxPlotter,\n \"violin\": _ViolinPlotter,\n \"boxen\": _LVPlotter,\n \"bar\": _BarPlotter,\n \"point\": _PointPlotter,\n \"count\": _CountPlotter,\n }[kind]\n p = _CategoricalPlotter()\n p.require_numeric = plotter_class.require_numeric\n p.establish_variables(x_, y_, hue, data, orient, order, hue_order)\n if (\n order is not None\n or (sharex and p.orient == \"v\")\n or (sharey and p.orient == \"h\")\n ):\n # Sync categorical axis between facets to have the same categories\n order = p.group_names\n elif color is None and hue is None:\n msg = (\n \"Setting `{}=False` with `color=None` may cause different levels of the \"\n \"`{}` variable to share colors. This will change in a future version.\"\n )\n if not sharex and p.orient == \"v\":\n warnings.warn(msg.format(\"sharex\", \"x\"), UserWarning)\n if not sharey and p.orient == \"h\":\n warnings.warn(msg.format(\"sharey\", \"y\"), UserWarning)\n\n hue_order = p.hue_names\n\n # Determine the palette to use\n # (FacetGrid will pass a value for ``color`` to the plotting function\n # so we need to define ``palette`` to get default behavior for the\n # categorical functions\n p.establish_colors(color, palette, 1)\n if kind != \"point\" or hue is not None:\n palette = p.colors\n\n # Determine keyword arguments for the facets\n facet_kws = {} if facet_kws is None else facet_kws\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_catplot.facet_kws_update__catplot.return.g": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_catplot.facet_kws_update__catplot.return.g", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3213, "end_line": 3258, "span_ids": ["catplot"], "tokens": 520}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def catplot(\n data=None, *, x=None, y=None, hue=None, row=None, col=None,\n col_wrap=None, estimator=\"mean\", errorbar=(\"ci\", 95), n_boot=1000,\n units=None, seed=None, order=None, hue_order=None, row_order=None,\n col_order=None, height=5, aspect=1, kind=\"strip\", native_scale=False,\n formatter=None, orient=None, color=None, palette=None, hue_norm=None,\n legend=\"auto\", legend_out=True, sharex=True, sharey=True,\n margin_titles=False, facet_kws=None, ci=\"deprecated\",\n **kwargs\n):\n # ... other code\n facet_kws.update(\n data=data, row=row, col=col,\n row_order=row_order, col_order=col_order,\n col_wrap=col_wrap, height=height, aspect=aspect,\n sharex=sharex, sharey=sharey,\n legend_out=legend_out, margin_titles=margin_titles,\n dropna=False,\n )\n\n # Determine keyword arguments for the plotting function\n plot_kws = dict(\n order=order, hue_order=hue_order,\n orient=orient, color=color, palette=palette,\n )\n plot_kws.update(kwargs)\n\n if kind in [\"bar\", \"point\"]:\n errorbar = utils._deprecate_ci(errorbar, ci)\n plot_kws.update(\n estimator=estimator, errorbar=errorbar,\n n_boot=n_boot, units=units, seed=seed,\n )\n\n # Initialize the facets\n g = FacetGrid(**facet_kws)\n\n # Draw the plot onto the facets\n g.map_dataframe(plot_func, x=x, y=y, hue=hue, **plot_kws)\n\n if p.orient == \"h\":\n g.set_axis_labels(p.value_label, p.group_label)\n else:\n g.set_axis_labels(p.group_label, p.value_label)\n\n # Special case axis labels for a count type plot\n if kind == \"count\":\n if x is None:\n g.set_axis_labels(x_var=\"count\")\n if y is None:\n g.set_axis_labels(y_var=\"count\")\n\n if legend and (hue is not None) and (hue not in [x, row, col]):\n hue_order = list(map(utils.to_utf8, hue_order))\n g.add_legend(title=hue, label_order=hue_order)\n\n return g", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_catplot.__doc___catplot.__doc__.dedent_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_catplot.__doc___catplot.__doc__.dedent_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3261, "end_line": 3345, "span_ids": ["impl:28"], "tokens": 712}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "catplot.__doc__ = dedent(\"\"\"\\\n Figure-level interface for drawing categorical plots onto a FacetGrid.\n\n This function provides access to several axes-level functions that\n show the relationship between a numerical and one or more categorical\n variables using one of several visual representations. The `kind`\n parameter selects the underlying axes-level function to use:\n\n Categorical scatterplots:\n\n - :func:`stripplot` (with `kind=\"strip\"`; the default)\n - :func:`swarmplot` (with `kind=\"swarm\"`)\n\n Categorical distribution plots:\n\n - :func:`boxplot` (with `kind=\"box\"`)\n - :func:`violinplot` (with `kind=\"violin\"`)\n - :func:`boxenplot` (with `kind=\"boxen\"`)\n\n Categorical estimate plots:\n\n - :func:`pointplot` (with `kind=\"point\"`)\n - :func:`barplot` (with `kind=\"bar\"`)\n - :func:`countplot` (with `kind=\"count\"`)\n\n Extra keyword arguments are passed to the underlying function, so you\n should refer to the documentation for each to see kind-specific options.\n\n Note that unlike when using the axes-level functions directly, data must be\n passed in a long-form DataFrame with variables specified by passing strings\n to `x`, `y`, `hue`, etc.\n\n {categorical_narrative}\n\n After plotting, the :class:`FacetGrid` with the plot is returned and can\n be used directly to tweak supporting plot details or add other layers.\n\n Parameters\n ----------\n {long_form_data}\n {string_input_params}\n row, col : names of variables in `data`, optional\n Categorical variables that will determine the faceting of the grid.\n {col_wrap}\n {stat_api_params}\n {order_vars}\n row_order, col_order : lists of strings, optional\n Order to organize the rows and/or columns of the grid in, otherwise the\n orders are inferred from the data objects.\n {height}\n {aspect}\n kind : str, optional\n The kind of plot to draw, corresponds to the name of a categorical\n axes-level plotting function. Options are: \"strip\", \"swarm\", \"box\", \"violin\",\n \"boxen\", \"point\", \"bar\", or \"count\".\n {native_scale}\n {formatter}\n {orient}\n {color}\n {palette}\n {hue_norm}\n legend : str or bool, optional\n Set to `False` to disable the legend. With `strip` or `swarm` plots,\n this also accepts a string, as described in the axes-level docstrings.\n {legend_out}\n {share_xy}\n {margin_titles}\n facet_kws : dict, optional\n Dictionary of other keyword arguments to pass to :class:`FacetGrid`.\n kwargs : key, value pairings\n Other keyword arguments are passed through to the underlying plotting\n function.\n\n Returns\n -------\n g : :class:`FacetGrid`\n Returns the :class:`FacetGrid` object with the plot on it for further\n tweaking.\n\n Examples\n --------\n\n .. include:: ../docstrings/catplot.rst\n\n \"\"\").format(**_categorical_docs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_Beeswarm_Beeswarm.__call__.None_4.else_.points_set_offsets_np_c__": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_Beeswarm_Beeswarm.__call__.None_4.else_.points_set_offsets_np_c__", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4016, "end_line": 4086, "span_ids": ["Beeswarm", "Beeswarm.__call__"], "tokens": 668}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Beeswarm:\n \"\"\"Modifies a scatterplot artist to show a beeswarm plot.\"\"\"\n def __init__(self, orient=\"v\", width=0.8, warn_thresh=.05):\n\n # XXX should we keep the orient parameterization or specify the swarm axis?\n\n self.orient = orient\n self.width = width\n self.warn_thresh = warn_thresh\n\n def __call__(self, points, center):\n \"\"\"Swarm `points`, a PathCollection, around the `center` position.\"\"\"\n # Convert from point size (area) to diameter\n\n ax = points.axes\n dpi = ax.figure.dpi\n\n # Get the original positions of the points\n orig_xy_data = points.get_offsets()\n\n # Reset the categorical positions to the center line\n cat_idx = 1 if self.orient == \"h\" else 0\n orig_xy_data[:, cat_idx] = center\n\n # Transform the data coordinates to point coordinates.\n # We'll figure out the swarm positions in the latter\n # and then convert back to data coordinates and replot\n orig_x_data, orig_y_data = orig_xy_data.T\n orig_xy = ax.transData.transform(orig_xy_data)\n\n # Order the variables so that x is the categorical axis\n if self.orient == \"h\":\n orig_xy = orig_xy[:, [1, 0]]\n\n # Add a column with each point's radius\n sizes = points.get_sizes()\n if sizes.size == 1:\n sizes = np.repeat(sizes, orig_xy.shape[0])\n edge = points.get_linewidth().item()\n radii = (np.sqrt(sizes) + edge) / 2 * (dpi / 72)\n orig_xy = np.c_[orig_xy, radii]\n\n # Sort along the value axis to facilitate the beeswarm\n sorter = np.argsort(orig_xy[:, 1])\n orig_xyr = orig_xy[sorter]\n\n # Adjust points along the categorical axis to prevent overlaps\n new_xyr = np.empty_like(orig_xyr)\n new_xyr[sorter] = self.beeswarm(orig_xyr)\n\n # Transform the point coordinates back to data coordinates\n if self.orient == \"h\":\n new_xy = new_xyr[:, [1, 0]]\n else:\n new_xy = new_xyr[:, :2]\n new_x_data, new_y_data = ax.transData.inverted().transform(new_xy).T\n\n swarm_axis = {\"h\": \"y\", \"v\": \"x\"}[self.orient]\n log_scale = getattr(ax, f\"get_{swarm_axis}scale\")() == \"log\"\n\n # Add gutters\n if self.orient == \"h\":\n self.add_gutters(new_y_data, center, log_scale=log_scale)\n else:\n self.add_gutters(new_x_data, center, log_scale=log_scale)\n\n # Reposition the points so they do not overlap\n if self.orient == \"h\":\n points.set_offsets(np.c_[orig_x_data, new_y_data])\n else:\n points.set_offsets(np.c_[new_x_data, orig_y_data])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_Beeswarm.beeswarm_Beeswarm.beeswarm.return.swarm": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_Beeswarm.beeswarm_Beeswarm.beeswarm.return.swarm", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4088, "end_line": 4118, "span_ids": ["Beeswarm.beeswarm"], "tokens": 268}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Beeswarm:\n\n def beeswarm(self, orig_xyr):\n \"\"\"Adjust x position of points to avoid overlaps.\"\"\"\n # In this method, `x` is always the categorical axis\n # Center of the swarm, in point coordinates\n midline = orig_xyr[0, 0]\n\n # Start the swarm with the first point\n swarm = np.atleast_2d(orig_xyr[0])\n\n # Loop over the remaining points\n for xyr_i in orig_xyr[1:]:\n\n # Find the points in the swarm that could possibly\n # overlap with the point we are currently placing\n neighbors = self.could_overlap(xyr_i, swarm)\n\n # Find positions that would be valid individually\n # with respect to each of the swarm neighbors\n candidates = self.position_candidates(xyr_i, neighbors)\n\n # Sort candidates by their centrality\n offsets = np.abs(candidates[:, 0] - midline)\n candidates = candidates[np.argsort(offsets)]\n\n # Find the first candidate that does not overlap any neighbors\n new_xyr_i = self.first_non_overlapping_candidate(candidates, neighbors)\n\n # Place it into the swarm\n swarm = np.vstack([swarm, new_xyr_i])\n\n return swarm", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_Beeswarm.could_overlap_Beeswarm.could_overlap.return.np_array_neighbors_1_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_Beeswarm.could_overlap_Beeswarm.could_overlap.return.np_array_neighbors_1_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4120, "end_line": 4132, "span_ids": ["Beeswarm.could_overlap"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Beeswarm:\n\n def could_overlap(self, xyr_i, swarm):\n \"\"\"Return a list of all swarm points that could overlap with target.\"\"\"\n # Because we work backwards through the swarm and can short-circuit,\n # the for-loop is faster than vectorization\n _, y_i, r_i = xyr_i\n neighbors = []\n for xyr_j in reversed(swarm):\n _, y_j, r_j = xyr_j\n if (y_i - y_j) < (r_i + r_j):\n neighbors.append(xyr_j)\n else:\n break\n return np.array(neighbors)[::-1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_Beeswarm.position_candidates_Beeswarm.position_candidates.return.np_array_candidates_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_Beeswarm.position_candidates_Beeswarm.position_candidates.return.np_array_candidates_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4134, "end_line": 4149, "span_ids": ["Beeswarm.position_candidates"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Beeswarm:\n\n def position_candidates(self, xyr_i, neighbors):\n \"\"\"Return a list of coordinates that might be valid by adjusting x.\"\"\"\n candidates = [xyr_i]\n x_i, y_i, r_i = xyr_i\n left_first = True\n for x_j, y_j, r_j in neighbors:\n dy = y_i - y_j\n dx = np.sqrt(max((r_i + r_j) ** 2 - dy ** 2, 0)) * 1.05\n cl, cr = (x_j - dx, y_i, r_i), (x_j + dx, y_i, r_i)\n if left_first:\n new_candidates = [cl, cr]\n else:\n new_candidates = [cr, cl]\n candidates.extend(new_candidates)\n left_first = not left_first\n return np.array(candidates)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_Beeswarm.first_non_overlapping_candidate_Beeswarm.first_non_overlapping_candidate.raise_RuntimeError_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_Beeswarm.first_non_overlapping_candidate_Beeswarm.first_non_overlapping_candidate.raise_RuntimeError_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4151, "end_line": 4182, "span_ids": ["Beeswarm.first_non_overlapping_candidate"], "tokens": 237}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Beeswarm:\n\n def first_non_overlapping_candidate(self, candidates, neighbors):\n \"\"\"Find the first candidate that does not overlap with the swarm.\"\"\"\n\n # If we have no neighbors, all candidates are good.\n if len(neighbors) == 0:\n return candidates[0]\n\n neighbors_x = neighbors[:, 0]\n neighbors_y = neighbors[:, 1]\n neighbors_r = neighbors[:, 2]\n\n for xyr_i in candidates:\n\n x_i, y_i, r_i = xyr_i\n\n dx = neighbors_x - x_i\n dy = neighbors_y - y_i\n sq_distances = np.square(dx) + np.square(dy)\n\n sep_needed = np.square(neighbors_r + r_i)\n\n # Good candidate does not overlap any of neighbors which means that\n # squared distance between candidate and any of the neighbors has\n # to be at least square of the summed radii\n good_candidate = np.all(sq_distances >= sep_needed)\n\n if good_candidate:\n return xyr_i\n\n raise RuntimeError(\n \"No non-overlapping candidates found. This should not happen.\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_Beeswarm.add_gutters_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_Beeswarm.add_gutters_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4184, "end_line": 4211, "span_ids": ["Beeswarm.add_gutters"], "tokens": 245}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Beeswarm:\n\n def add_gutters(self, points, center, log_scale=False):\n \"\"\"Stop points from extending beyond their territory.\"\"\"\n half_width = self.width / 2\n if log_scale:\n low_gutter = 10 ** (np.log10(center) - half_width)\n else:\n low_gutter = center - half_width\n off_low = points < low_gutter\n if off_low.any():\n points[off_low] = low_gutter\n if log_scale:\n high_gutter = 10 ** (np.log10(center) + half_width)\n else:\n high_gutter = center + half_width\n off_high = points > high_gutter\n if off_high.any():\n points[off_high] = high_gutter\n\n gutter_prop = (off_high + off_low).sum() / len(points)\n if gutter_prop > self.warn_thresh:\n msg = (\n \"{:.1%} of the points cannot be placed; you may want \"\n \"to decrease the size of the markers or use stripplot.\"\n ).format(gutter_prop)\n warnings.warn(msg, UserWarning)\n\n return points", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/cm.py_from_matplotlib_import_co__crest_lut": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/cm.py_from_matplotlib_import_co__crest_lut", "embedding": null, "metadata": {"file_path": "seaborn/cm.py", "file_name": "cm.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 1562, "span_ids": ["impl", "impl:7", "impl:11", "impl:9", "impl:3", "imports", "impl:5"], "tokens": 74}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from matplotlib import colors\nfrom seaborn._compat import register_colormap\n\n\n_rocket_lut =\n # ... other code\n\n\n_mako_lut =\n # ... other code\n\n\n_vlag_lut =\n # ... other code\n\n\n_icefire_lut =\n # ... other code\n\n\n_flare_lut =\n # ... other code\n\n\n_crest_lut =\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/colors/__init__.py__": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/colors/__init__.py__", "embedding": null, "metadata": {"file_path": "seaborn/colors/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 3, "span_ids": ["imports:2", "docstring:2", "docstring", "imports"], "tokens": 32}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from .xkcd_rgb import xkcd_rgb # noqa: F401\nfrom .crayons import crayons # noqa: F401", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/colors/crayons.py_crayons_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/colors/crayons.py_crayons_", "embedding": null, "metadata": {"file_path": "seaborn/colors/crayons.py", "file_name": "crayons.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 121, "span_ids": ["impl"], "tokens": 1373}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "crayons = {'Almond': '#EFDECD',\n 'Antique Brass': '#CD9575',\n 'Apricot': '#FDD9B5',\n 'Aquamarine': '#78DBE2',\n 'Asparagus': '#87A96B',\n 'Atomic Tangerine': '#FFA474',\n 'Banana Mania': '#FAE7B5',\n 'Beaver': '#9F8170',\n 'Bittersweet': '#FD7C6E',\n 'Black': '#000000',\n 'Blue': '#1F75FE',\n 'Blue Bell': '#A2A2D0',\n 'Blue Green': '#0D98BA',\n 'Blue Violet': '#7366BD',\n 'Blush': '#DE5D83',\n 'Brick Red': '#CB4154',\n 'Brown': '#B4674D',\n 'Burnt Orange': '#FF7F49',\n 'Burnt Sienna': '#EA7E5D',\n 'Cadet Blue': '#B0B7C6',\n 'Canary': '#FFFF99',\n 'Caribbean Green': '#00CC99',\n 'Carnation Pink': '#FFAACC',\n 'Cerise': '#DD4492',\n 'Cerulean': '#1DACD6',\n 'Chestnut': '#BC5D58',\n 'Copper': '#DD9475',\n 'Cornflower': '#9ACEEB',\n 'Cotton Candy': '#FFBCD9',\n 'Dandelion': '#FDDB6D',\n 'Denim': '#2B6CC4',\n 'Desert Sand': '#EFCDB8',\n 'Eggplant': '#6E5160',\n 'Electric Lime': '#CEFF1D',\n 'Fern': '#71BC78',\n 'Forest Green': '#6DAE81',\n 'Fuchsia': '#C364C5',\n 'Fuzzy Wuzzy': '#CC6666',\n 'Gold': '#E7C697',\n 'Goldenrod': '#FCD975',\n 'Granny Smith Apple': '#A8E4A0',\n 'Gray': '#95918C',\n 'Green': '#1CAC78',\n 'Green Yellow': '#F0E891',\n 'Hot Magenta': '#FF1DCE',\n 'Inchworm': '#B2EC5D',\n 'Indigo': '#5D76CB',\n 'Jazzberry Jam': '#CA3767',\n 'Jungle Green': '#3BB08F',\n 'Laser Lemon': '#FEFE22',\n 'Lavender': '#FCB4D5',\n 'Macaroni and Cheese': '#FFBD88',\n 'Magenta': '#F664AF',\n 'Mahogany': '#CD4A4C',\n 'Manatee': '#979AAA',\n 'Mango Tango': '#FF8243',\n 'Maroon': '#C8385A',\n 'Mauvelous': '#EF98AA',\n 'Melon': '#FDBCB4',\n 'Midnight Blue': '#1A4876',\n 'Mountain Meadow': '#30BA8F',\n 'Navy Blue': '#1974D2',\n 'Neon Carrot': '#FFA343',\n 'Olive Green': '#BAB86C',\n 'Orange': '#FF7538',\n 'Orchid': '#E6A8D7',\n 'Outer Space': '#414A4C',\n 'Outrageous Orange': '#FF6E4A',\n 'Pacific Blue': '#1CA9C9',\n 'Peach': '#FFCFAB',\n 'Periwinkle': '#C5D0E6',\n 'Piggy Pink': '#FDDDE6',\n 'Pine Green': '#158078',\n 'Pink Flamingo': '#FC74FD',\n 'Pink Sherbert': '#F78FA7',\n 'Plum': '#8E4585',\n 'Purple Heart': '#7442C8',\n \"Purple Mountains' Majesty\": '#9D81BA',\n 'Purple Pizzazz': '#FE4EDA',\n 'Radical Red': '#FF496C',\n 'Raw Sienna': '#D68A59',\n 'Razzle Dazzle Rose': '#FF48D0',\n 'Razzmatazz': '#E3256B',\n 'Red': '#EE204D',\n 'Red Orange': '#FF5349',\n 'Red Violet': '#C0448F',\n \"Robin's Egg Blue\": '#1FCECB',\n 'Royal Purple': '#7851A9',\n 'Salmon': '#FF9BAA',\n 'Scarlet': '#FC2847',\n \"Screamin' Green\": '#76FF7A',\n 'Sea Green': '#93DFB8',\n 'Sepia': '#A5694F',\n 'Shadow': '#8A795D',\n 'Shamrock': '#45CEA2',\n 'Shocking Pink': '#FB7EFD',\n 'Silver': '#CDC5C2',\n 'Sky Blue': '#80DAEB',\n 'Spring Green': '#ECEABE',\n 'Sunglow': '#FFCF48',\n 'Sunset Orange': '#FD5E53',\n 'Tan': '#FAA76C',\n 'Tickle Me Pink': '#FC89AC',\n 'Timberwolf': '#DBD7D2',\n 'Tropical Rain Forest': '#17806D',\n 'Tumbleweed': '#DEAA88',\n 'Turquoise Blue': '#77DDE7',\n 'Unmellow Yellow': '#FFFF66',\n 'Violet (Purple)': '#926EAE',\n 'Violet Red': '#F75394',\n 'Vivid Tangerine': '#FFA089',\n 'Vivid Violet': '#8F509D',\n 'White': '#FFFFFF',\n 'Wild Blue Yonder': '#A2ADD0',\n 'Wild Strawberry': '#FF43A4',\n 'Wild Watermelon': '#FC6C85',\n 'Wisteria': '#CDA4DE',\n 'Yellow': '#FCE883',\n 'Yellow Green': '#C5E384',\n 'Yellow Orange': '#FFAE42'}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/colors/xkcd_rgb.py_xkcd_rgb_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/colors/xkcd_rgb.py_xkcd_rgb_", "embedding": null, "metadata": {"file_path": "seaborn/colors/xkcd_rgb.py", "file_name": "xkcd_rgb.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 950, "span_ids": ["impl"], "tokens": 9}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "xkcd_rgb =\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__Plotting_functions_for__param_docs.DocstringComponents_from_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__Plotting_functions_for__param_docs.DocstringComponents_from_", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 91, "span_ids": ["impl", "docstring", "imports"], "tokens": 588}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Plotting functions for visualizing distributions.\"\"\"\nfrom numbers import Number\nfrom functools import partial\nimport math\nimport textwrap\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nimport matplotlib.transforms as tx\nfrom matplotlib.colors import to_rgba\nfrom matplotlib.collections import LineCollection\n\nfrom ._oldcore import (\n VectorPlotter,\n)\nfrom ._statistics import (\n KDE,\n Histogram,\n ECDF,\n)\nfrom .axisgrid import (\n FacetGrid,\n _facet_docs,\n)\nfrom .utils import (\n remove_na,\n _kde_support,\n _normalize_kwargs,\n _check_argument,\n _assign_default_kwargs,\n _default_color,\n)\nfrom .palettes import color_palette\nfrom .external import husl\nfrom .external.kde import gaussian_kde\nfrom ._docstrings import (\n DocstringComponents,\n _core_docs,\n)\n\n\n__all__ = [\"displot\", \"histplot\", \"kdeplot\", \"ecdfplot\", \"rugplot\", \"distplot\"]\n\n# ==================================================================================== #\n# Module documentation\n# ==================================================================================== #\n\n_dist_params = dict(\n\n multiple=\"\"\"\nmultiple : {{\"layer\", \"stack\", \"fill\"}}\n Method for drawing multiple elements when semantic mapping creates subsets.\n Only relevant with univariate data.\n \"\"\",\n log_scale=\"\"\"\nlog_scale : bool or number, or pair of bools or numbers\n Set axis scale(s) to log. A single value sets the data axis for univariate\n distributions and both axes for bivariate distributions. A pair of values\n sets each axis independently. Numeric values are interpreted as the desired\n base (default 10). If `False`, defer to the existing Axes scale.\n \"\"\",\n legend=\"\"\"\nlegend : bool\n If False, suppress the legend for semantic variables.\n \"\"\",\n cbar=\"\"\"\ncbar : bool\n If True, add a colorbar to annotate the color mapping in a bivariate plot.\n Note: Does not currently support plots with a ``hue`` variable well.\n \"\"\",\n cbar_ax=\"\"\"\ncbar_ax : :class:`matplotlib.axes.Axes`\n Pre-existing axes for the colorbar.\n \"\"\",\n cbar_kws=\"\"\"\ncbar_kws : dict\n Additional parameters passed to :meth:`matplotlib.figure.Figure.colorbar`.\n \"\"\",\n)\n\n_param_docs = DocstringComponents.from_nested_components(\n core=_core_docs[\"params\"],\n facets=DocstringComponents(_facet_docs),\n dist=DocstringComponents(_dist_params),\n kde=DocstringComponents.from_function_params(KDE.__init__),\n hist=DocstringComponents.from_function_params(Histogram.__init__),\n ecdf=DocstringComponents.from_function_params(ECDF.__init__),\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_None_4__DistributionPlotter.has_xy_data.return.bool_x_y_set_sel": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_None_4__DistributionPlotter.has_xy_data.return.bool_x_y_set_sel", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 94, "end_line": 135, "span_ids": ["impl", "_DistributionPlotter", "_DistributionPlotter.data_variable", "_DistributionPlotter.has_xy_data", "_DistributionPlotter.univariate"], "tokens": 316}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# ==================================================================================== #\n# Internal API\n# ==================================================================================== #\n\n\nclass _DistributionPlotter(VectorPlotter):\n\n semantics = \"x\", \"y\", \"hue\", \"weights\"\n\n wide_structure = {\"x\": \"@values\", \"hue\": \"@columns\"}\n flat_structure = {\"x\": \"@values\"}\n\n def __init__(\n self,\n data=None,\n variables={},\n ):\n\n super().__init__(data=data, variables=variables)\n\n @property\n def univariate(self):\n \"\"\"Return True if only x or y are used.\"\"\"\n # TODO this could go down to core, but putting it here now.\n # We'd want to be conceptually clear that univariate only applies\n # to x/y and not to other semantics, which can exist.\n # We haven't settled on a good conceptual name for x/y.\n return bool({\"x\", \"y\"} - set(self.variables))\n\n @property\n def data_variable(self):\n \"\"\"Return the variable with data for univariate plots.\"\"\"\n # TODO This could also be in core, but it should have a better name.\n if not self.univariate:\n raise AttributeError(\"This is not a univariate plot\")\n return {\"x\", \"y\"}.intersection(self.variables).pop()\n\n @property\n def has_xy_data(self):\n \"\"\"Return True at least one of x or y is defined.\"\"\"\n # TODO see above points about where this should go\n return bool({\"x\", \"y\"} & set(self.variables))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter._add_legend__DistributionPlotter._add_legend.if_isinstance_ax_obj_mpl.else_i_e_a_FacetGrid.ax_obj_add_legend_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter._add_legend__DistributionPlotter._add_legend.if_isinstance_ax_obj_mpl.else_i_e_a_FacetGrid.ax_obj_add_legend_", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 137, "end_line": 170, "span_ids": ["_DistributionPlotter._add_legend"], "tokens": 298}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _DistributionPlotter(VectorPlotter):\n\n def _add_legend(\n self,\n ax_obj, artist, fill, element, multiple, alpha, artist_kws, legend_kws,\n ):\n \"\"\"Add artists that reflect semantic mappings and put then in a legend.\"\"\"\n # TODO note that this doesn't handle numeric mappings like the relational plots\n handles = []\n labels = []\n for level in self._hue_map.levels:\n color = self._hue_map(level)\n\n kws = self._artist_kws(\n artist_kws, fill, element, multiple, color, alpha\n )\n\n # color gets added to the kws to workaround an issue with barplot's color\n # cycle integration but it causes problems in this context where we are\n # setting artist properties directly, so pop it off here\n if \"facecolor\" in kws:\n kws.pop(\"color\", None)\n\n handles.append(artist(**kws))\n labels.append(level)\n\n if isinstance(ax_obj, mpl.axes.Axes):\n ax_obj.legend(handles, labels, title=self.variables[\"hue\"], **legend_kws)\n else: # i.e. a FacetGrid. TODO make this better\n legend_data = dict(zip(labels, handles))\n ax_obj.add_legend(\n legend_data,\n title=self.variables[\"hue\"],\n label_order=self.var_levels[\"hue\"],\n **legend_kws\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter._artist_kws__DistributionPlotter._artist_kws.return.kws": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter._artist_kws__DistributionPlotter._artist_kws.return.kws", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 172, "end_line": 193, "span_ids": ["_DistributionPlotter._artist_kws"], "tokens": 228}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _DistributionPlotter(VectorPlotter):\n\n def _artist_kws(self, kws, fill, element, multiple, color, alpha):\n \"\"\"Handle differences between artists in filled/unfilled plots.\"\"\"\n kws = kws.copy()\n if fill:\n kws = _normalize_kwargs(kws, mpl.collections.PolyCollection)\n kws.setdefault(\"facecolor\", to_rgba(color, alpha))\n\n if element == \"bars\":\n # Make bar() interface with property cycle correctly\n # https://github.com/matplotlib/matplotlib/issues/19385\n kws[\"color\"] = \"none\"\n\n if multiple in [\"stack\", \"fill\"] or element == \"bars\":\n kws.setdefault(\"edgecolor\", mpl.rcParams[\"patch.edgecolor\"])\n else:\n kws.setdefault(\"edgecolor\", to_rgba(color, 1))\n elif element == \"bars\":\n kws[\"facecolor\"] = \"none\"\n kws[\"edgecolor\"] = to_rgba(color, alpha)\n else:\n kws[\"color\"] = to_rgba(color, alpha)\n return kws", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter._quantile_to_level__DistributionPlotter._default_discrete.return.discrete": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter._quantile_to_level__DistributionPlotter._default_discrete.return.discrete", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 195, "end_line": 227, "span_ids": ["_DistributionPlotter._default_discrete", "_DistributionPlotter._cmap_from_color", "_DistributionPlotter._quantile_to_level"], "tokens": 406}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _DistributionPlotter(VectorPlotter):\n\n def _quantile_to_level(self, data, quantile):\n \"\"\"Return data levels corresponding to quantile cuts of mass.\"\"\"\n isoprop = np.asarray(quantile)\n values = np.ravel(data)\n sorted_values = np.sort(values)[::-1]\n normalized_values = np.cumsum(sorted_values) / values.sum()\n idx = np.searchsorted(normalized_values, 1 - isoprop)\n levels = np.take(sorted_values, idx, mode=\"clip\")\n return levels\n\n def _cmap_from_color(self, color):\n \"\"\"Return a sequential colormap given a color seed.\"\"\"\n # Like so much else here, this is broadly useful, but keeping it\n # in this class to signify that I haven't thought overly hard about it...\n r, g, b, _ = to_rgba(color)\n h, s, _ = husl.rgb_to_husl(r, g, b)\n xx = np.linspace(-1, 1, int(1.15 * 256))[:256]\n ramp = np.zeros((256, 3))\n ramp[:, 0] = h\n ramp[:, 1] = s * np.cos(xx)\n ramp[:, 2] = np.linspace(35, 80, 256)\n colors = np.clip([husl.husl_to_rgb(*hsl) for hsl in ramp], 0, 1)\n return mpl.colors.ListedColormap(colors[::-1])\n\n def _default_discrete(self):\n \"\"\"Find default values for discrete hist estimation based on variable type.\"\"\"\n if self.univariate:\n discrete = self.var_types[self.data_variable] == \"categorical\"\n else:\n discrete_x = self.var_types[\"x\"] == \"categorical\"\n discrete_y = self.var_types[\"y\"] == \"categorical\"\n discrete = discrete_x, discrete_y\n return discrete", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter._resolve_multiple__DistributionPlotter._resolve_multiple.return.curves_baselines": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter._resolve_multiple__DistributionPlotter._resolve_multiple.return.curves_baselines", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 229, "end_line": 298, "span_ids": ["_DistributionPlotter._resolve_multiple"], "tokens": 654}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _DistributionPlotter(VectorPlotter):\n\n def _resolve_multiple(self, curves, multiple):\n \"\"\"Modify the density data structure to handle multiple densities.\"\"\"\n\n # Default baselines have all densities starting at 0\n baselines = {k: np.zeros_like(v) for k, v in curves.items()}\n\n # TODO we should have some central clearinghouse for checking if any\n # \"grouping\" (terminnology?) semantics have been assigned\n if \"hue\" not in self.variables:\n return curves, baselines\n\n if multiple in (\"stack\", \"fill\"):\n\n # Setting stack or fill means that the curves share a\n # support grid / set of bin edges, so we can make a dataframe\n # Reverse the column order to plot from top to bottom\n curves = pd.DataFrame(curves).iloc[:, ::-1]\n\n # Find column groups that are nested within col/row variables\n column_groups = {}\n for i, keyd in enumerate(map(dict, curves.columns.tolist())):\n facet_key = keyd.get(\"col\", None), keyd.get(\"row\", None)\n column_groups.setdefault(facet_key, [])\n column_groups[facet_key].append(i)\n\n baselines = curves.copy()\n for cols in column_groups.values():\n\n norm_constant = curves.iloc[:, cols].sum(axis=\"columns\")\n\n # Take the cumulative sum to stack\n curves.iloc[:, cols] = curves.iloc[:, cols].cumsum(axis=\"columns\")\n\n # Normalize by row sum to fill\n if multiple == \"fill\":\n curves.iloc[:, cols] = (curves\n .iloc[:, cols]\n .div(norm_constant, axis=\"index\"))\n\n # Define where each segment starts\n baselines.iloc[:, cols] = (curves\n .iloc[:, cols]\n .shift(1, axis=1)\n .fillna(0))\n\n if multiple == \"dodge\":\n\n # Account for the unique semantic (non-faceting) levels\n # This will require rethiniking if we add other semantics!\n hue_levels = self.var_levels[\"hue\"]\n n = len(hue_levels)\n for key in curves:\n level = dict(key)[\"hue\"]\n hist = curves[key].reset_index(name=\"heights\")\n level_idx = hue_levels.index(level)\n if self._log_scaled(self.data_variable):\n log_min = np.log10(hist[\"edges\"])\n log_max = np.log10(hist[\"edges\"] + hist[\"widths\"])\n log_width = (log_max - log_min) / n\n new_min = np.power(10, log_min + level_idx * log_width)\n new_max = np.power(10, log_min + (level_idx + 1) * log_width)\n hist[\"widths\"] = new_max - new_min\n hist[\"edges\"] = new_min\n else:\n hist[\"widths\"] /= n\n hist[\"edges\"] += level_idx * hist[\"widths\"]\n\n curves[key] = hist.set_index([\"edges\", \"widths\"])[\"heights\"]\n\n return curves, baselines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.___DistributionPlotter.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.___DistributionPlotter.None_5", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 300, "end_line": 380, "span_ids": ["_DistributionPlotter._resolve_multiple", "_DistributionPlotter._compute_univariate_density"], "tokens": 516}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _DistributionPlotter(VectorPlotter):\n\n # -------------------------------------------------------------------------------- #\n # Computation\n # -------------------------------------------------------------------------------- #\n\n def _compute_univariate_density(\n self,\n data_variable,\n common_norm,\n common_grid,\n estimate_kws,\n log_scale,\n warn_singular=True,\n ):\n\n # Initialize the estimator object\n estimator = KDE(**estimate_kws)\n\n if set(self.variables) - {\"x\", \"y\"}:\n if common_grid:\n all_observations = self.comp_data.dropna()\n estimator.define_support(all_observations[data_variable])\n else:\n common_norm = False\n\n all_data = self.plot_data.dropna()\n if common_norm and \"weights\" in all_data:\n whole_weight = all_data[\"weights\"].sum()\n else:\n whole_weight = len(all_data)\n\n densities = {}\n\n for sub_vars, sub_data in self.iter_data(\"hue\", from_comp_data=True):\n\n # Extract the data points from this sub set and remove nulls\n observations = sub_data[data_variable]\n\n # Extract the weights for this subset of observations\n if \"weights\" in self.variables:\n weights = sub_data[\"weights\"]\n part_weight = weights.sum()\n else:\n weights = None\n part_weight = len(sub_data)\n\n # Estimate the density of observations at this level\n variance = np.nan_to_num(observations.var())\n singular = len(observations) < 2 or math.isclose(variance, 0)\n try:\n if not singular:\n # Convoluted approach needed because numerical failures\n # can manifest in a few different ways.\n density, support = estimator(observations, weights=weights)\n except np.linalg.LinAlgError:\n singular = True\n\n if singular:\n msg = (\n \"Dataset has 0 variance; skipping density estimate. \"\n \"Pass `warn_singular=False` to disable this warning.\"\n )\n if warn_singular:\n warnings.warn(msg, UserWarning, stacklevel=4)\n continue\n\n if log_scale:\n support = np.power(10, support)\n\n # Apply a scaling factor so that the integral over all subsets is 1\n if common_norm:\n density *= part_weight / whole_weight\n\n # Store the density for this level\n key = tuple(sub_vars.items())\n densities[key] = pd.Series(density, index=support)\n\n return densities\n\n # -------------------------------------------------------------------------------- #\n # Plotting\n # -------------------------------------------------------------------------------- #", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_univariate_histogram__DistributionPlotter.plot_univariate_histogram._First_pass_through_the_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_univariate_histogram__DistributionPlotter.plot_univariate_histogram._First_pass_through_the_", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 382, "end_line": 462, "span_ids": ["_DistributionPlotter.plot_univariate_histogram"], "tokens": 597}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _DistributionPlotter(VectorPlotter):\n\n def plot_univariate_histogram(\n self,\n multiple,\n element,\n fill,\n common_norm,\n common_bins,\n shrink,\n kde,\n kde_kws,\n color,\n legend,\n line_kws,\n estimate_kws,\n **plot_kws,\n ):\n\n # -- Default keyword dicts\n kde_kws = {} if kde_kws is None else kde_kws.copy()\n line_kws = {} if line_kws is None else line_kws.copy()\n estimate_kws = {} if estimate_kws is None else estimate_kws.copy()\n\n # -- Input checking\n _check_argument(\"multiple\", [\"layer\", \"stack\", \"fill\", \"dodge\"], multiple)\n _check_argument(\"element\", [\"bars\", \"step\", \"poly\"], element)\n\n auto_bins_with_weights = (\n \"weights\" in self.variables\n and estimate_kws[\"bins\"] == \"auto\"\n and estimate_kws[\"binwidth\"] is None\n and not estimate_kws[\"discrete\"]\n )\n if auto_bins_with_weights:\n msg = (\n \"`bins` cannot be 'auto' when using weights. \"\n \"Setting `bins=10`, but you will likely want to adjust.\"\n )\n warnings.warn(msg, UserWarning)\n estimate_kws[\"bins\"] = 10\n\n # Simplify downstream code if we are not normalizing\n if estimate_kws[\"stat\"] == \"count\":\n common_norm = False\n\n # Now initialize the Histogram estimator\n estimator = Histogram(**estimate_kws)\n histograms = {}\n\n # Do pre-compute housekeeping related to multiple groups\n all_data = self.comp_data.dropna()\n all_weights = all_data.get(\"weights\", None)\n\n if set(self.variables) - {\"x\", \"y\"}: # Check if we'll have multiple histograms\n if common_bins:\n estimator.define_bin_params(\n all_data[self.data_variable], weights=all_weights\n )\n else:\n common_norm = False\n\n if common_norm and all_weights is not None:\n whole_weight = all_weights.sum()\n else:\n whole_weight = len(all_data)\n\n # Estimate the smoothed kernel densities, for use later\n if kde:\n # TODO alternatively, clip at min/max bins?\n kde_kws.setdefault(\"cut\", 0)\n kde_kws[\"cumulative\"] = estimate_kws[\"cumulative\"]\n log_scale = self._log_scaled(self.data_variable)\n densities = self._compute_univariate_density(\n self.data_variable,\n common_norm,\n common_bins,\n kde_kws,\n log_scale,\n warn_singular=False,\n )\n\n # First pass through the data to compute the histograms\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_univariate_histogram.for_sub_vars_sub_data_in__DistributionPlotter.plot_univariate_histogram._Go_back_through_the_dat": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_univariate_histogram.for_sub_vars_sub_data_in__DistributionPlotter.plot_univariate_histogram._Go_back_through_the_dat", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 449, "end_line": 535, "span_ids": ["_DistributionPlotter.plot_univariate_histogram"], "tokens": 733}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _DistributionPlotter(VectorPlotter):\n\n def plot_univariate_histogram(\n self,\n multiple,\n element,\n fill,\n common_norm,\n common_bins,\n shrink,\n kde,\n kde_kws,\n color,\n legend,\n line_kws,\n estimate_kws,\n **plot_kws,\n ):\n # ... other code\n for sub_vars, sub_data in self.iter_data(\"hue\", from_comp_data=True):\n\n # Prepare the relevant data\n key = tuple(sub_vars.items())\n observations = sub_data[self.data_variable]\n\n if \"weights\" in self.variables:\n weights = sub_data[\"weights\"]\n part_weight = weights.sum()\n else:\n weights = None\n part_weight = len(sub_data)\n\n # Do the histogram computation\n heights, edges = estimator(observations, weights=weights)\n\n # Rescale the smoothed curve to match the histogram\n if kde and key in densities:\n density = densities[key]\n if estimator.cumulative:\n hist_norm = heights.max()\n else:\n hist_norm = (heights * np.diff(edges)).sum()\n densities[key] *= hist_norm\n\n # Convert edges back to original units for plotting\n if self._log_scaled(self.data_variable):\n edges = np.power(10, edges)\n\n # Pack the histogram data and metadata together\n orig_widths = np.diff(edges)\n widths = shrink * orig_widths\n edges = edges[:-1] + (1 - shrink) / 2 * orig_widths\n index = pd.MultiIndex.from_arrays([\n pd.Index(edges, name=\"edges\"),\n pd.Index(widths, name=\"widths\"),\n ])\n hist = pd.Series(heights, index=index, name=\"heights\")\n\n # Apply scaling to normalize across groups\n if common_norm:\n hist *= part_weight / whole_weight\n\n # Store the finalized histogram data for future plotting\n histograms[key] = hist\n\n # Modify the histogram and density data to resolve multiple groups\n histograms, baselines = self._resolve_multiple(histograms, multiple)\n if kde:\n densities, _ = self._resolve_multiple(\n densities, None if multiple == \"dodge\" else multiple\n )\n\n # Set autoscaling-related meta\n sticky_stat = (0, 1) if multiple == \"fill\" else (0, np.inf)\n if multiple == \"fill\":\n # Filled plots should not have any margins\n bin_vals = histograms.index.to_frame()\n edges = bin_vals[\"edges\"]\n widths = bin_vals[\"widths\"]\n sticky_data = (\n edges.min(),\n edges.max() + widths.loc[edges.idxmax()]\n )\n else:\n sticky_data = []\n\n # --- Handle default visual attributes\n\n # Note: default linewidth is determined after plotting\n\n # Default alpha should depend on other parameters\n if fill:\n # Note: will need to account for other grouping semantics if added\n if \"hue\" in self.variables and multiple == \"layer\":\n default_alpha = .5 if element == \"bars\" else .25\n elif kde:\n default_alpha = .5\n else:\n default_alpha = .75\n else:\n default_alpha = 1\n alpha = plot_kws.pop(\"alpha\", default_alpha) # TODO make parameter?\n\n hist_artists = []\n\n # Go back through the dataset and draw the plots\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_univariate_histogram.for_sub_vars___in_self_i__DistributionPlotter.plot_univariate_histogram.for_sub_vars___in_self_i.if_kde_.if_sticky_y_is_not_None_.line_sticky_edges_y_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_univariate_histogram.for_sub_vars___in_self_i__DistributionPlotter.plot_univariate_histogram.for_sub_vars___in_self_i.if_kde_.if_sticky_y_is_not_None_.line_sticky_edges_y_", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 536, "end_line": 646, "span_ids": ["_DistributionPlotter.plot_univariate_histogram"], "tokens": 861}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _DistributionPlotter(VectorPlotter):\n\n def plot_univariate_histogram(\n self,\n multiple,\n element,\n fill,\n common_norm,\n common_bins,\n shrink,\n kde,\n kde_kws,\n color,\n legend,\n line_kws,\n estimate_kws,\n **plot_kws,\n ):\n # ... other code\n for sub_vars, _ in self.iter_data(\"hue\", reverse=True):\n\n key = tuple(sub_vars.items())\n hist = histograms[key].rename(\"heights\").reset_index()\n bottom = np.asarray(baselines[key])\n\n ax = self._get_axes(sub_vars)\n\n # Define the matplotlib attributes that depend on semantic mapping\n if \"hue\" in self.variables:\n sub_color = self._hue_map(sub_vars[\"hue\"])\n else:\n sub_color = color\n\n artist_kws = self._artist_kws(\n plot_kws, fill, element, multiple, sub_color, alpha\n )\n\n if element == \"bars\":\n\n # Use matplotlib bar plotting\n\n plot_func = ax.bar if self.data_variable == \"x\" else ax.barh\n artists = plot_func(\n hist[\"edges\"],\n hist[\"heights\"] - bottom,\n hist[\"widths\"],\n bottom,\n align=\"edge\",\n **artist_kws,\n )\n\n for bar in artists:\n if self.data_variable == \"x\":\n bar.sticky_edges.x[:] = sticky_data\n bar.sticky_edges.y[:] = sticky_stat\n else:\n bar.sticky_edges.x[:] = sticky_stat\n bar.sticky_edges.y[:] = sticky_data\n\n hist_artists.extend(artists)\n\n else:\n\n # Use either fill_between or plot to draw hull of histogram\n if element == \"step\":\n\n final = hist.iloc[-1]\n x = np.append(hist[\"edges\"], final[\"edges\"] + final[\"widths\"])\n y = np.append(hist[\"heights\"], final[\"heights\"])\n b = np.append(bottom, bottom[-1])\n\n if self.data_variable == \"x\":\n step = \"post\"\n drawstyle = \"steps-post\"\n else:\n step = \"post\" # fillbetweenx handles mapping internally\n drawstyle = \"steps-pre\"\n\n elif element == \"poly\":\n\n x = hist[\"edges\"] + hist[\"widths\"] / 2\n y = hist[\"heights\"]\n b = bottom\n\n step = None\n drawstyle = None\n\n if self.data_variable == \"x\":\n if fill:\n artist = ax.fill_between(x, b, y, step=step, **artist_kws)\n else:\n artist, = ax.plot(x, y, drawstyle=drawstyle, **artist_kws)\n artist.sticky_edges.x[:] = sticky_data\n artist.sticky_edges.y[:] = sticky_stat\n else:\n if fill:\n artist = ax.fill_betweenx(x, b, y, step=step, **artist_kws)\n else:\n artist, = ax.plot(y, x, drawstyle=drawstyle, **artist_kws)\n artist.sticky_edges.x[:] = sticky_stat\n artist.sticky_edges.y[:] = sticky_data\n\n hist_artists.append(artist)\n\n if kde:\n\n # Add in the density curves\n\n try:\n density = densities[key]\n except KeyError:\n continue\n support = density.index\n\n if \"x\" in self.variables:\n line_args = support, density\n sticky_x, sticky_y = None, (0, np.inf)\n else:\n line_args = density, support\n sticky_x, sticky_y = (0, np.inf), None\n\n line_kws[\"color\"] = to_rgba(sub_color, 1)\n line, = ax.plot(\n *line_args, **line_kws,\n )\n\n if sticky_x is not None:\n line.sticky_edges.x[:] = sticky_x\n if sticky_y is not None:\n line.sticky_edges.y[:] = sticky_y\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_univariate_histogram.if_element_bars_and___DistributionPlotter.plot_univariate_histogram.if_hue_in_self_variable.self__add_legend_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_univariate_histogram.if_element_bars_and___DistributionPlotter.plot_univariate_histogram.if_hue_in_self_variable.self__add_legend_", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 648, "end_line": 726, "span_ids": ["_DistributionPlotter.plot_univariate_histogram"], "tokens": 708}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _DistributionPlotter(VectorPlotter):\n\n def plot_univariate_histogram(\n self,\n multiple,\n element,\n fill,\n common_norm,\n common_bins,\n shrink,\n kde,\n kde_kws,\n color,\n legend,\n line_kws,\n estimate_kws,\n **plot_kws,\n ):\n # ... other code\n\n if element == \"bars\" and \"linewidth\" not in plot_kws:\n\n # Now we handle linewidth, which depends on the scaling of the plot\n\n # We will base everything on the minimum bin width\n hist_metadata = pd.concat([\n # Use .items for generality over dict or df\n h.index.to_frame() for _, h in histograms.items()\n ]).reset_index(drop=True)\n thin_bar_idx = hist_metadata[\"widths\"].idxmin()\n binwidth = hist_metadata.loc[thin_bar_idx, \"widths\"]\n left_edge = hist_metadata.loc[thin_bar_idx, \"edges\"]\n\n # Set initial value\n default_linewidth = math.inf\n\n # Loop through subsets based only on facet variables\n for sub_vars, _ in self.iter_data():\n\n ax = self._get_axes(sub_vars)\n\n # Needed in some cases to get valid transforms.\n # Innocuous in other cases?\n ax.autoscale_view()\n\n # Convert binwidth from data coordinates to pixels\n pts_x, pts_y = 72 / ax.figure.dpi * abs(\n ax.transData.transform([left_edge + binwidth] * 2)\n - ax.transData.transform([left_edge] * 2)\n )\n if self.data_variable == \"x\":\n binwidth_points = pts_x\n else:\n binwidth_points = pts_y\n\n # The relative size of the lines depends on the appearance\n # This is a provisional value and may need more tweaking\n default_linewidth = min(.1 * binwidth_points, default_linewidth)\n\n # Set the attributes\n for bar in hist_artists:\n\n # Don't let the lines get too thick\n max_linewidth = bar.get_linewidth()\n if not fill:\n max_linewidth *= 1.5\n\n linewidth = min(default_linewidth, max_linewidth)\n\n # If not filling, don't let lines disappear\n if not fill:\n min_linewidth = .5\n linewidth = max(linewidth, min_linewidth)\n\n bar.set_linewidth(linewidth)\n\n # --- Finalize the plot ----\n\n # Axis labels\n ax = self.ax if self.ax is not None else self.facets.axes.flat[0]\n default_x = default_y = \"\"\n if self.data_variable == \"x\":\n default_y = estimator.stat.capitalize()\n if self.data_variable == \"y\":\n default_x = estimator.stat.capitalize()\n self._add_axis_labels(ax, default_x, default_y)\n\n # Legend for semantic variables\n if \"hue\" in self.variables and legend:\n\n if fill or element == \"bars\":\n artist = partial(mpl.patches.Patch)\n else:\n artist = partial(mpl.lines.Line2D, [], [])\n\n ax_obj = self.ax if self.ax is not None else self.facets\n self._add_legend(\n ax_obj, artist, fill, element, multiple, alpha, plot_kws, {},\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_bivariate_histogram__DistributionPlotter.plot_bivariate_histogram._Loop_over_data_sub": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_bivariate_histogram__DistributionPlotter.plot_bivariate_histogram._Loop_over_data_sub", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 728, "end_line": 784, "span_ids": ["_DistributionPlotter.plot_bivariate_histogram"], "tokens": 443}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _DistributionPlotter(VectorPlotter):\n\n def plot_bivariate_histogram(\n self,\n common_bins, common_norm,\n thresh, pthresh, pmax,\n color, legend,\n cbar, cbar_ax, cbar_kws,\n estimate_kws,\n **plot_kws,\n ):\n\n # Default keyword dicts\n cbar_kws = {} if cbar_kws is None else cbar_kws.copy()\n\n # Now initialize the Histogram estimator\n estimator = Histogram(**estimate_kws)\n\n # Do pre-compute housekeeping related to multiple groups\n if set(self.variables) - {\"x\", \"y\"}:\n all_data = self.comp_data.dropna()\n if common_bins:\n estimator.define_bin_params(\n all_data[\"x\"],\n all_data[\"y\"],\n all_data.get(\"weights\", None),\n )\n else:\n common_norm = False\n\n # -- Determine colormap threshold and norm based on the full data\n\n full_heights = []\n for _, sub_data in self.iter_data(from_comp_data=True):\n sub_heights, _ = estimator(\n sub_data[\"x\"], sub_data[\"y\"], sub_data.get(\"weights\", None)\n )\n full_heights.append(sub_heights)\n\n common_color_norm = not set(self.variables) - {\"x\", \"y\"} or common_norm\n\n if pthresh is not None and common_color_norm:\n thresh = self._quantile_to_level(full_heights, pthresh)\n\n plot_kws.setdefault(\"vmin\", 0)\n if common_color_norm:\n if pmax is not None:\n vmax = self._quantile_to_level(full_heights, pmax)\n else:\n vmax = plot_kws.pop(\"vmax\", max(map(np.max, full_heights)))\n else:\n vmax = None\n\n # Get a default color\n # (We won't follow the color cycle here, as multiple plots are unlikely)\n if color is None:\n color = \"C0\"\n\n # --- Loop over data (subsets) and draw the histograms\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_bivariate_histogram.for_sub_vars_sub_data_in__DistributionPlotter.plot_bivariate_histogram.self__add_axis_labels_ax_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_bivariate_histogram.for_sub_vars_sub_data_in__DistributionPlotter.plot_bivariate_histogram.self__add_axis_labels_ax_", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 785, "end_line": 870, "span_ids": ["_DistributionPlotter.plot_bivariate_histogram"], "tokens": 805}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _DistributionPlotter(VectorPlotter):\n\n def plot_bivariate_histogram(\n self,\n common_bins, common_norm,\n thresh, pthresh, pmax,\n color, legend,\n cbar, cbar_ax, cbar_kws,\n estimate_kws,\n **plot_kws,\n ):\n # ... other code\n for sub_vars, sub_data in self.iter_data(\"hue\", from_comp_data=True):\n\n if sub_data.empty:\n continue\n\n # Do the histogram computation\n heights, (x_edges, y_edges) = estimator(\n sub_data[\"x\"],\n sub_data[\"y\"],\n weights=sub_data.get(\"weights\", None),\n )\n\n # Check for log scaling on the data axis\n if self._log_scaled(\"x\"):\n x_edges = np.power(10, x_edges)\n if self._log_scaled(\"y\"):\n y_edges = np.power(10, y_edges)\n\n # Apply scaling to normalize across groups\n if estimator.stat != \"count\" and common_norm:\n heights *= len(sub_data) / len(all_data)\n\n # Define the specific kwargs for this artist\n artist_kws = plot_kws.copy()\n if \"hue\" in self.variables:\n color = self._hue_map(sub_vars[\"hue\"])\n cmap = self._cmap_from_color(color)\n artist_kws[\"cmap\"] = cmap\n else:\n cmap = artist_kws.pop(\"cmap\", None)\n if isinstance(cmap, str):\n cmap = color_palette(cmap, as_cmap=True)\n elif cmap is None:\n cmap = self._cmap_from_color(color)\n artist_kws[\"cmap\"] = cmap\n\n # Set the upper norm on the colormap\n if not common_color_norm and pmax is not None:\n vmax = self._quantile_to_level(heights, pmax)\n if vmax is not None:\n artist_kws[\"vmax\"] = vmax\n\n # Make cells at or below the threshold transparent\n if not common_color_norm and pthresh:\n thresh = self._quantile_to_level(heights, pthresh)\n if thresh is not None:\n heights = np.ma.masked_less_equal(heights, thresh)\n\n # Get the axes for this plot\n ax = self._get_axes(sub_vars)\n\n # pcolormesh is going to turn the grid off, but we want to keep it\n # I'm not sure if there's a better way to get the grid state\n x_grid = any([l.get_visible() for l in ax.xaxis.get_gridlines()])\n y_grid = any([l.get_visible() for l in ax.yaxis.get_gridlines()])\n\n mesh = ax.pcolormesh(\n x_edges,\n y_edges,\n heights.T,\n **artist_kws,\n )\n\n # pcolormesh sets sticky edges, but we only want them if not thresholding\n if thresh is not None:\n mesh.sticky_edges.x[:] = []\n mesh.sticky_edges.y[:] = []\n\n # Add an optional colorbar\n # Note, we want to improve this. When hue is used, it will stack\n # multiple colorbars with redundant ticks in an ugly way.\n # But it's going to take some work to have multiple colorbars that\n # share ticks nicely.\n if cbar:\n ax.figure.colorbar(mesh, cbar_ax, ax, **cbar_kws)\n\n # Reset the grid state\n if x_grid:\n ax.grid(True, axis=\"x\")\n if y_grid:\n ax.grid(True, axis=\"y\")\n\n # --- Finalize the plot\n\n ax = self.ax if self.ax is not None else self.facets.axes.flat[0]\n self._add_axis_labels(ax)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_bivariate_histogram.if_hue_in_self_variable__DistributionPlotter.plot_bivariate_histogram.if_hue_in_self_variable.self__add_legend_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_bivariate_histogram.if_hue_in_self_variable__DistributionPlotter.plot_bivariate_histogram.if_hue_in_self_variable.self__add_legend_", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 872, "end_line": 883, "span_ids": ["_DistributionPlotter.plot_bivariate_histogram"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _DistributionPlotter(VectorPlotter):\n\n def plot_bivariate_histogram(\n self,\n common_bins, common_norm,\n thresh, pthresh, pmax,\n color, legend,\n cbar, cbar_ax, cbar_kws,\n estimate_kws,\n **plot_kws,\n ):\n # ... other code\n\n if \"hue\" in self.variables and legend:\n\n # TODO if possible, I would like to move the contour\n # intensity information into the legend too and label the\n # iso proportions rather than the raw density values\n\n artist_kws = {}\n artist = partial(mpl.patches.Patch)\n ax_obj = self.ax if self.ax is not None else self.facets\n self._add_legend(\n ax_obj, artist, True, False, \"layer\", 1, artist_kws, {},\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_univariate_density__DistributionPlotter.plot_univariate_density.if_hue_in_self_variable.self__add_legend_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_univariate_density__DistributionPlotter.plot_univariate_density.if_hue_in_self_variable.self__add_legend_", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 885, "end_line": 1018, "span_ids": ["_DistributionPlotter.plot_univariate_density"], "tokens": 937}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _DistributionPlotter(VectorPlotter):\n\n def plot_univariate_density(\n self,\n multiple,\n common_norm,\n common_grid,\n warn_singular,\n fill,\n color,\n legend,\n estimate_kws,\n **plot_kws,\n ):\n\n # Handle conditional defaults\n if fill is None:\n fill = multiple in (\"stack\", \"fill\")\n\n # Preprocess the matplotlib keyword dictionaries\n if fill:\n artist = mpl.collections.PolyCollection\n else:\n artist = mpl.lines.Line2D\n plot_kws = _normalize_kwargs(plot_kws, artist)\n\n # Input checking\n _check_argument(\"multiple\", [\"layer\", \"stack\", \"fill\"], multiple)\n\n # Always share the evaluation grid when stacking\n subsets = bool(set(self.variables) - {\"x\", \"y\"})\n if subsets and multiple in (\"stack\", \"fill\"):\n common_grid = True\n\n # Check if the data axis is log scaled\n log_scale = self._log_scaled(self.data_variable)\n\n # Do the computation\n densities = self._compute_univariate_density(\n self.data_variable,\n common_norm,\n common_grid,\n estimate_kws,\n log_scale,\n warn_singular,\n )\n\n # Adjust densities based on the `multiple` rule\n densities, baselines = self._resolve_multiple(densities, multiple)\n\n # Control the interaction with autoscaling by defining sticky_edges\n # i.e. we don't want autoscale margins below the density curve\n sticky_density = (0, 1) if multiple == \"fill\" else (0, np.inf)\n\n if multiple == \"fill\":\n # Filled plots should not have any margins\n sticky_support = densities.index.min(), densities.index.max()\n else:\n sticky_support = []\n\n if fill:\n if multiple == \"layer\":\n default_alpha = .25\n else:\n default_alpha = .75\n else:\n default_alpha = 1\n alpha = plot_kws.pop(\"alpha\", default_alpha) # TODO make parameter?\n\n # Now iterate through the subsets and draw the densities\n # We go backwards so stacked densities read from top-to-bottom\n for sub_vars, _ in self.iter_data(\"hue\", reverse=True):\n\n # Extract the support grid and density curve for this level\n key = tuple(sub_vars.items())\n try:\n density = densities[key]\n except KeyError:\n continue\n support = density.index\n fill_from = baselines[key]\n\n ax = self._get_axes(sub_vars)\n\n if \"hue\" in self.variables:\n sub_color = self._hue_map(sub_vars[\"hue\"])\n else:\n sub_color = color\n\n artist_kws = self._artist_kws(\n plot_kws, fill, False, multiple, sub_color, alpha\n )\n\n # Either plot a curve with observation values on the x axis\n if \"x\" in self.variables:\n\n if fill:\n artist = ax.fill_between(support, fill_from, density, **artist_kws)\n\n else:\n artist, = ax.plot(support, density, **artist_kws)\n\n artist.sticky_edges.x[:] = sticky_support\n artist.sticky_edges.y[:] = sticky_density\n\n # Or plot a curve with observation values on the y axis\n else:\n if fill:\n artist = ax.fill_betweenx(support, fill_from, density, **artist_kws)\n else:\n artist, = ax.plot(density, support, **artist_kws)\n\n artist.sticky_edges.x[:] = sticky_density\n artist.sticky_edges.y[:] = sticky_support\n\n # --- Finalize the plot ----\n\n ax = self.ax if self.ax is not None else self.facets.axes.flat[0]\n default_x = default_y = \"\"\n if self.data_variable == \"x\":\n default_y = \"Density\"\n if self.data_variable == \"y\":\n default_x = \"Density\"\n self._add_axis_labels(ax, default_x, default_y)\n\n if \"hue\" in self.variables and legend:\n\n if fill:\n artist = partial(mpl.patches.Patch)\n else:\n artist = partial(mpl.lines.Line2D, [], [])\n\n ax_obj = self.ax if self.ax is not None else self.facets\n self._add_legend(\n ax_obj, artist, fill, False, multiple, alpha, plot_kws, {},\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_bivariate_density__DistributionPlotter.plot_bivariate_density._Define_the_coloring_of_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_bivariate_density__DistributionPlotter.plot_bivariate_density._Define_the_coloring_of_", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1034, "end_line": 1139, "span_ids": ["_DistributionPlotter.plot_bivariate_density"], "tokens": 752}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _DistributionPlotter(VectorPlotter):\n\n def plot_bivariate_density(\n self,\n common_norm,\n fill,\n levels,\n thresh,\n color,\n legend,\n cbar,\n warn_singular,\n cbar_ax,\n cbar_kws,\n estimate_kws,\n **contour_kws,\n ):\n\n contour_kws = contour_kws.copy()\n\n estimator = KDE(**estimate_kws)\n\n if not set(self.variables) - {\"x\", \"y\"}:\n common_norm = False\n\n all_data = self.plot_data.dropna()\n\n # Loop through the subsets and estimate the KDEs\n densities, supports = {}, {}\n\n for sub_vars, sub_data in self.iter_data(\"hue\", from_comp_data=True):\n\n # Extract the data points from this sub set\n observations = sub_data[[\"x\", \"y\"]]\n min_variance = observations.var().fillna(0).min()\n observations = observations[\"x\"], observations[\"y\"]\n\n # Extract the weights for this subset of observations\n if \"weights\" in self.variables:\n weights = sub_data[\"weights\"]\n else:\n weights = None\n\n # Estimate the density of observations at this level\n singular = math.isclose(min_variance, 0)\n try:\n if not singular:\n density, support = estimator(*observations, weights=weights)\n except np.linalg.LinAlgError:\n # Testing for 0 variance doesn't catch all cases where scipy raises,\n # but we can also get a ValueError, so we need this convoluted approach\n singular = True\n\n if singular:\n msg = (\n \"KDE cannot be estimated (0 variance or perfect covariance). \"\n \"Pass `warn_singular=False` to disable this warning.\"\n )\n if warn_singular:\n warnings.warn(msg, UserWarning, stacklevel=3)\n continue\n\n # Transform the support grid back to the original scale\n xx, yy = support\n if self._log_scaled(\"x\"):\n xx = np.power(10, xx)\n if self._log_scaled(\"y\"):\n yy = np.power(10, yy)\n support = xx, yy\n\n # Apply a scaling factor so that the integral over all subsets is 1\n if common_norm:\n density *= len(sub_data) / len(all_data)\n\n key = tuple(sub_vars.items())\n densities[key] = density\n supports[key] = support\n\n # Define a grid of iso-proportion levels\n if thresh is None:\n thresh = 0\n if isinstance(levels, Number):\n levels = np.linspace(thresh, 1, levels)\n else:\n if min(levels) < 0 or max(levels) > 1:\n raise ValueError(\"levels must be in [0, 1]\")\n\n # Transform from iso-proportions to iso-densities\n if common_norm:\n common_levels = self._quantile_to_level(\n list(densities.values()), levels,\n )\n draw_levels = {k: common_levels for k in densities}\n else:\n draw_levels = {\n k: self._quantile_to_level(d, levels)\n for k, d in densities.items()\n }\n\n # Get a default single color from the attribute cycle\n if self.ax is None:\n default_color = \"C0\" if color is None else color\n else:\n scout, = self.ax.plot([], color=color)\n default_color = scout.get_color()\n scout.remove()\n\n # Define the coloring of the contours\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_bivariate_density.if_hue_in_self_variable__DistributionPlotter.plot_bivariate_density.None_8.self__add_legend_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_bivariate_density.if_hue_in_self_variable__DistributionPlotter.plot_bivariate_density.None_8.self__add_legend_", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1120, "end_line": 1206, "span_ids": ["_DistributionPlotter.plot_bivariate_density"], "tokens": 775}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _DistributionPlotter(VectorPlotter):\n\n def plot_bivariate_density(\n self,\n common_norm,\n fill,\n levels,\n thresh,\n color,\n legend,\n cbar,\n warn_singular,\n cbar_ax,\n cbar_kws,\n estimate_kws,\n **contour_kws,\n ):\n # ... other code\n if \"hue\" in self.variables:\n for param in [\"cmap\", \"colors\"]:\n if param in contour_kws:\n msg = f\"{param} parameter ignored when using hue mapping.\"\n warnings.warn(msg, UserWarning)\n contour_kws.pop(param)\n else:\n\n # Work out a default coloring of the contours\n coloring_given = set(contour_kws) & {\"cmap\", \"colors\"}\n if fill and not coloring_given:\n cmap = self._cmap_from_color(default_color)\n contour_kws[\"cmap\"] = cmap\n if not fill and not coloring_given:\n contour_kws[\"colors\"] = [default_color]\n\n # Use our internal colormap lookup\n cmap = contour_kws.pop(\"cmap\", None)\n if isinstance(cmap, str):\n cmap = color_palette(cmap, as_cmap=True)\n if cmap is not None:\n contour_kws[\"cmap\"] = cmap\n\n # Loop through the subsets again and plot the data\n for sub_vars, _ in self.iter_data(\"hue\"):\n\n if \"hue\" in sub_vars:\n color = self._hue_map(sub_vars[\"hue\"])\n if fill:\n contour_kws[\"cmap\"] = self._cmap_from_color(color)\n else:\n contour_kws[\"colors\"] = [color]\n\n ax = self._get_axes(sub_vars)\n\n # Choose the function to plot with\n # TODO could add a pcolormesh based option as well\n # Which would look something like element=\"raster\"\n if fill:\n contour_func = ax.contourf\n else:\n contour_func = ax.contour\n\n key = tuple(sub_vars.items())\n if key not in densities:\n continue\n density = densities[key]\n xx, yy = supports[key]\n\n label = contour_kws.pop(\"label\", None)\n\n cset = contour_func(\n xx, yy, density,\n levels=draw_levels[key],\n **contour_kws,\n )\n\n if \"hue\" not in self.variables:\n cset.collections[0].set_label(label)\n\n # Add a color bar representing the contour heights\n # Note: this shows iso densities, not iso proportions\n # See more notes in histplot about how this could be improved\n if cbar:\n cbar_kws = {} if cbar_kws is None else cbar_kws\n ax.figure.colorbar(cset, cbar_ax, ax, **cbar_kws)\n\n # --- Finalize the plot\n ax = self.ax if self.ax is not None else self.facets.axes.flat[0]\n self._add_axis_labels(ax)\n\n if \"hue\" in self.variables and legend:\n\n # TODO if possible, I would like to move the contour\n # intensity information into the legend too and label the\n # iso proportions rather than the raw density values\n\n artist_kws = {}\n if fill:\n artist = partial(mpl.patches.Patch)\n else:\n artist = partial(mpl.lines.Line2D, [], [])\n\n ax_obj = self.ax if self.ax is not None else self.facets\n self._add_legend(\n ax_obj, artist, fill, False, \"layer\", 1, artist_kws, {},\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_univariate_ecdf__DistributionPlotter.plot_univariate_ecdf.if_hue_in_self_variable.self__add_legend_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_univariate_ecdf__DistributionPlotter.plot_univariate_ecdf.if_hue_in_self_variable.self__add_legend_", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1208, "end_line": 1275, "span_ids": ["_DistributionPlotter.plot_univariate_ecdf"], "tokens": 577}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _DistributionPlotter(VectorPlotter):\n\n def plot_univariate_ecdf(self, estimate_kws, legend, **plot_kws):\n\n estimator = ECDF(**estimate_kws)\n\n # Set the draw style to step the right way for the data variable\n drawstyles = dict(x=\"steps-post\", y=\"steps-pre\")\n plot_kws[\"drawstyle\"] = drawstyles[self.data_variable]\n\n # Loop through the subsets, transform and plot the data\n for sub_vars, sub_data in self.iter_data(\n \"hue\", reverse=True, from_comp_data=True,\n ):\n\n # Compute the ECDF\n if sub_data.empty:\n continue\n\n observations = sub_data[self.data_variable]\n weights = sub_data.get(\"weights\", None)\n stat, vals = estimator(observations, weights=weights)\n\n # Assign attributes based on semantic mapping\n artist_kws = plot_kws.copy()\n if \"hue\" in self.variables:\n artist_kws[\"color\"] = self._hue_map(sub_vars[\"hue\"])\n\n # Return the data variable to the linear domain\n # This needs an automatic solution; see GH2409\n if self._log_scaled(self.data_variable):\n vals = np.power(10, vals)\n vals[0] = -np.inf\n\n # Work out the orientation of the plot\n if self.data_variable == \"x\":\n plot_args = vals, stat\n stat_variable = \"y\"\n else:\n plot_args = stat, vals\n stat_variable = \"x\"\n\n if estimator.stat == \"count\":\n top_edge = len(observations)\n else:\n top_edge = 1\n\n # Draw the line for this subset\n ax = self._get_axes(sub_vars)\n artist, = ax.plot(*plot_args, **artist_kws)\n sticky_edges = getattr(artist.sticky_edges, stat_variable)\n sticky_edges[:] = 0, top_edge\n\n # --- Finalize the plot ----\n ax = self.ax if self.ax is not None else self.facets.axes.flat[0]\n stat = estimator.stat.capitalize()\n default_x = default_y = \"\"\n if self.data_variable == \"x\":\n default_y = stat\n if self.data_variable == \"y\":\n default_x = stat\n self._add_axis_labels(ax, default_x, default_y)\n\n if \"hue\" in self.variables and legend:\n artist = partial(mpl.lines.Line2D, [], [])\n alpha = plot_kws.get(\"alpha\", 1)\n ax_obj = self.ax if self.ax is not None else self.facets\n self._add_legend(\n ax_obj, artist, False, False, None, alpha, plot_kws, {},\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_rug__DistributionPlotter.plot_rug.for_sub_vars_sub_data_i.None_4.self__add_legend_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter.plot_rug__DistributionPlotter.plot_rug.for_sub_vars_sub_data_i.None_4.self__add_legend_", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1277, "end_line": 1309, "span_ids": ["_DistributionPlotter.plot_rug"], "tokens": 301}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _DistributionPlotter(VectorPlotter):\n\n def plot_rug(self, height, expand_margins, legend, **kws):\n\n for sub_vars, sub_data, in self.iter_data(from_comp_data=True):\n\n ax = self._get_axes(sub_vars)\n\n kws.setdefault(\"linewidth\", 1)\n\n if expand_margins:\n xmarg, ymarg = ax.margins()\n if \"x\" in self.variables:\n ymarg += height * 2\n if \"y\" in self.variables:\n xmarg += height * 2\n ax.margins(x=xmarg, y=ymarg)\n\n if \"hue\" in self.variables:\n kws.pop(\"c\", None)\n kws.pop(\"color\", None)\n\n if \"x\" in self.variables:\n self._plot_single_rug(sub_data, \"x\", height, ax, kws)\n if \"y\" in self.variables:\n self._plot_single_rug(sub_data, \"y\", height, ax, kws)\n\n # --- Finalize the plot\n self._add_axis_labels(ax)\n if \"hue\" in self.variables and legend:\n # TODO ideally i'd like the legend artist to look like a rug\n legend_artist = partial(mpl.lines.Line2D, [], [])\n self._add_legend(\n ax, legend_artist, False, False, None, 1, {}, {},\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter._plot_single_rug__DistributionFacetPlotter.semantics._DistributionPlotter_sema": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py__DistributionPlotter._plot_single_rug__DistributionFacetPlotter.semantics._DistributionPlotter_sema", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1311, "end_line": 1353, "span_ids": ["_DistributionPlotter._plot_single_rug", "_DistributionFacetPlotter"], "tokens": 351}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _DistributionPlotter(VectorPlotter):\n\n def _plot_single_rug(self, sub_data, var, height, ax, kws):\n \"\"\"Draw a rugplot along one axis of the plot.\"\"\"\n vector = sub_data[var]\n n = len(vector)\n\n # Return data to linear domain\n # This needs an automatic solution; see GH2409\n if self._log_scaled(var):\n vector = np.power(10, vector)\n\n # We'll always add a single collection with varying colors\n if \"hue\" in self.variables:\n colors = self._hue_map(sub_data[\"hue\"])\n else:\n colors = None\n\n # Build the array of values for the LineCollection\n if var == \"x\":\n\n trans = tx.blended_transform_factory(ax.transData, ax.transAxes)\n xy_pairs = np.column_stack([\n np.repeat(vector, 2), np.tile([0, height], n)\n ])\n\n if var == \"y\":\n\n trans = tx.blended_transform_factory(ax.transAxes, ax.transData)\n xy_pairs = np.column_stack([\n np.tile([0, height], n), np.repeat(vector, 2)\n ])\n\n # Draw the lines on the plot\n line_segs = xy_pairs.reshape([n, 2, 2])\n ax.add_collection(LineCollection(\n line_segs, transform=trans, colors=colors, **kws\n ))\n\n ax.autoscale_view(scalex=var == \"x\", scaley=var == \"y\")\n\n\nclass _DistributionFacetPlotter(_DistributionPlotter):\n\n semantics = _DistributionPlotter.semantics + (\"col\", \"row\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_None_7_histplot.return.ax": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_None_7_histplot.return.ax", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1356, "end_line": 1451, "span_ids": ["histplot", "_DistributionFacetPlotter"], "tokens": 608}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# ==================================================================================== #\n# External API\n# ==================================================================================== #\n\ndef histplot(\n data=None, *,\n # Vector variables\n x=None, y=None, hue=None, weights=None,\n # Histogram computation parameters\n stat=\"count\", bins=\"auto\", binwidth=None, binrange=None,\n discrete=None, cumulative=False, common_bins=True, common_norm=True,\n # Histogram appearance parameters\n multiple=\"layer\", element=\"bars\", fill=True, shrink=1,\n # Histogram smoothing with a kernel density estimate\n kde=False, kde_kws=None, line_kws=None,\n # Bivariate histogram parameters\n thresh=0, pthresh=None, pmax=None, cbar=False, cbar_ax=None, cbar_kws=None,\n # Hue mapping parameters\n palette=None, hue_order=None, hue_norm=None, color=None,\n # Axes information\n log_scale=None, legend=True, ax=None,\n # Other appearance keywords\n **kwargs,\n):\n\n p = _DistributionPlotter(\n data=data,\n variables=_DistributionPlotter.get_semantics(locals())\n )\n\n p.map_hue(palette=palette, order=hue_order, norm=hue_norm)\n\n if ax is None:\n ax = plt.gca()\n\n p._attach(ax, log_scale=log_scale)\n\n if p.univariate: # Note, bivariate plots won't cycle\n if fill:\n method = ax.bar if element == \"bars\" else ax.fill_between\n else:\n method = ax.plot\n color = _default_color(method, hue, color, kwargs)\n\n if not p.has_xy_data:\n return ax\n\n # Default to discrete bins for categorical variables\n if discrete is None:\n discrete = p._default_discrete()\n\n estimate_kws = dict(\n stat=stat,\n bins=bins,\n binwidth=binwidth,\n binrange=binrange,\n discrete=discrete,\n cumulative=cumulative,\n )\n\n if p.univariate:\n\n p.plot_univariate_histogram(\n multiple=multiple,\n element=element,\n fill=fill,\n shrink=shrink,\n common_norm=common_norm,\n common_bins=common_bins,\n kde=kde,\n kde_kws=kde_kws,\n color=color,\n legend=legend,\n estimate_kws=estimate_kws,\n line_kws=line_kws,\n **kwargs,\n )\n\n else:\n\n p.plot_bivariate_histogram(\n common_bins=common_bins,\n common_norm=common_norm,\n thresh=thresh,\n pthresh=pthresh,\n pmax=pmax,\n color=color,\n legend=legend,\n cbar=cbar,\n cbar_ax=cbar_ax,\n cbar_kws=cbar_kws,\n estimate_kws=estimate_kws,\n **kwargs,\n )\n\n return ax", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_histplot.__doc___histplot.__doc__._": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_histplot.__doc___histplot.__doc__._", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1474, "end_line": 1600, "span_ids": ["impl:7"], "tokens": 1103}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "histplot.__doc__ = \"\"\"\\\nPlot univariate or bivariate histograms to show distributions of datasets.\n\nA histogram is a classic visualization tool that represents the distribution\nof one or more variables by counting the number of observations that fall within\ndiscrete bins.\n\nThis function can normalize the statistic computed within each bin to estimate\nfrequency, density or probability mass, and it can add a smooth curve obtained\nusing a kernel density estimate, similar to :func:`kdeplot`.\n\nMore information is provided in the :ref:`user guide `.\n\nParameters\n----------\n{params.core.data}\n{params.core.xy}\n{params.core.hue}\nweights : vector or key in ``data``\n If provided, weight the contribution of the corresponding data points\n towards the count in each bin by these factors.\n{params.hist.stat}\n{params.hist.bins}\n{params.hist.binwidth}\n{params.hist.binrange}\ndiscrete : bool\n If True, default to ``binwidth=1`` and draw the bars so that they are\n centered on their corresponding data points. This avoids \"gaps\" that may\n otherwise appear when using discrete (integer) data.\ncumulative : bool\n If True, plot the cumulative counts as bins increase.\ncommon_bins : bool\n If True, use the same bins when semantic variables produce multiple\n plots. If using a reference rule to determine the bins, it will be computed\n with the full dataset.\ncommon_norm : bool\n If True and using a normalized statistic, the normalization will apply over\n the full dataset. Otherwise, normalize each histogram independently.\nmultiple : {{\"layer\", \"dodge\", \"stack\", \"fill\"}}\n Approach to resolving multiple elements when semantic mapping creates subsets.\n Only relevant with univariate data.\nelement : {{\"bars\", \"step\", \"poly\"}}\n Visual representation of the histogram statistic.\n Only relevant with univariate data.\nfill : bool\n If True, fill in the space under the histogram.\n Only relevant with univariate data.\nshrink : number\n Scale the width of each bar relative to the binwidth by this factor.\n Only relevant with univariate data.\nkde : bool\n If True, compute a kernel density estimate to smooth the distribution\n and show on the plot as (one or more) line(s).\n Only relevant with univariate data.\nkde_kws : dict\n Parameters that control the KDE computation, as in :func:`kdeplot`.\nline_kws : dict\n Parameters that control the KDE visualization, passed to\n :meth:`matplotlib.axes.Axes.plot`.\nthresh : number or None\n Cells with a statistic less than or equal to this value will be transparent.\n Only relevant with bivariate data.\npthresh : number or None\n Like ``thresh``, but a value in [0, 1] such that cells with aggregate counts\n (or other statistics, when used) up to this proportion of the total will be\n transparent.\npmax : number or None\n A value in [0, 1] that sets that saturation point for the colormap at a value\n such that cells below constitute this proportion of the total count (or\n other statistic, when used).\n{params.dist.cbar}\n{params.dist.cbar_ax}\n{params.dist.cbar_kws}\n{params.core.palette}\n{params.core.hue_order}\n{params.core.hue_norm}\n{params.core.color}\n{params.dist.log_scale}\n{params.dist.legend}\n{params.core.ax}\nkwargs\n Other keyword arguments are passed to one of the following matplotlib\n functions:\n\n - :meth:`matplotlib.axes.Axes.bar` (univariate, element=\"bars\")\n - :meth:`matplotlib.axes.Axes.fill_between` (univariate, other element, fill=True)\n - :meth:`matplotlib.axes.Axes.plot` (univariate, other element, fill=False)\n - :meth:`matplotlib.axes.Axes.pcolormesh` (bivariate)\n\nReturns\n-------\n{returns.ax}\n\nSee Also\n--------\n{seealso.displot}\n{seealso.kdeplot}\n{seealso.rugplot}\n{seealso.ecdfplot}\n{seealso.jointplot}\n\nNotes\n-----\n\nThe choice of bins for computing and plotting a histogram can exert\nsubstantial influence on the insights that one is able to draw from the\nvisualization. If the bins are too large, they may erase important features.\nOn the other hand, bins that are too small may be dominated by random\nvariability, obscuring the shape of the true underlying distribution. The\ndefault bin size is determined using a reference rule that depends on the\nsample size and variance. This works well in many cases, (i.e., with\n\"well-behaved\" data) but it fails in others. It is always a good to try\ndifferent bin sizes to be sure that you are not missing something important.\nThis function allows you to specify bins in several different ways, such as\nby setting the total number of bins to use, the width of each bin, or the\nspecific locations where the bins should break.\n\nExamples\n--------\n\n.. include:: ../docstrings/histplot.rst\n\n\"\"\".format(\n params=_param_docs,\n returns=_core_docs[\"returns\"],\n seealso=_core_docs[\"seealso\"],\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_kdeplot_kdeplot.shade.kwargs_pop_shade_None_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_kdeplot_kdeplot.shade.kwargs_pop_shade_None_", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1583, "end_line": 1655, "span_ids": ["kdeplot"], "tokens": 809}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def kdeplot(\n data=None, *, x=None, y=None, hue=None, weights=None,\n palette=None, hue_order=None, hue_norm=None, color=None, fill=None,\n multiple=\"layer\", common_norm=True, common_grid=False, cumulative=False,\n bw_method=\"scott\", bw_adjust=1, warn_singular=True, log_scale=None,\n levels=10, thresh=.05, gridsize=200, cut=3, clip=None,\n legend=True, cbar=False, cbar_ax=None, cbar_kws=None, ax=None,\n **kwargs,\n):\n\n # --- Start with backwards compatability for versions < 0.11.0 ----------------\n\n # Handle (past) deprecation of `data2`\n if \"data2\" in kwargs:\n msg = \"`data2` has been removed (replaced by `y`); please update your code.\"\n TypeError(msg)\n\n # Handle deprecation of `vertical`\n vertical = kwargs.pop(\"vertical\", None)\n if vertical is not None:\n if vertical:\n action_taken = \"assigning data to `y`.\"\n if x is None:\n data, y = y, data\n else:\n x, y = y, x\n else:\n action_taken = \"assigning data to `x`.\"\n msg = textwrap.dedent(f\"\"\"\\n\n The `vertical` parameter is deprecated; {action_taken}\n This will become an error in seaborn v0.13.0; please update your code.\n \"\"\")\n warnings.warn(msg, UserWarning, stacklevel=2)\n\n # Handle deprecation of `bw`\n bw = kwargs.pop(\"bw\", None)\n if bw is not None:\n msg = textwrap.dedent(f\"\"\"\\n\n The `bw` parameter is deprecated in favor of `bw_method` and `bw_adjust`.\n Setting `bw_method={bw}`, but please see the docs for the new parameters\n and update your code. This will become an error in seaborn v0.13.0.\n \"\"\")\n warnings.warn(msg, UserWarning, stacklevel=2)\n bw_method = bw\n\n # Handle deprecation of `kernel`\n if kwargs.pop(\"kernel\", None) is not None:\n msg = textwrap.dedent(\"\"\"\\n\n Support for alternate kernels has been removed; using Gaussian kernel.\n This will become an error in seaborn v0.13.0; please update your code.\n \"\"\")\n warnings.warn(msg, UserWarning, stacklevel=2)\n\n # Handle deprecation of shade_lowest\n shade_lowest = kwargs.pop(\"shade_lowest\", None)\n if shade_lowest is not None:\n if shade_lowest:\n thresh = 0\n msg = textwrap.dedent(f\"\"\"\\n\n `shade_lowest` has been replaced by `thresh`; setting `thresh={thresh}.\n This will become an error in seaborn v0.13.0; please update your code.\n \"\"\")\n warnings.warn(msg, UserWarning, stacklevel=2)\n\n # Handle \"soft\" deprecation of shade `shade` is not really the right\n # terminology here, but unlike some of the other deprecated parameters it\n # is probably very commonly used and much hard to remove. This is therefore\n # going to be a longer process where, first, `fill` will be introduced and\n # be used throughout the documentation. In 0.12, when kwarg-only\n # enforcement hits, we can remove the shade/shade_lowest out of the\n # function signature all together and pull them out of the kwargs. Then we\n # can actually fire a FutureWarning, and eventually remove.\n shade = kwargs.pop(\"shade\", None)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_kdeplot.if_shade_is_not_None__kdeplot.return.ax": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_kdeplot.if_shade_is_not_None__kdeplot.return.ax", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1656, "end_line": 1732, "span_ids": ["kdeplot"], "tokens": 646}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def kdeplot(\n data=None, *, x=None, y=None, hue=None, weights=None,\n palette=None, hue_order=None, hue_norm=None, color=None, fill=None,\n multiple=\"layer\", common_norm=True, common_grid=False, cumulative=False,\n bw_method=\"scott\", bw_adjust=1, warn_singular=True, log_scale=None,\n levels=10, thresh=.05, gridsize=200, cut=3, clip=None,\n legend=True, cbar=False, cbar_ax=None, cbar_kws=None, ax=None,\n **kwargs,\n):\n # ... other code\n if shade is not None:\n fill = shade\n msg = textwrap.dedent(f\"\"\"\\n\n `shade` is now deprecated in favor of `fill`; setting `fill={shade}`.\n This will become an error in seaborn v0.14.0; please update your code.\n \"\"\")\n warnings.warn(msg, FutureWarning, stacklevel=2)\n\n # Handle `n_levels`\n # This was never in the formal API but it was processed, and appeared in an\n # example. We can treat as an alias for `levels` now and deprecate later.\n levels = kwargs.pop(\"n_levels\", levels)\n\n # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #\n\n p = _DistributionPlotter(\n data=data,\n variables=_DistributionPlotter.get_semantics(locals()),\n )\n\n p.map_hue(palette=palette, order=hue_order, norm=hue_norm)\n\n if ax is None:\n ax = plt.gca()\n\n p._attach(ax, allowed_types=[\"numeric\", \"datetime\"], log_scale=log_scale)\n\n method = ax.fill_between if fill else ax.plot\n color = _default_color(method, hue, color, kwargs)\n\n if not p.has_xy_data:\n return ax\n\n # Pack the kwargs for statistics.KDE\n estimate_kws = dict(\n bw_method=bw_method,\n bw_adjust=bw_adjust,\n gridsize=gridsize,\n cut=cut,\n clip=clip,\n cumulative=cumulative,\n )\n\n if p.univariate:\n\n plot_kws = kwargs.copy()\n\n p.plot_univariate_density(\n multiple=multiple,\n common_norm=common_norm,\n common_grid=common_grid,\n fill=fill,\n color=color,\n legend=legend,\n warn_singular=warn_singular,\n estimate_kws=estimate_kws,\n **plot_kws,\n )\n\n else:\n\n p.plot_bivariate_density(\n common_norm=common_norm,\n fill=fill,\n levels=levels,\n thresh=thresh,\n legend=legend,\n color=color,\n warn_singular=warn_singular,\n cbar=cbar,\n cbar_ax=cbar_ax,\n cbar_kws=cbar_kws,\n estimate_kws=estimate_kws,\n **kwargs,\n )\n\n return ax", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_kdeplot.__doc___kdeplot.__doc__._": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_kdeplot.__doc___kdeplot.__doc__._", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1735, "end_line": 1860, "span_ids": ["impl:9"], "tokens": 1114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "kdeplot.__doc__ = \"\"\"\\\nPlot univariate or bivariate distributions using kernel density estimation.\n\nA kernel density estimate (KDE) plot is a method for visualizing the\ndistribution of observations in a dataset, analogous to a histogram. KDE\nrepresents the data using a continuous probability density curve in one or\nmore dimensions.\n\nThe approach is explained further in the :ref:`user guide `.\n\nRelative to a histogram, KDE can produce a plot that is less cluttered and\nmore interpretable, especially when drawing multiple distributions. But it\nhas the potential to introduce distortions if the underlying distribution is\nbounded or not smooth. Like a histogram, the quality of the representation\nalso depends on the selection of good smoothing parameters.\n\nParameters\n----------\n{params.core.data}\n{params.core.xy}\n{params.core.hue}\nweights : vector or key in ``data``\n If provided, weight the kernel density estimation using these values.\n{params.core.palette}\n{params.core.hue_order}\n{params.core.hue_norm}\n{params.core.color}\nfill : bool or None\n If True, fill in the area under univariate density curves or between\n bivariate contours. If None, the default depends on ``multiple``.\n{params.dist.multiple}\ncommon_norm : bool\n If True, scale each conditional density by the number of observations\n such that the total area under all densities sums to 1. Otherwise,\n normalize each density independently.\ncommon_grid : bool\n If True, use the same evaluation grid for each kernel density estimate.\n Only relevant with univariate data.\n{params.kde.cumulative}\n{params.kde.bw_method}\n{params.kde.bw_adjust}\nwarn_singular : bool\n If True, issue a warning when trying to estimate the density of data\n with zero variance.\n{params.dist.log_scale}\nlevels : int or vector\n Number of contour levels or values to draw contours at. A vector argument\n must have increasing values in [0, 1]. Levels correspond to iso-proportions\n of the density: e.g., 20% of the probability mass will lie below the\n contour drawn for 0.2. Only relevant with bivariate data.\nthresh : number in [0, 1]\n Lowest iso-proportion level at which to draw a contour line. Ignored when\n ``levels`` is a vector. Only relevant with bivariate data.\ngridsize : int\n Number of points on each dimension of the evaluation grid.\n{params.kde.cut}\n{params.kde.clip}\n{params.dist.legend}\n{params.dist.cbar}\n{params.dist.cbar_ax}\n{params.dist.cbar_kws}\n{params.core.ax}\nkwargs\n Other keyword arguments are passed to one of the following matplotlib\n functions:\n\n - :meth:`matplotlib.axes.Axes.plot` (univariate, ``fill=False``),\n - :meth:`matplotlib.axes.Axes.fill_between` (univariate, ``fill=True``),\n - :meth:`matplotlib.axes.Axes.contour` (bivariate, ``fill=False``),\n - :meth:`matplotlib.axes.contourf` (bivariate, ``fill=True``).\n\nReturns\n-------\n{returns.ax}\n\nSee Also\n--------\n{seealso.displot}\n{seealso.histplot}\n{seealso.ecdfplot}\n{seealso.jointplot}\n{seealso.violinplot}\n\nNotes\n-----\n\nThe *bandwidth*, or standard deviation of the smoothing kernel, is an\nimportant parameter. Misspecification of the bandwidth can produce a\ndistorted representation of the data. Much like the choice of bin width in a\nhistogram, an over-smoothed curve can erase true features of a\ndistribution, while an under-smoothed curve can create false features out of\nrandom variability. The rule-of-thumb that sets the default bandwidth works\nbest when the true distribution is smooth, unimodal, and roughly bell-shaped.\nIt is always a good idea to check the default behavior by using ``bw_adjust``\nto increase or decrease the amount of smoothing.\n\nBecause the smoothing algorithm uses a Gaussian kernel, the estimated density\ncurve can extend to values that do not make sense for a particular dataset.\nFor example, the curve may be drawn over negative values when smoothing data\nthat are naturally positive. The ``cut`` and ``clip`` parameters can be used\nto control the extent of the curve, but datasets that have many observations\nclose to a natural boundary may be better served by a different visualization\nmethod.\n\nSimilar considerations apply when a dataset is naturally discrete or \"spiky\"\n(containing many repeated observations of the same value). Kernel density\nestimation will always produce a smooth curve, which would be misleading\nin these situations.\n\nThe units on the density axis are a common source of confusion. While kernel\ndensity estimation produces a probability distribution, the height of the curve\nat each point gives a density, not a probability. A probability can be obtained\nonly by integrating the density across a range. The curve is normalized so\nthat the integral over all possible values is 1, meaning that the scale of\nthe density axis depends on the data values.\n\nExamples\n--------\n\n.. include:: ../docstrings/kdeplot.rst\n\n\"\"\".format(\n params=_param_docs,\n returns=_core_docs[\"returns\"],\n seealso=_core_docs[\"seealso\"],\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_ecdfplot_ecdfplot.return.ax": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_ecdfplot_ecdfplot.return.ax", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1863, "end_line": 1916, "span_ids": ["ecdfplot"], "tokens": 368}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def ecdfplot(\n data=None, *,\n # Vector variables\n x=None, y=None, hue=None, weights=None,\n # Computation parameters\n stat=\"proportion\", complementary=False,\n # Hue mapping parameters\n palette=None, hue_order=None, hue_norm=None,\n # Axes information\n log_scale=None, legend=True, ax=None,\n # Other appearance keywords\n **kwargs,\n):\n\n p = _DistributionPlotter(\n data=data,\n variables=_DistributionPlotter.get_semantics(locals())\n )\n\n p.map_hue(palette=palette, order=hue_order, norm=hue_norm)\n\n # We could support other semantics (size, style) here fairly easily\n # But it would make distplot a bit more complicated.\n # It's always possible to add features like that later, so I am going to defer.\n # It will be even easier to wait until after there is a more general/abstract\n # way to go from semantic specs to artist attributes.\n\n if ax is None:\n ax = plt.gca()\n\n p._attach(ax, log_scale=log_scale)\n\n color = kwargs.pop(\"color\", kwargs.pop(\"c\", None))\n kwargs[\"color\"] = _default_color(ax.plot, hue, color, kwargs)\n\n if not p.has_xy_data:\n return ax\n\n # We could add this one day, but it's of dubious value\n if not p.univariate:\n raise NotImplementedError(\"Bivariate ECDF plots are not implemented\")\n\n estimate_kws = dict(\n stat=stat,\n complementary=complementary,\n )\n\n p.plot_univariate_ecdf(\n estimate_kws=estimate_kws,\n legend=legend,\n **kwargs,\n )\n\n return ax", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_ecdfplot.__doc___ecdfplot.__doc__._": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_ecdfplot.__doc___ecdfplot.__doc__._", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1919, "end_line": 1972, "span_ids": ["impl:11"], "tokens": 340}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "ecdfplot.__doc__ = \"\"\"\\\nPlot empirical cumulative distribution functions.\n\nAn ECDF represents the proportion or count of observations falling below each\nunique value in a dataset. Compared to a histogram or density plot, it has the\nadvantage that each observation is visualized directly, meaning that there are\nno binning or smoothing parameters that need to be adjusted. It also aids direct\ncomparisons between multiple distributions. A downside is that the relationship\nbetween the appearance of the plot and the basic properties of the distribution\n(such as its central tendency, variance, and the presence of any bimodality)\nmay not be as intuitive.\n\nMore information is provided in the :ref:`user guide `.\n\nParameters\n----------\n{params.core.data}\n{params.core.xy}\n{params.core.hue}\nweights : vector or key in ``data``\n If provided, weight the contribution of the corresponding data points\n towards the cumulative distribution using these values.\n{params.ecdf.stat}\n{params.ecdf.complementary}\n{params.core.palette}\n{params.core.hue_order}\n{params.core.hue_norm}\n{params.dist.log_scale}\n{params.dist.legend}\n{params.core.ax}\nkwargs\n Other keyword arguments are passed to :meth:`matplotlib.axes.Axes.plot`.\n\nReturns\n-------\n{returns.ax}\n\nSee Also\n--------\n{seealso.displot}\n{seealso.histplot}\n{seealso.kdeplot}\n{seealso.rugplot}\n\nExamples\n--------\n\n.. include:: ../docstrings/ecdfplot.rst\n\n\"\"\".format(\n params=_param_docs,\n returns=_core_docs[\"returns\"],\n seealso=_core_docs[\"seealso\"],\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_rugplot_rugplot.return.ax": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_rugplot_rugplot.return.ax", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1975, "end_line": 2052, "span_ids": ["rugplot"], "tokens": 699}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def rugplot(\n data=None, *, x=None, y=None, hue=None, height=.025, expand_margins=True,\n palette=None, hue_order=None, hue_norm=None, legend=True, ax=None, **kwargs\n):\n\n # A note: I think it would make sense to add multiple= to rugplot and allow\n # rugs for different hue variables to be shifted orthogonal to the data axis\n # But is this stacking, or dodging?\n\n # A note: if we want to add a style semantic to rugplot,\n # we could make an option that draws the rug using scatterplot\n\n # A note, it would also be nice to offer some kind of histogram/density\n # rugplot, since alpha blending doesn't work great in the large n regime\n\n # --- Start with backwards compatability for versions < 0.11.0 ----------------\n\n a = kwargs.pop(\"a\", None)\n axis = kwargs.pop(\"axis\", None)\n\n if a is not None:\n data = a\n msg = textwrap.dedent(\"\"\"\\n\n The `a` parameter has been replaced; use `x`, `y`, and/or `data` instead.\n Please update your code; This will become an error in seaborn v0.13.0.\n \"\"\")\n warnings.warn(msg, UserWarning, stacklevel=2)\n\n if axis is not None:\n if axis == \"x\":\n x = data\n elif axis == \"y\":\n y = data\n msg = textwrap.dedent(f\"\"\"\\n\n The `axis` parameter has been deprecated; use the `{axis}` parameter instead.\n Please update your code; this will become an error in seaborn v0.13.0.\n \"\"\")\n warnings.warn(msg, UserWarning, stacklevel=2)\n\n vertical = kwargs.pop(\"vertical\", None)\n if vertical is not None:\n if vertical:\n action_taken = \"assigning data to `y`.\"\n if x is None:\n data, y = y, data\n else:\n x, y = y, x\n else:\n action_taken = \"assigning data to `x`.\"\n msg = textwrap.dedent(f\"\"\"\\n\n The `vertical` parameter is deprecated; {action_taken}\n This will become an error in seaborn v0.13.0; please update your code.\n \"\"\")\n warnings.warn(msg, UserWarning, stacklevel=2)\n\n # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #\n\n weights = None\n p = _DistributionPlotter(\n data=data,\n variables=_DistributionPlotter.get_semantics(locals()),\n )\n p.map_hue(palette=palette, order=hue_order, norm=hue_norm)\n\n if ax is None:\n ax = plt.gca()\n\n p._attach(ax)\n\n color = kwargs.pop(\"color\", kwargs.pop(\"c\", None))\n kwargs[\"color\"] = _default_color(ax.plot, hue, color, kwargs)\n\n if not p.has_xy_data:\n return ax\n\n p.plot_rug(height, expand_margins, legend, **kwargs)\n\n return ax", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_rugplot.__doc___rugplot.__doc__._": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_rugplot.__doc___rugplot.__doc__._", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2055, "end_line": 2094, "span_ids": ["impl:13"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "rugplot.__doc__ = \"\"\"\\\nPlot marginal distributions by drawing ticks along the x and y axes.\n\nThis function is intended to complement other plots by showing the location\nof individual observations in an unobtrusive way.\n\nParameters\n----------\n{params.core.data}\n{params.core.xy}\n{params.core.hue}\nheight : float\n Proportion of axes extent covered by each rug element. Can be negative.\nexpand_margins : bool\n If True, increase the axes margins by the height of the rug to avoid\n overlap with other elements.\n{params.core.palette}\n{params.core.hue_order}\n{params.core.hue_norm}\nlegend : bool\n If False, do not add a legend for semantic variables.\n{params.core.ax}\nkwargs\n Other keyword arguments are passed to\n :meth:`matplotlib.collections.LineCollection`\n\nReturns\n-------\n{returns.ax}\n\nExamples\n--------\n\n.. include:: ../docstrings/rugplot.rst\n\n\"\"\".format(\n params=_param_docs,\n returns=_core_docs[\"returns\"],\n seealso=_core_docs[\"seealso\"],\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_displot_displot._Draw_the_plots": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_displot_displot._Draw_the_plots", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2097, "end_line": 2171, "span_ids": ["displot"], "tokens": 585}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def displot(\n data=None, *,\n # Vector variables\n x=None, y=None, hue=None, row=None, col=None, weights=None,\n # Other plot parameters\n kind=\"hist\", rug=False, rug_kws=None, log_scale=None, legend=True,\n # Hue-mapping parameters\n palette=None, hue_order=None, hue_norm=None, color=None,\n # Faceting parameters\n col_wrap=None, row_order=None, col_order=None,\n height=5, aspect=1, facet_kws=None,\n **kwargs,\n):\n\n p = _DistributionFacetPlotter(\n data=data,\n variables=_DistributionFacetPlotter.get_semantics(locals())\n )\n\n p.map_hue(palette=palette, order=hue_order, norm=hue_norm)\n\n _check_argument(\"kind\", [\"hist\", \"kde\", \"ecdf\"], kind)\n\n # --- Initialize the FacetGrid object\n\n # Check for attempt to plot onto specific axes and warn\n if \"ax\" in kwargs:\n msg = (\n \"`displot` is a figure-level function and does not accept \"\n \"the ax= parameter. You may wish to try {}plot.\".format(kind)\n )\n warnings.warn(msg, UserWarning)\n kwargs.pop(\"ax\")\n\n for var in [\"row\", \"col\"]:\n # Handle faceting variables that lack name information\n if var in p.variables and p.variables[var] is None:\n p.variables[var] = f\"_{var}_\"\n\n # Adapt the plot_data dataframe for use with FacetGrid\n grid_data = p.plot_data.rename(columns=p.variables)\n grid_data = grid_data.loc[:, ~grid_data.columns.duplicated()]\n\n col_name = p.variables.get(\"col\")\n row_name = p.variables.get(\"row\")\n\n if facet_kws is None:\n facet_kws = {}\n\n g = FacetGrid(\n data=grid_data, row=row_name, col=col_name,\n col_wrap=col_wrap, row_order=row_order,\n col_order=col_order, height=height,\n aspect=aspect,\n **facet_kws,\n )\n\n # Now attach the axes object to the plotter object\n if kind == \"kde\":\n allowed_types = [\"numeric\", \"datetime\"]\n else:\n allowed_types = None\n p._attach(g, allowed_types=allowed_types, log_scale=log_scale)\n\n # Check for a specification that lacks x/y data and return early\n if not p.has_xy_data:\n return g\n\n if color is None and hue is None:\n color = \"C0\"\n # XXX else warn if hue is not None?\n\n kwargs[\"legend\"] = legend\n\n # --- Draw the plots\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_displot.if_kind_hist__displot._Note_that_the_legend_is": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_displot.if_kind_hist__displot._Note_that_the_legend_is", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2173, "end_line": 2263, "span_ids": ["displot"], "tokens": 810}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def displot(\n data=None, *,\n # Vector variables\n x=None, y=None, hue=None, row=None, col=None, weights=None,\n # Other plot parameters\n kind=\"hist\", rug=False, rug_kws=None, log_scale=None, legend=True,\n # Hue-mapping parameters\n palette=None, hue_order=None, hue_norm=None, color=None,\n # Faceting parameters\n col_wrap=None, row_order=None, col_order=None,\n height=5, aspect=1, facet_kws=None,\n **kwargs,\n):\n # ... other code\n\n if kind == \"hist\":\n\n hist_kws = kwargs.copy()\n\n # Extract the parameters that will go directly to Histogram\n estimate_defaults = {}\n _assign_default_kwargs(estimate_defaults, Histogram.__init__, histplot)\n\n estimate_kws = {}\n for key, default_val in estimate_defaults.items():\n estimate_kws[key] = hist_kws.pop(key, default_val)\n\n # Handle derivative defaults\n if estimate_kws[\"discrete\"] is None:\n estimate_kws[\"discrete\"] = p._default_discrete()\n\n hist_kws[\"estimate_kws\"] = estimate_kws\n\n hist_kws.setdefault(\"color\", color)\n\n if p.univariate:\n\n _assign_default_kwargs(hist_kws, p.plot_univariate_histogram, histplot)\n p.plot_univariate_histogram(**hist_kws)\n\n else:\n\n _assign_default_kwargs(hist_kws, p.plot_bivariate_histogram, histplot)\n p.plot_bivariate_histogram(**hist_kws)\n\n elif kind == \"kde\":\n\n kde_kws = kwargs.copy()\n\n # Extract the parameters that will go directly to KDE\n estimate_defaults = {}\n _assign_default_kwargs(estimate_defaults, KDE.__init__, kdeplot)\n\n estimate_kws = {}\n for key, default_val in estimate_defaults.items():\n estimate_kws[key] = kde_kws.pop(key, default_val)\n\n kde_kws[\"estimate_kws\"] = estimate_kws\n kde_kws[\"color\"] = color\n\n if p.univariate:\n\n _assign_default_kwargs(kde_kws, p.plot_univariate_density, kdeplot)\n p.plot_univariate_density(**kde_kws)\n\n else:\n\n _assign_default_kwargs(kde_kws, p.plot_bivariate_density, kdeplot)\n p.plot_bivariate_density(**kde_kws)\n\n elif kind == \"ecdf\":\n\n ecdf_kws = kwargs.copy()\n\n # Extract the parameters that will go directly to the estimator\n estimate_kws = {}\n estimate_defaults = {}\n _assign_default_kwargs(estimate_defaults, ECDF.__init__, ecdfplot)\n for key, default_val in estimate_defaults.items():\n estimate_kws[key] = ecdf_kws.pop(key, default_val)\n\n ecdf_kws[\"estimate_kws\"] = estimate_kws\n ecdf_kws[\"color\"] = color\n\n if p.univariate:\n\n _assign_default_kwargs(ecdf_kws, p.plot_univariate_ecdf, ecdfplot)\n p.plot_univariate_ecdf(**ecdf_kws)\n\n else:\n\n raise NotImplementedError(\"Bivariate ECDF plots are not implemented\")\n\n # All plot kinds can include a rug\n if rug:\n # TODO with expand_margins=True, each facet expands margins... annoying!\n if rug_kws is None:\n rug_kws = {}\n _assign_default_kwargs(rug_kws, p.plot_rug, rugplot)\n rug_kws[\"legend\"] = False\n if color is not None:\n rug_kws[\"color\"] = color\n p.plot_rug(**rug_kws)\n\n # Call FacetGrid annotation methods\n # Note that the legend is currently set inside the plotting method\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_displot.g_set_axis_labels__displot.return.g": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_displot.g_set_axis_labels__displot.return.g", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2264, "end_line": 2286, "span_ids": ["displot"], "tokens": 296}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def displot(\n data=None, *,\n # Vector variables\n x=None, y=None, hue=None, row=None, col=None, weights=None,\n # Other plot parameters\n kind=\"hist\", rug=False, rug_kws=None, log_scale=None, legend=True,\n # Hue-mapping parameters\n palette=None, hue_order=None, hue_norm=None, color=None,\n # Faceting parameters\n col_wrap=None, row_order=None, col_order=None,\n height=5, aspect=1, facet_kws=None,\n **kwargs,\n):\n # ... other code\n g.set_axis_labels(\n x_var=p.variables.get(\"x\", g.axes.flat[0].get_xlabel()),\n y_var=p.variables.get(\"y\", g.axes.flat[0].get_ylabel()),\n )\n g.set_titles()\n g.tight_layout()\n\n if data is not None and (x is not None or y is not None):\n if not isinstance(data, pd.DataFrame):\n data = pd.DataFrame(data)\n g.data = pd.merge(\n data,\n g.data[g.data.columns.difference(data.columns)],\n left_index=True,\n right_index=True,\n )\n else:\n wide_cols = {\n k: f\"_{k}_\" if v is None else v for k, v in p.variables.items()\n }\n g.data = p.plot_data.rename(columns=wide_cols)\n\n return g", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_displot.__doc___displot.__doc__._": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_displot.__doc___displot.__doc__._", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2289, "end_line": 2368, "span_ids": ["impl:15"], "tokens": 602}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "displot.__doc__ = \"\"\"\\\nFigure-level interface for drawing distribution plots onto a FacetGrid.\n\nThis function provides access to several approaches for visualizing the\nunivariate or bivariate distribution of data, including subsets of data\ndefined by semantic mapping and faceting across multiple subplots. The\n``kind`` parameter selects the approach to use:\n\n- :func:`histplot` (with ``kind=\"hist\"``; the default)\n- :func:`kdeplot` (with ``kind=\"kde\"``)\n- :func:`ecdfplot` (with ``kind=\"ecdf\"``; univariate-only)\n\nAdditionally, a :func:`rugplot` can be added to any kind of plot to show\nindividual observations.\n\nExtra keyword arguments are passed to the underlying function, so you should\nrefer to the documentation for each to understand the complete set of options\nfor making plots with this interface.\n\nSee the :doc:`distribution plots tutorial <../tutorial/distributions>` for a more\nin-depth discussion of the relative strengths and weaknesses of each approach.\nThe distinction between figure-level and axes-level functions is explained\nfurther in the :doc:`user guide <../tutorial/function_overview>`.\n\nParameters\n----------\n{params.core.data}\n{params.core.xy}\n{params.core.hue}\n{params.facets.rowcol}\nkind : {{\"hist\", \"kde\", \"ecdf\"}}\n Approach for visualizing the data. Selects the underlying plotting function\n and determines the additional set of valid parameters.\nrug : bool\n If True, show each observation with marginal ticks (as in :func:`rugplot`).\nrug_kws : dict\n Parameters to control the appearance of the rug plot.\n{params.dist.log_scale}\n{params.dist.legend}\n{params.core.palette}\n{params.core.hue_order}\n{params.core.hue_norm}\n{params.core.color}\n{params.facets.col_wrap}\n{params.facets.rowcol_order}\n{params.facets.height}\n{params.facets.aspect}\n{params.facets.facet_kws}\nkwargs\n Other keyword arguments are documented with the relevant axes-level function:\n\n - :func:`histplot` (with ``kind=\"hist\"``)\n - :func:`kdeplot` (with ``kind=\"kde\"``)\n - :func:`ecdfplot` (with ``kind=\"ecdf\"``)\n\nReturns\n-------\n{returns.facetgrid}\n\nSee Also\n--------\n{seealso.histplot}\n{seealso.kdeplot}\n{seealso.rugplot}\n{seealso.ecdfplot}\n{seealso.jointplot}\n\nExamples\n--------\n\nSee the API documentation for the axes-level functions for more details\nabout the breadth of options available for each plot kind.\n\n.. include:: ../docstrings/displot.rst\n\n\"\"\".format(\n params=_param_docs,\n returns=_core_docs[\"returns\"],\n seealso=_core_docs[\"seealso\"],\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_None_10__freedman_diaconis_bins.if_h_0_.else_.return.int_np_ceil_a_max_a_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_None_10__freedman_diaconis_bins.if_h_0_.else_.return.int_np_ceil_a_max_a_", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2371, "end_line": 2388, "span_ids": ["impl:15", "_freedman_diaconis_bins"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# =========================================================================== #\n# DEPRECATED FUNCTIONS LIVE BELOW HERE\n# =========================================================================== #\n\n\ndef _freedman_diaconis_bins(a):\n \"\"\"Calculate number of hist bins using Freedman-Diaconis rule.\"\"\"\n # From https://stats.stackexchange.com/questions/798/\n a = np.asarray(a)\n if len(a) < 2:\n return 1\n iqr = np.subtract.reduce(np.nanpercentile(a, [75, 25]))\n h = 2 * iqr / (len(a) ** (1 / 3))\n # fall back to sqrt(a) bins if iqr is 0\n if h == 0:\n return int(np.sqrt(a.size))\n else:\n return int(np.ceil((a.max() - a.min()) / h))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_distplot_distplot.if_label_is_not_None_.if_hist_.elif_fit_.fit_kws_label_label": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_distplot_distplot.if_label_is_not_None_.if_hist_.elif_fit_.fit_kws_label_label", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2391, "end_line": 2478, "span_ids": ["distplot"], "tokens": 724}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def distplot(a=None, bins=None, hist=True, kde=True, rug=False, fit=None,\n hist_kws=None, kde_kws=None, rug_kws=None, fit_kws=None,\n color=None, vertical=False, norm_hist=False, axlabel=None,\n label=None, ax=None, x=None):\n \"\"\"\n DEPRECATED\n\n This function has been deprecated and will be removed in seaborn v0.14.0.\n It has been replaced by :func:`histplot` and :func:`displot`, two functions\n with a modern API and many more capabilities.\n\n For a guide to updating, please see this notebook:\n\n https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751\n\n \"\"\"\n\n if kde and not hist:\n axes_level_suggestion = (\n \"`kdeplot` (an axes-level function for kernel density plots)\"\n )\n else:\n axes_level_suggestion = (\n \"`histplot` (an axes-level function for histograms)\"\n )\n\n msg = textwrap.dedent(f\"\"\"\n\n `distplot` is a deprecated function and will be removed in seaborn v0.14.0.\n\n Please adapt your code to use either `displot` (a figure-level function with\n similar flexibility) or {axes_level_suggestion}.\n\n For a guide to updating your code to use the new functions, please see\n https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751\n \"\"\")\n warnings.warn(msg, UserWarning, stacklevel=2)\n\n if ax is None:\n ax = plt.gca()\n\n # Intelligently label the support axis\n label_ax = bool(axlabel)\n if axlabel is None and hasattr(a, \"name\"):\n axlabel = a.name\n if axlabel is not None:\n label_ax = True\n\n # Support new-style API\n if x is not None:\n a = x\n\n # Make a a 1-d float array\n a = np.asarray(a, float)\n if a.ndim > 1:\n a = a.squeeze()\n\n # Drop null values from array\n a = remove_na(a)\n\n # Decide if the hist is normed\n norm_hist = norm_hist or kde or (fit is not None)\n\n # Handle dictionary defaults\n hist_kws = {} if hist_kws is None else hist_kws.copy()\n kde_kws = {} if kde_kws is None else kde_kws.copy()\n rug_kws = {} if rug_kws is None else rug_kws.copy()\n fit_kws = {} if fit_kws is None else fit_kws.copy()\n\n # Get the color from the current color cycle\n if color is None:\n if vertical:\n line, = ax.plot(0, a.mean())\n else:\n line, = ax.plot(a.mean(), 0)\n color = line.get_color()\n line.remove()\n\n # Plug the label into the right kwarg dictionary\n if label is not None:\n if hist:\n hist_kws[\"label\"] = label\n elif kde:\n kde_kws[\"label\"] = label\n elif rug:\n rug_kws[\"label\"] = label\n elif fit:\n fit_kws[\"label\"] = label\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_distplot.if_hist__": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/distributions.py_distplot.if_hist__", "embedding": null, "metadata": {"file_path": "seaborn/distributions.py", "file_name": "distributions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2480, "end_line": 2533, "span_ids": ["distplot"], "tokens": 537}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def distplot(a=None, bins=None, hist=True, kde=True, rug=False, fit=None,\n hist_kws=None, kde_kws=None, rug_kws=None, fit_kws=None,\n color=None, vertical=False, norm_hist=False, axlabel=None,\n label=None, ax=None, x=None):\n # ... other code\n\n if hist:\n if bins is None:\n bins = min(_freedman_diaconis_bins(a), 50)\n hist_kws.setdefault(\"alpha\", 0.4)\n hist_kws.setdefault(\"density\", norm_hist)\n\n orientation = \"horizontal\" if vertical else \"vertical\"\n hist_color = hist_kws.pop(\"color\", color)\n ax.hist(a, bins, orientation=orientation,\n color=hist_color, **hist_kws)\n if hist_color != color:\n hist_kws[\"color\"] = hist_color\n\n axis = \"y\" if vertical else \"x\"\n\n if kde:\n kde_color = kde_kws.pop(\"color\", color)\n kdeplot(**{axis: a}, ax=ax, color=kde_color, **kde_kws)\n if kde_color != color:\n kde_kws[\"color\"] = kde_color\n\n if rug:\n rug_color = rug_kws.pop(\"color\", color)\n rugplot(**{axis: a}, ax=ax, color=rug_color, **rug_kws)\n if rug_color != color:\n rug_kws[\"color\"] = rug_color\n\n if fit is not None:\n\n def pdf(x):\n return fit.pdf(x, *params)\n\n fit_color = fit_kws.pop(\"color\", \"#282828\")\n gridsize = fit_kws.pop(\"gridsize\", 200)\n cut = fit_kws.pop(\"cut\", 3)\n clip = fit_kws.pop(\"clip\", (-np.inf, np.inf))\n bw = gaussian_kde(a).scotts_factor() * a.std(ddof=1)\n x = _kde_support(a, bw, gridsize, cut, clip)\n params = fit.fit(a)\n y = pdf(x)\n if vertical:\n x, y = y, x\n ax.plot(x, y, color=fit_color, **fit_kws)\n if fit_color != \"#282828\":\n fit_kws[\"color\"] = fit_color\n\n if label_ax:\n if vertical:\n ax.set_ylabel(axlabel)\n else:\n ax.set_xlabel(axlabel)\n\n return ax", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/appdirs.py__usr_bin_env_python3_if_sys_platform_startswit.else_.system.sys_platform": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/appdirs.py__usr_bin_env_python3_if_sys_platform_startswit.else_.system.sys_platform", "embedding": null, "metadata": {"file_path": "seaborn/external/appdirs.py", "file_name": "appdirs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 70, "span_ids": ["impl", "impl:8", "docstring", "imports", "imports:3", "impl:5"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "#!/usr/bin/env python3\n\n__version__ = \"1.4.4\"\n__version_info__ = tuple(int(segment) for segment in __version__.split(\".\"))\n\n\nimport sys\nimport os\n\nunicode = str\n\nif sys.platform.startswith('java'):\n import platform\n os_name = platform.java_ver()[3][0]\n if os_name.startswith('Windows'): # \"Windows XP\", \"Windows 7\", etc.\n system = 'win32'\n elif os_name.startswith('Mac'): # \"Mac OS X\", etc.\n system = 'darwin'\n else: # \"Linux\", \"SunOS\", \"FreeBSD\", etc.\n # Setting this to \"linux2\" is not ideal, but only Windows or Mac\n # are actually checked for and the rest of the module expects\n # *sys.platform* style strings.\n system = 'linux2'\nelse:\n system = sys.platform", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/appdirs.py_user_cache_dir_user_cache_dir.return.path": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/appdirs.py_user_cache_dir_user_cache_dir.return.path", "embedding": null, "metadata": {"file_path": "seaborn/external/appdirs.py", "file_name": "appdirs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 294, "end_line": 348, "span_ids": ["user_cache_dir"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def user_cache_dir(appname=None, appauthor=None, version=None, opinion=True):\n if system == \"win32\":\n if appauthor is None:\n appauthor = appname\n path = os.path.normpath(_get_win_folder(\"CSIDL_LOCAL_APPDATA\"))\n if appname:\n if appauthor is not False:\n path = os.path.join(path, appauthor, appname)\n else:\n path = os.path.join(path, appname)\n if opinion:\n path = os.path.join(path, \"Cache\")\n elif system == 'darwin':\n path = os.path.expanduser('~/Library/Caches')\n if appname:\n path = os.path.join(path, appname)\n else:\n path = os.getenv('XDG_CACHE_HOME', os.path.expanduser('~/.cache'))\n if appname:\n path = os.path.join(path, appname)\n if appname and version:\n path = os.path.join(path, version)\n return path", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/appdirs.py__internal_support_st__get_win_folder_from_registry.return.dir": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/appdirs.py__internal_support_st__get_win_folder_from_registry.return.dir", "embedding": null, "metadata": {"file_path": "seaborn/external/appdirs.py", "file_name": "appdirs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 130, "end_line": 150, "span_ids": ["_get_win_folder_from_registry", "user_cache_dir"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "#---- internal support stuff\n\ndef _get_win_folder_from_registry(csidl_name):\n \"\"\"This is a fallback technique at best. I'm not sure if using the\n registry for this guarantees us the correct answer for all CSIDL_*\n names.\n \"\"\"\n import winreg as _winreg\n\n shell_folder_name = {\n \"CSIDL_APPDATA\": \"AppData\",\n \"CSIDL_COMMON_APPDATA\": \"Common AppData\",\n \"CSIDL_LOCAL_APPDATA\": \"Local AppData\",\n }[csidl_name]\n\n key = _winreg.OpenKey(\n _winreg.HKEY_CURRENT_USER,\n r\"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\"\n )\n dir, type = _winreg.QueryValueEx(key, shell_folder_name)\n return dir", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/appdirs.py__get_win_folder_with_pywin32__get_win_folder_with_pywin32.return.dir": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/appdirs.py__get_win_folder_with_pywin32__get_win_folder_with_pywin32.return.dir", "embedding": null, "metadata": {"file_path": "seaborn/external/appdirs.py", "file_name": "appdirs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 513, "end_line": 537, "span_ids": ["_get_win_folder_with_pywin32"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _get_win_folder_with_pywin32(csidl_name):\n from win32com.shell import shellcon, shell\n dir = shell.SHGetFolderPath(0, getattr(shellcon, csidl_name), 0, 0)\n # Try to make this a unicode path because SHGetFolderPath does\n # not return unicode strings when there is unicode data in the\n # path.\n try:\n dir = unicode(dir)\n\n # Downgrade to short path name if have highbit chars. See\n # .\n has_high_char = False\n for c in dir:\n if ord(c) > 255:\n has_high_char = True\n break\n if has_high_char:\n try:\n import win32api\n dir = win32api.GetShortPathName(dir)\n except ImportError:\n pass\n except UnicodeError:\n pass\n return dir", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/appdirs.py__get_win_folder_with_ctypes__get_win_folder_with_ctypes.return.buf_value": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/appdirs.py__get_win_folder_with_ctypes__get_win_folder_with_ctypes.return.buf_value", "embedding": null, "metadata": {"file_path": "seaborn/external/appdirs.py", "file_name": "appdirs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 540, "end_line": 564, "span_ids": ["_get_win_folder_with_ctypes"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _get_win_folder_with_ctypes(csidl_name):\n import ctypes\n\n csidl_const = {\n \"CSIDL_APPDATA\": 26,\n \"CSIDL_COMMON_APPDATA\": 35,\n \"CSIDL_LOCAL_APPDATA\": 28,\n }[csidl_name]\n\n buf = ctypes.create_unicode_buffer(1024)\n ctypes.windll.shell32.SHGetFolderPathW(None, csidl_const, None, 0, buf)\n\n # Downgrade to short path name if have highbit chars. See\n # .\n has_high_char = False\n for c in buf:\n if ord(c) > 255:\n has_high_char = True\n break\n if has_high_char:\n buf2 = ctypes.create_unicode_buffer(1024)\n if ctypes.windll.kernel32.GetShortPathNameW(buf.value, buf2, 1024):\n buf = buf2\n\n return buf.value", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_inspect_Parameter.namedtuple_Parameter_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_inspect_Parameter.namedtuple_Parameter_", "embedding": null, "metadata": {"file_path": "seaborn/external/docscrape.py", "file_name": "docscrape.py", "file_type": "text/x-python", "category": "implementation", "start_line": 29, "end_line": 133, "span_ids": ["impl", "Reader.read_to_next_unindented_line", "Reader.is_empty", "ParseError", "Reader.read_to_condition", "Reader.reset", "strip_blank_lines", "Reader.read_to_next_empty_line", "Reader.peek", "imports", "Reader.read", "Reader.seek_next_non_empty_line", "Reader", "ParseError.__str__", "Reader.eof", "Reader.__getitem__"], "tokens": 572}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import inspect\nimport textwrap\nimport re\nimport pydoc\nfrom warnings import warn\nfrom collections import namedtuple\nfrom collections.abc import Callable, Mapping\nimport copy\nimport sys\n\n\ndef strip_blank_lines(l):\n \"Remove leading and trailing blank lines from a list of lines\"\n while l and not l[0].strip():\n del l[0]\n while l and not l[-1].strip():\n del l[-1]\n return l\n\n\nclass Reader:\n \"\"\"A line-based string reader.\n\n \"\"\"\n def __init__(self, data):\n \"\"\"\n Parameters\n ----------\n data : str\n String with lines separated by '\\n'.\n\n \"\"\"\n if isinstance(data, list):\n self._str = data\n else:\n self._str = data.split('\\n') # store string as list of lines\n\n self.reset()\n\n def __getitem__(self, n):\n return self._str[n]\n\n def reset(self):\n self._l = 0 # current line nr\n\n def read(self):\n if not self.eof():\n out = self[self._l]\n self._l += 1\n return out\n else:\n return ''\n\n def seek_next_non_empty_line(self):\n for l in self[self._l:]:\n if l.strip():\n break\n else:\n self._l += 1\n\n def eof(self):\n return self._l >= len(self._str)\n\n def read_to_condition(self, condition_func):\n start = self._l\n for line in self[start:]:\n if condition_func(line):\n return self[start:self._l]\n self._l += 1\n if self.eof():\n return self[start:self._l+1]\n return []\n\n def read_to_next_empty_line(self):\n self.seek_next_non_empty_line()\n\n def is_empty(line):\n return not line.strip()\n\n return self.read_to_condition(is_empty)\n\n def read_to_next_unindented_line(self):\n def is_unindented(line):\n return (line.strip() and (len(line.lstrip()) == len(line)))\n return self.read_to_condition(is_unindented)\n\n def peek(self, n=0):\n if self._l + n < len(self._str):\n return self[self._l + n]\n else:\n return ''\n\n def is_empty(self):\n return not ''.join(self._str).strip()\n\n\nclass ParseError(Exception):\n def __str__(self):\n message = self.args[0]\n if hasattr(self, 'docstring'):\n message = f\"{message} in {self.docstring!r}\"\n return message\n\n\nParameter = namedtuple('Parameter', ['name', 'type', 'desc'])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString_NumpyDocString._read_sections.while_not_self__doc_eof_.if_name_startswith_.else_.yield_name_self__strip_d": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString_NumpyDocString._read_sections.while_not_self__doc_eof_.if_name_startswith_.else_.yield_name_self__strip_d", "embedding": null, "metadata": {"file_path": "seaborn/external/docscrape.py", "file_name": "docscrape.py", "file_type": "text/x-python", "category": "implementation", "start_line": 136, "end_line": 240, "span_ids": ["NumpyDocString.__setitem__", "NumpyDocString._is_at_section", "NumpyDocString", "NumpyDocString._read_to_next_section", "NumpyDocString.__iter__", "NumpyDocString._strip", "NumpyDocString._read_sections", "NumpyDocString.__getitem__", "NumpyDocString.__len__"], "tokens": 646}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocString(Mapping):\n \"\"\"Parses a numpydoc string to an abstract representation\n\n Instances define a mapping from section title to structured data.\n\n \"\"\"\n\n sections = {\n 'Signature': '',\n 'Summary': [''],\n 'Extended Summary': [],\n 'Parameters': [],\n 'Returns': [],\n 'Yields': [],\n 'Receives': [],\n 'Raises': [],\n 'Warns': [],\n 'Other Parameters': [],\n 'Attributes': [],\n 'Methods': [],\n 'See Also': [],\n 'Notes': [],\n 'Warnings': [],\n 'References': '',\n 'Examples': '',\n 'index': {}\n }\n\n def __init__(self, docstring, config={}):\n orig_docstring = docstring\n docstring = textwrap.dedent(docstring).split('\\n')\n\n self._doc = Reader(docstring)\n self._parsed_data = copy.deepcopy(self.sections)\n\n try:\n self._parse()\n except ParseError as e:\n e.docstring = orig_docstring\n raise\n\n def __getitem__(self, key):\n return self._parsed_data[key]\n\n def __setitem__(self, key, val):\n if key not in self._parsed_data:\n self._error_location(f\"Unknown section {key}\", error=False)\n else:\n self._parsed_data[key] = val\n\n def __iter__(self):\n return iter(self._parsed_data)\n\n def __len__(self):\n return len(self._parsed_data)\n\n def _is_at_section(self):\n self._doc.seek_next_non_empty_line()\n\n if self._doc.eof():\n return False\n\n l1 = self._doc.peek().strip() # e.g. Parameters\n\n if l1.startswith('.. index::'):\n return True\n\n l2 = self._doc.peek(1).strip() # ---------- or ==========\n return l2.startswith('-'*len(l1)) or l2.startswith('='*len(l1))\n\n def _strip(self, doc):\n i = 0\n j = 0\n for i, line in enumerate(doc):\n if line.strip():\n break\n\n for j, line in enumerate(doc[::-1]):\n if line.strip():\n break\n\n return doc[i:len(doc)-j]\n\n def _read_to_next_section(self):\n section = self._doc.read_to_next_empty_line()\n\n while not self._is_at_section() and not self._doc.eof():\n if not self._doc.peek(-1).strip(): # previous line was empty\n section += ['']\n\n section += self._doc.read_to_next_empty_line()\n\n return section\n\n def _read_sections(self):\n while not self._doc.eof():\n data = self._read_to_next_section()\n name = data[0].strip()\n\n if name.startswith('..'): # index section\n yield name, data[1:]\n elif len(data) < 2:\n yield StopIteration\n else:\n yield name, self._strip(data[2:])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._parse_param_list_NumpyDocString._parse_param_list.return.params": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._parse_param_list_NumpyDocString._parse_param_list.return.params", "embedding": null, "metadata": {"file_path": "seaborn/external/docscrape.py", "file_name": "docscrape.py", "file_type": "text/x-python", "category": "implementation", "start_line": 242, "end_line": 261, "span_ids": ["NumpyDocString._parse_param_list"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocString(Mapping):\n\n def _parse_param_list(self, content, single_element_is_type=False):\n r = Reader(content)\n params = []\n while not r.eof():\n header = r.read().strip()\n if ' : ' in header:\n arg_name, arg_type = header.split(' : ')[:2]\n else:\n if single_element_is_type:\n arg_name, arg_type = '', header\n else:\n arg_name, arg_type = header, ''\n\n desc = r.read_to_next_unindented_line()\n desc = dedent_lines(desc)\n desc = strip_blank_lines(desc)\n\n params.append(Parameter(arg_name, arg_type, desc))\n\n return params", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._See_also_supports_the_f_NumpyDocString.empty_description._": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._See_also_supports_the_f_NumpyDocString.empty_description._", "embedding": null, "metadata": {"file_path": "seaborn/external/docscrape.py", "file_name": "docscrape.py", "file_type": "text/x-python", "category": "implementation", "start_line": 263, "end_line": 297, "span_ids": ["NumpyDocString:5", "NumpyDocString._parse_param_list"], "tokens": 529}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocString(Mapping):\n\n # See also supports the following formats.\n #\n # \n # SPACE* COLON SPACE+ SPACE*\n # ( COMMA SPACE+ )+ (COMMA | PERIOD)? SPACE*\n # ( COMMA SPACE+ )* SPACE* COLON SPACE+ SPACE*\n\n # is one of\n # \n # COLON COLON BACKTICK BACKTICK\n # where\n # is a legal function name, and\n # is any nonempty sequence of word characters.\n # Examples: func_f1 :meth:`func_h1` :obj:`~baz.obj_r` :class:`class_j`\n # is a string describing the function.\n\n _role = r\":(?P\\w+):\"\n _funcbacktick = r\"`(?P(?:~\\w+\\.)?[a-zA-Z0-9_\\.-]+)`\"\n _funcplain = r\"(?P[a-zA-Z0-9_\\.-]+)\"\n _funcname = r\"(\" + _role + _funcbacktick + r\"|\" + _funcplain + r\")\"\n _funcnamenext = _funcname.replace('role', 'rolenext')\n _funcnamenext = _funcnamenext.replace('name', 'namenext')\n _description = r\"(?P\\s*:(\\s+(?P\\S+.*))?)?\\s*$\"\n _func_rgx = re.compile(r\"^\\s*\" + _funcname + r\"\\s*\")\n _line_rgx = re.compile(\n r\"^\\s*\" +\n r\"(?P\" + # group for all function names\n _funcname +\n r\"(?P([,]\\s+\" + _funcnamenext + r\")*)\" +\n r\")\" + # end of \"allfuncs\"\n r\"(?P[,\\.])?\" + # Some function lists have a trailing comma (or period) '\\s*'\n _description)\n\n # Empty elements are replaced with '..'\n empty_description = '..'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._parse_see_also_NumpyDocString._parse_see_also.return.items": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._parse_see_also_NumpyDocString._parse_see_also.return.items", "embedding": null, "metadata": {"file_path": "seaborn/external/docscrape.py", "file_name": "docscrape.py", "file_type": "text/x-python", "category": "implementation", "start_line": 299, "end_line": 350, "span_ids": ["NumpyDocString._parse_see_also"], "tokens": 394}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocString(Mapping):\n\n def _parse_see_also(self, content):\n \"\"\"\n func_name : Descriptive text\n continued text\n another_func_name : Descriptive text\n func_name1, func_name2, :meth:`func_name`, func_name3\n\n \"\"\"\n\n items = []\n\n def parse_item_name(text):\n \"\"\"Match ':role:`name`' or 'name'.\"\"\"\n m = self._func_rgx.match(text)\n if not m:\n raise ParseError(f\"{text} is not a item name\")\n role = m.group('role')\n name = m.group('name') if role else m.group('name2')\n return name, role, m.end()\n\n rest = []\n for line in content:\n if not line.strip():\n continue\n\n line_match = self._line_rgx.match(line)\n description = None\n if line_match:\n description = line_match.group('desc')\n if line_match.group('trailing') and description:\n self._error_location(\n 'Unexpected comma or period after function list at index %d of '\n 'line \"%s\"' % (line_match.end('trailing'), line),\n error=False)\n if not description and line.startswith(' '):\n rest.append(line.strip())\n elif line_match:\n funcs = []\n text = line_match.group('allfuncs')\n while True:\n if not text.strip():\n break\n name, role, match_end = parse_item_name(text)\n funcs.append((name, role))\n text = text[match_end:].strip()\n if text and text[0] == ',':\n text = text[1:].strip()\n rest = list(filter(None, [description]))\n items.append((funcs, rest))\n else:\n raise ParseError(f\"{line} is not a item name\")\n return items", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._parse_index_NumpyDocString._parse_index.return.out": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._parse_index_NumpyDocString._parse_index.return.out", "embedding": null, "metadata": {"file_path": "seaborn/external/docscrape.py", "file_name": "docscrape.py", "file_type": "text/x-python", "category": "implementation", "start_line": 352, "end_line": 369, "span_ids": ["NumpyDocString._parse_index"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocString(Mapping):\n\n def _parse_index(self, section, content):\n \"\"\"\n .. index: default\n :refguide: something, else, and more\n\n \"\"\"\n def strip_each_in(lst):\n return [s.strip() for s in lst]\n\n out = {}\n section = section.split('::')\n if len(section) > 1:\n out['default'] = strip_each_in(section[1].split(','))[0]\n for line in content:\n line = line.split(':')\n if len(line) > 2:\n out[line[1]] = strip_each_in(line[2].split(','))\n return out", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._parse_summary_NumpyDocString._parse_summary.if_not_self__is_at_sectio.self_Extended_Summary_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._parse_summary_NumpyDocString._parse_summary.if_not_self__is_at_sectio.self_Extended_Summary_", "embedding": null, "metadata": {"file_path": "seaborn/external/docscrape.py", "file_name": "docscrape.py", "file_type": "text/x-python", "category": "implementation", "start_line": 371, "end_line": 391, "span_ids": ["NumpyDocString._parse_summary"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocString(Mapping):\n\n def _parse_summary(self):\n \"\"\"Grab signature (if given) and summary\"\"\"\n if self._is_at_section():\n return\n\n # If several signatures present, take the last one\n while True:\n summary = self._doc.read_to_next_empty_line()\n summary_str = \" \".join([s.strip() for s in summary]).strip()\n compiled = re.compile(r'^([\\w., ]+=)?\\s*[\\w\\.]+\\(.*\\)$')\n if compiled.match(summary_str):\n self['Signature'] = summary_str\n if not self._is_at_section():\n continue\n break\n\n if summary is not None:\n self['Summary'] = summary\n\n if not self._is_at_section():\n self['Extended Summary'] = self._read_to_next_section()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._parse_NumpyDocString._parse.for_section_content_in.if_section_in_Parameter.else_.self_section_content": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._parse_NumpyDocString._parse.for_section_content_in.if_section_in_Parameter.else_.self_section_content", "embedding": null, "metadata": {"file_path": "seaborn/external/docscrape.py", "file_name": "docscrape.py", "file_type": "text/x-python", "category": "implementation", "start_line": 393, "end_line": 428, "span_ids": ["NumpyDocString._parse"], "tokens": 344}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocString(Mapping):\n\n def _parse(self):\n self._doc.reset()\n self._parse_summary()\n\n sections = list(self._read_sections())\n section_names = {section for section, content in sections}\n\n has_returns = 'Returns' in section_names\n has_yields = 'Yields' in section_names\n # We could do more tests, but we are not. Arbitrarily.\n if has_returns and has_yields:\n msg = 'Docstring contains both a Returns and Yields section.'\n raise ValueError(msg)\n if not has_yields and 'Receives' in section_names:\n msg = 'Docstring contains a Receives section but not Yields.'\n raise ValueError(msg)\n\n for (section, content) in sections:\n if not section.startswith('..'):\n section = (s.capitalize() for s in section.split(' '))\n section = ' '.join(section)\n if self.get(section):\n self._error_location(f\"The section {section} appears twice\")\n\n if section in ('Parameters', 'Other Parameters', 'Attributes',\n 'Methods'):\n self[section] = self._parse_param_list(content)\n elif section in ('Returns', 'Yields', 'Raises', 'Warns', 'Receives'):\n self[section] = self._parse_param_list(\n content, single_element_is_type=True)\n elif section.startswith('.. index::'):\n self['index'] = self._parse_index(section, content)\n elif section == 'See Also':\n self['See Also'] = self._parse_see_also(content)\n else:\n self[section] = content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._error_location_NumpyDocString._str_section.return.out": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._error_location_NumpyDocString._str_section.return.out", "embedding": null, "metadata": {"file_path": "seaborn/external/docscrape.py", "file_name": "docscrape.py", "file_type": "text/x-python", "category": "implementation", "start_line": 430, "end_line": 494, "span_ids": ["NumpyDocString._error_location", "NumpyDocString._str_section", "NumpyDocString._str_extended_summary", "NumpyDocString._str_param_list", "NumpyDocString._str_indent", "NumpyDocString._str_signature", "NumpyDocString._str_summary", "NumpyDocString._str_header"], "tokens": 400}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocString(Mapping):\n\n def _error_location(self, msg, error=True):\n if hasattr(self, '_obj'):\n # we know where the docs came from:\n try:\n filename = inspect.getsourcefile(self._obj)\n except TypeError:\n filename = None\n msg = msg + f\" in the docstring of {self._obj} in {filename}.\"\n if error:\n raise ValueError(msg)\n else:\n warn(msg)\n\n # string conversion routines\n\n def _str_header(self, name, symbol='-'):\n return [name, len(name)*symbol]\n\n def _str_indent(self, doc, indent=4):\n out = []\n for line in doc:\n out += [' '*indent + line]\n return out\n\n def _str_signature(self):\n if self['Signature']:\n return [self['Signature'].replace('*', r'\\*')] + ['']\n else:\n return ['']\n\n def _str_summary(self):\n if self['Summary']:\n return self['Summary'] + ['']\n else:\n return []\n\n def _str_extended_summary(self):\n if self['Extended Summary']:\n return self['Extended Summary'] + ['']\n else:\n return []\n\n def _str_param_list(self, name):\n out = []\n if self[name]:\n out += self._str_header(name)\n for param in self[name]:\n parts = []\n if param.name:\n parts.append(param.name)\n if param.type:\n parts.append(param.type)\n out += [' : '.join(parts)]\n if param.desc and ''.join(param.desc).strip():\n out += self._str_indent(param.desc)\n out += ['']\n return out\n\n def _str_section(self, name):\n out = []\n if self[name]:\n out += self._str_header(name)\n out += self[name]\n out += ['']\n return out", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._str_see_also_NumpyDocString._str_see_also.return.out": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._str_see_also_NumpyDocString._str_see_also.return.out", "embedding": null, "metadata": {"file_path": "seaborn/external/docscrape.py", "file_name": "docscrape.py", "file_type": "text/x-python", "category": "implementation", "start_line": 496, "end_line": 526, "span_ids": ["NumpyDocString._str_see_also"], "tokens": 226}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocString(Mapping):\n\n def _str_see_also(self, func_role):\n if not self['See Also']:\n return []\n out = []\n out += self._str_header(\"See Also\")\n out += ['']\n last_had_desc = True\n for funcs, desc in self['See Also']:\n assert isinstance(funcs, list)\n links = []\n for func, role in funcs:\n if role:\n link = f':{role}:`{func}`'\n elif func_role:\n link = f':{func_role}:`{func}`'\n else:\n link = f\"`{func}`_\"\n links.append(link)\n link = ', '.join(links)\n out += [link]\n if desc:\n out += self._str_indent([' '.join(desc)])\n last_had_desc = True\n else:\n last_had_desc = False\n out += self._str_indent([self.empty_description])\n\n if last_had_desc:\n out += ['']\n out += ['']\n return out", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._str_index_header.return.text_n_style_len_t": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_NumpyDocString._str_index_header.return.text_n_style_len_t", "embedding": null, "metadata": {"file_path": "seaborn/external/docscrape.py", "file_name": "docscrape.py", "file_type": "text/x-python", "category": "implementation", "start_line": 528, "end_line": 578, "span_ids": ["NumpyDocString._str_index", "indent", "dedent_lines", "NumpyDocString.__str__", "header"], "tokens": 399}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NumpyDocString(Mapping):\n\n def _str_index(self):\n idx = self['index']\n out = []\n output_index = False\n default_index = idx.get('default', '')\n if default_index:\n output_index = True\n out += [f'.. index:: {default_index}']\n for section, references in idx.items():\n if section == 'default':\n continue\n output_index = True\n out += [f\" :{section}: {', '.join(references)}\"]\n if output_index:\n return out\n else:\n return ''\n\n def __str__(self, func_role=''):\n out = []\n out += self._str_signature()\n out += self._str_summary()\n out += self._str_extended_summary()\n for param_list in ('Parameters', 'Returns', 'Yields', 'Receives',\n 'Other Parameters', 'Raises', 'Warns'):\n out += self._str_param_list(param_list)\n out += self._str_section('Warnings')\n out += self._str_see_also(func_role)\n for s in ('Notes', 'References', 'Examples'):\n out += self._str_section(s)\n for param_list in ('Attributes', 'Methods'):\n out += self._str_param_list(param_list)\n out += self._str_index()\n return '\\n'.join(out)\n\n\ndef indent(str, indent=4):\n indent_str = ' '*indent\n if str is None:\n return indent_str\n lines = str.split('\\n')\n return '\\n'.join(indent_str + l for l in lines)\n\n\ndef dedent_lines(lines):\n \"\"\"Deindent a list of lines maximally\"\"\"\n return textwrap.dedent(\"\\n\".join(lines)).split(\"\\n\")\n\n\ndef header(text, style='-'):\n return text + '\\n' + style*len(text) + '\\n'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_FunctionDoc_FunctionDoc.__str__.return.out": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_FunctionDoc_FunctionDoc.__str__.return.out", "embedding": null, "metadata": {"file_path": "seaborn/external/docscrape.py", "file_name": "docscrape.py", "file_type": "text/x-python", "category": "implementation", "start_line": 581, "end_line": 631, "span_ids": ["FunctionDoc", "FunctionDoc.__str__", "FunctionDoc.get_func"], "tokens": 410}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FunctionDoc(NumpyDocString):\n def __init__(self, func, role='func', doc=None, config={}):\n self._f = func\n self._role = role # e.g. \"func\" or \"meth\"\n\n if doc is None:\n if func is None:\n raise ValueError(\"No function or docstring given\")\n doc = inspect.getdoc(func) or ''\n NumpyDocString.__init__(self, doc, config)\n\n if not self['Signature'] and func is not None:\n func, func_name = self.get_func()\n try:\n try:\n signature = str(inspect.signature(func))\n except (AttributeError, ValueError):\n # try to read signature, backward compat for older Python\n if sys.version_info[0] >= 3:\n argspec = inspect.getfullargspec(func)\n else:\n argspec = inspect.getargspec(func)\n signature = inspect.formatargspec(*argspec)\n signature = f'{func_name}{signature}'\n except TypeError:\n signature = f'{func_name}()'\n self['Signature'] = signature\n\n def get_func(self):\n func_name = getattr(self._f, '__name__', self.__class__.__name__)\n if inspect.isclass(self._f):\n func = getattr(self._f, '__call__', self._f.__init__)\n else:\n func = self._f\n return func, func_name\n\n def __str__(self):\n out = ''\n\n func, func_name = self.get_func()\n\n roles = {'func': 'function',\n 'meth': 'method'}\n\n if self._role:\n if self._role not in roles:\n print(f\"Warning: invalid role {self._role}\")\n out += f\".. {roles.get(self._role, '')}:: {func_name}\\n \\n\\n\"\n\n out += super().__str__(func_role=self._role)\n return out", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_ClassDoc_ClassDoc._is_show_member.return.True": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/docscrape.py_ClassDoc_ClassDoc._is_show_member.return.True", "embedding": null, "metadata": {"file_path": "seaborn/external/docscrape.py", "file_name": "docscrape.py", "file_type": "text/x-python", "category": "implementation", "start_line": 634, "end_line": 715, "span_ids": ["ClassDoc", "ClassDoc.methods", "ClassDoc.properties", "ClassDoc._is_show_member", "ClassDoc.__init__.if_config_get_show_class.splitlines_x"], "tokens": 603}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClassDoc(NumpyDocString):\n\n extra_public_methods = ['__call__']\n\n def __init__(self, cls, doc=None, modulename='', func_doc=FunctionDoc,\n config={}):\n if not inspect.isclass(cls) and cls is not None:\n raise ValueError(f\"Expected a class or None, but got {cls!r}\")\n self._cls = cls\n\n if 'sphinx' in sys.modules:\n from sphinx.ext.autodoc import ALL\n else:\n ALL = object()\n\n self.show_inherited_members = config.get(\n 'show_inherited_class_members', True)\n\n if modulename and not modulename.endswith('.'):\n modulename += '.'\n self._mod = modulename\n\n if doc is None:\n if cls is None:\n raise ValueError(\"No class or documentation string given\")\n doc = pydoc.getdoc(cls)\n\n NumpyDocString.__init__(self, doc)\n\n _members = config.get('members', [])\n if _members is ALL:\n _members = None\n _exclude = config.get('exclude-members', [])\n\n if config.get('show_class_members', True) and _exclude is not ALL:\n def splitlines_x(s):\n if not s:\n return []\n else:\n return s.splitlines()\n for field, items in [('Methods', self.methods),\n ('Attributes', self.properties)]:\n if not self[field]:\n doc_list = []\n for name in sorted(items):\n if (name in _exclude or\n (_members and name not in _members)):\n continue\n try:\n doc_item = pydoc.getdoc(getattr(self._cls, name))\n doc_list.append(\n Parameter(name, '', splitlines_x(doc_item)))\n except AttributeError:\n pass # method doesn't exist\n self[field] = doc_list\n\n @property\n def methods(self):\n if self._cls is None:\n return []\n return [name for name, func in inspect.getmembers(self._cls)\n if ((not name.startswith('_')\n or name in self.extra_public_methods)\n and isinstance(func, Callable)\n and self._is_show_member(name))]\n\n @property\n def properties(self):\n if self._cls is None:\n return []\n return [name for name, func in inspect.getmembers(self._cls)\n if (not name.startswith('_') and\n (func is None or isinstance(func, property) or\n inspect.isdatadescriptor(func))\n and self._is_show_member(name))]\n\n def _is_show_member(self, name):\n if self.show_inherited_members:\n return True # show all class members\n if name not in self._cls.__dict__:\n return False # class member is inherited, we do not show it\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_operator_rgb_to_lch.return.luv_to_lch_xyz_to_luv_rgb": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_operator_rgb_to_lch.return.luv_to_lch_xyz_to_luv_rgb", "embedding": null, "metadata": {"file_path": "seaborn/external/husl.py", "file_name": "husl.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 68, "span_ids": ["husl_to_hex", "impl", "huslp_to_rgb", "husl_to_rgb", "lch_to_rgb", "rgb_to_huslp", "imports", "hex_to_huslp", "huslp_to_hex", "rgb_to_husl", "hex_to_husl", "rgb_to_lch"], "tokens": 498}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import operator\nimport math\n\n__version__ = \"2.1.0\"\n\n\nm = [\n [3.2406, -1.5372, -0.4986],\n [-0.9689, 1.8758, 0.0415],\n [0.0557, -0.2040, 1.0570]\n]\n\nm_inv = [\n [0.4124, 0.3576, 0.1805],\n [0.2126, 0.7152, 0.0722],\n [0.0193, 0.1192, 0.9505]\n]\n\n# Hard-coded D65 illuminant\nrefX = 0.95047\nrefY = 1.00000\nrefZ = 1.08883\nrefU = 0.19784\nrefV = 0.46834\nlab_e = 0.008856\nlab_k = 903.3\n\n\n# Public API\n\ndef husl_to_rgb(h, s, l):\n return lch_to_rgb(*husl_to_lch([h, s, l]))\n\n\ndef husl_to_hex(h, s, l):\n return rgb_to_hex(husl_to_rgb(h, s, l))\n\n\ndef rgb_to_husl(r, g, b):\n return lch_to_husl(rgb_to_lch(r, g, b))\n\n\ndef hex_to_husl(hex):\n return rgb_to_husl(*hex_to_rgb(hex))\n\n\ndef huslp_to_rgb(h, s, l):\n return lch_to_rgb(*huslp_to_lch([h, s, l]))\n\n\ndef huslp_to_hex(h, s, l):\n return rgb_to_hex(huslp_to_rgb(h, s, l))\n\n\ndef rgb_to_huslp(r, g, b):\n return lch_to_huslp(rgb_to_lch(r, g, b))\n\n\ndef hex_to_huslp(hex):\n return rgb_to_huslp(*hex_to_rgb(hex))\n\n\ndef lch_to_rgb(l, c, h):\n return xyz_to_rgb(luv_to_xyz(lch_to_luv([l, c, h])))\n\n\ndef rgb_to_lch(r, g, b):\n return luv_to_lch(xyz_to_luv(rgb_to_xyz([r, g, b])))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_max_chroma_max_chroma.return.result": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_max_chroma_max_chroma.return.result", "embedding": null, "metadata": {"file_path": "seaborn/external/husl.py", "file_name": "husl.py", "file_type": "text/x-python", "category": "implementation", "start_line": 71, "end_line": 91, "span_ids": ["max_chroma"], "tokens": 287}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def max_chroma(L, H):\n hrad = math.radians(H)\n sinH = (math.sin(hrad))\n cosH = (math.cos(hrad))\n sub1 = (math.pow(L + 16, 3.0) / 1560896.0)\n sub2 = sub1 if sub1 > 0.008856 else (L / 903.3)\n result = float(\"inf\")\n for row in m:\n m1 = row[0]\n m2 = row[1]\n m3 = row[2]\n top = ((0.99915 * m1 + 1.05122 * m2 + 1.14460 * m3) * sub2)\n rbottom = (0.86330 * m3 - 0.17266 * m2)\n lbottom = (0.12949 * m3 - 0.38848 * m1)\n bottom = (rbottom * sinH + lbottom * cosH) * sub2\n\n for t in (0.0, 1.0):\n C = (L * (top - 1.05122 * t) / (bottom + 0.17266 * sinH * t))\n if C > 0.0 and C < result:\n result = C\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py__hrad_extremum__hrad_extremum.return.result": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py__hrad_extremum__hrad_extremum.return.result", "embedding": null, "metadata": {"file_path": "seaborn/external/husl.py", "file_name": "husl.py", "file_type": "text/x-python", "category": "implementation", "start_line": 94, "end_line": 114, "span_ids": ["_hrad_extremum"], "tokens": 301}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _hrad_extremum(L):\n lhs = (math.pow(L, 3.0) + 48.0 * math.pow(L, 2.0) + 768.0 * L + 4096.0) / 1560896.0\n rhs = 1107.0 / 125000.0\n sub = lhs if lhs > rhs else 10.0 * L / 9033.0\n chroma = float(\"inf\")\n result = None\n for row in m:\n for limit in (0.0, 1.0):\n [m1, m2, m3] = row\n top = -3015466475.0 * m3 * sub + 603093295.0 * m2 * sub - 603093295.0 * limit\n bottom = 1356959916.0 * m1 * sub - 452319972.0 * m3 * sub\n hrad = math.atan2(top, bottom)\n # This is a math hack to deal with tan quadrants, I'm too lazy to figure\n # out how to do this properly\n if limit == 0.0:\n hrad += math.pi\n test = max_chroma(L, math.degrees(hrad))\n if test < chroma:\n chroma = test\n result = hrad\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_max_chroma_pastel_to_linear.if_c_0_04045_.else_.return._c_12_92_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_max_chroma_pastel_to_linear.if_c_0_04045_.else_.return._c_12_92_", "embedding": null, "metadata": {"file_path": "seaborn/external/husl.py", "file_name": "husl.py", "file_type": "text/x-python", "category": "implementation", "start_line": 117, "end_line": 153, "span_ids": ["to_linear", "dot_product", "f_inv", "max_chroma_pastel", "f", "from_linear"], "tokens": 266}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def max_chroma_pastel(L):\n H = math.degrees(_hrad_extremum(L))\n return max_chroma(L, H)\n\n\ndef dot_product(a, b):\n return sum(map(operator.mul, a, b))\n\n\ndef f(t):\n if t > lab_e:\n return (math.pow(t, 1.0 / 3.0))\n else:\n return (7.787 * t + 16.0 / 116.0)\n\n\ndef f_inv(t):\n if math.pow(t, 3.0) > lab_e:\n return (math.pow(t, 3.0))\n else:\n return (116.0 * t - 16.0) / lab_k\n\n\ndef from_linear(c):\n if c <= 0.0031308:\n return 12.92 * c\n else:\n return (1.055 * math.pow(c, 1.0 / 2.4) - 0.055)\n\n\ndef to_linear(c):\n a = 0.055\n\n if c > 0.04045:\n return (math.pow((c + a) / (1.0 + a), 2.4))\n else:\n return (c / 12.92)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_rgb_prepare_rgb_prepare.return.ret": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_rgb_prepare_rgb_prepare.return.ret", "embedding": null, "metadata": {"file_path": "seaborn/external/husl.py", "file_name": "husl.py", "file_type": "text/x-python", "category": "implementation", "start_line": 156, "end_line": 175, "span_ids": ["rgb_prepare"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def rgb_prepare(triple):\n ret = []\n for ch in triple:\n ch = round(ch, 3)\n\n if ch < -0.0001 or ch > 1.0001:\n raise Exception(f\"Illegal RGB value {ch:f}\")\n\n if ch < 0:\n ch = 0\n if ch > 1:\n ch = 1\n\n # Fix for Python 3 which by default rounds 4.5 down to 4.0\n # instead of Python 2 which is rounded to 5.0 which caused\n # a couple off by one errors in the tests. Tests now all pass\n # in Python 2 and Python 3\n ret.append(int(round(ch * 255 + 0.001, 0)))\n\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_hex_to_rgb_rgb_to_xyz.return.list_map_lambda_row_dot_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_hex_to_rgb_rgb_to_xyz.return.list_map_lambda_row_dot_", "embedding": null, "metadata": {"file_path": "seaborn/external/husl.py", "file_name": "husl.py", "file_type": "text/x-python", "category": "implementation", "start_line": 178, "end_line": 199, "span_ids": ["rgb_to_hex", "xyz_to_rgb", "rgb_to_xyz", "hex_to_rgb"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def hex_to_rgb(hex):\n if hex.startswith('#'):\n hex = hex[1:]\n r = int(hex[0:2], 16) / 255.0\n g = int(hex[2:4], 16) / 255.0\n b = int(hex[4:6], 16) / 255.0\n return [r, g, b]\n\n\ndef rgb_to_hex(triple):\n [r, g, b] = triple\n return '#%02x%02x%02x' % tuple(rgb_prepare([r, g, b]))\n\n\ndef xyz_to_rgb(triple):\n xyz = map(lambda row: dot_product(row, triple), m)\n return list(map(from_linear, xyz))\n\n\ndef rgb_to_xyz(triple):\n rgbl = list(map(to_linear, triple))\n return list(map(lambda row: dot_product(row, rgbl), m_inv))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_xyz_to_luv_xyz_to_luv.return._L_U_V_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_xyz_to_luv_xyz_to_luv.return._L_U_V_", "embedding": null, "metadata": {"file_path": "seaborn/external/husl.py", "file_name": "husl.py", "file_type": "text/x-python", "category": "implementation", "start_line": 202, "end_line": 219, "span_ids": ["xyz_to_luv"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def xyz_to_luv(triple):\n X, Y, Z = triple\n\n if X == Y == Z == 0.0:\n return [0.0, 0.0, 0.0]\n\n varU = (4.0 * X) / (X + (15.0 * Y) + (3.0 * Z))\n varV = (9.0 * Y) / (X + (15.0 * Y) + (3.0 * Z))\n L = 116.0 * f(Y / refY) - 16.0\n\n # Black will create a divide-by-zero error\n if L == 0.0:\n return [0.0, 0.0, 0.0]\n\n U = 13.0 * L * (varU - refU)\n V = 13.0 * L * (varV - refV)\n\n return [L, U, V]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_luv_to_xyz_luv_to_xyz.return._X_Y_Z_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_luv_to_xyz_luv_to_xyz.return._X_Y_Z_", "embedding": null, "metadata": {"file_path": "seaborn/external/husl.py", "file_name": "husl.py", "file_type": "text/x-python", "category": "implementation", "start_line": 222, "end_line": 235, "span_ids": ["luv_to_xyz"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def luv_to_xyz(triple):\n L, U, V = triple\n\n if L == 0:\n return [0.0, 0.0, 0.0]\n\n varY = f_inv((L + 16.0) / 116.0)\n varU = U / (13.0 * L) + refU\n varV = V / (13.0 * L) + refV\n Y = varY * refY\n X = 0.0 - (9.0 * Y * varU) / ((varU - 4.0) * varV - varU * varV)\n Z = (9.0 * Y - (15.0 * varV * Y) - (varV * X)) / (3.0 * varV)\n\n return [X, Y, Z]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_luv_to_lch_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/husl.py_luv_to_lch_", "embedding": null, "metadata": {"file_path": "seaborn/external/husl.py", "file_name": "husl.py", "file_type": "text/x-python", "category": "implementation", "start_line": 238, "end_line": 314, "span_ids": ["huslp_to_lch", "lch_to_husl", "lch_to_huslp", "lch_to_luv", "luv_to_lch", "husl_to_lch"], "tokens": 555}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def luv_to_lch(triple):\n L, U, V = triple\n\n C = (math.pow(math.pow(U, 2) + math.pow(V, 2), (1.0 / 2.0)))\n hrad = (math.atan2(V, U))\n H = math.degrees(hrad)\n if H < 0.0:\n H = 360.0 + H\n\n return [L, C, H]\n\n\ndef lch_to_luv(triple):\n L, C, H = triple\n\n Hrad = math.radians(H)\n U = (math.cos(Hrad) * C)\n V = (math.sin(Hrad) * C)\n\n return [L, U, V]\n\n\ndef husl_to_lch(triple):\n H, S, L = triple\n\n if L > 99.9999999:\n return [100, 0.0, H]\n if L < 0.00000001:\n return [0.0, 0.0, H]\n\n mx = max_chroma(L, H)\n C = mx / 100.0 * S\n\n return [L, C, H]\n\n\ndef lch_to_husl(triple):\n L, C, H = triple\n\n if L > 99.9999999:\n return [H, 0.0, 100.0]\n if L < 0.00000001:\n return [H, 0.0, 0.0]\n\n mx = max_chroma(L, H)\n S = C / mx * 100.0\n\n return [H, S, L]\n\n\ndef huslp_to_lch(triple):\n H, S, L = triple\n\n if L > 99.9999999:\n return [100, 0.0, H]\n if L < 0.00000001:\n return [0.0, 0.0, H]\n\n mx = max_chroma_pastel(L)\n C = mx / 100.0 * S\n\n return [L, C, H]\n\n\ndef lch_to_huslp(triple):\n L, C, H = triple\n\n if L > 99.9999999:\n return [H, 0.0, 100.0]\n if L < 0.00000001:\n return [H, 0.0, 0.0]\n\n mx = max_chroma_pastel(L)\n S = C / mx * 100.0\n\n return [H, S, L]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/kde.py_np_gaussian_kde._Representation_of_a_ke": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/kde.py_np_gaussian_kde._Representation_of_a_ke", "embedding": null, "metadata": {"file_path": "seaborn/external/kde.py", "file_name": "kde.py", "file_type": "text/x-python", "category": "implementation", "start_line": 72, "end_line": 194, "span_ids": ["impl", "gaussian_kde", "imports"], "tokens": 1153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nfrom numpy import (asarray, atleast_2d, reshape, zeros, newaxis, dot, exp, pi,\n sqrt, ravel, power, atleast_1d, squeeze, sum, transpose,\n ones, cov)\nfrom numpy import linalg\n\n\n__all__ = ['gaussian_kde']\n\n\nclass gaussian_kde:\n \"\"\"Representation of a kernel-density estimate using Gaussian kernels.\n\n Kernel density estimation is a way to estimate the probability density\n function (PDF) of a random variable in a non-parametric way.\n `gaussian_kde` works for both uni-variate and multi-variate data. It\n includes automatic bandwidth determination. The estimation works best for\n a unimodal distribution; bimodal or multi-modal distributions tend to be\n oversmoothed.\n\n Parameters\n ----------\n dataset : array_like\n Datapoints to estimate from. In case of univariate data this is a 1-D\n array, otherwise a 2-D array with shape (# of dims, # of data).\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 scalar,\n this will be used directly as `kde.factor`. If a callable, it should\n take a `gaussian_kde` instance as only parameter and return a scalar.\n If None (default), 'scott' is used. See Notes for more details.\n weights : array_like, optional\n weights of datapoints. This must be the same shape as dataset.\n If None (default), the samples are assumed to be equally weighted\n\n Attributes\n ----------\n dataset : ndarray\n The dataset with which `gaussian_kde` was initialized.\n d : int\n Number of dimensions.\n n : int\n Number of datapoints.\n neff : int\n Effective number of datapoints.\n\n .. versionadded:: 1.2.0\n factor : float\n The bandwidth factor, obtained from `kde.covariance_factor`, with which\n the covariance matrix is multiplied.\n covariance : ndarray\n The covariance matrix of `dataset`, scaled by the calculated bandwidth\n (`kde.factor`).\n inv_cov : ndarray\n The inverse of `covariance`.\n\n Methods\n -------\n evaluate\n __call__\n integrate_gaussian\n integrate_box_1d\n integrate_box\n integrate_kde\n pdf\n logpdf\n resample\n set_bandwidth\n covariance_factor\n\n Notes\n -----\n Bandwidth selection strongly influences the estimate obtained from the KDE\n (much more so than the actual shape of the kernel). Bandwidth selection\n can be done by a \"rule of thumb\", by cross-validation, by \"plug-in\n methods\" or by other means; see [3]_, [4]_ for reviews. `gaussian_kde`\n uses a rule of thumb, the default is Scott's Rule.\n\n Scott's Rule [1]_, implemented as `scotts_factor`, is::\n\n n**(-1./(d+4)),\n\n with ``n`` the number of data points and ``d`` the number of dimensions.\n In the case of unequally weighted points, `scotts_factor` becomes::\n\n neff**(-1./(d+4)),\n\n with ``neff`` the effective number of datapoints.\n Silverman's Rule [2]_, implemented as `silverman_factor`, is::\n\n (n * (d + 2) / 4.)**(-1. / (d + 4)).\n\n or in the case of unequally weighted points::\n\n (neff * (d + 2) / 4.)**(-1. / (d + 4)).\n\n Good general descriptions of kernel density estimation can be found in [1]_\n and [2]_, the mathematics for this multi-dimensional implementation can be\n found in [1]_.\n\n With a set of weighted samples, the effective number of datapoints ``neff``\n is defined by::\n\n neff = sum(weights)^2 / sum(weights^2)\n\n as detailed in [5]_.\n\n References\n ----------\n .. [1] D.W. Scott, \"Multivariate Density Estimation: Theory, Practice, and\n Visualization\", John Wiley & Sons, New York, Chicester, 1992.\n .. [2] B.W. Silverman, \"Density Estimation for Statistics and Data\n Analysis\", Vol. 26, Monographs on Statistics and Applied Probability,\n Chapman and Hall, London, 1986.\n .. [3] B.A. Turlach, \"Bandwidth Selection in Kernel Density Estimation: A\n Review\", CORE and Institut de Statistique, Vol. 19, pp. 1-33, 1993.\n .. [4] D.M. Bashtannyk and R.J. Hyndman, \"Bandwidth selection for kernel\n conditional density estimation\", Computational Statistics & Data\n Analysis, Vol. 36, pp. 279-298, 2001.\n .. [5] Gray P. G., 1969, Journal of the Royal Statistical Society.\n Series A (General), 132, 272\n\n \"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/kde.py_gaussian_kde.__init___gaussian_kde.__init__.self_set_bandwidth_bw_met": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/kde.py_gaussian_kde.__init___gaussian_kde.__init__.self_set_bandwidth_bw_met", "embedding": null, "metadata": {"file_path": "seaborn/external/kde.py", "file_name": "kde.py", "file_type": "text/x-python", "category": "implementation", "start_line": 195, "end_line": 211, "span_ids": ["gaussian_kde"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class gaussian_kde:\n def __init__(self, dataset, bw_method=None, weights=None):\n self.dataset = atleast_2d(asarray(dataset))\n if not self.dataset.size > 1:\n raise ValueError(\"`dataset` input should have multiple elements.\")\n\n self.d, self.n = self.dataset.shape\n\n if weights is not None:\n self._weights = atleast_1d(weights).astype(float)\n self._weights /= sum(self._weights)\n if self.weights.ndim != 1:\n raise ValueError(\"`weights` input should be one-dimensional.\")\n if len(self._weights) != self.n:\n raise ValueError(\"`weights` input should be of length n\")\n self._neff = 1/sum(self._weights**2)\n\n self.set_bandwidth(bw_method=bw_method)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/kde.py_gaussian_kde.evaluate_gaussian_kde.evaluate.return.result": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/kde.py_gaussian_kde.evaluate_gaussian_kde.evaluate.return.result", "embedding": null, "metadata": {"file_path": "seaborn/external/kde.py", "file_name": "kde.py", "file_type": "text/x-python", "category": "implementation", "start_line": 213, "end_line": 267, "span_ids": ["gaussian_kde.evaluate"], "tokens": 426}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class gaussian_kde:\n\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 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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/kde.py_gaussian_kde.__call___gaussian_kde.covariance_factor.__doc__._Computes_the_coefficie": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/kde.py_gaussian_kde.__call___gaussian_kde.covariance_factor.__doc__._Computes_the_coefficie", "embedding": null, "metadata": {"file_path": "seaborn/external/kde.py", "file_name": "kde.py", "file_type": "text/x-python", "category": "implementation", "start_line": 269, "end_line": 297, "span_ids": ["gaussian_kde:5", "gaussian_kde.silverman_factor", "gaussian_kde.scotts_factor", "gaussian_kde:3"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class gaussian_kde:\n\n __call__ = evaluate\n\n def scotts_factor(self):\n \"\"\"Compute Scott's factor.\n\n Returns\n -------\n s : float\n Scott's factor.\n \"\"\"\n return power(self.neff, -1./(self.d+4))\n\n def silverman_factor(self):\n \"\"\"Compute the Silverman factor.\n\n Returns\n -------\n s : float\n The silverman factor.\n \"\"\"\n return power(self.neff*(self.d+2.0)/4.0, -1./(self.d+4))\n\n # Default method to calculate bandwidth, can be overwritten by subclass\n covariance_factor = scotts_factor\n covariance_factor.__doc__ = \"\"\"Computes the coefficient (`kde.factor`) that\n multiplies the data covariance matrix to obtain the kernel covariance\n matrix. The default is `scotts_factor`. A subclass can overwrite this\n method to provide a different method, or set it through a call to\n `kde.set_bandwidth`.\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/kde.py_gaussian_kde.set_bandwidth_gaussian_kde.set_bandwidth.self__compute_covariance_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/kde.py_gaussian_kde.set_bandwidth_gaussian_kde.set_bandwidth.self__compute_covariance_", "embedding": null, "metadata": {"file_path": "seaborn/external/kde.py", "file_name": "kde.py", "file_type": "text/x-python", "category": "implementation", "start_line": 299, "end_line": 337, "span_ids": ["gaussian_kde.set_bandwidth"], "tokens": 354}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class gaussian_kde:\n\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 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()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/kde.py_gaussian_kde._compute_covariance_gaussian_kde._compute_covariance.self._norm_factor.sqrt_linalg_det_2_pi_self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/kde.py_gaussian_kde._compute_covariance_gaussian_kde._compute_covariance.self._norm_factor.sqrt_linalg_det_2_pi_self", "embedding": null, "metadata": {"file_path": "seaborn/external/kde.py", "file_name": "kde.py", "file_type": "text/x-python", "category": "implementation", "start_line": 339, "end_line": 353, "span_ids": ["gaussian_kde._compute_covariance"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class gaussian_kde:\n\n def _compute_covariance(self):\n \"\"\"Computes the covariance matrix for each Gaussian kernel using\n covariance_factor().\n \"\"\"\n self.factor = self.covariance_factor()\n # Cache covariance and inverse covariance of the data\n if not hasattr(self, '_data_inv_cov'):\n self._data_covariance = atleast_2d(cov(self.dataset, rowvar=1,\n bias=False,\n aweights=self.weights))\n self._data_inv_cov = linalg.inv(self._data_covariance)\n\n self.covariance = self._data_covariance * self.factor**2\n self.inv_cov = self._data_inv_cov / self.factor**2\n self._norm_factor = sqrt(linalg.det(2*pi*self.covariance))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/kde.py_gaussian_kde.pdf_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/kde.py_gaussian_kde.pdf_", "embedding": null, "metadata": {"file_path": "seaborn/external/kde.py", "file_name": "kde.py", "file_type": "text/x-python", "category": "implementation", "start_line": 355, "end_line": 382, "span_ids": ["gaussian_kde.weights", "gaussian_kde.pdf", "gaussian_kde.neff"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class gaussian_kde:\n\n def pdf(self, x):\n \"\"\"\n Evaluate the estimated pdf on a provided set of points.\n\n Notes\n -----\n This is an alias for `gaussian_kde.evaluate`. See the ``evaluate``\n docstring for more details.\n\n \"\"\"\n return self.evaluate(x)\n\n @property\n def weights(self):\n try:\n return self._weights\n except AttributeError:\n self._weights = ones(self.n)/self.n\n return self._weights\n\n @property\n def neff(self):\n try:\n return self._neff\n except AttributeError:\n self._neff = 1/sum(self.weights**2)\n return self._neff", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py_collections_InfinityType.__neg__.return.NegativeInfinity": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py_collections_InfinityType.__neg__.return.NegativeInfinity", "embedding": null, "metadata": {"file_path": "seaborn/external/version.py", "file_name": "version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 24, "end_line": 60, "span_ids": ["InfinityType", "impl", "InfinityType.__repr__", "InfinityType.__lt__", "InfinityType.__neg__", "InfinityType.__ge__", "InfinityType.__gt__", "imports", "InfinityType.__le__", "InfinityType.__eq__", "InfinityType.__ne__", "InfinityType.__hash__"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import collections\nimport itertools\nimport re\nfrom typing import Callable, Optional, SupportsInt, Tuple, Union\n\n__all__ = [\"Version\", \"InvalidVersion\", \"VERSION_PATTERN\"]\n\n\n# Vendored from https://github.com/pypa/packaging/blob/main/packaging/_structures.py\n\nclass InfinityType:\n def __repr__(self) -> str:\n return \"Infinity\"\n\n def __hash__(self) -> int:\n return hash(repr(self))\n\n def __lt__(self, other: object) -> bool:\n return False\n\n def __le__(self, other: object) -> bool:\n return False\n\n def __eq__(self, other: object) -> bool:\n return isinstance(other, self.__class__)\n\n def __ne__(self, other: object) -> bool:\n return not isinstance(other, self.__class__)\n\n def __gt__(self, other: object) -> bool:\n return True\n\n def __ge__(self, other: object) -> bool:\n return True\n\n def __neg__(self: object) -> \"NegativeInfinityType\":\n return NegativeInfinity", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py_Infinity_NegativeInfinityType.__neg__.return.Infinity": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py_Infinity_NegativeInfinityType.__neg__.return.Infinity", "embedding": null, "metadata": {"file_path": "seaborn/external/version.py", "file_name": "version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 63, "end_line": 92, "span_ids": ["NegativeInfinityType.__ge__", "NegativeInfinityType.__hash__", "NegativeInfinityType.__gt__", "NegativeInfinityType.__lt__", "NegativeInfinityType.__repr__", "NegativeInfinityType", "NegativeInfinityType.__le__", "impl:3", "NegativeInfinityType.__eq__", "NegativeInfinityType.__neg__", "NegativeInfinityType.__ne__"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "Infinity = InfinityType()\n\n\nclass NegativeInfinityType:\n def __repr__(self) -> str:\n return \"-Infinity\"\n\n def __hash__(self) -> int:\n return hash(repr(self))\n\n def __lt__(self, other: object) -> bool:\n return True\n\n def __le__(self, other: object) -> bool:\n return True\n\n def __eq__(self, other: object) -> bool:\n return isinstance(other, self.__class__)\n\n def __ne__(self, other: object) -> bool:\n return not isinstance(other, self.__class__)\n\n def __gt__(self, other: object) -> bool:\n return False\n\n def __ge__(self, other: object) -> bool:\n return False\n\n def __neg__(self: object) -> InfinityType:\n return Infinity", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py_NegativeInfinity_InvalidVersion._": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py_NegativeInfinity_InvalidVersion._", "embedding": null, "metadata": {"file_path": "seaborn/external/version.py", "file_name": "version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 95, "end_line": 131, "span_ids": ["InvalidVersion", "impl:5"], "tokens": 252}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "NegativeInfinity = NegativeInfinityType()\n\n\n# Vendored from https://github.com/pypa/packaging/blob/main/packaging/version.py\n\nInfiniteTypes = Union[InfinityType, NegativeInfinityType]\nPrePostDevType = Union[InfiniteTypes, Tuple[str, int]]\nSubLocalType = Union[InfiniteTypes, int, str]\nLocalType = Union[\n NegativeInfinityType,\n Tuple[\n Union[\n SubLocalType,\n Tuple[SubLocalType, str],\n Tuple[NegativeInfinityType, SubLocalType],\n ],\n ...,\n ],\n]\nCmpKey = Tuple[\n int, Tuple[int, ...], PrePostDevType, PrePostDevType, PrePostDevType, LocalType\n]\nLegacyCmpKey = Tuple[int, Tuple[str, ...]]\nVersionComparisonMethod = Callable[\n [Union[CmpKey, LegacyCmpKey], Union[CmpKey, LegacyCmpKey]], bool\n]\n\n_Version = collections.namedtuple(\n \"_Version\", [\"epoch\", \"release\", \"dev\", \"pre\", \"post\", \"local\"]\n)\n\n\n\nclass InvalidVersion(ValueError):\n \"\"\"\n An invalid version was found, users should refer to PEP 440.\n \"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py__BaseVersion__BaseVersion.__ne__.return.self__key_other__key": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py__BaseVersion__BaseVersion.__ne__.return.self__key_other__key", "embedding": null, "metadata": {"file_path": "seaborn/external/version.py", "file_name": "version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 134, "end_line": 177, "span_ids": ["_BaseVersion.__le__", "_BaseVersion.__gt__", "_BaseVersion.__ge__", "_BaseVersion.__hash__", "_BaseVersion.__lt__", "_BaseVersion", "_BaseVersion.__eq__", "_BaseVersion.__ne__"], "tokens": 306}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _BaseVersion:\n _key: Union[CmpKey, LegacyCmpKey]\n\n def __hash__(self) -> int:\n return hash(self._key)\n\n # Please keep the duplicated `isinstance` check\n # in the six comparisons hereunder\n # unless you find a way to avoid adding overhead function calls.\n def __lt__(self, other: \"_BaseVersion\") -> bool:\n if not isinstance(other, _BaseVersion):\n return NotImplemented\n\n return self._key < other._key\n\n def __le__(self, other: \"_BaseVersion\") -> bool:\n if not isinstance(other, _BaseVersion):\n return NotImplemented\n\n return self._key <= other._key\n\n def __eq__(self, other: object) -> bool:\n if not isinstance(other, _BaseVersion):\n return NotImplemented\n\n return self._key == other._key\n\n def __ge__(self, other: \"_BaseVersion\") -> bool:\n if not isinstance(other, _BaseVersion):\n return NotImplemented\n\n return self._key >= other._key\n\n def __gt__(self, other: \"_BaseVersion\") -> bool:\n if not isinstance(other, _BaseVersion):\n return NotImplemented\n\n return self._key > other._key\n\n def __ne__(self, other: object) -> bool:\n if not isinstance(other, _BaseVersion):\n return NotImplemented\n\n return self._key != other._key", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py__Deliberately_not_anchor_VERSION_PATTERN.r_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py__Deliberately_not_anchor_VERSION_PATTERN.r_", "embedding": null, "metadata": {"file_path": "seaborn/external/version.py", "file_name": "version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 180, "end_line": 211, "span_ids": ["impl:23", "_BaseVersion.__ne__"], "tokens": 299}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Deliberately not anchored to the start and end of the string, to make it\n# easier for 3rd party code to reuse\nVERSION_PATTERN = r\"\"\"\n v?\n (?:\n (?:(?P[0-9]+)!)? # epoch\n (?P[0-9]+(?:\\.[0-9]+)*) # release segment\n (?P
                                          # pre-release\n            [-_\\.]?\n            (?P(a|b|c|rc|alpha|beta|pre|preview))\n            [-_\\.]?\n            (?P[0-9]+)?\n        )?\n        (?P                                         # post release\n            (?:-(?P[0-9]+))\n            |\n            (?:\n                [-_\\.]?\n                (?Ppost|rev|r)\n                [-_\\.]?\n                (?P[0-9]+)?\n            )\n        )?\n        (?P                                          # dev release\n            [-_\\.]?\n            (?Pdev)\n            [-_\\.]?\n            (?P[0-9]+)?\n        )?\n    )\n    (?:\\+(?P[a-z0-9]+(?:[-_\\.][a-z0-9]+)*))?       # local version\n\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py_Version_Version.__repr__.return.f_Version_self_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py_Version_Version.__repr__.return.f_Version_self_", "embedding": null, "metadata": {"file_path": "seaborn/external/version.py", "file_name": "version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 214, "end_line": 248, "span_ids": ["Version.__repr__", "Version"], "tokens": 299}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Version(_BaseVersion):\n\n    _regex = re.compile(r\"^\\s*\" + VERSION_PATTERN + r\"\\s*$\", re.VERBOSE | re.IGNORECASE)\n\n    def __init__(self, version: str) -> None:\n\n        # Validate the version and parse it into pieces\n        match = self._regex.search(version)\n        if not match:\n            raise InvalidVersion(f\"Invalid version: '{version}'\")\n\n        # Store the parsed out pieces of the version\n        self._version = _Version(\n            epoch=int(match.group(\"epoch\")) if match.group(\"epoch\") else 0,\n            release=tuple(int(i) for i in match.group(\"release\").split(\".\")),\n            pre=_parse_letter_version(match.group(\"pre_l\"), match.group(\"pre_n\")),\n            post=_parse_letter_version(\n                match.group(\"post_l\"), match.group(\"post_n1\") or match.group(\"post_n2\")\n            ),\n            dev=_parse_letter_version(match.group(\"dev_l\"), match.group(\"dev_n\")),\n            local=_parse_local_version(match.group(\"local\")),\n        )\n\n        # Generate a key which will be used for sorting\n        self._key = _cmpkey(\n            self._version.epoch,\n            self._version.release,\n            self._version.pre,\n            self._version.post,\n            self._version.dev,\n            self._version.local,\n        )\n\n    def __repr__(self) -> str:\n        return f\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py_Version.__str___Version.__str__.return._join_parts_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py_Version.__str___Version.__str__.return._join_parts_", "embedding": null, "metadata": {"file_path": "seaborn/external/version.py", "file_name": "version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 250, "end_line": 276, "span_ids": ["Version.__str__"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Version(_BaseVersion):\n\n    def __str__(self) -> str:\n        parts = []\n\n        # Epoch\n        if self.epoch != 0:\n            parts.append(f\"{self.epoch}!\")\n\n        # Release segment\n        parts.append(\".\".join(str(x) for x in self.release))\n\n        # Pre-release\n        if self.pre is not None:\n            parts.append(\"\".join(str(x) for x in self.pre))\n\n        # Post-release\n        if self.post is not None:\n            parts.append(f\".post{self.post}\")\n\n        # Development release\n        if self.dev is not None:\n            parts.append(f\".dev{self.dev}\")\n\n        # Local version segment\n        if self.local is not None:\n            parts.append(f\"+{self.local}\")\n\n        return \"\".join(parts)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py_Version.epoch_Version.micro.return.self_release_2_if_len_se": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py_Version.epoch_Version.micro.return.self_release_2_if_len_se", "embedding": null, "metadata": {"file_path": "seaborn/external/version.py", "file_name": "version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 278, "end_line": 347, "span_ids": ["Version.is_prerelease", "Version.is_devrelease", "Version.base_version", "Version.dev", "Version.minor", "Version.local", "Version.micro", "Version.major", "Version.is_postrelease", "Version.public", "Version.pre", "Version.epoch", "Version.post", "Version.release"], "tokens": 465}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Version(_BaseVersion):\n\n    @property\n    def epoch(self) -> int:\n        _epoch: int = self._version.epoch\n        return _epoch\n\n    @property\n    def release(self) -> Tuple[int, ...]:\n        _release: Tuple[int, ...] = self._version.release\n        return _release\n\n    @property\n    def pre(self) -> Optional[Tuple[str, int]]:\n        _pre: Optional[Tuple[str, int]] = self._version.pre\n        return _pre\n\n    @property\n    def post(self) -> Optional[int]:\n        return self._version.post[1] if self._version.post else None\n\n    @property\n    def dev(self) -> Optional[int]:\n        return self._version.dev[1] if self._version.dev else None\n\n    @property\n    def local(self) -> Optional[str]:\n        if self._version.local:\n            return \".\".join(str(x) for x in self._version.local)\n        else:\n            return None\n\n    @property\n    def public(self) -> str:\n        return str(self).split(\"+\", 1)[0]\n\n    @property\n    def base_version(self) -> str:\n        parts = []\n\n        # Epoch\n        if self.epoch != 0:\n            parts.append(f\"{self.epoch}!\")\n\n        # Release segment\n        parts.append(\".\".join(str(x) for x in self.release))\n\n        return \"\".join(parts)\n\n    @property\n    def is_prerelease(self) -> bool:\n        return self.dev is not None or self.pre is not None\n\n    @property\n    def is_postrelease(self) -> bool:\n        return self.post is not None\n\n    @property\n    def is_devrelease(self) -> bool:\n        return self.dev is not None\n\n    @property\n    def major(self) -> int:\n        return self.release[0] if len(self.release) >= 1 else 0\n\n    @property\n    def minor(self) -> int:\n        return self.release[1] if len(self.release) >= 2 else 0\n\n    @property\n    def micro(self) -> int:\n        return self.release[2] if len(self.release) >= 3 else 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py__parse_letter_version__parse_local_version.return.None": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py__parse_letter_version__parse_local_version.return.None", "embedding": null, "metadata": {"file_path": "seaborn/external/version.py", "file_name": "version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 350, "end_line": 398, "span_ids": ["_parse_letter_version", "_parse_local_version", "impl:25"], "tokens": 362}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _parse_letter_version(\n    letter: str, number: Union[str, bytes, SupportsInt]\n) -> Optional[Tuple[str, int]]:\n\n    if letter:\n        # We consider there to be an implicit 0 in a pre-release if there is\n        # not a numeral associated with it.\n        if number is None:\n            number = 0\n\n        # We normalize any letters to their lower case form\n        letter = letter.lower()\n\n        # We consider some words to be alternate spellings of other words and\n        # in those cases we want to normalize the spellings to our preferred\n        # spelling.\n        if letter == \"alpha\":\n            letter = \"a\"\n        elif letter == \"beta\":\n            letter = \"b\"\n        elif letter in [\"c\", \"pre\", \"preview\"]:\n            letter = \"rc\"\n        elif letter in [\"rev\", \"r\"]:\n            letter = \"post\"\n\n        return letter, int(number)\n    if not letter and number:\n        # We assume if we are given a number, but we are not given a letter\n        # then this is using the implicit post release syntax (e.g. 1.0-1)\n        letter = \"post\"\n\n        return letter, int(number)\n\n    return None\n\n\n_local_version_separators = re.compile(r\"[\\._-]\")\n\n\ndef _parse_local_version(local: str) -> Optional[LocalType]:\n    \"\"\"\n    Takes a string like abc.1.twelve and turns it into (\"abc\", 1, \"twelve\").\n    \"\"\"\n    if local is not None:\n        return tuple(\n            part.lower() if not part.isdigit() else int(part)\n            for part in _local_version_separators.split(local)\n        )\n    return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py__cmpkey_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/version.py__cmpkey_", "embedding": null, "metadata": {"file_path": "seaborn/external/version.py", "file_name": "version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 401, "end_line": 462, "span_ids": ["_cmpkey"], "tokens": 567}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _cmpkey(\n    epoch: int,\n    release: Tuple[int, ...],\n    pre: Optional[Tuple[str, int]],\n    post: Optional[Tuple[str, int]],\n    dev: Optional[Tuple[str, int]],\n    local: Optional[Tuple[SubLocalType]],\n) -> CmpKey:\n\n    # When we compare a release version, we want to compare it with all of the\n    # trailing zeros removed. So we'll use a reverse the list, drop all the now\n    # leading zeros until we come to something non zero, then take the rest\n    # re-reverse it back into the correct order and make it a tuple and use\n    # that for our sorting key.\n    _release = tuple(\n        reversed(list(itertools.dropwhile(lambda x: x == 0, reversed(release))))\n    )\n\n    # We need to \"trick\" the sorting algorithm to put 1.0.dev0 before 1.0a0.\n    # We'll do this by abusing the pre segment, but we _only_ want to do this\n    # if there is not a pre or a post segment. If we have one of those then\n    # the normal sorting rules will handle this case correctly.\n    if pre is None and post is None and dev is not None:\n        _pre: PrePostDevType = NegativeInfinity\n    # Versions without a pre-release (except as noted above) should sort after\n    # those with one.\n    elif pre is None:\n        _pre = Infinity\n    else:\n        _pre = pre\n\n    # Versions without a post segment should sort before those with one.\n    if post is None:\n        _post: PrePostDevType = NegativeInfinity\n\n    else:\n        _post = post\n\n    # Versions without a development segment should sort after those with one.\n    if dev is None:\n        _dev: PrePostDevType = Infinity\n\n    else:\n        _dev = dev\n\n    if local is None:\n        # Versions without a local segment should sort before those with one.\n        _local: LocalType = NegativeInfinity\n    else:\n        # Versions with a local segment need that segment parsed to implement\n        # the sorting rules in PEP440.\n        # - Alpha numeric segments sort before numeric segments\n        # - Alpha numeric segments sort lexicographically\n        # - Numeric segments sort numerically\n        # - Shorter versions sort before longer versions when the prefixes\n        #   match exactly\n        _local = tuple(\n            (i, \"\") if isinstance(i, int) else (NegativeInfinity, i) for i in local\n        )\n\n    return epoch, _release, _pre, _post, _dev, _local", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__Functions_to_visualize__convert_colors.try_.except_ValueError_.return._list_map_to_rgb_l_for": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__Functions_to_visualize__convert_colors.try_.except_ValueError_.return._list_map_to_rgb_l_for", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 57, "span_ids": ["_index_to_ticklabels", "impl", "impl:2", "imports:9", "impl:7", "docstring", "_convert_colors", "imports", "_index_to_label", "imports:8"], "tokens": 340}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Functions to visualize matrices of data.\"\"\"\nimport warnings\n\nimport matplotlib as mpl\nfrom matplotlib.collections import LineCollection\nimport matplotlib.pyplot as plt\nfrom matplotlib import gridspec\nimport numpy as np\nimport pandas as pd\ntry:\n    from scipy.cluster import hierarchy\n    _no_scipy = False\nexcept ImportError:\n    _no_scipy = True\n\nfrom . import cm\nfrom .axisgrid import Grid\nfrom ._compat import get_colormap\nfrom .utils import (\n    despine,\n    axis_ticklabels_overlap,\n    relative_luminance,\n    to_utf8,\n    _draw_figure,\n)\n\n\n__all__ = [\"heatmap\", \"clustermap\"]\n\n\ndef _index_to_label(index):\n    \"\"\"Convert a pandas index or multiindex to an axis label.\"\"\"\n    if isinstance(index, pd.MultiIndex):\n        return \"-\".join(map(to_utf8, index.names))\n    else:\n        return index.name\n\n\ndef _index_to_ticklabels(index):\n    \"\"\"Convert a pandas index or multiindex into ticklabels.\"\"\"\n    if isinstance(index, pd.MultiIndex):\n        return [\"-\".join(map(to_utf8, i)) for i in index.values]\n    else:\n        return index.values\n\n\ndef _convert_colors(colors):\n    \"\"\"Convert either a list of colors or nested lists of colors to RGB.\"\"\"\n    to_rgb = mpl.colors.to_rgb\n\n    try:\n        to_rgb(colors[0])\n        # If this works, there is only one level of colors\n        return list(map(to_rgb, colors))\n    except ValueError:\n        # If we get here, we have nested lists\n        return [list(map(to_rgb, l)) for l in colors]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__matrix_mask__matrix_mask.return.mask": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__matrix_mask__matrix_mask.return.mask", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 59, "end_line": 93, "span_ids": ["_matrix_mask"], "tokens": 253}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _matrix_mask(data, mask):\n    \"\"\"Ensure that data and mask are compatible and add missing values.\n\n    Values will be plotted for cells where ``mask`` is ``False``.\n\n    ``data`` is expected to be a DataFrame; ``mask`` can be an array or\n    a DataFrame.\n\n    \"\"\"\n    if mask is None:\n        mask = np.zeros(data.shape, bool)\n\n    if isinstance(mask, np.ndarray):\n        # For array masks, ensure that shape matches data then convert\n        if mask.shape != data.shape:\n            raise ValueError(\"Mask must have the same shape as data.\")\n\n        mask = pd.DataFrame(mask,\n                            index=data.index,\n                            columns=data.columns,\n                            dtype=bool)\n\n    elif isinstance(mask, pd.DataFrame):\n        # For DataFrame masks, ensure that semantic labels match data\n        if not mask.index.equals(data.index) \\\n           and mask.columns.equals(data.columns):\n            err = \"Mask must have the same index and columns as data.\"\n            raise ValueError(err)\n\n    # Add any cells with missing data to the mask\n    # This works around an issue where `plt.pcolormesh` doesn't represent\n    # missing data properly\n    mask = mask | pd.isnull(data)\n\n    return mask", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__HeatMapper__HeatMapper.__init__.self.cbar_kws._if_cbar_kws_is_None_el": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__HeatMapper__HeatMapper.__init__.self.cbar_kws._if_cbar_kws_is_None_el", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 96, "end_line": 189, "span_ids": ["_HeatMapper"], "tokens": 780}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _HeatMapper:\n    \"\"\"Draw a heatmap plot of a matrix with nice labels and colormaps.\"\"\"\n\n    def __init__(self, data, vmin, vmax, cmap, center, robust, annot, fmt,\n                 annot_kws, cbar, cbar_kws,\n                 xticklabels=True, yticklabels=True, mask=None):\n        \"\"\"Initialize the plotting object.\"\"\"\n        # We always want to have a DataFrame with semantic information\n        # and an ndarray to pass to matplotlib\n        if isinstance(data, pd.DataFrame):\n            plot_data = data.values\n        else:\n            plot_data = np.asarray(data)\n            data = pd.DataFrame(plot_data)\n\n        # Validate the mask and convert to DataFrame\n        mask = _matrix_mask(data, mask)\n\n        plot_data = np.ma.masked_where(np.asarray(mask), plot_data)\n\n        # Get good names for the rows and columns\n        xtickevery = 1\n        if isinstance(xticklabels, int):\n            xtickevery = xticklabels\n            xticklabels = _index_to_ticklabels(data.columns)\n        elif xticklabels is True:\n            xticklabels = _index_to_ticklabels(data.columns)\n        elif xticklabels is False:\n            xticklabels = []\n\n        ytickevery = 1\n        if isinstance(yticklabels, int):\n            ytickevery = yticklabels\n            yticklabels = _index_to_ticklabels(data.index)\n        elif yticklabels is True:\n            yticklabels = _index_to_ticklabels(data.index)\n        elif yticklabels is False:\n            yticklabels = []\n\n        if not len(xticklabels):\n            self.xticks = []\n            self.xticklabels = []\n        elif isinstance(xticklabels, str) and xticklabels == \"auto\":\n            self.xticks = \"auto\"\n            self.xticklabels = _index_to_ticklabels(data.columns)\n        else:\n            self.xticks, self.xticklabels = self._skip_ticks(xticklabels,\n                                                             xtickevery)\n\n        if not len(yticklabels):\n            self.yticks = []\n            self.yticklabels = []\n        elif isinstance(yticklabels, str) and yticklabels == \"auto\":\n            self.yticks = \"auto\"\n            self.yticklabels = _index_to_ticklabels(data.index)\n        else:\n            self.yticks, self.yticklabels = self._skip_ticks(yticklabels,\n                                                             ytickevery)\n\n        # Get good names for the axis labels\n        xlabel = _index_to_label(data.columns)\n        ylabel = _index_to_label(data.index)\n        self.xlabel = xlabel if xlabel is not None else \"\"\n        self.ylabel = ylabel if ylabel is not None else \"\"\n\n        # Determine good default values for the colormapping\n        self._determine_cmap_params(plot_data, vmin, vmax,\n                                    cmap, center, robust)\n\n        # Sort out the annotations\n        if annot is None or annot is False:\n            annot = False\n            annot_data = None\n        else:\n            if isinstance(annot, bool):\n                annot_data = plot_data\n            else:\n                annot_data = np.asarray(annot)\n                if annot_data.shape != plot_data.shape:\n                    err = \"`data` and `annot` must have same shape.\"\n                    raise ValueError(err)\n            annot = True\n\n        # Save other attributes to the object\n        self.data = data\n        self.plot_data = plot_data\n\n        self.annot = annot\n        self.annot_data = annot_data\n\n        self.fmt = fmt\n        self.annot_kws = {} if annot_kws is None else annot_kws.copy()\n        self.cbar = cbar\n        self.cbar_kws = {} if cbar_kws is None else cbar_kws.copy()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__HeatMapper._determine_cmap_params__HeatMapper._determine_cmap_params.if_center_is_not_None_.if_over_set_.self_cmap_set_over_over_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__HeatMapper._determine_cmap_params__HeatMapper._determine_cmap_params.if_center_is_not_None_.if_over_set_.self_cmap_set_over_over_", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 192, "end_line": 247, "span_ids": ["_HeatMapper._determine_cmap_params"], "tokens": 517}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _HeatMapper:\n\n    def _determine_cmap_params(self, plot_data, vmin, vmax,\n                               cmap, center, robust):\n        \"\"\"Use some heuristics to set good defaults for colorbar and range.\"\"\"\n\n        # plot_data is a np.ma.array instance\n        calc_data = plot_data.astype(float).filled(np.nan)\n        if vmin is None:\n            if robust:\n                vmin = np.nanpercentile(calc_data, 2)\n            else:\n                vmin = np.nanmin(calc_data)\n        if vmax is None:\n            if robust:\n                vmax = np.nanpercentile(calc_data, 98)\n            else:\n                vmax = np.nanmax(calc_data)\n        self.vmin, self.vmax = vmin, vmax\n\n        # Choose default colormaps if not provided\n        if cmap is None:\n            if center is None:\n                self.cmap = cm.rocket\n            else:\n                self.cmap = cm.icefire\n        elif isinstance(cmap, str):\n            self.cmap = get_colormap(cmap)\n        elif isinstance(cmap, list):\n            self.cmap = mpl.colors.ListedColormap(cmap)\n        else:\n            self.cmap = cmap\n\n        # Recenter a divergent colormap\n        if center is not None:\n\n            # Copy bad values\n            # in mpl<3.2 only masked values are honored with \"bad\" color spec\n            # (see https://github.com/matplotlib/matplotlib/pull/14257)\n            bad = self.cmap(np.ma.masked_invalid([np.nan]))[0]\n\n            # under/over values are set for sure when cmap extremes\n            # do not map to the same color as +-inf\n            under = self.cmap(-np.inf)\n            over = self.cmap(np.inf)\n            under_set = under != self.cmap(0)\n            over_set = over != self.cmap(self.cmap.N - 1)\n\n            vrange = max(vmax - center, center - vmin)\n            normlize = mpl.colors.Normalize(center - vrange, center + vrange)\n            cmin, cmax = normlize([vmin, vmax])\n            cc = np.linspace(cmin, cmax, 256)\n            self.cmap = mpl.colors.ListedColormap(self.cmap(cc))\n            self.cmap.set_bad(bad)\n            if under_set:\n                self.cmap.set_under(under)\n            if over_set:\n                self.cmap.set_over(over)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__HeatMapper._annotate_heatmap__HeatMapper._annotate_heatmap.for_x_y_m_color_val_i.if_m_is_not_np_ma_masked_.ax_text_x_y_annotation_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__HeatMapper._annotate_heatmap__HeatMapper._annotate_heatmap.for_x_y_m_color_val_i.if_m_is_not_np_ma_masked_.ax_text_x_y_annotation_", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 248, "end_line": 262, "span_ids": ["_HeatMapper._annotate_heatmap"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _HeatMapper:\n\n    def _annotate_heatmap(self, ax, mesh):\n        \"\"\"Add textual labels with the value in each cell.\"\"\"\n        mesh.update_scalarmappable()\n        height, width = self.annot_data.shape\n        xpos, ypos = np.meshgrid(np.arange(width) + .5, np.arange(height) + .5)\n        for x, y, m, color, val in zip(xpos.flat, ypos.flat,\n                                       mesh.get_array(), mesh.get_facecolors(),\n                                       self.annot_data.flat):\n            if m is not np.ma.masked:\n                lum = relative_luminance(color)\n                text_color = \".15\" if lum > .408 else \"w\"\n                annotation = (\"{:\" + self.fmt + \"}\").format(val)\n                text_kwargs = dict(color=text_color, ha=\"center\", va=\"center\")\n                text_kwargs.update(self.annot_kws)\n                ax.text(x, y, annotation, **text_kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__HeatMapper._skip_ticks__HeatMapper._skip_ticks.return.ticks_labels": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__HeatMapper._skip_ticks__HeatMapper._skip_ticks.return.ticks_labels", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 264, "end_line": 275, "span_ids": ["_HeatMapper._skip_ticks"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _HeatMapper:\n\n    def _skip_ticks(self, labels, tickevery):\n        \"\"\"Return ticks and labels at evenly spaced intervals.\"\"\"\n        n = len(labels)\n        if tickevery == 0:\n            ticks, labels = [], []\n        elif tickevery == 1:\n            ticks, labels = np.arange(n) + .5, labels\n        else:\n            start, end, step = 0, n, tickevery\n            ticks = np.arange(start, end, step) + .5\n            labels = labels[start:end:step]\n        return ticks, labels", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__HeatMapper._auto_ticks__HeatMapper._auto_ticks.return.ticks_labels": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__HeatMapper._auto_ticks__HeatMapper._auto_ticks.return.ticks_labels", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 277, "end_line": 291, "span_ids": ["_HeatMapper._auto_ticks"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _HeatMapper:\n\n    def _auto_ticks(self, ax, labels, axis):\n        \"\"\"Determine ticks and ticklabels that minimize overlap.\"\"\"\n        transform = ax.figure.dpi_scale_trans.inverted()\n        bbox = ax.get_window_extent().transformed(transform)\n        size = [bbox.width, bbox.height][axis]\n        axis = [ax.xaxis, ax.yaxis][axis]\n        tick, = axis.set_ticks([0])\n        fontsize = tick.label1.get_size()\n        max_ticks = int(size // (fontsize / 72))\n        if max_ticks < 1:\n            return [], []\n        tick_every = len(labels) // max_ticks + 1\n        tick_every = 1 if tick_every == 0 else tick_every\n        ticks, labels = self._skip_ticks(labels, tick_every)\n        return ticks, labels", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__HeatMapper.plot_heatmap": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__HeatMapper.plot_heatmap", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 293, "end_line": 556, "span_ids": ["_HeatMapper.plot", "heatmap"], "tokens": 667}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _HeatMapper:\n\n    def plot(self, ax, cax, kws):\n        \"\"\"Draw the heatmap on the provided Axes.\"\"\"\n        # Remove all the Axes spines\n        despine(ax=ax, left=True, bottom=True)\n\n        # setting vmin/vmax in addition to norm is deprecated\n        # so avoid setting if norm is set\n        if \"norm\" not in kws:\n            kws.setdefault(\"vmin\", self.vmin)\n            kws.setdefault(\"vmax\", self.vmax)\n\n        # Draw the heatmap\n        mesh = ax.pcolormesh(self.plot_data, cmap=self.cmap, **kws)\n\n        # Set the axis limits\n        ax.set(xlim=(0, self.data.shape[1]), ylim=(0, self.data.shape[0]))\n\n        # Invert the y axis to show the plot in matrix form\n        ax.invert_yaxis()\n\n        # Possibly add a colorbar\n        if self.cbar:\n            cb = ax.figure.colorbar(mesh, cax, ax, **self.cbar_kws)\n            cb.outline.set_linewidth(0)\n            # If rasterized is passed to pcolormesh, also rasterize the\n            # colorbar to avoid white lines on the PDF rendering\n            if kws.get('rasterized', False):\n                cb.solids.set_rasterized(True)\n\n        # Add row and column labels\n        if isinstance(self.xticks, str) and self.xticks == \"auto\":\n            xticks, xticklabels = self._auto_ticks(ax, self.xticklabels, 0)\n        else:\n            xticks, xticklabels = self.xticks, self.xticklabels\n\n        if isinstance(self.yticks, str) and self.yticks == \"auto\":\n            yticks, yticklabels = self._auto_ticks(ax, self.yticklabels, 1)\n        else:\n            yticks, yticklabels = self.yticks, self.yticklabels\n\n        ax.set(xticks=xticks, yticks=yticks)\n        xtl = ax.set_xticklabels(xticklabels)\n        ytl = ax.set_yticklabels(yticklabels, rotation=\"vertical\")\n        plt.setp(ytl, va=\"center\")  # GH2484\n\n        # Possibly rotate them if they overlap\n        _draw_figure(ax.figure)\n\n        if axis_ticklabels_overlap(xtl):\n            plt.setp(xtl, rotation=\"vertical\")\n        if axis_ticklabels_overlap(ytl):\n            plt.setp(ytl, rotation=\"horizontal\")\n\n        # Add the axis labels\n        ax.set(xlabel=self.xlabel, ylabel=self.ylabel)\n\n        # Annotate the cells with the formatted values\n        if self.annot:\n            self._annotate_heatmap(ax, mesh)\n\n\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    # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_heatmap._Plot_rectangular_data__heatmap._Plot_rectangular_data_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_heatmap._Plot_rectangular_data__heatmap._Plot_rectangular_data_", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 364, "end_line": 540, "span_ids": ["heatmap"], "tokens": 1576}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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    Plot a heatmap for a numpy array:\n\n    .. plot::\n        :context: close-figs\n\n        >>> import numpy as np; np.random.seed(0)\n        >>> import seaborn as sns; sns.set_theme()\n        >>> uniform_data = np.random.rand(10, 12)\n        >>> ax = sns.heatmap(uniform_data)\n\n    Change the limits of the colormap:\n\n    .. plot::\n        :context: close-figs\n\n        >>> ax = sns.heatmap(uniform_data, vmin=0, vmax=1)\n\n    Plot a heatmap for data centered on 0 with a diverging colormap:\n\n    .. plot::\n        :context: close-figs\n\n        >>> normal_data = np.random.randn(10, 12)\n        >>> ax = sns.heatmap(normal_data, center=0)\n\n    Plot a dataframe with meaningful row and column labels:\n\n    .. plot::\n        :context: close-figs\n\n        >>> flights = sns.load_dataset(\"flights\")\n        >>> flights = flights.pivot(\"month\", \"year\", \"passengers\")\n        >>> ax = sns.heatmap(flights)\n\n    Annotate each cell with the numeric value using integer formatting:\n\n    .. plot::\n        :context: close-figs\n\n        >>> ax = sns.heatmap(flights, annot=True, fmt=\"d\")\n\n    Add lines between each cell:\n\n    .. plot::\n        :context: close-figs\n\n        >>> ax = sns.heatmap(flights, linewidths=.5)\n\n    Use a different colormap:\n\n    .. plot::\n        :context: close-figs\n\n        >>> ax = sns.heatmap(flights, cmap=\"YlGnBu\")\n\n    Center the colormap at a specific value:\n\n    .. plot::\n        :context: close-figs\n\n        >>> ax = sns.heatmap(flights, center=flights.loc[\"Jan\", 1955])\n\n    Plot every other column label and don't plot row labels:\n\n    .. plot::\n        :context: close-figs\n\n        >>> data = np.random.randn(50, 20)\n        >>> ax = sns.heatmap(data, xticklabels=2, yticklabels=False)\n\n    Don't draw a colorbar:\n\n    .. plot::\n        :context: close-figs\n\n        >>> ax = sns.heatmap(flights, cbar=False)\n\n    Use different axes for the colorbar:\n\n    .. plot::\n        :context: close-figs\n\n        >>> grid_kws = {\"height_ratios\": (.9, .05), \"hspace\": .3}\n        >>> f, (ax, cbar_ax) = plt.subplots(2, gridspec_kw=grid_kws)\n        >>> ax = sns.heatmap(flights, ax=ax,\n        ...                  cbar_ax=cbar_ax,\n        ...                  cbar_kws={\"orientation\": \"horizontal\"})\n\n    Use a mask to plot only part of a matrix\n\n    .. plot::\n        :context: close-figs\n\n        >>> corr = np.corrcoef(np.random.randn(10, 200))\n        >>> mask = np.zeros_like(corr)\n        >>> mask[np.triu_indices_from(mask)] = True\n        >>> with sns.axes_style(\"white\"):\n        ...     f, ax = plt.subplots(figsize=(7, 5))\n        ...     ax = sns.heatmap(corr, mask=mask, vmax=.3, square=True)\n    \"\"\"\n    # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_heatmap._Initialize_the_plotter__heatmap.return.ax": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_heatmap._Initialize_the_plotter__heatmap.return.ax", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 541, "end_line": 556, "span_ids": ["heatmap"], "tokens": 226}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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    # 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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__DendrogramPlotter__DendrogramPlotter._calculate_linkage_scipy.return.linkage": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__DendrogramPlotter__DendrogramPlotter._calculate_linkage_scipy.return.linkage", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 559, "end_line": 628, "span_ids": ["_DendrogramPlotter", "_DendrogramPlotter._calculate_linkage_scipy"], "tokens": 479}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _DendrogramPlotter:\n    \"\"\"Object for drawing tree of similarities between data rows/columns\"\"\"\n\n    def __init__(self, data, linkage, metric, method, axis, label, rotate):\n        \"\"\"Plot a dendrogram of the relationships between the columns of data\n\n        Parameters\n        ----------\n        data : pandas.DataFrame\n            Rectangular data\n        \"\"\"\n        self.axis = axis\n        if self.axis == 1:\n            data = data.T\n\n        if isinstance(data, pd.DataFrame):\n            array = data.values\n        else:\n            array = np.asarray(data)\n            data = pd.DataFrame(array)\n\n        self.array = array\n        self.data = data\n\n        self.shape = self.data.shape\n        self.metric = metric\n        self.method = method\n        self.axis = axis\n        self.label = label\n        self.rotate = rotate\n\n        if linkage is None:\n            self.linkage = self.calculated_linkage\n        else:\n            self.linkage = linkage\n        self.dendrogram = self.calculate_dendrogram()\n\n        # Dendrogram ends are always at multiples of 5, who knows why\n        ticks = 10 * np.arange(self.data.shape[0]) + 5\n\n        if self.label:\n            ticklabels = _index_to_ticklabels(self.data.index)\n            ticklabels = [ticklabels[i] for i in self.reordered_ind]\n            if self.rotate:\n                self.xticks = []\n                self.yticks = ticks\n                self.xticklabels = []\n\n                self.yticklabels = ticklabels\n                self.ylabel = _index_to_label(self.data.index)\n                self.xlabel = ''\n            else:\n                self.xticks = ticks\n                self.yticks = []\n                self.xticklabels = ticklabels\n                self.yticklabels = []\n                self.ylabel = ''\n                self.xlabel = _index_to_label(self.data.index)\n        else:\n            self.xticks, self.yticks = [], []\n            self.yticklabels, self.xticklabels = [], []\n            self.xlabel, self.ylabel = '', ''\n\n        self.dependent_coord = self.dendrogram['dcoord']\n        self.independent_coord = self.dendrogram['icoord']\n\n    def _calculate_linkage_scipy(self):\n        linkage = hierarchy.linkage(self.array, method=self.method,\n                                    metric=self.metric)\n        return linkage", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__DendrogramPlotter._calculate_linkage_fastcluster__DendrogramPlotter._calculate_linkage_fastcluster.if_euclidean_or_self_meth.else_.return.linkage": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__DendrogramPlotter._calculate_linkage_fastcluster__DendrogramPlotter._calculate_linkage_fastcluster.if_euclidean_or_self_meth.else_.return.linkage", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 630, "end_line": 645, "span_ids": ["_DendrogramPlotter._calculate_linkage_fastcluster"], "tokens": 160}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _DendrogramPlotter:\n\n    def _calculate_linkage_fastcluster(self):\n        import fastcluster\n        # Fastcluster has a memory-saving vectorized version, but only\n        # with certain linkage methods, and mostly with euclidean metric\n        # vector_methods = ('single', 'centroid', 'median', 'ward')\n        euclidean_methods = ('centroid', 'median', 'ward')\n        euclidean = self.metric == 'euclidean' and self.method in \\\n            euclidean_methods\n        if euclidean or self.method == 'single':\n            return fastcluster.linkage_vector(self.array,\n                                              method=self.method,\n                                              metric=self.metric)\n        else:\n            linkage = fastcluster.linkage(self.array, method=self.method,\n                                          metric=self.metric)\n            return linkage", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__DendrogramPlotter.calculated_linkage__DendrogramPlotter.reordered_ind.return.self_dendrogram_leaves_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__DendrogramPlotter.calculated_linkage__DendrogramPlotter.reordered_ind.return.self_dendrogram_leaves_", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 647, "end_line": 679, "span_ids": ["_DendrogramPlotter.reordered_ind", "_DendrogramPlotter.calculated_linkage", "_DendrogramPlotter.calculate_dendrogram"], "tokens": 243}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _DendrogramPlotter:\n\n    @property\n    def calculated_linkage(self):\n\n        try:\n            return self._calculate_linkage_fastcluster()\n        except ImportError:\n            if np.product(self.shape) >= 10000:\n                msg = (\"Clustering large matrix with scipy. Installing \"\n                       \"`fastcluster` may give better performance.\")\n                warnings.warn(msg)\n\n        return self._calculate_linkage_scipy()\n\n    def calculate_dendrogram(self):\n        \"\"\"Calculates a dendrogram based on the linkage matrix\n\n        Made a separate function, not a property because don't want to\n        recalculate the dendrogram every time it is accessed.\n\n        Returns\n        -------\n        dendrogram : dict\n            Dendrogram dictionary as returned by scipy.cluster.hierarchy\n            .dendrogram. The important key-value pairing is\n            \"reordered_ind\" which indicates the re-ordering of the matrix\n        \"\"\"\n        return hierarchy.dendrogram(self.linkage, no_plot=True,\n                                    color_threshold=-np.inf)\n\n    @property\n    def reordered_ind(self):\n        \"\"\"Indices of the matrix, reordered by the dendrogram\"\"\"\n        return self.dendrogram['leaves']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__DendrogramPlotter.plot__DendrogramPlotter.plot.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py__DendrogramPlotter.plot__DendrogramPlotter.plot.return.self", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 681, "end_line": 735, "span_ids": ["_DendrogramPlotter.plot"], "tokens": 512}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _DendrogramPlotter:\n\n    def plot(self, ax, tree_kws):\n        \"\"\"Plots a dendrogram of the similarities between data on the axes\n\n        Parameters\n        ----------\n        ax : matplotlib.axes.Axes\n            Axes object upon which the dendrogram is plotted\n\n        \"\"\"\n        tree_kws = {} if tree_kws is None else tree_kws.copy()\n        tree_kws.setdefault(\"linewidths\", .5)\n        tree_kws.setdefault(\"colors\", tree_kws.pop(\"color\", (.2, .2, .2)))\n\n        if self.rotate and self.axis == 0:\n            coords = zip(self.dependent_coord, self.independent_coord)\n        else:\n            coords = zip(self.independent_coord, self.dependent_coord)\n        lines = LineCollection([list(zip(x, y)) for x, y in coords],\n                               **tree_kws)\n\n        ax.add_collection(lines)\n        number_of_leaves = len(self.reordered_ind)\n        max_dependent_coord = max(map(max, self.dependent_coord))\n\n        if self.rotate:\n            ax.yaxis.set_ticks_position('right')\n\n            # Constants 10 and 1.05 come from\n            # `scipy.cluster.hierarchy._plot_dendrogram`\n            ax.set_ylim(0, number_of_leaves * 10)\n            ax.set_xlim(0, max_dependent_coord * 1.05)\n\n            ax.invert_xaxis()\n            ax.invert_yaxis()\n        else:\n            # Constants 10 and 1.05 come from\n            # `scipy.cluster.hierarchy._plot_dendrogram`\n            ax.set_xlim(0, number_of_leaves * 10)\n            ax.set_ylim(0, max_dependent_coord * 1.05)\n\n        despine(ax=ax, bottom=True, left=True)\n\n        ax.set(xticks=self.xticks, yticks=self.yticks,\n               xlabel=self.xlabel, ylabel=self.ylabel)\n        xtl = ax.set_xticklabels(self.xticklabels)\n        ytl = ax.set_yticklabels(self.yticklabels, rotation='vertical')\n\n        # Force a draw of the plot to avoid matplotlib window error\n        _draw_figure(ax.figure)\n\n        if len(ytl) > 0 and axis_ticklabels_overlap(ytl):\n            plt.setp(ytl, rotation=\"horizontal\")\n        if len(xtl) > 0 and axis_ticklabels_overlap(xtl):\n            plt.setp(xtl, rotation=\"vertical\")\n        return self", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_dendrogram_dendrogram.return.plotter_plot_ax_ax_tree_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_dendrogram_dendrogram.return.plotter_plot_ax_ax_tree_", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 738, "end_line": 789, "span_ids": ["dendrogram"], "tokens": 400}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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    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)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid_ClusterGrid.__init__.self.dendrogram_col.None": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid_ClusterGrid.__init__.self.dendrogram_col.None", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 792, "end_line": 868, "span_ids": ["ClusterGrid"], "tokens": 675}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClusterGrid(Grid):\n\n    def __init__(self, data, pivot_kws=None, z_score=None, standard_scale=None,\n                 figsize=None, row_colors=None, col_colors=None, mask=None,\n                 dendrogram_ratio=None, colors_ratio=None, cbar_pos=None):\n        \"\"\"Grid object for organizing clustered heatmap input on to axes\"\"\"\n        if _no_scipy:\n            raise RuntimeError(\"ClusterGrid requires scipy to be available\")\n\n        if isinstance(data, pd.DataFrame):\n            self.data = data\n        else:\n            self.data = pd.DataFrame(data)\n\n        self.data2d = self.format_data(self.data, pivot_kws, z_score,\n                                       standard_scale)\n\n        self.mask = _matrix_mask(self.data2d, mask)\n\n        self._figure = plt.figure(figsize=figsize)\n\n        self.row_colors, self.row_color_labels = \\\n            self._preprocess_colors(data, row_colors, axis=0)\n        self.col_colors, self.col_color_labels = \\\n            self._preprocess_colors(data, col_colors, axis=1)\n\n        try:\n            row_dendrogram_ratio, col_dendrogram_ratio = dendrogram_ratio\n        except TypeError:\n            row_dendrogram_ratio = col_dendrogram_ratio = dendrogram_ratio\n\n        try:\n            row_colors_ratio, col_colors_ratio = colors_ratio\n        except TypeError:\n            row_colors_ratio = col_colors_ratio = colors_ratio\n\n        width_ratios = self.dim_ratios(self.row_colors,\n                                       row_dendrogram_ratio,\n                                       row_colors_ratio)\n        height_ratios = self.dim_ratios(self.col_colors,\n                                        col_dendrogram_ratio,\n                                        col_colors_ratio)\n\n        nrows = 2 if self.col_colors is None else 3\n        ncols = 2 if self.row_colors is None else 3\n\n        self.gs = gridspec.GridSpec(nrows, ncols,\n                                    width_ratios=width_ratios,\n                                    height_ratios=height_ratios)\n\n        self.ax_row_dendrogram = self._figure.add_subplot(self.gs[-1, 0])\n        self.ax_col_dendrogram = self._figure.add_subplot(self.gs[0, -1])\n        self.ax_row_dendrogram.set_axis_off()\n        self.ax_col_dendrogram.set_axis_off()\n\n        self.ax_row_colors = None\n        self.ax_col_colors = None\n\n        if self.row_colors is not None:\n            self.ax_row_colors = self._figure.add_subplot(\n                self.gs[-1, 1])\n        if self.col_colors is not None:\n            self.ax_col_colors = self._figure.add_subplot(\n                self.gs[1, -1])\n\n        self.ax_heatmap = self._figure.add_subplot(self.gs[-1, -1])\n        if cbar_pos is None:\n            self.ax_cbar = self.cax = None\n        else:\n            # Initialize the colorbar axes in the gridspec so that tight_layout\n            # works. We will move it where it belongs later. This is a hack.\n            self.ax_cbar = self._figure.add_subplot(self.gs[0, 0])\n            self.cax = self.ax_cbar  # Backwards compatibility\n        self.cbar_pos = cbar_pos\n\n        self.dendrogram_row = None\n        self.dendrogram_col = None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid._preprocess_colors_ClusterGrid._preprocess_colors.return.colors_labels": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid._preprocess_colors_ClusterGrid._preprocess_colors.return.colors_labels", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 870, "end_line": 910, "span_ids": ["ClusterGrid._preprocess_colors"], "tokens": 318}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClusterGrid(Grid):\n\n    def _preprocess_colors(self, data, colors, axis):\n        \"\"\"Preprocess {row/col}_colors to extract labels and convert colors.\"\"\"\n        labels = None\n\n        if colors is not None:\n            if isinstance(colors, (pd.DataFrame, pd.Series)):\n\n                # If data is unindexed, raise\n                if (not hasattr(data, \"index\") and axis == 0) or (\n                    not hasattr(data, \"columns\") and axis == 1\n                ):\n                    axis_name = \"col\" if axis else \"row\"\n                    msg = (f\"{axis_name}_colors indices can't be matched with data \"\n                           f\"indices. Provide {axis_name}_colors as a non-indexed \"\n                           \"datatype, e.g. by using `.to_numpy()``\")\n                    raise TypeError(msg)\n\n                # Ensure colors match data indices\n                if axis == 0:\n                    colors = colors.reindex(data.index)\n                else:\n                    colors = colors.reindex(data.columns)\n\n                # Replace na's with white color\n                # TODO We should set these to transparent instead\n                colors = colors.astype(object).fillna('white')\n\n                # Extract color values and labels from frame/series\n                if isinstance(colors, pd.DataFrame):\n                    labels = list(colors.columns)\n                    colors = colors.T.values\n                else:\n                    if colors.name is None:\n                        labels = [\"\"]\n                    else:\n                        labels = [colors.name]\n                    colors = colors.values\n\n            colors = _convert_colors(colors)\n\n        return colors, labels", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.format_data_ClusterGrid.format_data.return.data2d": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.format_data_ClusterGrid.format_data.return.data2d", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 912, "end_line": 930, "span_ids": ["ClusterGrid.format_data"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClusterGrid(Grid):\n\n    def format_data(self, data, pivot_kws, z_score=None,\n                    standard_scale=None):\n        \"\"\"Extract variables from data or use directly.\"\"\"\n\n        # Either the data is already in 2d matrix format, or need to do a pivot\n        if pivot_kws is not None:\n            data2d = data.pivot(**pivot_kws)\n        else:\n            data2d = data\n\n        if z_score is not None and standard_scale is not None:\n            raise ValueError(\n                'Cannot perform both z-scoring and standard-scaling on data')\n\n        if z_score is not None:\n            data2d = self.z_score(data2d, z_score)\n        if standard_scale is not None:\n            data2d = self.standard_scale(data2d, standard_scale)\n        return data2d", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.z_score_ClusterGrid.z_score.None_1.else_.return.z_scored_T": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.z_score_ClusterGrid.z_score.None_1.else_.return.z_scored_T", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 932, "end_line": 960, "span_ids": ["ClusterGrid.z_score"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClusterGrid(Grid):\n\n    @staticmethod\n    def z_score(data2d, axis=1):\n        \"\"\"Standarize the mean and variance of the data axis\n\n        Parameters\n        ----------\n        data2d : pandas.DataFrame\n            Data to normalize\n        axis : int\n            Which axis to normalize across. If 0, normalize across rows, if 1,\n            normalize across columns.\n\n        Returns\n        -------\n        normalized : pandas.DataFrame\n            Noramlized data with a mean of 0 and variance of 1 across the\n            specified axis.\n        \"\"\"\n        if axis == 1:\n            z_scored = data2d\n        else:\n            z_scored = data2d.T\n\n        z_scored = (z_scored - z_scored.mean()) / z_scored.std()\n\n        if axis == 1:\n            return z_scored\n        else:\n            return z_scored.T", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.standard_scale_ClusterGrid.standard_scale.None_1.else_.return.standardized_T": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.standard_scale_ClusterGrid.standard_scale.None_1.else_.return.standardized_T", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 962, "end_line": 994, "span_ids": ["ClusterGrid.standard_scale"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClusterGrid(Grid):\n\n    @staticmethod\n    def standard_scale(data2d, axis=1):\n        \"\"\"Divide the data by the difference between the max and min\n\n        Parameters\n        ----------\n        data2d : pandas.DataFrame\n            Data to normalize\n        axis : int\n            Which axis to normalize across. If 0, normalize across rows, if 1,\n            normalize across columns.\n\n        Returns\n        -------\n        standardized : pandas.DataFrame\n            Noramlized data with a mean of 0 and variance of 1 across the\n            specified axis.\n\n        \"\"\"\n        # Normalize these values to range from 0 to 1\n        if axis == 1:\n            standardized = data2d\n        else:\n            standardized = data2d.T\n\n        subtract = standardized.min()\n        standardized = (standardized - subtract) / (\n            standardized.max() - standardized.min())\n\n        if axis == 1:\n            return standardized\n        else:\n            return standardized.T", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.dim_ratios_ClusterGrid.dim_ratios.return.ratios": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.dim_ratios_ClusterGrid.dim_ratios.return.ratios", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 996, "end_line": 1012, "span_ids": ["ClusterGrid.dim_ratios"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClusterGrid(Grid):\n\n    def dim_ratios(self, colors, dendrogram_ratio, colors_ratio):\n        \"\"\"Get the proportions of the figure taken up by each axes.\"\"\"\n        ratios = [dendrogram_ratio]\n\n        if colors is not None:\n            # Colors are encoded as rgb, so there is an extra dimension\n            if np.ndim(colors) > 2:\n                n_colors = len(colors)\n            else:\n                n_colors = 1\n\n            ratios += [n_colors * colors_ratio]\n\n        # Add the ratio for the heatmap itself\n        ratios.append(1 - sum(ratios))\n\n        return ratios", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.color_list_to_matrix_and_cmap_ClusterGrid.color_list_to_matrix_and_cmap.return.matrix_cmap": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.color_list_to_matrix_and_cmap_ClusterGrid.color_list_to_matrix_and_cmap.return.matrix_cmap", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1014, "end_line": 1064, "span_ids": ["ClusterGrid.color_list_to_matrix_and_cmap"], "tokens": 383}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClusterGrid(Grid):\n\n    @staticmethod\n    def color_list_to_matrix_and_cmap(colors, ind, axis=0):\n        \"\"\"Turns a list of colors into a numpy matrix and matplotlib colormap\n\n        These arguments can now be plotted using heatmap(matrix, cmap)\n        and the provided colors will be plotted.\n\n        Parameters\n        ----------\n        colors : list of matplotlib colors\n            Colors to label the rows or columns of a dataframe.\n        ind : list of ints\n            Ordering of the rows or columns, to reorder the original colors\n            by the clustered dendrogram order\n        axis : int\n            Which axis this is labeling\n\n        Returns\n        -------\n        matrix : numpy.array\n            A numpy array of integer values, where each indexes into the cmap\n        cmap : matplotlib.colors.ListedColormap\n\n        \"\"\"\n        try:\n            mpl.colors.to_rgb(colors[0])\n        except ValueError:\n            # We have a 2D color structure\n            m, n = len(colors), len(colors[0])\n            if not all(len(c) == n for c in colors[1:]):\n                raise ValueError(\"Multiple side color vectors must have same size\")\n        else:\n            # We have one vector of colors\n            m, n = 1, len(colors)\n            colors = [colors]\n\n        # Map from unique colors to colormap index value\n        unique_colors = {}\n        matrix = np.zeros((m, n), int)\n        for i, inner in enumerate(colors):\n            for j, color in enumerate(inner):\n                idx = unique_colors.setdefault(color, len(unique_colors))\n                matrix[i, j] = idx\n\n        # Reorder for clustering and transpose for axis\n        matrix = matrix[:, ind]\n        if axis == 0:\n            matrix = matrix.T\n\n        cmap = mpl.colors.ListedColormap(list(unique_colors))\n        return matrix, cmap", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.plot_dendrograms_ClusterGrid.plot_dendrograms.despine_ax_self_ax_col_de": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.plot_dendrograms_ClusterGrid.plot_dendrograms.despine_ax_self_ax_col_de", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1066, "end_line": 1089, "span_ids": ["ClusterGrid.plot_dendrograms"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClusterGrid(Grid):\n\n    def plot_dendrograms(self, row_cluster, col_cluster, metric, method,\n                         row_linkage, col_linkage, tree_kws):\n        # Plot the row dendrogram\n        if row_cluster:\n            self.dendrogram_row = dendrogram(\n                self.data2d, metric=metric, method=method, label=False, axis=0,\n                ax=self.ax_row_dendrogram, rotate=True, linkage=row_linkage,\n                tree_kws=tree_kws\n            )\n        else:\n            self.ax_row_dendrogram.set_xticks([])\n            self.ax_row_dendrogram.set_yticks([])\n        # PLot the column dendrogram\n        if col_cluster:\n            self.dendrogram_col = dendrogram(\n                self.data2d, metric=metric, method=method, label=False,\n                axis=1, ax=self.ax_col_dendrogram, linkage=col_linkage,\n                tree_kws=tree_kws\n            )\n        else:\n            self.ax_col_dendrogram.set_xticks([])\n            self.ax_col_dendrogram.set_yticks([])\n        despine(ax=self.ax_row_dendrogram, bottom=True, left=True)\n        despine(ax=self.ax_col_dendrogram, bottom=True, left=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.plot_colors_ClusterGrid.plot_colors.if_self_col_colors_is_not.else_.despine_self_ax_col_color": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.plot_colors_ClusterGrid.plot_colors.if_self_col_colors_is_not.else_.despine_self_ax_col_color", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1091, "end_line": 1154, "span_ids": ["ClusterGrid.plot_colors"], "tokens": 543}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClusterGrid(Grid):\n\n    def plot_colors(self, xind, yind, **kws):\n        \"\"\"Plots color labels between the dendrogram and the heatmap\n\n        Parameters\n        ----------\n        heatmap_kws : dict\n            Keyword arguments heatmap\n\n        \"\"\"\n        # Remove any custom colormap and centering\n        # TODO this code has consistently caused problems when we\n        # have missed kwargs that need to be excluded that it might\n        # be better to rewrite *in*clusively.\n        kws = kws.copy()\n        kws.pop('cmap', None)\n        kws.pop('norm', None)\n        kws.pop('center', None)\n        kws.pop('annot', None)\n        kws.pop('vmin', None)\n        kws.pop('vmax', None)\n        kws.pop('robust', None)\n        kws.pop('xticklabels', None)\n        kws.pop('yticklabels', None)\n\n        # Plot the row colors\n        if self.row_colors is not None:\n            matrix, cmap = self.color_list_to_matrix_and_cmap(\n                self.row_colors, yind, axis=0)\n\n            # Get row_color labels\n            if self.row_color_labels is not None:\n                row_color_labels = self.row_color_labels\n            else:\n                row_color_labels = False\n\n            heatmap(matrix, cmap=cmap, cbar=False, ax=self.ax_row_colors,\n                    xticklabels=row_color_labels, yticklabels=False, **kws)\n\n            # Adjust rotation of labels\n            if row_color_labels is not False:\n                plt.setp(self.ax_row_colors.get_xticklabels(), rotation=90)\n        else:\n            despine(self.ax_row_colors, left=True, bottom=True)\n\n        # Plot the column colors\n        if self.col_colors is not None:\n            matrix, cmap = self.color_list_to_matrix_and_cmap(\n                self.col_colors, xind, axis=1)\n\n            # Get col_color labels\n            if self.col_color_labels is not None:\n                col_color_labels = self.col_color_labels\n            else:\n                col_color_labels = False\n\n            heatmap(matrix, cmap=cmap, cbar=False, ax=self.ax_col_colors,\n                    xticklabels=False, yticklabels=col_color_labels, **kws)\n\n            # Adjust rotation of labels, place on right side\n            if col_color_labels is not False:\n                self.ax_col_colors.yaxis.tick_right()\n                plt.setp(self.ax_col_colors.get_yticklabels(), rotation=0)\n        else:\n            despine(self.ax_col_colors, left=True, bottom=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.plot_matrix_ClusterGrid.plot_matrix.if_self_ax_cbar_is_None_.else_.self_ax_cbar_set_position": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.plot_matrix_ClusterGrid.plot_matrix.if_self_ax_cbar_is_None_.else_.self_ax_cbar_set_position", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1156, "end_line": 1211, "span_ids": ["ClusterGrid.plot_matrix"], "tokens": 562}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClusterGrid(Grid):\n\n    def plot_matrix(self, colorbar_kws, xind, yind, **kws):\n        self.data2d = self.data2d.iloc[yind, xind]\n        self.mask = self.mask.iloc[yind, xind]\n\n        # Try to reorganize specified tick labels, if provided\n        xtl = kws.pop(\"xticklabels\", \"auto\")\n        try:\n            xtl = np.asarray(xtl)[xind]\n        except (TypeError, IndexError):\n            pass\n        ytl = kws.pop(\"yticklabels\", \"auto\")\n        try:\n            ytl = np.asarray(ytl)[yind]\n        except (TypeError, IndexError):\n            pass\n\n        # Reorganize the annotations to match the heatmap\n        annot = kws.pop(\"annot\", None)\n        if annot is None or annot is False:\n            pass\n        else:\n            if isinstance(annot, bool):\n                annot_data = self.data2d\n            else:\n                annot_data = np.asarray(annot)\n                if annot_data.shape != self.data2d.shape:\n                    err = \"`data` and `annot` must have same shape.\"\n                    raise ValueError(err)\n                annot_data = annot_data[yind][:, xind]\n            annot = annot_data\n\n        # Setting ax_cbar=None in clustermap call implies no colorbar\n        kws.setdefault(\"cbar\", self.ax_cbar is not None)\n        heatmap(self.data2d, ax=self.ax_heatmap, cbar_ax=self.ax_cbar,\n                cbar_kws=colorbar_kws, mask=self.mask,\n                xticklabels=xtl, yticklabels=ytl, annot=annot, **kws)\n\n        ytl = self.ax_heatmap.get_yticklabels()\n        ytl_rot = None if not ytl else ytl[0].get_rotation()\n        self.ax_heatmap.yaxis.set_ticks_position('right')\n        self.ax_heatmap.yaxis.set_label_position('right')\n        if ytl_rot is not None:\n            ytl = self.ax_heatmap.get_yticklabels()\n            plt.setp(ytl, rotation=ytl_rot)\n\n        tight_params = dict(h_pad=.02, w_pad=.02)\n        if self.ax_cbar is None:\n            self._figure.tight_layout(**tight_params)\n        else:\n            # Turn the colorbar axes off for tight layout so that its\n            # ticks don't interfere with the rest of the plot layout.\n            # Then move it.\n            self.ax_cbar.set_axis_off()\n            self._figure.tight_layout(**tight_params)\n            self.ax_cbar.set_axis_on()\n            self.ax_cbar.set_position(self.cbar_pos)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.plot_ClusterGrid.plot.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_ClusterGrid.plot_ClusterGrid.plot.return.self", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1213, "end_line": 1239, "span_ids": ["ClusterGrid.plot"], "tokens": 274}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ClusterGrid(Grid):\n\n    def plot(self, metric, method, colorbar_kws, row_cluster, col_cluster,\n             row_linkage, col_linkage, tree_kws, **kws):\n\n        # heatmap square=True sets the aspect ratio on the axes, but that is\n        # not compatible with the multi-axes layout of clustergrid\n        if kws.get(\"square\", False):\n            msg = \"``square=True`` ignored in clustermap\"\n            warnings.warn(msg)\n            kws.pop(\"square\")\n\n        colorbar_kws = {} if colorbar_kws is None else colorbar_kws\n\n        self.plot_dendrograms(row_cluster, col_cluster, metric, method,\n                              row_linkage=row_linkage, col_linkage=col_linkage,\n                              tree_kws=tree_kws)\n        try:\n            xind = self.dendrogram_col.reordered_ind\n        except AttributeError:\n            xind = np.arange(self.data2d.shape[1])\n        try:\n            yind = self.dendrogram_row.reordered_ind\n        except AttributeError:\n            yind = np.arange(self.data2d.shape[0])\n\n        self.plot_colors(xind, yind, **kws)\n        self.plot_matrix(colorbar_kws, xind, yind, **kws)\n        return self", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_clustermap_clustermap._": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_clustermap_clustermap._", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1242, "end_line": 1406, "span_ids": ["clustermap"], "tokens": 1458}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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    Plot a clustered heatmap:\n\n    .. plot::\n        :context: close-figs\n\n        >>> import seaborn as sns; sns.set_theme(color_codes=True)\n        >>> iris = sns.load_dataset(\"iris\")\n        >>> species = iris.pop(\"species\")\n        >>> g = sns.clustermap(iris)\n\n    Change the size and layout of the figure:\n\n    .. plot::\n        :context: close-figs\n\n        >>> g = sns.clustermap(iris,\n        ...                    figsize=(7, 5),\n        ...                    row_cluster=False,\n        ...                    dendrogram_ratio=(.1, .2),\n        ...                    cbar_pos=(0, .2, .03, .4))\n\n    Add colored labels to identify observations:\n\n    .. plot::\n        :context: close-figs\n\n        >>> lut = dict(zip(species.unique(), \"rbg\"))\n        >>> row_colors = species.map(lut)\n        >>> g = sns.clustermap(iris, row_colors=row_colors)\n\n    Use a different colormap and adjust the limits of the color range:\n\n    .. plot::\n        :context: close-figs\n\n        >>> g = sns.clustermap(iris, cmap=\"mako\", vmin=0, vmax=10)\n\n    Use a different similarity metric:\n\n    .. plot::\n        :context: close-figs\n\n        >>> g = sns.clustermap(iris, metric=\"correlation\")\n\n    Use a different clustering method:\n\n    .. plot::\n        :context: close-figs\n\n        >>> g = sns.clustermap(iris, method=\"single\")\n\n    Standardize the data within the columns:\n\n    .. plot::\n        :context: close-figs\n\n        >>> g = sns.clustermap(iris, standard_scale=1)\n\n    Normalize the data within the rows:\n\n    .. plot::\n        :context: close-figs\n\n        >>> g = sns.clustermap(iris, z_score=0, cmap=\"vlag\")\n    \"\"\"\n    # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_clustermap.if__no_scipy__": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/matrix.py_clustermap.if__no_scipy__", "embedding": null, "metadata": {"file_path": "seaborn/matrix.py", "file_name": "matrix.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1407, "end_line": 1421, "span_ids": ["clustermap"], "tokens": 272}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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    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)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/miscplot.py_np_palplot.ax_yaxis_set_major_locato": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/miscplot.py_np_palplot.ax_yaxis_set_major_locato", "embedding": null, "metadata": {"file_path": "seaborn/miscplot.py", "file_name": "miscplot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 30, "span_ids": ["palplot", "impl", "imports"], "tokens": 231}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nimport matplotlib.ticker as ticker\n\n__all__ = [\"palplot\", \"dogplot\"]\n\n\ndef palplot(pal, size=1):\n    \"\"\"Plot the values in a color palette as a horizontal array.\n\n    Parameters\n    ----------\n    pal : sequence of matplotlib colors\n        colors, i.e. as returned by seaborn.color_palette()\n    size :\n        scaling factor for size of plot\n\n    \"\"\"\n    n = len(pal)\n    f, ax = plt.subplots(1, 1, figsize=(n * size, size))\n    ax.imshow(np.arange(n).reshape(1, n),\n              cmap=mpl.colors.ListedColormap(list(pal)),\n              interpolation=\"nearest\", aspect=\"auto\")\n    ax.set_xticks(np.arange(n) - .5)\n    ax.set_yticks([-.5, .5])\n    # Ensure nice border between colors\n    ax.set_xticklabels([\"\" for _ in range(n)])\n    # The proper way to set no ticks\n    ax.yaxis.set_major_locator(ticker.NullLocator())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/miscplot.py_dogplot_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/miscplot.py_dogplot_", "embedding": null, "metadata": {"file_path": "seaborn/miscplot.py", "file_name": "miscplot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 33, "end_line": 49, "span_ids": ["dogplot"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def dogplot(*_, **__):\n    \"\"\"Who's a good boy?\"\"\"\n    try:\n        from urllib.request import urlopen\n    except ImportError:\n        from urllib2 import urlopen\n    from io import BytesIO\n\n    url = \"https://github.com/mwaskom/seaborn-data/raw/master/png/img{}.png\"\n    pic = np.random.randint(2, 7)\n    data = BytesIO(urlopen(url.format(pic)).read())\n    img = plt.imread(data)\n    f, ax = plt.subplots(figsize=(5, 5), dpi=100)\n    f.subplots_adjust(0, 0, 1, 1)\n    ax.imshow(img)\n    ax.set_axis_off()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/objects.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/objects.py___", "embedding": null, "metadata": {"file_path": "seaborn/objects.py", "file_name": "objects.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 45, "span_ids": ["docstring:6", "docstring:7", "docstring:4", "docstring:3", "docstring", "docstring:12", "docstring:2", "docstring:13", "docstring:5", "imports:3", "imports:5", "imports:6", "imports:12", "docstring:9", "imports:9", "imports:4", "imports:10", "docstring:8", "docstring:11", "docstring:10", "imports", "imports:11", "imports:7", "imports:2", "imports:8"], "tokens": 473}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nA declarative, object-oriented interface for creating statistical graphics.\n\nThe seaborn.objects namespace contains a number of classes that can be composed\ntogether to build a customized visualization.\n\nThe main object is :class:`Plot`, which is the starting point for all figures.\nPass :class:`Plot` a dataset and specify assignments from its variables to\nroles in the plot. Build up the visualization by calling its methods.\n\nThere are four other general types of objects in this interface:\n\n- :class:`Mark` subclasses, which create matplotlib artists for visualization\n- :class:`Stat` subclasses, which apply statistical transforms before plotting\n- :class:`Move` subclasses, which make further adjustments to reduce overplotting\n\nThese classes are passed to :meth:`Plot.add` to define a layer in the plot.\nEach layer has a :class:`Mark` and optional :class:`Stat` and/or :class:`Move`.\nPlots can have multiple layers.\n\nThe other general type of object is a :class:`Scale` subclass, which provide an\ninterface for controlling the mappings between data values and visual properties.\nPass :class:`Scale` objects to :meth:`Plot.scale`.\n\nSee the documentation for other :class:`Plot` methods to learn about the many\nways that a plot can be enhanced and customized.\n\n\"\"\"\nfrom seaborn._core.plot import Plot  # noqa: F401\n\nfrom seaborn._marks.base import Mark  # noqa: F401\nfrom seaborn._marks.area import Area, Band  # noqa: F401\nfrom seaborn._marks.bar import Bar, Bars  # noqa: F401\nfrom seaborn._marks.line import Line, Lines, Path, Paths, Range  # noqa: F401\nfrom seaborn._marks.dot import Dot, Dots  # noqa: F401\n\nfrom seaborn._stats.base import Stat  # noqa: F401\nfrom seaborn._stats.aggregation import Agg, Est  # noqa: F401\nfrom seaborn._stats.regression import PolyFit  # noqa: F401\nfrom seaborn._stats.histogram import Hist  # noqa: F401\n\nfrom seaborn._core.moves import Dodge, Jitter, Norm, Shift, Stack, Move  # noqa: F401\n\nfrom seaborn._core.scales import Nominal, Continuous, Temporal, Scale  # noqa: F401", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_colorsys_SEABORN_PALETTES.dict_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_colorsys_SEABORN_PALETTES.dict_", "embedding": null, "metadata": {"file_path": "seaborn/palettes.py", "file_name": "palettes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 45, "span_ids": ["impl", "imports"], "tokens": 758}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import colorsys\nfrom itertools import cycle\n\nimport numpy as np\nimport matplotlib as mpl\n\nfrom .external import husl\n\nfrom .utils import desaturate, get_color_cycle\nfrom .colors import xkcd_rgb, crayons\nfrom ._compat import get_colormap\n\n\n__all__ = [\"color_palette\", \"hls_palette\", \"husl_palette\", \"mpl_palette\",\n           \"dark_palette\", \"light_palette\", \"diverging_palette\",\n           \"blend_palette\", \"xkcd_palette\", \"crayon_palette\",\n           \"cubehelix_palette\", \"set_color_codes\"]\n\n\nSEABORN_PALETTES = dict(\n    deep=[\"#4C72B0\", \"#DD8452\", \"#55A868\", \"#C44E52\", \"#8172B3\",\n          \"#937860\", \"#DA8BC3\", \"#8C8C8C\", \"#CCB974\", \"#64B5CD\"],\n    deep6=[\"#4C72B0\", \"#55A868\", \"#C44E52\",\n           \"#8172B3\", \"#CCB974\", \"#64B5CD\"],\n    muted=[\"#4878D0\", \"#EE854A\", \"#6ACC64\", \"#D65F5F\", \"#956CB4\",\n           \"#8C613C\", \"#DC7EC0\", \"#797979\", \"#D5BB67\", \"#82C6E2\"],\n    muted6=[\"#4878D0\", \"#6ACC64\", \"#D65F5F\",\n            \"#956CB4\", \"#D5BB67\", \"#82C6E2\"],\n    pastel=[\"#A1C9F4\", \"#FFB482\", \"#8DE5A1\", \"#FF9F9B\", \"#D0BBFF\",\n            \"#DEBB9B\", \"#FAB0E4\", \"#CFCFCF\", \"#FFFEA3\", \"#B9F2F0\"],\n    pastel6=[\"#A1C9F4\", \"#8DE5A1\", \"#FF9F9B\",\n             \"#D0BBFF\", \"#FFFEA3\", \"#B9F2F0\"],\n    bright=[\"#023EFF\", \"#FF7C00\", \"#1AC938\", \"#E8000B\", \"#8B2BE2\",\n            \"#9F4800\", \"#F14CC1\", \"#A3A3A3\", \"#FFC400\", \"#00D7FF\"],\n    bright6=[\"#023EFF\", \"#1AC938\", \"#E8000B\",\n             \"#8B2BE2\", \"#FFC400\", \"#00D7FF\"],\n    dark=[\"#001C7F\", \"#B1400D\", \"#12711C\", \"#8C0800\", \"#591E71\",\n          \"#592F0D\", \"#A23582\", \"#3C3C3C\", \"#B8850A\", \"#006374\"],\n    dark6=[\"#001C7F\", \"#12711C\", \"#8C0800\",\n           \"#591E71\", \"#B8850A\", \"#006374\"],\n    colorblind=[\"#0173B2\", \"#DE8F05\", \"#029E73\", \"#D55E00\", \"#CC78BC\",\n                \"#CA9161\", \"#FBAFE4\", \"#949494\", \"#ECE133\", \"#56B4E9\"],\n    colorblind6=[\"#0173B2\", \"#029E73\", \"#D55E00\",\n                 \"#CC78BC\", \"#ECE133\", \"#56B4E9\"]\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_MPL_QUAL_PALS_QUAL_PALETTES.list_QUAL_PALETTE_SIZES_k": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_MPL_QUAL_PALS_QUAL_PALETTES.list_QUAL_PALETTE_SIZES_k", "embedding": null, "metadata": {"file_path": "seaborn/palettes.py", "file_name": "palettes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 47, "end_line": 57, "span_ids": ["impl:5"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "MPL_QUAL_PALS = {\n    \"tab10\": 10, \"tab20\": 20, \"tab20b\": 20, \"tab20c\": 20,\n    \"Set1\": 9, \"Set2\": 8, \"Set3\": 12,\n    \"Accent\": 8, \"Paired\": 12,\n    \"Pastel1\": 9, \"Pastel2\": 8, \"Dark2\": 8,\n}\n\n\nQUAL_PALETTE_SIZES = MPL_QUAL_PALS.copy()\nQUAL_PALETTE_SIZES.update({k: len(v) for k, v in SEABORN_PALETTES.items()})\nQUAL_PALETTES = list(QUAL_PALETTE_SIZES.keys())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py__ColorPalette__ColorPalette.as_hex.return._ColorPalette_hex_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py__ColorPalette__ColorPalette.as_hex.return._ColorPalette_hex_", "embedding": null, "metadata": {"file_path": "seaborn/palettes.py", "file_name": "palettes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 60, "end_line": 77, "span_ids": ["_ColorPalette.__exit__", "_ColorPalette", "_ColorPalette.as_hex", "_ColorPalette.__enter__"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _ColorPalette(list):\n    \"\"\"Set the color palette in a with statement, otherwise be a list.\"\"\"\n    def __enter__(self):\n        \"\"\"Open the context.\"\"\"\n        from .rcmod import set_palette\n        self._orig_palette = color_palette()\n        set_palette(self)\n        return self\n\n    def __exit__(self, *args):\n        \"\"\"Close the context.\"\"\"\n        from .rcmod import set_palette\n        set_palette(self._orig_palette)\n\n    def as_hex(self):\n        \"\"\"Return a color palette with hex codes instead of RGB values.\"\"\"\n        hex = [mpl.colors.rgb2hex(rgb) for rgb in self]\n        return _ColorPalette(hex)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py__ColorPalette._repr_html___ColorPalette._repr_html_.return.html": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py__ColorPalette._repr_html___ColorPalette._repr_html_.return.html", "embedding": null, "metadata": {"file_path": "seaborn/palettes.py", "file_name": "palettes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 79, "end_line": 90, "span_ids": ["_ColorPalette._repr_html_"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _ColorPalette(list):\n\n    def _repr_html_(self):\n        \"\"\"Rich display of the color palette in an HTML frontend.\"\"\"\n        s = 55\n        n = len(self)\n        html = f''\n        for i, c in enumerate(self.as_hex()):\n            html += (\n                f''\n            )\n        html += ''\n        return html", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_color_palette_color_palette._Return_a_list_of_color": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_color_palette_color_palette._Return_a_list_of_color", "embedding": null, "metadata": {"file_path": "seaborn/palettes.py", "file_name": "palettes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 93, "end_line": 144, "span_ids": ["color_palette"], "tokens": 472}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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:'\n        - 'light:', 'dark:', 'blend:,',\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 ` 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.Colormap`.\n\n    Returns\n    -------\n    list of RGB tuples or :class:`matplotlib.colors.Colormap`\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    # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_color_palette.if_palette_is_None__color_palette.return.palette": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_color_palette.if_palette_is_None__color_palette.return.palette", "embedding": null, "metadata": {"file_path": "seaborn/palettes.py", "file_name": "palettes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 146, "end_line": 227, "span_ids": ["color_palette"], "tokens": 687}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def color_palette(palette=None, n_colors=None, desat=None, as_cmap=False):\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} 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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_hls_palette_hls_palette.None_1.else_.return._ColorPalette_palette_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_hls_palette_hls_palette.None_1.else_.return._ColorPalette_palette_", "embedding": null, "metadata": {"file_path": "seaborn/palettes.py", "file_name": "palettes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 229, "end_line": 297, "span_ids": ["hls_palette"], "tokens": 457}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def hls_palette(n_colors=6, h=.01, l=.6, s=.65, as_cmap=False):  # noqa\n    \"\"\"Get a set of evenly spaced colors in HLS hue space.\n\n    h, l, and s should be between 0 and 1\n\n    Parameters\n    ----------\n\n    n_colors : int\n        number of colors in the palette\n    h : float\n        first hue\n    l : float\n        lightness\n    s : float\n        saturation\n\n    Returns\n    -------\n    list of RGB tuples or :class:`matplotlib.colors.Colormap`\n\n    See Also\n    --------\n    husl_palette : Make a palette using evenly spaced hues in the HUSL system.\n\n    Examples\n    --------\n\n    Create a palette of 10 colors with the default parameters:\n\n    .. plot::\n        :context: close-figs\n\n        >>> import seaborn as sns; sns.set_theme()\n        >>> sns.palplot(sns.hls_palette(10))\n\n    Create a palette of 10 colors that begins at a different hue value:\n\n    .. plot::\n        :context: close-figs\n\n        >>> sns.palplot(sns.hls_palette(10, h=.5))\n\n    Create a palette of 10 colors that are darker than the default:\n\n    .. plot::\n        :context: close-figs\n\n        >>> sns.palplot(sns.hls_palette(10, l=.4))\n\n    Create a palette of 10 colors that are less saturated than the default:\n\n    .. plot::\n        :context: close-figs\n\n        >>> sns.palplot(sns.hls_palette(10, s=.4))\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)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_husl_palette_husl_palette.None_1.else_.return._ColorPalette_palette_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_husl_palette_husl_palette.None_1.else_.return._ColorPalette_palette_", "embedding": null, "metadata": {"file_path": "seaborn/palettes.py", "file_name": "palettes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 300, "end_line": 371, "span_ids": ["husl_palette"], "tokens": 483}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def husl_palette(n_colors=6, h=.01, s=.9, l=.65, as_cmap=False):  # noqa\n    \"\"\"Get a set of evenly spaced colors in HUSL hue space.\n\n    h, s, and l should be between 0 and 1\n\n    Parameters\n    ----------\n\n    n_colors : int\n        number of colors in the palette\n    h : float\n        first hue\n    s : float\n        saturation\n    l : float\n        lightness\n\n    Returns\n    -------\n    list of RGB tuples or :class:`matplotlib.colors.Colormap`\n\n    See Also\n    --------\n    hls_palette : Make a palette using evently spaced circular hues in the\n                  HSL system.\n\n    Examples\n    --------\n\n    Create a palette of 10 colors with the default parameters:\n\n    .. plot::\n        :context: close-figs\n\n        >>> import seaborn as sns; sns.set_theme()\n        >>> sns.palplot(sns.husl_palette(10))\n\n    Create a palette of 10 colors that begins at a different hue value:\n\n    .. plot::\n        :context: close-figs\n\n        >>> sns.palplot(sns.husl_palette(10, h=.5))\n\n    Create a palette of 10 colors that are darker than the default:\n\n    .. plot::\n        :context: close-figs\n\n        >>> sns.palplot(sns.husl_palette(10, l=.4))\n\n    Create a palette of 10 colors that are less saturated than the default:\n\n    .. plot::\n        :context: close-figs\n\n        >>> sns.palplot(sns.husl_palette(10, s=.4))\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)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_mpl_palette__color_to_rgb.return.mpl_colors_to_rgb_color_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_mpl_palette__color_to_rgb.return.mpl_colors_to_rgb_color_", "embedding": null, "metadata": {"file_path": "seaborn/palettes.py", "file_name": "palettes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 375, "end_line": 468, "span_ids": ["mpl_palette", "_color_to_rgb"], "tokens": 663}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def mpl_palette(name, n_colors=6, as_cmap=False):\n    \"\"\"Return discrete colors from a matplotlib palette.\n\n    Note that this handles the qualitative colorbrewer palettes\n    properly, although if you ask for more colors than a particular\n    qualitative palette can provide you will get fewer than you are\n    expecting. In contrast, asking for qualitative color brewer palettes\n    using :func:`color_palette` will return the expected number of colors,\n    but they will cycle.\n\n    If you are using the IPython notebook, you can also use the function\n    :func:`choose_colorbrewer_palette` to interactively select palettes.\n\n    Parameters\n    ----------\n    name : string\n        Name of the palette. This should be a named matplotlib colormap.\n    n_colors : int\n        Number of discrete colors in the palette.\n\n    Returns\n    -------\n    list of RGB tuples or :class:`matplotlib.colors.Colormap`\n\n    Examples\n    --------\n\n    Create a qualitative colorbrewer palette with 8 colors:\n\n    .. plot::\n        :context: close-figs\n\n        >>> import seaborn as sns; sns.set_theme()\n        >>> sns.palplot(sns.mpl_palette(\"Set2\", 8))\n\n    Create a sequential colorbrewer palette:\n\n    .. plot::\n        :context: close-figs\n\n        >>> sns.palplot(sns.mpl_palette(\"Blues\"))\n\n    Create a diverging palette:\n\n    .. plot::\n        :context: close-figs\n\n        >>> sns.palplot(sns.mpl_palette(\"seismic\", 8))\n\n    Create a \"dark\" sequential palette:\n\n    .. plot::\n        :context: close-figs\n\n        >>> sns.palplot(sns.mpl_palette(\"GnBu_d\"))\n\n    \"\"\"\n    if name.endswith(\"_d\"):\n        sub_name = name[:-2]\n        if sub_name.endswith(\"_r\"):\n            reverse = True\n            sub_name = sub_name[:-2]\n        else:\n            reverse = False\n        pal = color_palette(sub_name, 2) + [\"#333333\"]\n        if reverse:\n            pal = pal[::-1]\n        cmap = blend_palette(pal, n_colors, as_cmap=True)\n    else:\n        cmap = get_colormap(name)\n\n    if name in MPL_QUAL_PALS:\n        bins = np.linspace(0, 1, MPL_QUAL_PALS[name])[:n_colors]\n    else:\n        bins = np.linspace(0, 1, int(n_colors) + 2)[1:-1]\n    palette = list(map(tuple, cmap(bins)[:, :3]))\n\n    if as_cmap:\n        return cmap\n    else:\n        return _ColorPalette(palette)\n\n\ndef _color_to_rgb(color, input):\n    \"\"\"Add some more flexibility to color choices.\"\"\"\n    if input == \"hls\":\n        color = colorsys.hls_to_rgb(*color)\n    elif input == \"husl\":\n        color = husl.husl_to_rgb(*color)\n        color = tuple(np.clip(color, 0, 1))\n    elif input == \"xkcd\":\n        color = xkcd_rgb[color]\n\n    return mpl.colors.to_rgb(color)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_dark_palette_dark_palette.return.blend_palette_colors_n_c": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_dark_palette_dark_palette.return.blend_palette_colors_n_c", "embedding": null, "metadata": {"file_path": "seaborn/palettes.py", "file_name": "palettes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 470, "end_line": 548, "span_ids": ["dark_palette"], "tokens": 639}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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.Colormap`.\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    list of RGB tuples or :class:`matplotlib.colors.Colormap`\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\n    Generate a palette from an HTML color:\n\n    .. plot::\n        :context: close-figs\n\n        >>> import seaborn as sns; sns.set_theme()\n        >>> sns.palplot(sns.dark_palette(\"purple\"))\n\n    Generate a palette that decreases in lightness:\n\n    .. plot::\n        :context: close-figs\n\n        >>> sns.palplot(sns.dark_palette(\"seagreen\", reverse=True))\n\n    Generate a palette from an HUSL-space seed:\n\n    .. plot::\n        :context: close-figs\n\n        >>> sns.palplot(sns.dark_palette((260, 75, 60), input=\"husl\"))\n\n    Generate a colormap object:\n\n    .. plot::\n        :context: close-figs\n\n        >>> from numpy import arange\n        >>> x = arange(25).reshape(5, 5)\n        >>> cmap = sns.dark_palette(\"#2ecc71\", as_cmap=True)\n        >>> ax = sns.heatmap(x, cmap=cmap)\n\n    \"\"\"\n    rgb = _color_to_rgb(color, input)\n    h, s, l = husl.rgb_to_husl(*rgb)\n    gray_s, gray_l = .15 * s, 15\n    gray = _color_to_rgb((h, gray_s, gray_l), input=\"husl\")\n    colors = [rgb, gray] if reverse else [gray, rgb]\n    return blend_palette(colors, n_colors, as_cmap)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_light_palette_light_palette.return.blend_palette_colors_n_c": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_light_palette_light_palette.return.blend_palette_colors_n_c", "embedding": null, "metadata": {"file_path": "seaborn/palettes.py", "file_name": "palettes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 551, "end_line": 629, "span_ids": ["light_palette"], "tokens": 643}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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    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_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.Colormap`.\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    list of RGB tuples or :class:`matplotlib.colors.Colormap`\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\n    Generate a palette from an HTML color:\n\n    .. plot::\n        :context: close-figs\n\n        >>> import seaborn as sns; sns.set_theme()\n        >>> sns.palplot(sns.light_palette(\"purple\"))\n\n    Generate a palette that increases in lightness:\n\n    .. plot::\n        :context: close-figs\n\n        >>> sns.palplot(sns.light_palette(\"seagreen\", reverse=True))\n\n    Generate a palette from an HUSL-space seed:\n\n    .. plot::\n        :context: close-figs\n\n        >>> sns.palplot(sns.light_palette((260, 75, 60), input=\"husl\"))\n\n    Generate a colormap object:\n\n    .. plot::\n        :context: close-figs\n\n        >>> from numpy import arange\n        >>> x = arange(25).reshape(5, 5)\n        >>> cmap = sns.light_palette(\"#2ecc71\", as_cmap=True)\n        >>> ax = sns.heatmap(x, cmap=cmap)\n\n    \"\"\"\n    rgb = _color_to_rgb(color, input)\n    h, s, l = husl.rgb_to_husl(*rgb)\n    gray_s, gray_l = .15 * s, 95\n    gray = _color_to_rgb((h, gray_s, gray_l), input=\"husl\")\n    colors = [rgb, gray] if reverse else [gray, rgb]\n    return blend_palette(colors, n_colors, as_cmap)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_diverging_palette_diverging_palette.return.pal": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_diverging_palette_diverging_palette.return.pal", "embedding": null, "metadata": {"file_path": "seaborn/palettes.py", "file_name": "palettes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 632, "end_line": 709, "span_ids": ["diverging_palette"], "tokens": 679}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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.Colormap`.\n\n    Returns\n    -------\n    list of RGB tuples or :class:`matplotlib.colors.Colormap`\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\n    Generate a blue-white-red palette:\n\n    .. plot::\n        :context: close-figs\n\n        >>> import seaborn as sns; sns.set_theme()\n        >>> sns.palplot(sns.diverging_palette(240, 10, n=9))\n\n    Generate a brighter green-white-purple palette:\n\n    .. plot::\n        :context: close-figs\n\n        >>> sns.palplot(sns.diverging_palette(150, 275, s=80, l=55, n=9))\n\n    Generate a blue-black-red palette:\n\n    .. plot::\n        :context: close-figs\n\n        >>> sns.palplot(sns.diverging_palette(250, 15, s=75, l=40,\n        ...                                   n=9, center=\"dark\"))\n\n    Generate a colormap object:\n\n    .. plot::\n        :context: close-figs\n\n        >>> from numpy import arange\n        >>> x = arange(25).reshape(5, 5)\n        >>> cmap = sns.diverging_palette(220, 20, as_cmap=True)\n        >>> ax = sns.heatmap(x, cmap=cmap)\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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_blend_palette_blend_palette.return.pal": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_blend_palette_blend_palette.return.pal", "embedding": null, "metadata": {"file_path": "seaborn/palettes.py", "file_name": "palettes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 712, "end_line": 735, "span_ids": ["blend_palette"], "tokens": 213}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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.Colormap`.\n\n    Returns\n    -------\n    list of RGB tuples or :class:`matplotlib.colors.Colormap`\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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_xkcd_palette_xkcd_palette.return.color_palette_palette_le": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_xkcd_palette_xkcd_palette.return.color_palette_palette_le", "embedding": null, "metadata": {"file_path": "seaborn/palettes.py", "file_name": "palettes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 738, "end_line": 762, "span_ids": ["xkcd_palette"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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 : seaborn color palette\n        Returns the list of colors as RGB tuples in an object that behaves like\n        other seaborn color palettes.\n\n    See Also\n    --------\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))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_crayon_palette_crayon_palette.return.color_palette_palette_le": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_crayon_palette_crayon_palette.return.color_palette_palette_le", "embedding": null, "metadata": {"file_path": "seaborn/palettes.py", "file_name": "palettes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 765, "end_line": 790, "span_ids": ["crayon_palette"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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 : seaborn color palette\n        Returns the list of colors as rgb tuples in an object that behaves like\n        other seaborn color palettes.\n\n    See Also\n    --------\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))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_cubehelix_palette_cubehelix_palette._Make_a_sequential_pale": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_cubehelix_palette_cubehelix_palette._Make_a_sequential_pale", "embedding": null, "metadata": {"file_path": "seaborn/palettes.py", "file_name": "palettes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 793, "end_line": 904, "span_ids": ["cubehelix_palette"], "tokens": 865}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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-shorthand; see the\n    example below.\n\n    Parameters\n    ----------\n    n_colors : int\n        Number of colors in the palette.\n    start : float, 0 <= start <= 3\n        The hue 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        Gamma factor to emphasize darker (gamma < 1) or lighter (gamma > 1)\n        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.Colormap`.\n\n    Returns\n    -------\n    list of RGB tuples or :class:`matplotlib.colors.Colormap`\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\n    Generate the default palette:\n\n    .. plot::\n        :context: close-figs\n\n        >>> import seaborn as sns; sns.set_theme()\n        >>> sns.palplot(sns.cubehelix_palette())\n\n    Rotate backwards from the same starting location:\n\n    .. plot::\n        :context: close-figs\n\n        >>> sns.palplot(sns.cubehelix_palette(rot=-.4))\n\n    Use a different starting point and shorter rotation:\n\n    .. plot::\n        :context: close-figs\n\n        >>> sns.palplot(sns.cubehelix_palette(start=2.8, rot=.1))\n\n    Reverse the direction of the lightness ramp:\n\n    .. plot::\n        :context: close-figs\n\n        >>> sns.palplot(sns.cubehelix_palette(reverse=True))\n\n    Generate a colormap object:\n\n    .. plot::\n        :context: close-figs\n\n        >>> from numpy import arange\n        >>> x = arange(25).reshape(5, 5)\n        >>> cmap = sns.cubehelix_palette(as_cmap=True)\n        >>> ax = sns.heatmap(x, cmap=cmap)\n\n    Use the full lightness range:\n\n    .. plot::\n        :context: close-figs\n\n        >>> cmap = sns.cubehelix_palette(dark=0, light=1, as_cmap=True)\n        >>> ax = sns.heatmap(x, cmap=cmap)\n\n    Use through the :func:`color_palette` interface:\n\n    .. plot::\n        :context: close-figs\n\n        >>> sns.palplot(sns.color_palette(\"ch:2,r=.2,l=.6\"))\n\n    \"\"\"\n    # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_cubehelix_palette.get_color_function_cubehelix_palette.get_color_function.return.color": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_cubehelix_palette.get_color_function_cubehelix_palette.get_color_function.return.color", "embedding": null, "metadata": {"file_path": "seaborn/palettes.py", "file_name": "palettes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 905, "end_line": 919, "span_ids": ["cubehelix_palette"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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    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    # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_cubehelix_palette.cdict_cubehelix_palette.if_as_cmap_.else_.return._ColorPalette_pal_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_cubehelix_palette.cdict_cubehelix_palette.if_as_cmap_.else_.return._ColorPalette_pal_", "embedding": null, "metadata": {"file_path": "seaborn/palettes.py", "file_name": "palettes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 921, "end_line": 942, "span_ids": ["cubehelix_palette"], "tokens": 254}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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    # ... other code\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)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py__parse_cubehelix_args__parse_cubehelix_args.return.args_kwargs": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py__parse_cubehelix_args__parse_cubehelix_args.return.args_kwargs", "embedding": null, "metadata": {"file_path": "seaborn/palettes.py", "file_name": "palettes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 945, "end_line": 977, "span_ids": ["_parse_cubehelix_args"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _parse_cubehelix_args(argstr):\n    \"\"\"Turn stringified cubehelix params into args/kwargs.\"\"\"\n\n    if argstr.startswith(\"ch:\"):\n        argstr = argstr[3:]\n\n    if argstr.endswith(\"_r\"):\n        reverse = True\n        argstr = argstr[:-2]\n    else:\n        reverse = False\n\n    if not argstr:\n        return [], {\"reverse\": reverse}\n\n    all_args = argstr.split(\",\")\n\n    args = [float(a.strip(\" \")) for a in all_args if \"=\" not in a]\n\n    kwargs = [a.split(\"=\") for a in all_args if \"=\" in a]\n    kwargs = {k.strip(\" \"): float(v.strip(\" \")) for k, v in kwargs}\n\n    kwarg_map = dict(\n        s=\"start\", r=\"rot\", g=\"gamma\",\n        h=\"hue\", l=\"light\", d=\"dark\",  # noqa: E741\n    )\n\n    kwargs = {kwarg_map.get(k, k): v for k, v in kwargs.items()}\n\n    if reverse:\n        kwargs[\"reverse\"] = True\n\n    return args, kwargs", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_set_color_codes_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/palettes.py_set_color_codes_", "embedding": null, "metadata": {"file_path": "seaborn/palettes.py", "file_name": "palettes.py", "file_type": "text/x-python", "category": "implementation", "start_line": 980, "end_line": 1039, "span_ids": ["set_color_codes"], "tokens": 485}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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    Examples\n    --------\n\n    Map matplotlib color codes to the default seaborn palette.\n\n    .. plot::\n        :context: close-figs\n\n        >>> import matplotlib.pyplot as plt\n        >>> import seaborn as sns; sns.set_theme()\n        >>> sns.set_color_codes()\n        >>> _ = plt.plot([0, 1], color=\"r\")\n\n    Use a different seaborn palette.\n\n    .. plot::\n        :context: close-figs\n\n        >>> sns.set_color_codes(\"dark\")\n        >>> _ = plt.plot([0, 1], color=\"g\")\n        >>> _ = plt.plot([0, 2], color=\"m\")\n\n    \"\"\"\n    if palette == \"reset\":\n        colors = [(0., 0., 1.), (0., .5, 0.), (1., 0., 0.), (.75, 0., .75),\n                  (.75, .75, 0.), (0., .75, .75), (0., 0., 0.)]\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        mpl.colors.colorConverter.cache[code] = rgb", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py__Control_plot_style_and__context_keys._": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py__Control_plot_style_and__context_keys._", "embedding": null, "metadata": {"file_path": "seaborn/rcmod.py", "file_name": "rcmod.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 79, "span_ids": ["impl", "docstring", "imports"], "tokens": 389}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Control plot style and scaling using the matplotlib rcParams interface.\"\"\"\nimport functools\nimport matplotlib as mpl\nfrom cycler import cycler\nfrom . import palettes\n\n\n__all__ = [\"set_theme\", \"set\", \"reset_defaults\", \"reset_orig\",\n           \"axes_style\", \"set_style\", \"plotting_context\", \"set_context\",\n           \"set_palette\"]\n\n\n_style_keys = [\n\n    \"axes.facecolor\",\n    \"axes.edgecolor\",\n    \"axes.grid\",\n    \"axes.axisbelow\",\n    \"axes.labelcolor\",\n\n    \"figure.facecolor\",\n\n    \"grid.color\",\n    \"grid.linestyle\",\n\n    \"text.color\",\n\n    \"xtick.color\",\n    \"ytick.color\",\n    \"xtick.direction\",\n    \"ytick.direction\",\n    \"lines.solid_capstyle\",\n\n    \"patch.edgecolor\",\n    \"patch.force_edgecolor\",\n\n    \"image.cmap\",\n    \"font.family\",\n    \"font.sans-serif\",\n\n    \"xtick.bottom\",\n    \"xtick.top\",\n    \"ytick.left\",\n    \"ytick.right\",\n\n    \"axes.spines.left\",\n    \"axes.spines.bottom\",\n    \"axes.spines.right\",\n    \"axes.spines.top\",\n\n]\n\n_context_keys = [\n\n    \"font.size\",\n    \"axes.labelsize\",\n    \"axes.titlesize\",\n    \"xtick.labelsize\",\n    \"ytick.labelsize\",\n    \"legend.fontsize\",\n    \"legend.title_fontsize\",\n\n    \"axes.linewidth\",\n    \"grid.linewidth\",\n    \"lines.linewidth\",\n    \"lines.markersize\",\n    \"patch.linewidth\",\n\n    \"xtick.major.width\",\n    \"ytick.major.width\",\n    \"xtick.minor.width\",\n    \"ytick.minor.width\",\n\n    \"xtick.major.size\",\n    \"ytick.major.size\",\n    \"xtick.minor.size\",\n    \"ytick.minor.size\",\n\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py_set_theme_set_theme.if_rc_is_not_None_.mpl_rcParams_update_rc_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py_set_theme_set_theme.if_rc_is_not_None_.mpl_rcParams_update_rc_", "embedding": null, "metadata": {"file_path": "seaborn/rcmod.py", "file_name": "rcmod.py", "file_type": "text/x-python", "category": "implementation", "start_line": 82, "end_line": 123, "span_ids": ["set_theme"], "tokens": 353}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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    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)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py_axes_style.if_style_is_None__axes_style.return.style_object": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py_axes_style.if_style_is_None__axes_style.return.style_object", "embedding": null, "metadata": {"file_path": "seaborn/rcmod.py", "file_name": "rcmod.py", "file_type": "text/x-python", "category": "implementation", "start_line": 179, "end_line": 303, "span_ids": ["axes_style"], "tokens": 795}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def axes_style(style=None, rc=None):\n    if style is None:\n        style_dict = {k: mpl.rcParams[k] for k in _style_keys}\n\n    elif isinstance(style, dict):\n        style_dict = style\n\n    else:\n        styles = [\"white\", \"dark\", \"whitegrid\", \"darkgrid\", \"ticks\"]\n        if style not in styles:\n            raise ValueError(f\"style must be one of {', '.join(styles)}\")\n\n        # Define colors here\n        dark_gray = \".15\"\n        light_gray = \".8\"\n\n        # Common parameters\n        style_dict = {\n\n            \"figure.facecolor\": \"white\",\n            \"axes.labelcolor\": dark_gray,\n\n            \"xtick.direction\": \"out\",\n            \"ytick.direction\": \"out\",\n            \"xtick.color\": dark_gray,\n            \"ytick.color\": dark_gray,\n\n            \"axes.axisbelow\": True,\n            \"grid.linestyle\": \"-\",\n\n\n            \"text.color\": dark_gray,\n            \"font.family\": [\"sans-serif\"],\n            \"font.sans-serif\": [\"Arial\", \"DejaVu Sans\", \"Liberation Sans\",\n                                \"Bitstream Vera Sans\", \"sans-serif\"],\n\n\n            \"lines.solid_capstyle\": \"round\",\n            \"patch.edgecolor\": \"w\",\n            \"patch.force_edgecolor\": True,\n\n            \"image.cmap\": \"rocket\",\n\n            \"xtick.top\": False,\n            \"ytick.right\": False,\n\n        }\n\n        # Set grid on or off\n        if \"grid\" in style:\n            style_dict.update({\n                \"axes.grid\": True,\n            })\n        else:\n            style_dict.update({\n                \"axes.grid\": False,\n            })\n\n        # Set the color of the background, spines, and grids\n        if style.startswith(\"dark\"):\n            style_dict.update({\n\n                \"axes.facecolor\": \"#EAEAF2\",\n                \"axes.edgecolor\": \"white\",\n                \"grid.color\": \"white\",\n\n                \"axes.spines.left\": True,\n                \"axes.spines.bottom\": True,\n                \"axes.spines.right\": True,\n                \"axes.spines.top\": True,\n\n            })\n\n        elif style == \"whitegrid\":\n            style_dict.update({\n\n                \"axes.facecolor\": \"white\",\n                \"axes.edgecolor\": light_gray,\n                \"grid.color\": light_gray,\n\n                \"axes.spines.left\": True,\n                \"axes.spines.bottom\": True,\n                \"axes.spines.right\": True,\n                \"axes.spines.top\": True,\n\n            })\n\n        elif style in [\"white\", \"ticks\"]:\n            style_dict.update({\n\n                \"axes.facecolor\": \"white\",\n                \"axes.edgecolor\": dark_gray,\n                \"grid.color\": light_gray,\n\n                \"axes.spines.left\": True,\n                \"axes.spines.bottom\": True,\n                \"axes.spines.right\": True,\n                \"axes.spines.top\": True,\n\n            })\n\n        # Show or hide the axes ticks\n        if style == \"ticks\":\n            style_dict.update({\n                \"xtick.bottom\": True,\n                \"ytick.left\": True,\n            })\n        else:\n            style_dict.update({\n                \"xtick.bottom\": False,\n                \"ytick.left\": False,\n            })\n\n    # Remove entries that are not defined in the base list of valid keys\n    # This lets us handle matplotlib <=/> 2.0\n    style_dict = {k: v for k, v in style_dict.items() if k in _style_keys}\n\n    # Override these settings with the provided rc dictionary\n    if rc is not None:\n        rc = {k: v for k, v in rc.items() if k in _style_keys}\n        style_dict.update(rc)\n\n    # Wrap in an _AxesStyle object so this can be used in a with statement\n    style_object = _AxesStyle(style_dict)\n\n    return style_object", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py_set_style_set_style.mpl_rcParams_update_style": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py_set_style_set_style.mpl_rcParams_update_style", "embedding": null, "metadata": {"file_path": "seaborn/rcmod.py", "file_name": "rcmod.py", "file_type": "text/x-python", "category": "implementation", "start_line": 303, "end_line": 332, "span_ids": ["set_style"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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    style_object = axes_style(style, rc)\n    mpl.rcParams.update(style_object)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py_plotting_context_plotting_context.return.context_object": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py_plotting_context_plotting_context.return.context_object", "embedding": null, "metadata": {"file_path": "seaborn/rcmod.py", "file_name": "rcmod.py", "file_type": "text/x-python", "category": "implementation", "start_line": 335, "end_line": 433, "span_ids": ["plotting_context"], "tokens": 792}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def plotting_context(context=None, font_scale=1, rc=None):\n    \"\"\"\n    Get the parameters that control the scaling of plot elements.\n\n    This affects things like the size of the labels, lines, and other elements\n    of the plot, but not the overall style. This is accomplished using the\n    matplotlib rcParams system.\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    This function can also be used as a context manager to temporarily\n    alter the global defaults. See :func:`set_theme` or :func:`set_context`\n    to modify the global defaults for all plots.\n\n    Parameters\n    ----------\n    context : None, 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/plotting_context.rst\n\n    \"\"\"\n    if context is None:\n        context_dict = {k: mpl.rcParams[k] for k in _context_keys}\n\n    elif isinstance(context, dict):\n        context_dict = context\n\n    else:\n\n        contexts = [\"paper\", \"notebook\", \"talk\", \"poster\"]\n        if context not in contexts:\n            raise ValueError(f\"context must be in {', '.join(contexts)}\")\n\n        # Set up dictionary of default parameters\n        texts_base_context = {\n\n            \"font.size\": 12,\n            \"axes.labelsize\": 12,\n            \"axes.titlesize\": 12,\n            \"xtick.labelsize\": 11,\n            \"ytick.labelsize\": 11,\n            \"legend.fontsize\": 11,\n            \"legend.title_fontsize\": 12,\n\n        }\n\n        base_context = {\n\n            \"axes.linewidth\": 1.25,\n            \"grid.linewidth\": 1,\n            \"lines.linewidth\": 1.5,\n            \"lines.markersize\": 6,\n            \"patch.linewidth\": 1,\n\n            \"xtick.major.width\": 1.25,\n            \"ytick.major.width\": 1.25,\n            \"xtick.minor.width\": 1,\n            \"ytick.minor.width\": 1,\n\n            \"xtick.major.size\": 6,\n            \"ytick.major.size\": 6,\n            \"xtick.minor.size\": 4,\n            \"ytick.minor.size\": 4,\n\n        }\n        base_context.update(texts_base_context)\n\n        # Scale all the parameters by the same factor depending on the context\n        scaling = dict(paper=.8, notebook=1, talk=1.5, poster=2)[context]\n        context_dict = {k: v * scaling for k, v in base_context.items()}\n\n        # Now independently scale the fonts\n        font_keys = texts_base_context.keys()\n        font_dict = {k: context_dict[k] * font_scale for k in font_keys}\n        context_dict.update(font_dict)\n\n    # Override these settings with the provided rc dictionary\n    if rc is not None:\n        rc = {k: v for k, v in rc.items() if k in _context_keys}\n        context_dict.update(rc)\n\n    # Wrap in a _PlottingContext object so this can be used in a with statement\n    context_object = _PlottingContext(context_dict)\n\n    return context_object", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py_set_context_set_context.mpl_rcParams_update_conte": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py_set_context_set_context.mpl_rcParams_update_conte", "embedding": null, "metadata": {"file_path": "seaborn/rcmod.py", "file_name": "rcmod.py", "file_type": "text/x-python", "category": "implementation", "start_line": 436, "end_line": 470, "span_ids": ["set_context"], "tokens": 278}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def set_context(context=None, font_scale=1, rc=None):\n    \"\"\"\n    Set the parameters that control the scaling of plot elements.\n\n    This affects things like the size of the labels, lines, and other elements\n    of the plot, but not the overall style. This is accomplished using the\n    matplotlib rcParams system.\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    context_object = plotting_context(context, font_scale, rc)\n    mpl.rcParams.update(context_object)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py__RCAesthetics__PlottingContext._set.staticmethod_set_context_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py__RCAesthetics__PlottingContext._set.staticmethod_set_context_", "embedding": null, "metadata": {"file_path": "seaborn/rcmod.py", "file_name": "rcmod.py", "file_type": "text/x-python", "category": "implementation", "start_line": 476, "end_line": 502, "span_ids": ["_RCAesthetics.__enter__", "_RCAesthetics.__exit__", "_RCAesthetics.__call__", "_RCAesthetics", "_PlottingContext", "_AxesStyle"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _RCAesthetics(dict):\n    def __enter__(self):\n        rc = mpl.rcParams\n        self._orig = {k: rc[k] for k in self._keys}\n        self._set(self)\n\n    def __exit__(self, exc_type, exc_value, exc_tb):\n        self._set(self._orig)\n\n    def __call__(self, func):\n        @functools.wraps(func)\n        def wrapper(*args, **kwargs):\n            with self:\n                return func(*args, **kwargs)\n        return wrapper\n\n\nclass _AxesStyle(_RCAesthetics):\n    \"\"\"Light wrapper on a dict to set style temporarily.\"\"\"\n    _keys = _style_keys\n    _set = staticmethod(set_style)\n\n\nclass _PlottingContext(_RCAesthetics):\n    \"\"\"Light wrapper on a dict to set context temporarily.\"\"\"\n    _keys = _context_keys\n    _set = staticmethod(set_context)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py_set_palette_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py_set_palette_", "embedding": null, "metadata": {"file_path": "seaborn/rcmod.py", "file_name": "rcmod.py", "file_type": "text/x-python", "category": "implementation", "start_line": 502, "end_line": 541, "span_ids": ["set_palette"], "tokens": 325}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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 paltte | 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    Examples\n    --------\n    >>> set_palette(\"Reds\")\n\n    >>> set_palette(\"Set1\", 8, .75)\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    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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__Plotting_functions_for___all__._lmplot_regplot_re": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__Plotting_functions_for___all__._lmplot_regplot_re", "embedding": null, "metadata": {"file_path": "seaborn/regression.py", "file_name": "regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 22, "span_ids": ["impl", "impl:8", "impl:2", "imports:9", "imports:10", "docstring", "impl:9", "imports", "imports:8"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Plotting functions for linear models (broadly construed).\"\"\"\nimport copy\nfrom textwrap import dedent\nimport warnings\nimport numpy as np\nimport pandas as pd\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\n\ntry:\n    import statsmodels\n    assert statsmodels\n    _has_statsmodels = True\nexcept ImportError:\n    _has_statsmodels = False\n\nfrom . import utils\nfrom . import algorithms as algo\nfrom .axisgrid import FacetGrid, _facet_docs\n\n\n__all__ = [\"lmplot\", \"regplot\", \"residplot\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__LinearPlotter__LinearPlotter.establish_variables.for_var_val_in_kws_items.setattr_self_var_vector": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__LinearPlotter__LinearPlotter.establish_variables.for_var_val_in_kws_items.setattr_self_var_vector", "embedding": null, "metadata": {"file_path": "seaborn/regression.py", "file_name": "regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 25, "end_line": 54, "span_ids": ["_LinearPlotter.establish_variables", "_LinearPlotter"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _LinearPlotter:\n    \"\"\"Base class for plotting relational data in tidy format.\n\n    To get anything useful done you'll have to inherit from this, but setup\n    code that can be abstracted out should be put here.\n\n    \"\"\"\n    def establish_variables(self, data, **kws):\n        \"\"\"Extract variables from data or use directly.\"\"\"\n        self.data = data\n\n        # Validate the inputs\n        any_strings = any([isinstance(v, str) for v in kws.values()])\n        if any_strings and data is None:\n            raise ValueError(\"Must pass `data` if using named variables.\")\n\n        # Set the variables\n        for var, val in kws.items():\n            if isinstance(val, str):\n                vector = data[val]\n            elif isinstance(val, list):\n                vector = np.asarray(val)\n            else:\n                vector = val\n            if vector is not None and vector.shape != (1,):\n                vector = np.squeeze(vector)\n            if np.ndim(vector) > 1:\n                err = \"regplot inputs must be 1d\"\n                raise ValueError(err)\n            setattr(self, var, vector)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__LinearPlotter.dropna__LinearPlotter.plot.raise_NotImplementedError": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__LinearPlotter.dropna__LinearPlotter.plot.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "seaborn/regression.py", "file_name": "regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 56, "end_line": 67, "span_ids": ["_LinearPlotter.plot", "_LinearPlotter.dropna"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _LinearPlotter:\n\n    def dropna(self, *vars):\n        \"\"\"Remove observations with missing data.\"\"\"\n        vals = [getattr(self, var) for var in vars]\n        vals = [v for v in vals if v is not None]\n        not_na = np.all(np.column_stack([pd.notnull(v) for v in vals]), axis=1)\n        for var in vars:\n            val = getattr(self, var)\n            if val is not None:\n                setattr(self, var, val[not_na])\n\n    def plot(self, ax):\n        raise NotImplementedError", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter__RegressionPlotter.scatter_data.return.x_y": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter__RegressionPlotter.scatter_data.return.x_y", "embedding": null, "metadata": {"file_path": "seaborn/regression.py", "file_name": "regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 70, "end_line": 151, "span_ids": ["_RegressionPlotter.scatter_data", "_RegressionPlotter"], "tokens": 719}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _RegressionPlotter(_LinearPlotter):\n    \"\"\"Plotter for numeric independent variables with regression model.\n\n    This does the computations and drawing for the `regplot` function, and\n    is thus also used indirectly by `lmplot`.\n    \"\"\"\n    def __init__(self, x, y, data=None, x_estimator=None, x_bins=None,\n                 x_ci=\"ci\", scatter=True, fit_reg=True, ci=95, n_boot=1000,\n                 units=None, seed=None, order=1, logistic=False, lowess=False,\n                 robust=False, logx=False, x_partial=None, y_partial=None,\n                 truncate=False, dropna=True, x_jitter=None, y_jitter=None,\n                 color=None, label=None):\n\n        # Set member attributes\n        self.x_estimator = x_estimator\n        self.ci = ci\n        self.x_ci = ci if x_ci == \"ci\" else x_ci\n        self.n_boot = n_boot\n        self.seed = seed\n        self.scatter = scatter\n        self.fit_reg = fit_reg\n        self.order = order\n        self.logistic = logistic\n        self.lowess = lowess\n        self.robust = robust\n        self.logx = logx\n        self.truncate = truncate\n        self.x_jitter = x_jitter\n        self.y_jitter = y_jitter\n        self.color = color\n        self.label = label\n\n        # Validate the regression options:\n        if sum((order > 1, logistic, robust, lowess, logx)) > 1:\n            raise ValueError(\"Mutually exclusive regression options.\")\n\n        # Extract the data vals from the arguments or passed dataframe\n        self.establish_variables(data, x=x, y=y, units=units,\n                                 x_partial=x_partial, y_partial=y_partial)\n\n        # Drop null observations\n        if dropna:\n            self.dropna(\"x\", \"y\", \"units\", \"x_partial\", \"y_partial\")\n\n        # Regress nuisance variables out of the data\n        if self.x_partial is not None:\n            self.x = self.regress_out(self.x, self.x_partial)\n        if self.y_partial is not None:\n            self.y = self.regress_out(self.y, self.y_partial)\n\n        # Possibly bin the predictor variable, which implies a point estimate\n        if x_bins is not None:\n            self.x_estimator = np.mean if x_estimator is None else x_estimator\n            x_discrete, x_bins = self.bin_predictor(x_bins)\n            self.x_discrete = x_discrete\n        else:\n            self.x_discrete = self.x\n\n        # Disable regression in case of singleton inputs\n        if len(self.x) <= 1:\n            self.fit_reg = False\n\n        # Save the range of the x variable for the grid later\n        if self.fit_reg:\n            self.x_range = self.x.min(), self.x.max()\n\n    @property\n    def scatter_data(self):\n        \"\"\"Data where each observation is a point.\"\"\"\n        x_j = self.x_jitter\n        if x_j is None:\n            x = self.x\n        else:\n            x = self.x + np.random.uniform(-x_j, x_j, len(self.x))\n\n        y_j = self.y_jitter\n        if y_j is None:\n            y = self.y\n        else:\n            y = self.y + np.random.uniform(-y_j, y_j, len(self.y))\n\n        return x, y", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.estimate_data__RegressionPlotter.estimate_data.return.vals_points_cis": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.estimate_data__RegressionPlotter.estimate_data.return.vals_points_cis", "embedding": null, "metadata": {"file_path": "seaborn/regression.py", "file_name": "regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 153, "end_line": 186, "span_ids": ["_RegressionPlotter.estimate_data"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _RegressionPlotter(_LinearPlotter):\n\n    @property\n    def estimate_data(self):\n        \"\"\"Data with a point estimate and CI for each discrete x value.\"\"\"\n        x, y = self.x_discrete, self.y\n        vals = sorted(np.unique(x))\n        points, cis = [], []\n\n        for val in vals:\n\n            # Get the point estimate of the y variable\n            _y = y[x == val]\n            est = self.x_estimator(_y)\n            points.append(est)\n\n            # Compute the confidence interval for this estimate\n            if self.x_ci is None:\n                cis.append(None)\n            else:\n                units = None\n                if self.x_ci == \"sd\":\n                    sd = np.std(_y)\n                    _ci = est - sd, est + sd\n                else:\n                    if self.units is not None:\n                        units = self.units[x == val]\n                    boots = algo.bootstrap(_y,\n                                           func=self.x_estimator,\n                                           n_boot=self.n_boot,\n                                           units=units,\n                                           seed=self.seed)\n                    _ci = utils.ci(boots, self.x_ci)\n                cis.append(_ci)\n\n        return vals, points, cis", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.fit_regression__RegressionPlotter.fit_regression.return.grid_yhat_err_bands": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.fit_regression__RegressionPlotter.fit_regression.return.grid_yhat_err_bands", "embedding": null, "metadata": {"file_path": "seaborn/regression.py", "file_name": "regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 188, "end_line": 227, "span_ids": ["_RegressionPlotter.fit_regression"], "tokens": 361}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _RegressionPlotter(_LinearPlotter):\n\n    def fit_regression(self, ax=None, x_range=None, grid=None):\n        \"\"\"Fit the regression model.\"\"\"\n        # Create the grid for the regression\n        if grid is None:\n            if self.truncate:\n                x_min, x_max = self.x_range\n            else:\n                if ax is None:\n                    x_min, x_max = x_range\n                else:\n                    x_min, x_max = ax.get_xlim()\n            grid = np.linspace(x_min, x_max, 100)\n        ci = self.ci\n\n        # Fit the regression\n        if self.order > 1:\n            yhat, yhat_boots = self.fit_poly(grid, self.order)\n        elif self.logistic:\n            from statsmodels.genmod.generalized_linear_model import GLM\n            from statsmodels.genmod.families import Binomial\n            yhat, yhat_boots = self.fit_statsmodels(grid, GLM,\n                                                    family=Binomial())\n        elif self.lowess:\n            ci = None\n            grid, yhat = self.fit_lowess()\n        elif self.robust:\n            from statsmodels.robust.robust_linear_model import RLM\n            yhat, yhat_boots = self.fit_statsmodels(grid, RLM)\n        elif self.logx:\n            yhat, yhat_boots = self.fit_logx(grid)\n        else:\n            yhat, yhat_boots = self.fit_fast(grid)\n\n        # Compute the confidence interval at each grid point\n        if ci is None:\n            err_bands = None\n        else:\n            err_bands = utils.ci(yhat_boots, ci, axis=0)\n\n        return grid, yhat, err_bands", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.fit_fast__RegressionPlotter.fit_fast.return.yhat_yhat_boots": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.fit_fast__RegressionPlotter.fit_fast.return.yhat_yhat_boots", "embedding": null, "metadata": {"file_path": "seaborn/regression.py", "file_name": "regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 229, "end_line": 246, "span_ids": ["_RegressionPlotter.fit_fast"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _RegressionPlotter(_LinearPlotter):\n\n    def fit_fast(self, grid):\n        \"\"\"Low-level regression and prediction using linear algebra.\"\"\"\n        def reg_func(_x, _y):\n            return np.linalg.pinv(_x).dot(_y)\n\n        X, y = np.c_[np.ones(len(self.x)), self.x], self.y\n        grid = np.c_[np.ones(len(grid)), grid]\n        yhat = grid.dot(reg_func(X, y))\n        if self.ci is None:\n            return yhat, None\n\n        beta_boots = algo.bootstrap(X, y,\n                                    func=reg_func,\n                                    n_boot=self.n_boot,\n                                    units=self.units,\n                                    seed=self.seed).T\n        yhat_boots = grid.dot(beta_boots).T\n        return yhat, yhat_boots", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.fit_poly__RegressionPlotter.fit_poly.return.yhat_yhat_boots": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.fit_poly__RegressionPlotter.fit_poly.return.yhat_yhat_boots", "embedding": null, "metadata": {"file_path": "seaborn/regression.py", "file_name": "regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 248, "end_line": 263, "span_ids": ["_RegressionPlotter.fit_poly"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _RegressionPlotter(_LinearPlotter):\n\n    def fit_poly(self, grid, order):\n        \"\"\"Regression using numpy polyfit for higher-order trends.\"\"\"\n        def reg_func(_x, _y):\n            return np.polyval(np.polyfit(_x, _y, order), grid)\n\n        x, y = self.x, self.y\n        yhat = reg_func(x, y)\n        if self.ci is None:\n            return yhat, None\n\n        yhat_boots = algo.bootstrap(x, y,\n                                    func=reg_func,\n                                    n_boot=self.n_boot,\n                                    units=self.units,\n                                    seed=self.seed)\n        return yhat, yhat_boots", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.fit_statsmodels__RegressionPlotter.fit_statsmodels.return.yhat_yhat_boots": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.fit_statsmodels__RegressionPlotter.fit_statsmodels.return.yhat_yhat_boots", "embedding": null, "metadata": {"file_path": "seaborn/regression.py", "file_name": "regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 265, "end_line": 288, "span_ids": ["_RegressionPlotter.fit_statsmodels"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _RegressionPlotter(_LinearPlotter):\n\n    def fit_statsmodels(self, grid, model, **kwargs):\n        \"\"\"More general regression function using statsmodels objects.\"\"\"\n        import statsmodels.genmod.generalized_linear_model as glm\n        X, y = np.c_[np.ones(len(self.x)), self.x], self.y\n        grid = np.c_[np.ones(len(grid)), grid]\n\n        def reg_func(_x, _y):\n            try:\n                yhat = model(_y, _x, **kwargs).fit().predict(grid)\n            except glm.PerfectSeparationError:\n                yhat = np.empty(len(grid))\n                yhat.fill(np.nan)\n            return yhat\n\n        yhat = reg_func(X, y)\n        if self.ci is None:\n            return yhat, None\n\n        yhat_boots = algo.bootstrap(X, y,\n                                    func=reg_func,\n                                    n_boot=self.n_boot,\n                                    units=self.units,\n                                    seed=self.seed)\n        return yhat, yhat_boots", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.fit_lowess__RegressionPlotter.fit_logx.return.yhat_yhat_boots": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.fit_lowess__RegressionPlotter.fit_logx.return.yhat_yhat_boots", "embedding": null, "metadata": {"file_path": "seaborn/regression.py", "file_name": "regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 290, "end_line": 315, "span_ids": ["_RegressionPlotter.fit_logx", "_RegressionPlotter.fit_lowess"], "tokens": 253}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _RegressionPlotter(_LinearPlotter):\n\n    def fit_lowess(self):\n        \"\"\"Fit a locally-weighted regression, which returns its own grid.\"\"\"\n        from statsmodels.nonparametric.smoothers_lowess import lowess\n        grid, yhat = lowess(self.y, self.x).T\n        return grid, yhat\n\n    def fit_logx(self, grid):\n        \"\"\"Fit the model in log-space.\"\"\"\n        X, y = np.c_[np.ones(len(self.x)), self.x], self.y\n        grid = np.c_[np.ones(len(grid)), np.log(grid)]\n\n        def reg_func(_x, _y):\n            _x = np.c_[_x[:, 0], np.log(_x[:, 1])]\n            return np.linalg.pinv(_x).dot(_y)\n\n        yhat = grid.dot(reg_func(X, y))\n        if self.ci is None:\n            return yhat, None\n\n        beta_boots = algo.bootstrap(X, y,\n                                    func=reg_func,\n                                    n_boot=self.n_boot,\n                                    units=self.units,\n                                    seed=self.seed).T\n        yhat_boots = grid.dot(beta_boots).T\n        return yhat, yhat_boots", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.bin_predictor__RegressionPlotter.regress_out.return.np_asarray_a_prime_a_me": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.bin_predictor__RegressionPlotter.regress_out.return.np_asarray_a_prime_a_me", "embedding": null, "metadata": {"file_path": "seaborn/regression.py", "file_name": "regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 317, "end_line": 338, "span_ids": ["_RegressionPlotter.bin_predictor", "_RegressionPlotter.regress_out"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _RegressionPlotter(_LinearPlotter):\n\n    def bin_predictor(self, bins):\n        \"\"\"Discretize a predictor by assigning value to closest bin.\"\"\"\n        x = np.asarray(self.x)\n        if np.isscalar(bins):\n            percentiles = np.linspace(0, 100, bins + 2)[1:-1]\n            bins = np.percentile(x, percentiles)\n        else:\n            bins = np.ravel(bins)\n\n        dist = np.abs(np.subtract.outer(x, bins))\n        x_binned = bins[np.argmin(dist, axis=1)].ravel()\n\n        return x_binned, bins\n\n    def regress_out(self, a, b):\n        \"\"\"Regress b from a keeping a's original mean.\"\"\"\n        a_mean = a.mean()\n        a = a - a_mean\n        b = b - b.mean()\n        b = np.c_[b]\n        a_prime = a - b.dot(np.linalg.pinv(b).dot(a))\n        return np.asarray(a_prime + a_mean).reshape(a.shape)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.plot__RegressionPlotter.plot.if_hasattr_self_y_name_.ax_set_ylabel_self_y_name": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.plot__RegressionPlotter.plot.if_hasattr_self_y_name_.ax_set_ylabel_self_y_name", "embedding": null, "metadata": {"file_path": "seaborn/regression.py", "file_name": "regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 340, "end_line": 374, "span_ids": ["_RegressionPlotter.plot"], "tokens": 263}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _RegressionPlotter(_LinearPlotter):\n\n    def plot(self, ax, scatter_kws, line_kws):\n        \"\"\"Draw the full plot.\"\"\"\n        # Insert the plot label into the correct set of keyword arguments\n        if self.scatter:\n            scatter_kws[\"label\"] = self.label\n        else:\n            line_kws[\"label\"] = self.label\n\n        # Use the current color cycle state as a default\n        if self.color is None:\n            lines, = ax.plot([], [])\n            color = lines.get_color()\n            lines.remove()\n        else:\n            color = self.color\n\n        # Ensure that color is hex to avoid matplotlib weirdness\n        color = mpl.colors.rgb2hex(mpl.colors.colorConverter.to_rgb(color))\n\n        # Let color in keyword arguments override overall plot color\n        scatter_kws.setdefault(\"color\", color)\n        line_kws.setdefault(\"color\", color)\n\n        # Draw the constituent plots\n        if self.scatter:\n            self.scatterplot(ax, scatter_kws)\n\n        if self.fit_reg:\n            self.lineplot(ax, line_kws)\n\n        # Label the axes\n        if hasattr(self.x, \"name\"):\n            ax.set_xlabel(self.x.name)\n        if hasattr(self.y, \"name\"):\n            ax.set_ylabel(self.y.name)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.scatterplot__RegressionPlotter.scatterplot.if_self_x_estimator_is_No.else_.ax_scatter_xs_ys_kws_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.scatterplot__RegressionPlotter.scatterplot.if_self_x_estimator_is_No.else_.ax_scatter_xs_ys_kws_", "embedding": null, "metadata": {"file_path": "seaborn/regression.py", "file_name": "regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 376, "end_line": 408, "span_ids": ["_RegressionPlotter.scatterplot"], "tokens": 371}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _RegressionPlotter(_LinearPlotter):\n\n    def scatterplot(self, ax, kws):\n        \"\"\"Draw the data.\"\"\"\n        # Treat the line-based markers specially, explicitly setting larger\n        # linewidth than is provided by the seaborn style defaults.\n        # This would ideally be handled better in matplotlib (i.e., distinguish\n        # between edgewidth for solid glyphs and linewidth for line glyphs\n        # but this should do for now.\n        line_markers = [\"1\", \"2\", \"3\", \"4\", \"+\", \"x\", \"|\", \"_\"]\n        if self.x_estimator is None:\n            if \"marker\" in kws and kws[\"marker\"] in line_markers:\n                lw = mpl.rcParams[\"lines.linewidth\"]\n            else:\n                lw = mpl.rcParams[\"lines.markeredgewidth\"]\n            kws.setdefault(\"linewidths\", lw)\n\n            if not hasattr(kws['color'], 'shape') or kws['color'].shape[1] < 4:\n                kws.setdefault(\"alpha\", .8)\n\n            x, y = self.scatter_data\n            ax.scatter(x, y, **kws)\n        else:\n            # TODO abstraction\n            ci_kws = {\"color\": kws[\"color\"]}\n            if \"alpha\" in kws:\n                ci_kws[\"alpha\"] = kws[\"alpha\"]\n            ci_kws[\"linewidth\"] = mpl.rcParams[\"lines.linewidth\"] * 1.75\n            kws.setdefault(\"s\", 50)\n\n            xs, ys, cis = self.estimate_data\n            if [ci for ci in cis if ci is not None]:\n                for x, ci in zip(xs, cis):\n                    ax.plot([x, x], ci, **ci_kws)\n            ax.scatter(xs, ys, **kws)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.lineplot__RegressionPlotter.lineplot.if_err_bands_is_not_None_.ax_fill_between_grid_er": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__RegressionPlotter.lineplot__RegressionPlotter.lineplot.if_err_bands_is_not_None_.ax_fill_between_grid_er", "embedding": null, "metadata": {"file_path": "seaborn/regression.py", "file_name": "regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 408, "end_line": 424, "span_ids": ["_RegressionPlotter.lineplot"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _RegressionPlotter(_LinearPlotter):\n\n    def lineplot(self, ax, kws):\n        \"\"\"Draw the model.\"\"\"\n        # Fit the regression model\n        grid, yhat, err_bands = self.fit_regression(ax)\n        edges = grid[0], grid[-1]\n\n        # Get set default aesthetics\n        fill_color = kws[\"color\"]\n        lw = kws.pop(\"lw\", mpl.rcParams[\"lines.linewidth\"] * 1.5)\n        kws.setdefault(\"linewidth\", lw)\n\n        # Draw the regression line and confidence interval\n        line, = ax.plot(grid, yhat, **kws)\n        if not self.truncate:\n            line.sticky_edges.x[:] = edges  # Prevent mpl from adding margin\n        if err_bands is not None:\n            ax.fill_between(grid, *err_bands, facecolor=fill_color, alpha=.15)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__regression_docs__regression_docs.dict_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__regression_docs__regression_docs.dict_", "embedding": null, "metadata": {"file_path": "seaborn/regression.py", "file_name": "regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 427, "end_line": 554, "span_ids": ["impl:11"], "tokens": 1382}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "_regression_docs = dict(\n\n    model_api=dedent(\"\"\"\\\n    There are a number of mutually exclusive options for estimating the\n    regression model. See the :ref:`tutorial ` for more\n    information.\\\n    \"\"\"),\n    regplot_vs_lmplot=dedent(\"\"\"\\\n    The :func:`regplot` and :func:`lmplot` functions are closely related, but\n    the former is an axes-level function while the latter is a figure-level\n    function that combines :func:`regplot` and :class:`FacetGrid`.\\\n    \"\"\"),\n    x_estimator=dedent(\"\"\"\\\n    x_estimator : callable that maps vector -> scalar, optional\n        Apply this function to each unique value of ``x`` and plot the\n        resulting estimate. This is useful when ``x`` is a discrete variable.\n        If ``x_ci`` is given, this estimate will be bootstrapped and a\n        confidence interval will be drawn.\\\n    \"\"\"),\n    x_bins=dedent(\"\"\"\\\n    x_bins : int or vector, optional\n        Bin the ``x`` variable into discrete bins and then estimate the central\n        tendency and a confidence interval. This binning only influences how\n        the scatterplot is drawn; the regression is still fit to the original\n        data.  This parameter is interpreted either as the number of\n        evenly-sized (not necessary spaced) bins or the positions of the bin\n        centers. When this parameter is used, it implies that the default of\n        ``x_estimator`` is ``numpy.mean``.\\\n    \"\"\"),\n    x_ci=dedent(\"\"\"\\\n    x_ci : \"ci\", \"sd\", int in [0, 100] or None, optional\n        Size of the confidence interval used when plotting a central tendency\n        for discrete values of ``x``. If ``\"ci\"``, defer to the value of the\n        ``ci`` parameter. If ``\"sd\"``, skip bootstrapping and show the\n        standard deviation of the observations in each bin.\\\n    \"\"\"),\n    scatter=dedent(\"\"\"\\\n    scatter : bool, optional\n        If ``True``, draw a scatterplot with the underlying observations (or\n        the ``x_estimator`` values).\\\n    \"\"\"),\n    fit_reg=dedent(\"\"\"\\\n    fit_reg : bool, optional\n        If ``True``, estimate and plot a regression model relating the ``x``\n        and ``y`` variables.\\\n    \"\"\"),\n    ci=dedent(\"\"\"\\\n    ci : int in [0, 100] or None, optional\n        Size of the confidence interval for the regression estimate. This will\n        be drawn using translucent bands around the regression line. The\n        confidence interval is estimated using a bootstrap; for large\n        datasets, it may be advisable to avoid that computation by setting\n        this parameter to None.\\\n    \"\"\"),\n    n_boot=dedent(\"\"\"\\\n    n_boot : int, optional\n        Number of bootstrap resamples used to estimate the ``ci``. The default\n        value attempts to balance time and stability; you may want to increase\n        this value for \"final\" versions of plots.\\\n    \"\"\"),\n    units=dedent(\"\"\"\\\n    units : variable name in ``data``, optional\n        If the ``x`` and ``y`` observations are nested within sampling units,\n        those can be specified here. This will be taken into account when\n        computing the confidence intervals by performing a multilevel bootstrap\n        that resamples both units and observations (within unit). This does not\n        otherwise influence how the regression is estimated or drawn.\\\n    \"\"\"),\n    seed=dedent(\"\"\"\\\n    seed : int, numpy.random.Generator, or numpy.random.RandomState, optional\n        Seed or random number generator for reproducible bootstrapping.\\\n    \"\"\"),\n    order=dedent(\"\"\"\\\n    order : int, optional\n        If ``order`` is greater than 1, use ``numpy.polyfit`` to estimate a\n        polynomial regression.\\\n    \"\"\"),\n    logistic=dedent(\"\"\"\\\n    logistic : bool, optional\n        If ``True``, assume that ``y`` is a binary variable and use\n        ``statsmodels`` to estimate a logistic regression model. Note that this\n        is substantially more computationally intensive than linear regression,\n        so you may wish to decrease the number of bootstrap resamples\n        (``n_boot``) or set ``ci`` to None.\\\n    \"\"\"),\n    lowess=dedent(\"\"\"\\\n    lowess : bool, optional\n        If ``True``, use ``statsmodels`` to estimate a nonparametric lowess\n        model (locally weighted linear regression). Note that confidence\n        intervals cannot currently be drawn for this kind of model.\\\n    \"\"\"),\n    robust=dedent(\"\"\"\\\n    robust : bool, optional\n        If ``True``, use ``statsmodels`` to estimate a robust regression. This\n        will de-weight outliers. Note that this is substantially more\n        computationally intensive than standard linear regression, so you may\n        wish to decrease the number of bootstrap resamples (``n_boot``) or set\n        ``ci`` to None.\\\n    \"\"\"),\n    logx=dedent(\"\"\"\\\n    logx : bool, optional\n        If ``True``, estimate a linear regression of the form y ~ log(x), but\n        plot the scatterplot and regression model in the input space. Note that\n        ``x`` must be positive for this to work.\\\n    \"\"\"),\n    xy_partial=dedent(\"\"\"\\\n    {x,y}_partial : strings in ``data`` or matrices\n        Confounding variables to regress out of the ``x`` or ``y`` variables\n        before plotting.\\\n    \"\"\"),\n    truncate=dedent(\"\"\"\\\n    truncate : bool, optional\n        If ``True``, the regression line is bounded by the data limits. If\n        ``False``, it extends to the ``x`` axis limits.\n    \"\"\"),\n    xy_jitter=dedent(\"\"\"\\\n    {x,y}_jitter : floats, optional\n        Add uniform random noise of this size to either the ``x`` or ``y``\n        variables. The noise is added to a copy of the data after fitting the\n        regression, and only influences the look of the scatterplot. This can\n        be helpful when plotting variables that take discrete values.\\\n    \"\"\"),\n    scatter_line_kws=dedent(\"\"\"\\\n    {scatter,line}_kws : dictionaries\n        Additional keyword arguments to pass to ``plt.scatter`` and\n        ``plt.plot``.\\\n    \"\"\"),\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py_lmplot.__doc___lmplot.__doc__.dedent_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py_lmplot.__doc___lmplot.__doc__.dedent_", "embedding": null, "metadata": {"file_path": "seaborn/regression.py", "file_name": "regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 649, "end_line": 829, "span_ids": ["impl:14"], "tokens": 1440}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "lmplot.__doc__ = dedent(\"\"\"\\\n    Plot data and regression model fits across a FacetGrid.\n\n    This function combines :func:`regplot` and :class:`FacetGrid`. It is\n    intended as a convenient interface to fit regression models across\n    conditional subsets of a dataset.\n\n    When thinking about how to assign variables to different facets, a general\n    rule is that it makes sense to use ``hue`` for the most important\n    comparison, followed by ``col`` and ``row``. However, always think about\n    your particular dataset and the goals of the visualization you are\n    creating.\n\n    {model_api}\n\n    The parameters to this function span most of the options in\n    :class:`FacetGrid`, although there may be occasional cases where you will\n    want to use that class and :func:`regplot` directly.\n\n    Parameters\n    ----------\n    {data}\n    x, y : strings, optional\n        Input variables; these should be column names in ``data``.\n    hue, col, row : strings\n        Variables that define subsets of the data, which will be drawn on\n        separate facets in the grid. See the ``*_order`` parameters to control\n        the order of levels of this variable.\n    {palette}\n    {col_wrap}\n    {height}\n    {aspect}\n    markers : matplotlib marker code or list of marker codes, optional\n        Markers for the scatterplot. If a list, each marker in the list will be\n        used for each level of the ``hue`` variable.\n    {share_xy}\n\n        .. deprecated:: 0.12.0\n            Pass using the `facet_kws` dictionary.\n\n    {{hue,col,row}}_order : lists, optional\n        Order for the levels of the faceting variables. By default, this will\n        be the order that the levels appear in ``data`` or, if the variables\n        are pandas categoricals, the category order.\n    legend : bool, optional\n        If ``True`` and there is a ``hue`` variable, add a legend.\n    {legend_out}\n\n        .. deprecated:: 0.12.0\n            Pass using the `facet_kws` dictionary.\n\n    {x_estimator}\n    {x_bins}\n    {x_ci}\n    {scatter}\n    {fit_reg}\n    {ci}\n    {n_boot}\n    {units}\n    {seed}\n    {order}\n    {logistic}\n    {lowess}\n    {robust}\n    {logx}\n    {xy_partial}\n    {truncate}\n    {xy_jitter}\n    {scatter_line_kws}\n    facet_kws : dict\n        Dictionary of keyword arguments for :class:`FacetGrid`.\n\n    See Also\n    --------\n    regplot : Plot data and a conditional model fit.\n    FacetGrid : Subplot grid for plotting conditional relationships.\n    pairplot : Combine :func:`regplot` and :class:`PairGrid` (when used with\n               ``kind=\"reg\"``).\n\n    Notes\n    -----\n\n    {regplot_vs_lmplot}\n\n    Examples\n    --------\n\n    These examples focus on basic regression model plots to exhibit the\n    various faceting options; see the :func:`regplot` docs for demonstrations\n    of the other options for plotting the data and models. There are also\n    other examples for how to manipulate plot using the returned object on\n    the :class:`FacetGrid` docs.\n\n    Plot a simple linear relationship between two variables:\n\n    .. plot::\n        :context: close-figs\n\n        >>> import seaborn as sns; sns.set_theme(color_codes=True)\n        >>> tips = sns.load_dataset(\"tips\")\n        >>> g = sns.lmplot(x=\"total_bill\", y=\"tip\", data=tips)\n\n    Condition on a third variable and plot the levels in different colors:\n\n    .. plot::\n        :context: close-figs\n\n        >>> g = sns.lmplot(x=\"total_bill\", y=\"tip\", hue=\"smoker\", data=tips)\n\n    Use different markers as well as colors so the plot will reproduce to\n    black-and-white more easily:\n\n    .. plot::\n        :context: close-figs\n\n        >>> g = sns.lmplot(x=\"total_bill\", y=\"tip\", hue=\"smoker\", data=tips,\n        ...                markers=[\"o\", \"x\"])\n\n    Use a different color palette:\n\n    .. plot::\n        :context: close-figs\n\n        >>> g = sns.lmplot(x=\"total_bill\", y=\"tip\", hue=\"smoker\", data=tips,\n        ...                palette=\"Set1\")\n\n    Map ``hue`` levels to colors with a dictionary:\n\n    .. plot::\n        :context: close-figs\n\n        >>> g = sns.lmplot(x=\"total_bill\", y=\"tip\", hue=\"smoker\", data=tips,\n        ...                palette=dict(Yes=\"g\", No=\"m\"))\n\n    Plot the levels of the third variable across different columns:\n\n    .. plot::\n        :context: close-figs\n\n        >>> g = sns.lmplot(x=\"total_bill\", y=\"tip\", col=\"smoker\", data=tips)\n\n    Change the height and aspect ratio of the facets:\n\n    .. plot::\n        :context: close-figs\n\n        >>> g = sns.lmplot(x=\"size\", y=\"total_bill\", hue=\"day\", col=\"day\",\n        ...                data=tips, height=6, aspect=.4, x_jitter=.1)\n\n    Wrap the levels of the column variable into multiple rows:\n\n    .. plot::\n        :context: close-figs\n\n        >>> g = sns.lmplot(x=\"total_bill\", y=\"tip\", col=\"day\", hue=\"day\",\n        ...                data=tips, col_wrap=2, height=3)\n\n    Condition on two variables to make a full grid:\n\n    .. plot::\n        :context: close-figs\n\n        >>> g = sns.lmplot(x=\"total_bill\", y=\"tip\", row=\"sex\", col=\"time\",\n        ...                data=tips, height=3)\n\n    Use methods on the returned :class:`FacetGrid` instance to further tweak\n    the plot:\n\n    .. plot::\n        :context: close-figs\n\n        >>> g = sns.lmplot(x=\"total_bill\", y=\"tip\", row=\"sex\", col=\"time\",\n        ...                data=tips, height=3)\n        >>> g = (g.set_axis_labels(\"Total bill (US Dollars)\", \"Tip\")\n        ...       .set(xlim=(0, 60), ylim=(0, 12),\n        ...            xticks=[10, 30, 50], yticks=[2, 6, 10])\n        ...       .fig.subplots_adjust(wspace=.02))\n\n\n\n    \"\"\").format(**_regression_docs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py_regplot_regplot.return.ax": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py_regplot_regplot.return.ax", "embedding": null, "metadata": {"file_path": "seaborn/regression.py", "file_name": "regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 832, "end_line": 856, "span_ids": ["regplot"], "tokens": 279}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def regplot(\n    data=None, *, x=None, y=None,\n    x_estimator=None, x_bins=None, x_ci=\"ci\",\n    scatter=True, fit_reg=True, ci=95, n_boot=1000, units=None,\n    seed=None, order=1, logistic=False, lowess=False, robust=False,\n    logx=False, x_partial=None, y_partial=None,\n    truncate=True, dropna=True, x_jitter=None, y_jitter=None,\n    label=None, color=None, marker=\"o\",\n    scatter_kws=None, line_kws=None, ax=None\n):\n\n    plotter = _RegressionPlotter(x, y, data, x_estimator, x_bins, x_ci,\n                                 scatter, fit_reg, ci, n_boot, units, seed,\n                                 order, logistic, lowess, robust, logx,\n                                 x_partial, y_partial, truncate, dropna,\n                                 x_jitter, y_jitter, color, label)\n\n    if ax is None:\n        ax = plt.gca()\n\n    scatter_kws = {} if scatter_kws is None else copy.copy(scatter_kws)\n    scatter_kws[\"marker\"] = marker\n    line_kws = {} if line_kws is None else copy.copy(line_kws)\n    plotter.plot(ax, scatter_kws, line_kws)\n    return ax", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py_regplot.__doc___regplot.__doc__.dedent_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py_regplot.__doc___regplot.__doc__.dedent_", "embedding": null, "metadata": {"file_path": "seaborn/regression.py", "file_name": "regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 859, "end_line": 1025, "span_ids": ["impl:16"], "tokens": 1275}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "regplot.__doc__ = dedent(\"\"\"\\\n    Plot data and a linear regression model fit.\n\n    {model_api}\n\n    Parameters\n    ----------\n    x, y: string, series, or vector array\n        Input variables. If strings, these should correspond with column names\n        in ``data``. When pandas objects are used, axes will be labeled with\n        the series name.\n    {data}\n    {x_estimator}\n    {x_bins}\n    {x_ci}\n    {scatter}\n    {fit_reg}\n    {ci}\n    {n_boot}\n    {units}\n    {seed}\n    {order}\n    {logistic}\n    {lowess}\n    {robust}\n    {logx}\n    {xy_partial}\n    {truncate}\n    {xy_jitter}\n    label : string\n        Label to apply to either the scatterplot or regression line (if\n        ``scatter`` is ``False``) for use in a legend.\n    color : matplotlib color\n        Color to apply to all plot elements; will be superseded by colors\n        passed in ``scatter_kws`` or ``line_kws``.\n    marker : matplotlib marker code\n        Marker to use for the scatterplot glyphs.\n    {scatter_line_kws}\n    ax : matplotlib Axes, optional\n        Axes object to draw the plot onto, otherwise uses the current Axes.\n\n    Returns\n    -------\n    ax : matplotlib Axes\n        The Axes object containing the plot.\n\n    See Also\n    --------\n    lmplot : Combine :func:`regplot` and :class:`FacetGrid` to plot multiple\n             linear relationships in a dataset.\n    jointplot : Combine :func:`regplot` and :class:`JointGrid` (when used with\n                ``kind=\"reg\"``).\n    pairplot : Combine :func:`regplot` and :class:`PairGrid` (when used with\n               ``kind=\"reg\"``).\n    residplot : Plot the residuals of a linear regression model.\n\n    Notes\n    -----\n\n    {regplot_vs_lmplot}\n\n\n    It's also easy to combine :func:`regplot` and :class:`JointGrid` or\n    :class:`PairGrid` through the :func:`jointplot` and :func:`pairplot`\n    functions, although these do not directly accept all of :func:`regplot`'s\n    parameters.\n\n    Examples\n    --------\n\n    Plot the relationship between two variables in a DataFrame:\n\n    .. plot::\n        :context: close-figs\n\n        >>> import seaborn as sns; sns.set_theme(color_codes=True)\n        >>> tips = sns.load_dataset(\"tips\")\n        >>> ax = sns.regplot(x=\"total_bill\", y=\"tip\", data=tips)\n\n    Plot with two variables defined as numpy arrays; use a different color:\n\n    .. plot::\n        :context: close-figs\n\n        >>> import numpy as np; np.random.seed(8)\n        >>> mean, cov = [4, 6], [(1.5, .7), (.7, 1)]\n        >>> x, y = np.random.multivariate_normal(mean, cov, 80).T\n        >>> ax = sns.regplot(x=x, y=y, color=\"g\")\n\n    Plot with two variables defined as pandas Series; use a different marker:\n\n    .. plot::\n        :context: close-figs\n\n        >>> import pandas as pd\n        >>> x, y = pd.Series(x, name=\"x_var\"), pd.Series(y, name=\"y_var\")\n        >>> ax = sns.regplot(x=x, y=y, marker=\"+\")\n\n    Use a 68% confidence interval, which corresponds with the standard error\n    of the estimate, and extend the regression line to the axis limits:\n\n    .. plot::\n        :context: close-figs\n\n        >>> ax = sns.regplot(x=x, y=y, ci=68, truncate=False)\n\n    Plot with a discrete ``x`` variable and add some jitter:\n\n    .. plot::\n        :context: close-figs\n\n        >>> ax = sns.regplot(x=\"size\", y=\"total_bill\", data=tips, x_jitter=.1)\n\n    Plot with a discrete ``x`` variable showing means and confidence intervals\n    for unique values:\n\n    .. plot::\n        :context: close-figs\n\n        >>> ax = sns.regplot(x=\"size\", y=\"total_bill\", data=tips,\n        ...                  x_estimator=np.mean)\n\n    Plot with a continuous variable divided into discrete bins:\n\n    .. plot::\n        :context: close-figs\n\n        >>> ax = sns.regplot(x=x, y=y, x_bins=4)\n\n    Fit a higher-order polynomial regression:\n\n    .. plot::\n        :context: close-figs\n\n        >>> ans = sns.load_dataset(\"anscombe\")\n        >>> ax = sns.regplot(x=\"x\", y=\"y\", data=ans.loc[ans.dataset == \"II\"],\n        ...                  scatter_kws={{\"s\": 80}},\n        ...                  order=2, ci=None)\n\n    Fit a robust regression and don't plot a confidence interval:\n\n    .. plot::\n        :context: close-figs\n\n        >>> ax = sns.regplot(x=\"x\", y=\"y\", data=ans.loc[ans.dataset == \"III\"],\n        ...                  scatter_kws={{\"s\": 80}},\n        ...                  robust=True, ci=None)\n\n    Fit a logistic regression; jitter the y variable and use fewer bootstrap\n    iterations:\n\n    .. plot::\n        :context: close-figs\n\n        >>> tips[\"big_tip\"] = (tips.tip / tips.total_bill) > .175\n        >>> ax = sns.regplot(x=\"total_bill\", y=\"big_tip\", data=tips,\n        ...                  logistic=True, n_boot=500, y_jitter=.03)\n\n    Fit the regression model using log(x):\n\n    .. plot::\n        :context: close-figs\n\n        >>> ax = sns.regplot(x=\"size\", y=\"total_bill\", data=tips,\n        ...                  x_estimator=np.mean, logx=True)\n\n    \"\"\").format(**_regression_docs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py_residplot_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py_residplot_", "embedding": null, "metadata": {"file_path": "seaborn/regression.py", "file_name": "regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1028, "end_line": 1110, "span_ids": ["residplot"], "tokens": 715}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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    \"\"\"\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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_warnings__relational_narrative.DocstringComponents_dict_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_warnings__relational_narrative.DocstringComponents_dict_", "embedding": null, "metadata": {"file_path": "seaborn/relational.py", "file_name": "relational.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 50, "span_ids": ["impl", "imports"], "tokens": 384}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import warnings\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\n\nfrom ._oldcore import (\n    VectorPlotter,\n)\nfrom .utils import (\n    locator_to_legend_entries,\n    adjust_legend_subtitles,\n    _default_color,\n    _deprecate_ci,\n)\nfrom ._statistics import EstimateAggregator\nfrom .axisgrid import FacetGrid, _facet_docs\nfrom ._docstrings import DocstringComponents, _core_docs\n\n\n__all__ = [\"relplot\", \"scatterplot\", \"lineplot\"]\n\n\n_relational_narrative = DocstringComponents(dict(\n\n    # ---  Introductory prose\n    main_api=\"\"\"\nThe relationship between `x` and `y` can be shown for different subsets\nof the data using the `hue`, `size`, and `style` parameters. These\nparameters control what visual semantics are used to identify the different\nsubsets. It is possible to show up to three dimensions independently by\nusing all three semantic types, but this style of plot can be hard to\ninterpret and is often ineffective. Using redundant semantics (i.e. both\n`hue` and `style` for the same variable) can be helpful for making\ngraphics more accessible.\n\nSee the :ref:`tutorial ` for more information.\n    \"\"\",\n\n    relational_semantic=\"\"\"\nThe default treatment of the `hue` (and to a lesser extent, `size`)\nsemantic, if present, depends on whether the variable is inferred to\nrepresent \"numeric\" or \"categorical\" data. In particular, numeric variables\nare represented with a sequential colormap by default, and the legend\nentries show regular \"ticks\" with values that may or may not exist in the\ndata. This behavior can be controlled through various parameters, as\ndescribed and illustrated below.\n    \"\"\",\n))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__relational_docs__relational_docs.dict_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__relational_docs__relational_docs.dict_", "embedding": null, "metadata": {"file_path": "seaborn/relational.py", "file_name": "relational.py", "file_type": "text/x-python", "category": "implementation", "start_line": 52, "end_line": 173, "span_ids": ["impl"], "tokens": 1142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "_relational_docs = dict(\n\n    # --- Shared function parameters\n    data_vars=\"\"\"\nx, y : names of variables in `data` or vector data\n    Input data variables; must be numeric. Can pass data directly or\n    reference columns in `data`.\n    \"\"\",\n    data=\"\"\"\ndata : DataFrame, array, or list of arrays\n    Input data structure. If `x` and `y` are specified as names, this\n    should be a \"long-form\" DataFrame containing those columns. Otherwise\n    it is treated as \"wide-form\" data and grouping variables are ignored.\n    See the examples for the various ways this parameter can be specified\n    and the different effects of each.\n    \"\"\",\n    palette=\"\"\"\npalette : string, list, dict, or matplotlib colormap\n    An object that determines how colors are chosen when `hue` is used.\n    It can be the name of a seaborn palette or matplotlib colormap, a list\n    of colors (anything matplotlib understands), a dict mapping levels\n    of the `hue` variable to colors, or a matplotlib colormap object.\n    \"\"\",\n    hue_order=\"\"\"\nhue_order : list\n    Specified order for the appearance of the `hue` variable levels,\n    otherwise they are determined from the data. Not relevant when the\n    `hue` variable is numeric.\n    \"\"\",\n    hue_norm=\"\"\"\nhue_norm : tuple or :class:`matplotlib.colors.Normalize` object\n    Normalization in data units for colormap applied to the `hue`\n    variable when it is numeric. Not relevant if `hue` is categorical.\n    \"\"\",\n    sizes=\"\"\"\nsizes : list, dict, or tuple\n    An object that determines how sizes are chosen when `size` is used.\n    List or dict arguments should provide a size for each unique data value,\n    which forces a categorical interpretation. The argument may also be a\n    min, max tuple.\n    \"\"\",\n    size_order=\"\"\"\nsize_order : list\n    Specified order for appearance of the `size` variable levels,\n    otherwise they are determined from the data. Not relevant when the\n    `size` variable is numeric.\n    \"\"\",\n    size_norm=\"\"\"\nsize_norm : tuple or Normalize object\n    Normalization in data units for scaling plot objects when the\n    `size` variable is numeric.\n    \"\"\",\n    dashes=\"\"\"\ndashes : boolean, list, or dictionary\n    Object determining how to draw the lines for different levels of the\n    `style` variable. Setting to `True` will use default dash codes, or\n    you can pass a list of dash codes or a dictionary mapping levels of the\n    `style` variable to dash codes. Setting to `False` will use solid\n    lines for all subsets. Dashes are specified as in matplotlib: a tuple\n    of `(segment, gap)` lengths, or an empty string to draw a solid line.\n    \"\"\",\n    markers=\"\"\"\nmarkers : boolean, list, or dictionary\n    Object determining how to draw the markers for different levels of the\n    `style` variable. Setting to `True` will use default markers, or\n    you can pass a list of markers or a dictionary mapping levels of the\n    `style` variable to markers. Setting to `False` will draw\n    marker-less lines.  Markers are specified as in matplotlib.\n    \"\"\",\n    style_order=\"\"\"\nstyle_order : list\n    Specified order for appearance of the `style` variable levels\n    otherwise they are determined from the data. Not relevant when the\n    `style` variable is numeric.\n    \"\"\",\n    units=\"\"\"\nunits : vector or key in `data`\n    Grouping variable identifying sampling units. When used, a separate\n    line will be drawn for each unit with appropriate semantics, but no\n    legend entry will be added. Useful for showing distribution of\n    experimental replicates when exact identities are not needed.\n    \"\"\",\n    estimator=\"\"\"\nestimator : name of pandas method or callable or None\n    Method for aggregating across multiple observations of the `y`\n    variable at the same `x` level. If `None`, all observations will\n    be drawn.\n    \"\"\",\n    ci=\"\"\"\nci : int or \"sd\" or None\n    Size of the confidence interval to draw when aggregating.\n\n    .. deprecated:: 0.12.0\n        Use the new `errorbar` parameter for more flexibility.\n\n    \"\"\",\n    n_boot=\"\"\"\nn_boot : int\n    Number of bootstraps to use for computing the confidence interval.\n    \"\"\",\n    seed=\"\"\"\nseed : int, numpy.random.Generator, or numpy.random.RandomState\n    Seed or random number generator for reproducible bootstrapping.\n    \"\"\",\n    legend=\"\"\"\nlegend : \"auto\", \"brief\", \"full\", or False\n    How to draw the legend. If \"brief\", numeric `hue` and `size`\n    variables will be represented with a sample of evenly spaced values.\n    If \"full\", every group will get an entry in the legend. If \"auto\",\n    choose between brief or full representation based on number of levels.\n    If `False`, no legend data is added and no legend is drawn.\n    \"\"\",\n    ax_in=\"\"\"\nax : matplotlib Axes\n    Axes object to draw the plot onto, otherwise uses the current Axes.\n    \"\"\",\n    ax_out=\"\"\"\nax : matplotlib Axes\n    Returns the Axes object with the plot drawn onto it.\n    \"\"\",\n\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__param_docs__RelationalPlotter.add_legend_data.brief_size.self__size_map_map_type_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__param_docs__RelationalPlotter.add_legend_data.brief_size.self__size_map_map_type_", "embedding": null, "metadata": {"file_path": "seaborn/relational.py", "file_name": "relational.py", "file_type": "text/x-python", "category": "implementation", "start_line": 177, "end_line": 270, "span_ids": ["impl:7", "_RelationalPlotter.add_legend_data", "_RelationalPlotter"], "tokens": 779}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "_param_docs = DocstringComponents.from_nested_components(\n    core=_core_docs[\"params\"],\n    facets=DocstringComponents(_facet_docs),\n    rel=DocstringComponents(_relational_docs),\n    stat=DocstringComponents.from_function_params(EstimateAggregator.__init__),\n)\n\n\nclass _RelationalPlotter(VectorPlotter):\n\n    wide_structure = {\n        \"x\": \"@index\", \"y\": \"@values\", \"hue\": \"@columns\", \"style\": \"@columns\",\n    }\n\n    # TODO where best to define default parameters?\n    sort = True\n\n    def add_legend_data(self, ax):\n        \"\"\"Add labeled artists to represent the different plot semantics.\"\"\"\n        verbosity = self.legend\n        if isinstance(verbosity, str) and verbosity not in [\"auto\", \"brief\", \"full\"]:\n            err = \"`legend` must be 'auto', 'brief', 'full', or a boolean.\"\n            raise ValueError(err)\n        elif verbosity is True:\n            verbosity = \"auto\"\n\n        legend_kwargs = {}\n        keys = []\n\n        # Assign a legend title if there is only going to be one sub-legend,\n        # otherwise, subtitles will be inserted into the texts list with an\n        # invisible handle (which is a hack)\n        titles = {\n            title for title in\n            (self.variables.get(v, None) for v in [\"hue\", \"size\", \"style\"])\n            if title is not None\n        }\n        if len(titles) == 1:\n            legend_title = titles.pop()\n        else:\n            legend_title = \"\"\n\n        title_kws = dict(\n            visible=False, color=\"w\", s=0, linewidth=0, marker=\"\", dashes=\"\"\n        )\n\n        def update(var_name, val_name, **kws):\n\n            key = var_name, val_name\n            if key in legend_kwargs:\n                legend_kwargs[key].update(**kws)\n            else:\n                keys.append(key)\n\n                legend_kwargs[key] = dict(**kws)\n\n        # Define the maximum number of ticks to use for \"brief\" legends\n        brief_ticks = 6\n\n        # -- Add a legend for hue semantics\n        brief_hue = self._hue_map.map_type == \"numeric\" and (\n            verbosity == \"brief\"\n            or (verbosity == \"auto\" and len(self._hue_map.levels) > brief_ticks)\n        )\n        if brief_hue:\n            if isinstance(self._hue_map.norm, mpl.colors.LogNorm):\n                locator = mpl.ticker.LogLocator(numticks=brief_ticks)\n            else:\n                locator = mpl.ticker.MaxNLocator(nbins=brief_ticks)\n            limits = min(self._hue_map.levels), max(self._hue_map.levels)\n            hue_levels, hue_formatted_levels = locator_to_legend_entries(\n                locator, limits, self.plot_data[\"hue\"].infer_objects().dtype\n            )\n        elif self._hue_map.levels is None:\n            hue_levels = hue_formatted_levels = []\n        else:\n            hue_levels = hue_formatted_levels = self._hue_map.levels\n\n        # Add the hue semantic subtitle\n        if not legend_title and self.variables.get(\"hue\", None) is not None:\n            update((self.variables[\"hue\"], \"title\"),\n                   self.variables[\"hue\"], **title_kws)\n\n        # Add the hue semantic labels\n        for level, formatted_level in zip(hue_levels, hue_formatted_levels):\n            if level is not None:\n                color = self._hue_map(level)\n                update(self.variables[\"hue\"], formatted_level, color=color)\n\n        # -- Add a legend for size semantics\n        brief_size = self._size_map.map_type == \"numeric\" and (\n            verbosity == \"brief\"\n            or (verbosity == \"auto\" and len(self._size_map.levels) > brief_ticks)\n        )\n        # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__RelationalPlotter.add_legend_data.if_brief_size___RelationalPlotter.add_legend_data.self.legend_order.legend_order": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__RelationalPlotter.add_legend_data.if_brief_size___RelationalPlotter.add_legend_data.self.legend_order.legend_order", "embedding": null, "metadata": {"file_path": "seaborn/relational.py", "file_name": "relational.py", "file_type": "text/x-python", "category": "implementation", "start_line": 271, "end_line": 344, "span_ids": ["_RelationalPlotter.add_legend_data"], "tokens": 584}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _RelationalPlotter(VectorPlotter):\n\n    def add_legend_data(self, ax):\n        # ... other code\n        if brief_size:\n            # Define how ticks will interpolate between the min/max data values\n            if isinstance(self._size_map.norm, mpl.colors.LogNorm):\n                locator = mpl.ticker.LogLocator(numticks=brief_ticks)\n            else:\n                locator = mpl.ticker.MaxNLocator(nbins=brief_ticks)\n            # Define the min/max data values\n            limits = min(self._size_map.levels), max(self._size_map.levels)\n            size_levels, size_formatted_levels = locator_to_legend_entries(\n                locator, limits, self.plot_data[\"size\"].infer_objects().dtype\n            )\n        elif self._size_map.levels is None:\n            size_levels = size_formatted_levels = []\n        else:\n            size_levels = size_formatted_levels = self._size_map.levels\n\n        # Add the size semantic subtitle\n        if not legend_title and self.variables.get(\"size\", None) is not None:\n            update((self.variables[\"size\"], \"title\"),\n                   self.variables[\"size\"], **title_kws)\n\n        # Add the size semantic labels\n        for level, formatted_level in zip(size_levels, size_formatted_levels):\n            if level is not None:\n                size = self._size_map(level)\n                update(\n                    self.variables[\"size\"],\n                    formatted_level,\n                    linewidth=size,\n                    s=size,\n                )\n\n        # -- Add a legend for style semantics\n\n        # Add the style semantic title\n        if not legend_title and self.variables.get(\"style\", None) is not None:\n            update((self.variables[\"style\"], \"title\"),\n                   self.variables[\"style\"], **title_kws)\n\n        # Add the style semantic labels\n        if self._style_map.levels is not None:\n            for level in self._style_map.levels:\n                if level is not None:\n                    attrs = self._style_map(level)\n                    update(\n                        self.variables[\"style\"],\n                        level,\n                        marker=attrs.get(\"marker\", \"\"),\n                        dashes=attrs.get(\"dashes\", \"\"),\n                    )\n\n        func = getattr(ax, self._legend_func)\n\n        legend_data = {}\n        legend_order = []\n\n        for key in keys:\n\n            _, label = key\n            kws = legend_kwargs[key]\n            kws.setdefault(\"color\", \".2\")\n            use_kws = {}\n            for attr in self._legend_attributes + [\"visible\"]:\n                if attr in kws:\n                    use_kws[attr] = kws[attr]\n            artist = func([], [], label=label, **use_kws)\n            if self._legend_func == \"plot\":\n                artist = artist[0]\n            legend_data[key] = artist\n            legend_order.append(key)\n\n        self.legend_title = legend_title\n        self.legend_data = legend_data\n        self.legend_order = legend_order", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__LinePlotter__LinePlotter.__init__.self.legend.legend": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__LinePlotter__LinePlotter.__init__.self.legend.legend", "embedding": null, "metadata": {"file_path": "seaborn/relational.py", "file_name": "relational.py", "file_type": "text/x-python", "category": "implementation", "start_line": 346, "end_line": 376, "span_ids": ["_LinePlotter"], "tokens": 251}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _LinePlotter(_RelationalPlotter):\n\n    _legend_attributes = [\"color\", \"linewidth\", \"marker\", \"dashes\"]\n    _legend_func = \"plot\"\n\n    def __init__(\n        self, *,\n        data=None, variables={},\n        estimator=None, n_boot=None, seed=None, errorbar=None,\n        sort=True, orient=\"x\", err_style=None, err_kws=None, legend=None\n    ):\n\n        # TODO this is messy, we want the mapping to be agnostic about\n        # the kind of plot to draw, but for the time being we need to set\n        # this information so the SizeMapping can use it\n        self._default_size_range = (\n            np.r_[.5, 2] * mpl.rcParams[\"lines.linewidth\"]\n        )\n\n        super().__init__(data=data, variables=variables)\n\n        self.estimator = estimator\n        self.errorbar = errorbar\n        self.n_boot = n_boot\n        self.seed = seed\n        self.sort = sort\n        self.orient = orient\n        self.err_style = err_style\n        self.err_kws = {} if err_kws is None else err_kws\n\n        self.legend = legend", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__LinePlotter.plot__LinePlotter.plot.grouping_vars._hue_size_style_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__LinePlotter.plot__LinePlotter.plot.grouping_vars._hue_size_style_", "embedding": null, "metadata": {"file_path": "seaborn/relational.py", "file_name": "relational.py", "file_type": "text/x-python", "category": "implementation", "start_line": 378, "end_line": 422, "span_ids": ["_LinePlotter.plot"], "tokens": 524}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _LinePlotter(_RelationalPlotter):\n\n    def plot(self, ax, kws):\n        \"\"\"Draw the plot onto an axes, passing matplotlib kwargs.\"\"\"\n\n        # Draw a test plot, using the passed in kwargs. The goal here is to\n        # honor both (a) the current state of the plot cycler and (b) the\n        # specified kwargs on all the lines we will draw, overriding when\n        # relevant with the data semantics. Note that we won't cycle\n        # internally; in other words, if `hue` is not used, all elements will\n        # have the same color, but they will have the color that you would have\n        # gotten from the corresponding matplotlib function, and calling the\n        # function will advance the axes property cycle.\n\n        kws.setdefault(\"markeredgewidth\", kws.pop(\"mew\", .75))\n        kws.setdefault(\"markeredgecolor\", kws.pop(\"mec\", \"w\"))\n\n        # Set default error kwargs\n        err_kws = self.err_kws.copy()\n        if self.err_style == \"band\":\n            err_kws.setdefault(\"alpha\", .2)\n        elif self.err_style == \"bars\":\n            pass\n        elif self.err_style is not None:\n            err = \"`err_style` must be 'band' or 'bars', not {}\"\n            raise ValueError(err.format(self.err_style))\n\n        # Initialize the aggregation object\n        agg = EstimateAggregator(\n            self.estimator, self.errorbar, n_boot=self.n_boot, seed=self.seed,\n        )\n\n        # TODO abstract variable to aggregate over here-ish. Better name?\n        orient = self.orient\n        if orient not in {\"x\", \"y\"}:\n            err = f\"`orient` must be either 'x' or 'y', not {orient!r}.\"\n            raise ValueError(err)\n        other = {\"x\": \"y\", \"y\": \"x\"}[orient]\n\n        # TODO How to handle NA? We don't want NA to propagate through to the\n        # estimate/CI when some values are present, but we would also like\n        # matplotlib to show \"gaps\" in the line when all values are missing.\n        # This is straightforward absent aggregation, but complicated with it.\n        # If we want to use nas, we need to conditionalize dropna in iter_data.\n\n        # Loop over the semantic subsets and add to the plot\n        grouping_vars = \"hue\", \"size\", \"style\"\n        # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__LinePlotter.plot.for_sub_vars_sub_data_in__LinePlotter.plot.if_self_legend_.if_handles_.adjust_legend_subtitles_l": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__LinePlotter.plot.for_sub_vars_sub_data_in__LinePlotter.plot.if_self_legend_.if_handles_.adjust_legend_subtitles_l", "embedding": null, "metadata": {"file_path": "seaborn/relational.py", "file_name": "relational.py", "file_type": "text/x-python", "category": "implementation", "start_line": 423, "end_line": 515, "span_ids": ["_LinePlotter.plot"], "tokens": 769}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _LinePlotter(_RelationalPlotter):\n\n    def plot(self, ax, kws):\n        # ... other code\n        for sub_vars, sub_data in self.iter_data(grouping_vars, from_comp_data=True):\n\n            if self.sort:\n                sort_vars = [\"units\", orient, other]\n                sort_cols = [var for var in sort_vars if var in self.variables]\n                sub_data = sub_data.sort_values(sort_cols)\n\n            if self.estimator is not None:\n                if \"units\" in self.variables:\n                    # TODO eventually relax this constraint\n                    err = \"estimator must be None when specifying units\"\n                    raise ValueError(err)\n                grouped = sub_data.groupby(orient, sort=self.sort)\n                # Could pass as_index=False instead of reset_index,\n                # but that fails on a corner case with older pandas.\n                sub_data = grouped.apply(agg, other).reset_index()\n\n            # TODO this is pretty ad hoc ; see GH2409\n            for var in \"xy\":\n                if self._log_scaled(var):\n                    for col in sub_data.filter(regex=f\"^{var}\"):\n                        sub_data[col] = np.power(10, sub_data[col])\n\n            # --- Draw the main line(s)\n\n            if \"units\" in self.variables:   # XXX why not add to grouping variables?\n                lines = []\n                for _, unit_data in sub_data.groupby(\"units\"):\n                    lines.extend(ax.plot(unit_data[\"x\"], unit_data[\"y\"], **kws))\n            else:\n                lines = ax.plot(sub_data[\"x\"], sub_data[\"y\"], **kws)\n\n            for line in lines:\n\n                if \"hue\" in sub_vars:\n                    line.set_color(self._hue_map(sub_vars[\"hue\"]))\n\n                if \"size\" in sub_vars:\n                    line.set_linewidth(self._size_map(sub_vars[\"size\"]))\n\n                if \"style\" in sub_vars:\n                    attributes = self._style_map(sub_vars[\"style\"])\n                    if \"dashes\" in attributes:\n                        line.set_dashes(attributes[\"dashes\"])\n                    if \"marker\" in attributes:\n                        line.set_marker(attributes[\"marker\"])\n\n            line_color = line.get_color()\n            line_alpha = line.get_alpha()\n            line_capstyle = line.get_solid_capstyle()\n\n            # --- Draw the confidence intervals\n\n            if self.estimator is not None and self.errorbar is not None:\n\n                # TODO handling of orientation will need to happen here\n\n                if self.err_style == \"band\":\n\n                    func = {\"x\": ax.fill_between, \"y\": ax.fill_betweenx}[orient]\n                    func(\n                        sub_data[orient],\n                        sub_data[f\"{other}min\"], sub_data[f\"{other}max\"],\n                        color=line_color, **err_kws\n                    )\n\n                elif self.err_style == \"bars\":\n\n                    error_param = {\n                        f\"{other}err\": (\n                            sub_data[other] - sub_data[f\"{other}min\"],\n                            sub_data[f\"{other}max\"] - sub_data[other],\n                        )\n                    }\n                    ebars = ax.errorbar(\n                        sub_data[\"x\"], sub_data[\"y\"], **error_param,\n                        linestyle=\"\", color=line_color, alpha=line_alpha,\n                        **err_kws\n                    )\n\n                    # Set the capstyle properly on the error bars\n                    for obj in ebars.get_children():\n                        if isinstance(obj, mpl.collections.LineCollection):\n                            obj.set_capstyle(line_capstyle)\n\n        # Finalize the axes details\n        self._add_axis_labels(ax)\n        if self.legend:\n            self.add_legend_data(ax)\n            handles, _ = ax.get_legend_handles_labels()\n            if handles:\n                legend = ax.legend(title=self.legend_title)\n                adjust_legend_subtitles(legend)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__ScatterPlotter__ScatterPlotter.__init__.self.legend.legend": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__ScatterPlotter__ScatterPlotter.__init__.self.legend.legend", "embedding": null, "metadata": {"file_path": "seaborn/relational.py", "file_name": "relational.py", "file_type": "text/x-python", "category": "implementation", "start_line": 518, "end_line": 534, "span_ids": ["_ScatterPlotter"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _ScatterPlotter(_RelationalPlotter):\n\n    _legend_attributes = [\"color\", \"s\", \"marker\"]\n    _legend_func = \"scatter\"\n\n    def __init__(self, *, data=None, variables={}, legend=None):\n\n        # TODO this is messy, we want the mapping to be agnostic about\n        # the kind of plot to draw, but for the time being we need to set\n        # this information so the SizeMapping can use it\n        self._default_size_range = (\n            np.r_[.5, 2] * np.square(mpl.rcParams[\"lines.markersize\"])\n        )\n\n        super().__init__(data=data, variables=variables)\n\n        self.legend = legend", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__ScatterPlotter.plot__ScatterPlotter.plot.if_self_legend_.if_handles_.adjust_legend_subtitles_l": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py__ScatterPlotter.plot__ScatterPlotter.plot.if_self_legend_.if_handles_.adjust_legend_subtitles_l", "embedding": null, "metadata": {"file_path": "seaborn/relational.py", "file_name": "relational.py", "file_type": "text/x-python", "category": "implementation", "start_line": 536, "end_line": 594, "span_ids": ["_ScatterPlotter.plot"], "tokens": 503}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _ScatterPlotter(_RelationalPlotter):\n\n    def plot(self, ax, kws):\n\n        # --- Determine the visual attributes of the plot\n\n        data = self.plot_data.dropna()\n        if data.empty:\n            return\n\n        # Define the vectors of x and y positions\n        empty = np.full(len(data), np.nan)\n        x = data.get(\"x\", empty)\n        y = data.get(\"y\", empty)\n\n        if \"style\" in self.variables:\n            # Use a representative marker so scatter sets the edgecolor\n            # properly for line art markers. We currently enforce either\n            # all or none line art so this works.\n            example_level = self._style_map.levels[0]\n            example_marker = self._style_map(example_level, \"marker\")\n            kws.setdefault(\"marker\", example_marker)\n\n        # Conditionally set the marker edgecolor based on whether the marker is \"filled\"\n        # See https://github.com/matplotlib/matplotlib/issues/17849 for context\n        m = kws.get(\"marker\", mpl.rcParams.get(\"marker\", \"o\"))\n        if not isinstance(m, mpl.markers.MarkerStyle):\n            # TODO in more recent matplotlib (which?) can pass a MarkerStyle here\n            m = mpl.markers.MarkerStyle(m)\n        if m.is_filled():\n            kws.setdefault(\"edgecolor\", \"w\")\n\n        # Draw the scatter plot\n        points = ax.scatter(x=x, y=y, **kws)\n\n        # Apply the mapping from semantic variables to artist attributes\n\n        if \"hue\" in self.variables:\n            points.set_facecolors(self._hue_map(data[\"hue\"]))\n\n        if \"size\" in self.variables:\n            points.set_sizes(self._size_map(data[\"size\"]))\n\n        if \"style\" in self.variables:\n            p = [self._style_map(val, \"path\") for val in data[\"style\"]]\n            points.set_paths(p)\n\n        # Apply dependent default attributes\n\n        if \"linewidth\" not in kws:\n            sizes = points.get_sizes()\n            points.set_linewidths(.08 * np.sqrt(np.percentile(sizes, 10)))\n\n        # Finalize the axes details\n        self._add_axis_labels(ax)\n        if self.legend:\n            self.add_legend_data(ax)\n            handles, _ = ax.get_legend_handles_labels()\n            if handles:\n                legend = ax.legend(title=self.legend_title)\n                adjust_legend_subtitles(legend)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_lineplot_lineplot.return.ax": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_lineplot_lineplot.return.ax", "embedding": null, "metadata": {"file_path": "seaborn/relational.py", "file_name": "relational.py", "file_type": "text/x-python", "category": "implementation", "start_line": 597, "end_line": 640, "span_ids": ["lineplot"], "tokens": 416}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def lineplot(\n    data=None, *,\n    x=None, y=None, hue=None, size=None, style=None, units=None,\n    palette=None, hue_order=None, hue_norm=None,\n    sizes=None, size_order=None, size_norm=None,\n    dashes=True, markers=None, style_order=None,\n    estimator=\"mean\", errorbar=(\"ci\", 95), n_boot=1000, seed=None,\n    orient=\"x\", sort=True, err_style=\"band\", err_kws=None,\n    legend=\"auto\", ci=\"deprecated\", ax=None, **kwargs\n):\n\n    # Handle deprecation of ci parameter\n    errorbar = _deprecate_ci(errorbar, ci)\n\n    variables = _LinePlotter.get_semantics(locals())\n    p = _LinePlotter(\n        data=data, variables=variables,\n        estimator=estimator, n_boot=n_boot, seed=seed, errorbar=errorbar,\n        sort=sort, orient=orient, err_style=err_style, err_kws=err_kws,\n        legend=legend,\n    )\n\n    p.map_hue(palette=palette, order=hue_order, norm=hue_norm)\n    p.map_size(sizes=sizes, order=size_order, norm=size_norm)\n    p.map_style(markers=markers, dashes=dashes, order=style_order)\n\n    if ax is None:\n        ax = plt.gca()\n\n    if style is None and not {\"ls\", \"linestyle\"} & set(kwargs):  # XXX\n        kwargs[\"dashes\"] = \"\" if dashes is None or isinstance(dashes, bool) else dashes\n\n    if not p.has_xy_data:\n        return ax\n\n    p._attach(ax)\n\n    # Other functions have color as an explicit param,\n    # and we should probably do that here too\n    color = kwargs.pop(\"color\", kwargs.pop(\"c\", None))\n    kwargs[\"color\"] = _default_color(ax.plot, hue, color, kwargs)\n\n    p.plot(ax, kwargs)\n    return ax", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_lineplot.__doc___lineplot.__doc__._": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_lineplot.__doc___lineplot.__doc__._", "embedding": null, "metadata": {"file_path": "seaborn/relational.py", "file_name": "relational.py", "file_type": "text/x-python", "category": "implementation", "start_line": 643, "end_line": 723, "span_ids": ["impl:9"], "tokens": 560}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "lineplot.__doc__ = \"\"\"\\\nDraw a line plot with possibility of several semantic groupings.\n\n{narrative.main_api}\n\n{narrative.relational_semantic}\n\nBy default, the plot aggregates over multiple `y` values at each value of\n`x` and shows an estimate of the central tendency and a confidence\ninterval for that estimate.\n\nParameters\n----------\n{params.core.data}\n{params.core.xy}\nhue : vector or key in `data`\n    Grouping variable that will produce lines with different colors.\n    Can be either categorical or numeric, although color mapping will\n    behave differently in latter case.\nsize : vector or key in `data`\n    Grouping variable that will produce lines with different widths.\n    Can be either categorical or numeric, although size mapping will\n    behave differently in latter case.\nstyle : vector or key in `data`\n    Grouping variable that will produce lines with different dashes\n    and/or markers. Can have a numeric dtype but will always be treated\n    as categorical.\n{params.rel.units}\n{params.core.palette}\n{params.core.hue_order}\n{params.core.hue_norm}\n{params.rel.sizes}\n{params.rel.size_order}\n{params.rel.size_norm}\n{params.rel.dashes}\n{params.rel.markers}\n{params.rel.style_order}\n{params.rel.estimator}\n{params.stat.errorbar}\n{params.rel.n_boot}\n{params.rel.seed}\norient : \"x\" or \"y\"\n    Dimension along which the data are sorted / aggregated. Equivalently,\n    the \"independent variable\" of the resulting function.\nsort : boolean\n    If True, the data will be sorted by the x and y variables, otherwise\n    lines will connect points in the order they appear in the dataset.\nerr_style : \"band\" or \"bars\"\n    Whether to draw the confidence intervals with translucent error bands\n    or discrete error bars.\nerr_kws : dict of keyword arguments\n    Additional parameters to control the aesthetics of the error bars. The\n    kwargs are passed either to :meth:`matplotlib.axes.Axes.fill_between`\n    or :meth:`matplotlib.axes.Axes.errorbar`, depending on `err_style`.\n{params.rel.legend}\n{params.rel.ci}\n{params.core.ax}\nkwargs : key, value mappings\n    Other keyword arguments are passed down to\n    :meth:`matplotlib.axes.Axes.plot`.\n\nReturns\n-------\n{returns.ax}\n\nSee Also\n--------\n{seealso.scatterplot}\n{seealso.pointplot}\n\nExamples\n--------\n\n.. include:: ../docstrings/lineplot.rst\n\n\"\"\".format(\n    narrative=_relational_narrative,\n    params=_param_docs,\n    returns=_core_docs[\"returns\"],\n    seealso=_core_docs[\"seealso\"],\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_scatterplot_scatterplot.return.ax": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_scatterplot_scatterplot.return.ax", "embedding": null, "metadata": {"file_path": "seaborn/relational.py", "file_name": "relational.py", "file_type": "text/x-python", "category": "implementation", "start_line": 726, "end_line": 757, "span_ids": ["scatterplot"], "tokens": 243}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def scatterplot(\n    data=None, *,\n    x=None, y=None, hue=None, size=None, style=None,\n    palette=None, hue_order=None, hue_norm=None,\n    sizes=None, size_order=None, size_norm=None,\n    markers=True, style_order=None, legend=\"auto\", ax=None,\n    **kwargs\n):\n\n    variables = _ScatterPlotter.get_semantics(locals())\n    p = _ScatterPlotter(data=data, variables=variables, legend=legend)\n\n    p.map_hue(palette=palette, order=hue_order, norm=hue_norm)\n    p.map_size(sizes=sizes, order=size_order, norm=size_norm)\n    p.map_style(markers=markers, order=style_order)\n\n    if ax is None:\n        ax = plt.gca()\n\n    if not p.has_xy_data:\n        return ax\n\n    p._attach(ax)\n\n    # Other functions have color as an explicit param,\n    # and we should probably do that here too\n    color = kwargs.pop(\"color\", None)\n    kwargs[\"color\"] = _default_color(ax.scatter, hue, color, kwargs)\n\n    p.plot(ax, kwargs)\n\n    return ax", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_scatterplot.__doc___scatterplot.__doc__._": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_scatterplot.__doc___scatterplot.__doc__._", "embedding": null, "metadata": {"file_path": "seaborn/relational.py", "file_name": "relational.py", "file_type": "text/x-python", "category": "implementation", "start_line": 760, "end_line": 816, "span_ids": ["impl:11"], "tokens": 327}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "scatterplot.__doc__ = \"\"\"\\\nDraw a scatter plot with possibility of several semantic groupings.\n\n{narrative.main_api}\n\n{narrative.relational_semantic}\n\nParameters\n----------\n{params.core.data}\n{params.core.xy}\nhue : vector or key in `data`\n    Grouping variable that will produce points with different colors.\n    Can be either categorical or numeric, although color mapping will\n    behave differently in latter case.\nsize : vector or key in `data`\n    Grouping variable that will produce points with different sizes.\n    Can be either categorical or numeric, although size mapping will\n    behave differently in latter case.\nstyle : vector or key in `data`\n    Grouping variable that will produce points with different markers.\n    Can have a numeric dtype but will always be treated as categorical.\n{params.core.palette}\n{params.core.hue_order}\n{params.core.hue_norm}\n{params.rel.sizes}\n{params.rel.size_order}\n{params.rel.size_norm}\n{params.rel.markers}\n{params.rel.style_order}\n{params.rel.legend}\n{params.core.ax}\nkwargs : key, value mappings\n    Other keyword arguments are passed down to\n    :meth:`matplotlib.axes.Axes.scatter`.\n\nReturns\n-------\n{returns.ax}\n\nSee Also\n--------\n{seealso.lineplot}\n{seealso.stripplot}\n{seealso.swarmplot}\n\nExamples\n--------\n\n.. include:: ../docstrings/scatterplot.rst\n\n\"\"\".format(\n    narrative=_relational_narrative,\n    params=_param_docs,\n    returns=_core_docs[\"returns\"],\n    seealso=_core_docs[\"seealso\"],\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_relplot_relplot.plot_kws_update_plot_vari": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_relplot_relplot.plot_kws_update_plot_vari", "embedding": null, "metadata": {"file_path": "seaborn/relational.py", "file_name": "relational.py", "file_type": "text/x-python", "category": "implementation", "start_line": 846, "end_line": 950, "span_ids": ["relplot"], "tokens": 840}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def relplot(\n    data=None, *,\n    x=None, y=None, hue=None, size=None, style=None, units=None,\n    row=None, col=None, col_wrap=None, row_order=None, col_order=None,\n    palette=None, hue_order=None, hue_norm=None,\n    sizes=None, size_order=None, size_norm=None,\n    markers=None, dashes=None, style_order=None,\n    legend=\"auto\", kind=\"scatter\", height=5, aspect=1, facet_kws=None,\n    **kwargs\n):\n\n    if kind == \"scatter\":\n\n        plotter = _ScatterPlotter\n        func = scatterplot\n        markers = True if markers is None else markers\n\n    elif kind == \"line\":\n\n        plotter = _LinePlotter\n        func = lineplot\n        dashes = True if dashes is None else dashes\n\n    else:\n        err = f\"Plot kind {kind} not recognized\"\n        raise ValueError(err)\n\n    # Check for attempt to plot onto specific axes and warn\n    if \"ax\" in kwargs:\n        msg = (\n            \"relplot is a figure-level function and does not accept \"\n            \"the `ax` parameter. You may wish to try {}\".format(kind + \"plot\")\n        )\n        warnings.warn(msg, UserWarning)\n        kwargs.pop(\"ax\")\n\n    # Use the full dataset to map the semantics\n    p = plotter(\n        data=data,\n        variables=plotter.get_semantics(locals()),\n        legend=legend,\n    )\n    p.map_hue(palette=palette, order=hue_order, norm=hue_norm)\n    p.map_size(sizes=sizes, order=size_order, norm=size_norm)\n    p.map_style(markers=markers, dashes=dashes, order=style_order)\n\n    # Extract the semantic mappings\n    if \"hue\" in p.variables:\n        palette = p._hue_map.lookup_table\n        hue_order = p._hue_map.levels\n        hue_norm = p._hue_map.norm\n    else:\n        palette = hue_order = hue_norm = None\n\n    if \"size\" in p.variables:\n        sizes = p._size_map.lookup_table\n        size_order = p._size_map.levels\n        size_norm = p._size_map.norm\n\n    if \"style\" in p.variables:\n        style_order = p._style_map.levels\n        if markers:\n            markers = {k: p._style_map(k, \"marker\") for k in style_order}\n        else:\n            markers = None\n        if dashes:\n            dashes = {k: p._style_map(k, \"dashes\") for k in style_order}\n        else:\n            dashes = None\n    else:\n        markers = dashes = style_order = None\n\n    # Now extract the data that would be used to draw a single plot\n    variables = p.variables\n    plot_data = p.plot_data\n    plot_semantics = p.semantics\n\n    # Define the common plotting parameters\n    plot_kws = dict(\n        palette=palette, hue_order=hue_order, hue_norm=hue_norm,\n        sizes=sizes, size_order=size_order, size_norm=size_norm,\n        markers=markers, dashes=dashes, style_order=style_order,\n        legend=False,\n    )\n    plot_kws.update(kwargs)\n    if kind == \"scatter\":\n        plot_kws.pop(\"dashes\")\n\n    # Add the grid semantics onto the plotter\n    grid_semantics = \"row\", \"col\"\n    p.semantics = plot_semantics + grid_semantics\n    p.assign_variables(\n        data=data,\n        variables=dict(\n            x=x, y=y,\n            hue=hue, size=size, style=style, units=units,\n            row=row, col=col,\n        ),\n    )\n\n    # Define the named variables for plotting on each facet\n    # Rename the variables with a leading underscore to avoid\n    # collisions with faceting variable names\n    plot_variables = {v: f\"_{v}\" for v in variables}\n    plot_kws.update(plot_variables)\n    # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_relplot._Pass_the_row_col_variab_relplot.return.g": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_relplot._Pass_the_row_col_variab_relplot.return.g", "embedding": null, "metadata": {"file_path": "seaborn/relational.py", "file_name": "relational.py", "file_type": "text/x-python", "category": "implementation", "start_line": 952, "end_line": 1011, "span_ids": ["relplot"], "tokens": 622}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def relplot(\n    data=None, *,\n    x=None, y=None, hue=None, size=None, style=None, units=None,\n    row=None, col=None, col_wrap=None, row_order=None, col_order=None,\n    palette=None, hue_order=None, hue_norm=None,\n    sizes=None, size_order=None, size_norm=None,\n    markers=None, dashes=None, style_order=None,\n    legend=\"auto\", kind=\"scatter\", height=5, aspect=1, facet_kws=None,\n    **kwargs\n):\n\n    # Pass the row/col variables to FacetGrid with their original\n    # names so that the axes titles render correctly\n    for var in [\"row\", \"col\"]:\n        # Handle faceting variables that lack name information\n        if var in p.variables and p.variables[var] is None:\n            p.variables[var] = f\"_{var}_\"\n    grid_kws = {v: p.variables.get(v) for v in grid_semantics}\n\n    # Rename the columns of the plot_data structure appropriately\n    new_cols = plot_variables.copy()\n    new_cols.update(grid_kws)\n    full_data = p.plot_data.rename(columns=new_cols)\n\n    # Set up the FacetGrid object\n    facet_kws = {} if facet_kws is None else facet_kws.copy()\n    g = FacetGrid(\n        data=full_data.dropna(axis=1, how=\"all\"),\n        **grid_kws,\n        col_wrap=col_wrap, row_order=row_order, col_order=col_order,\n        height=height, aspect=aspect, dropna=False,\n        **facet_kws\n    )\n\n    # Draw the plot\n    g.map_dataframe(func, **plot_kws)\n\n    # Label the axes, using the original variables\n    g.set(xlabel=variables.get(\"x\"), ylabel=variables.get(\"y\"))\n\n    # Show the legend\n    if legend:\n        # Replace the original plot data so the legend uses\n        # numeric data with the correct type\n        p.plot_data = plot_data\n        p.add_legend_data(g.axes.flat[0])\n        if p.legend_data:\n            g.add_legend(legend_data=p.legend_data,\n                         label_order=p.legend_order,\n                         title=p.legend_title,\n                         adjust_subtitles=True)\n\n    # Rename the columns of the FacetGrid's `data` attribute\n    # to match the original column names\n    orig_cols = {\n        f\"_{k}\": f\"_{k}_\" if v is None else v for k, v in variables.items()\n    }\n    grid_data = g.data.rename(columns=orig_cols)\n    if data is not None and (x is not None or y is not None):\n        if not isinstance(data, pd.DataFrame):\n            data = pd.DataFrame(data)\n        g.data = pd.merge(\n            data,\n            grid_data[grid_data.columns.difference(data.columns)],\n            left_index=True,\n            right_index=True,\n        )\n    else:\n        g.data = grid_data\n\n    return g", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_relplot.__doc___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/relational.py_relplot.__doc___", "embedding": null, "metadata": {"file_path": "seaborn/relational.py", "file_name": "relational.py", "file_type": "text/x-python", "category": "implementation", "start_line": 987, "end_line": 1065, "span_ids": ["impl:13"], "tokens": 557}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "relplot.__doc__ = \"\"\"\\\nFigure-level interface for drawing relational plots onto a FacetGrid.\n\nThis function provides access to several different axes-level functions\nthat show the relationship between two variables with semantic mappings\nof subsets. The `kind` parameter selects the underlying axes-level\nfunction to use:\n\n- :func:`scatterplot` (with `kind=\"scatter\"`; the default)\n- :func:`lineplot` (with `kind=\"line\"`)\n\nExtra keyword arguments are passed to the underlying function, so you\nshould refer to the documentation for each to see kind-specific options.\n\n{narrative.main_api}\n\n{narrative.relational_semantic}\n\nAfter plotting, the :class:`FacetGrid` with the plot is returned and can\nbe used directly to tweak supporting plot details or add other layers.\n\nParameters\n----------\n{params.core.data}\n{params.core.xy}\nhue : vector or key in `data`\n    Grouping variable that will produce elements with different colors.\n    Can be either categorical or numeric, although color mapping will\n    behave differently in latter case.\nsize : vector or key in `data`\n    Grouping variable that will produce elements with different sizes.\n    Can be either categorical or numeric, although size mapping will\n    behave differently in latter case.\nstyle : vector or key in `data`\n    Grouping variable that will produce elements with different styles.\n    Can have a numeric dtype but will always be treated as categorical.\n{params.rel.units}\n{params.facets.rowcol}\n{params.facets.col_wrap}\nrow_order, col_order : lists of strings\n    Order to organize the rows and/or columns of the grid in, otherwise the\n    orders are inferred from the data objects.\n{params.core.palette}\n{params.core.hue_order}\n{params.core.hue_norm}\n{params.rel.sizes}\n{params.rel.size_order}\n{params.rel.size_norm}\n{params.rel.style_order}\n{params.rel.dashes}\n{params.rel.markers}\n{params.rel.legend}\nkind : string\n    Kind of plot to draw, corresponding to a seaborn relational plot.\n    Options are `\"scatter\"` or `\"line\"`.\n{params.facets.height}\n{params.facets.aspect}\nfacet_kws : dict\n    Dictionary of other keyword arguments to pass to :class:`FacetGrid`.\nkwargs : key, value pairings\n    Other keyword arguments are passed through to the underlying plotting\n    function.\n\nReturns\n-------\n{returns.facetgrid}\n\nExamples\n--------\n\n.. include:: ../docstrings/relplot.rst\n\n\"\"\".format(\n    narrative=_relational_narrative,\n    params=_param_docs,\n    returns=_core_docs[\"returns\"],\n    seealso=_core_docs[\"seealso\"],\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__Utility_functions_mos___all__._desaturate_saturate_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__Utility_functions_mos___all__._desaturate_saturate_", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 21, "span_ids": ["impl", "docstring", "imports"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Utility functions, mostly for internal use.\"\"\"\nimport os\nimport re\nimport inspect\nimport warnings\nimport colorsys\nfrom contextlib import contextmanager\nfrom urllib.request import urlopen, urlretrieve\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib as mpl\nfrom matplotlib.colors import to_rgb\nimport matplotlib.pyplot as plt\nfrom matplotlib.cbook import normalize_kwargs\n\nfrom .external.version import Version\nfrom .external.appdirs import user_cache_dir\n\n__all__ = [\"desaturate\", \"saturate\", \"set_hls_values\", \"move_legend\",\n           \"despine\", \"get_dataset_names\", \"get_data_home\", \"load_dataset\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_ci_to_errsize_ci_to_errsize.return.errsize": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_ci_to_errsize_ci_to_errsize.return.errsize", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 23, "end_line": 50, "span_ids": ["ci_to_errsize"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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    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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__normal_quantile_func__draw_figure.if_fig_stale_.try_.except_AttributeError_.pass": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__normal_quantile_func__draw_figure.if_fig_stale_.try_.except_AttributeError_.pass", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 53, "end_line": 84, "span_ids": ["_normal_quantile_func", "_draw_figure"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _normal_quantile_func(q):\n    \"\"\"\n    Compute the quantile function of the standard normal distribution.\n\n    This wrapper exists because we are dropping scipy as a mandatory dependency\n    but statistics.NormalDist was added to the standard library in 3.8.\n\n    \"\"\"\n    try:\n        from statistics import NormalDist\n        qf = np.vectorize(NormalDist().inv_cdf)\n    except ImportError:\n        try:\n            from scipy.stats import norm\n            qf = norm.ppf\n        except ImportError:\n            msg = (\n                \"Standard normal quantile functions require either Python>=3.8 or scipy\"\n            )\n            raise RuntimeError(msg)\n    return qf(q)\n\n\ndef _draw_figure(fig):\n    \"\"\"Force draw of a matplotlib figure, accounting for back-compat.\"\"\"\n    # See https://github.com/matplotlib/matplotlib/issues/19197 for context\n    fig.canvas.draw()\n    if fig.stale:\n        try:\n            fig.draw(fig.canvas.get_renderer())\n        except AttributeError:\n            pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__default_color__default_color.return.color": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__default_color__default_color.return.color", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 88, "end_line": 164, "span_ids": ["_default_color"], "tokens": 693}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _default_color(method, hue, color, kws):\n    \"\"\"If needed, get a default color by using the matplotlib property cycle.\"\"\"\n    if hue is not None:\n        # This warning is probably user-friendly, but it's currently triggered\n        # in a FacetGrid context and I don't want to mess with that logic right now\n        #  if color is not None:\n        #      msg = \"`color` is ignored when `hue` is assigned.\"\n        #      warnings.warn(msg)\n        return None\n\n    if color is not None:\n        return color\n\n    elif method.__name__ == \"plot\":\n\n        scout, = method([], [], scalex=False, scaley=False, **kws)\n        color = scout.get_color()\n        scout.remove()\n\n    elif method.__name__ == \"scatter\":\n\n        # Matplotlib will raise if the size of x/y don't match s/c,\n        # and the latter might be in the kws dict\n        scout_size = max(\n            np.atleast_1d(kws.get(key, [])).shape[0]\n            for key in [\"s\", \"c\", \"fc\", \"facecolor\", \"facecolors\"]\n        )\n        scout_x = scout_y = np.full(scout_size, np.nan)\n\n        scout = method(scout_x, scout_y, **kws)\n        facecolors = scout.get_facecolors()\n\n        if not len(facecolors):\n            # Handle bug in matplotlib <= 3.2 (I think)\n            # This will limit the ability to use non color= kwargs to specify\n            # a color in versions of matplotlib with the bug, but trying to\n            # work out what the user wanted by re-implementing the broken logic\n            # of inspecting the kwargs is probably too brittle.\n            single_color = False\n        else:\n            single_color = np.unique(facecolors, axis=0).shape[0] == 1\n\n        # Allow the user to specify an array of colors through various kwargs\n        if \"c\" not in kws and single_color:\n            color = to_rgb(facecolors[0])\n\n        scout.remove()\n\n    elif method.__name__ == \"bar\":\n\n        # bar() needs masked, not empty data, to generate a patch\n        scout, = method([np.nan], [np.nan], **kws)\n        color = to_rgb(scout.get_facecolor())\n        scout.remove()\n\n    elif method.__name__ == \"fill_between\":\n\n        # There is a bug on matplotlib < 3.3 where fill_between with\n        # datetime units and empty data will set incorrect autoscale limits\n        # To workaround it, we'll always return the first color in the cycle.\n        # https://github.com/matplotlib/matplotlib/issues/17586\n        ax = method.__self__\n        datetime_axis = any([\n            isinstance(ax.xaxis.converter, mpl.dates.DateConverter),\n            isinstance(ax.yaxis.converter, mpl.dates.DateConverter),\n        ])\n        if Version(mpl.__version__) < Version(\"3.3\") and datetime_axis:\n            return \"C0\"\n\n        kws = _normalize_kwargs(kws, mpl.collections.PolyCollection)\n\n        scout = method([], [], **kws)\n        facecolor = scout.get_facecolor()\n        color = to_rgb(facecolor[0])\n        scout.remove()\n\n    return color", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_desaturate_desaturate.return.new_color": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_desaturate_desaturate.return.new_color", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 166, "end_line": 198, "span_ids": ["desaturate"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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    # 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    # 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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_saturate_set_hls_values.return.rgb": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_saturate_set_hls_values.return.rgb", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 201, "end_line": 242, "span_ids": ["set_hls_values", "saturate"], "tokens": 258}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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    return set_hls_values(color, s=1)\n\n\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    # 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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_axlabel_get_color_cycle.return.cycler_by_key_color_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_axlabel_get_color_cycle.return.cycler_by_key_color_", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 245, "end_line": 289, "span_ids": ["axlabel", "remove_na", "get_color_cycle"], "tokens": 262}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def axlabel(xlabel, ylabel, **kwargs):\n    \"\"\"Grab current axis and label it.\n\n    DEPRECATED: will be removed in a future version.\n\n    \"\"\"\n    msg = \"This function is deprecated and will be removed in a future version\"\n    warnings.warn(msg, FutureWarning)\n    ax = plt.gca()\n    ax.set_xlabel(xlabel, **kwargs)\n    ax.set_ylabel(ylabel, **kwargs)\n\n\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    return vector[pd.notnull(vector)]\n\n\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    cycler = mpl.rcParams['axes.prop_cycle']\n    return cycler.by_key()['color'] if 'color' in cycler.keys else [\".15\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_despine_despine.if_fig_is_None_and_ax_is_.elif_ax_is_not_None_.axes._ax_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_despine_despine.if_fig_is_None_and_ax_is_.elif_ax_is_not_None_.axes._ax_", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 292, "end_line": 322, "span_ids": ["despine"], "tokens": 269}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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    # 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    # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_despine.for_ax_i_in_axes__despine.for_ax_i_in_axes_.if_trim_.if_yticks_size_.ax_i_set_yticks_newticks_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_despine.for_ax_i_in_axes__despine.for_ax_i_in_axes_.if_trim_.if_yticks_size_.ax_i_set_yticks_newticks_", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 324, "end_line": 391, "span_ids": ["despine"], "tokens": 645}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def despine(fig=None, ax=None, top=True, right=True, left=False,\n            bottom=False, offset=None, trim=False):\n    # ... other code\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)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_move_legend_move_legend.None_4.obj._legend.new_legend": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_move_legend_move_legend.None_4.obj._legend.new_legend", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 394, "end_line": 481, "span_ids": ["move_legend"], "tokens": 727}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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    # 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    handles = old_legend.legendHandles\n    labels = [t.get_text() for t in old_legend.get_texts()]\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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__kde_support_get_dataset_names.return.datasets": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__kde_support_get_dataset_names.return.datasets", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 484, "end_line": 511, "span_ids": ["get_dataset_names", "_kde_support", "ci"], "tokens": 224}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _kde_support(data, bw, gridsize, cut, clip):\n    \"\"\"Establish support for a kernel density estimate.\"\"\"\n    support_min = max(data.min() - bw * cut, clip[0])\n    support_max = min(data.max() + bw * cut, clip[1])\n    support = np.linspace(support_min, support_max, gridsize)\n\n    return support\n\n\ndef ci(a, which=95, axis=None):\n    \"\"\"Return a percentile range from an array of values.\"\"\"\n    p = 50 - which / 2, 50 + which / 2\n    return np.nanpercentile(a, p, axis)\n\n\ndef get_dataset_names():\n    \"\"\"Report available example datasets, useful for reporting issues.\n\n    Requires an internet connection.\n\n    \"\"\"\n    url = \"https://github.com/mwaskom/seaborn-data\"\n    with urlopen(url) as resp:\n        html = resp.read()\n\n    pat = r\"/mwaskom/seaborn-data/blob/master/(\\w*).csv\"\n    datasets = re.findall(pat, html.decode())\n    return datasets", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_get_data_home_get_data_home.return.data_home": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_get_data_home_get_data_home.return.data_home", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 514, "end_line": 529, "span_ids": ["get_data_home"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_data_home(data_home=None):\n    \"\"\"Return a path to the cache directory for example datasets.\n\n    This directory is used by :func:`load_dataset`.\n\n    If the ``data_home`` argument is not provided, it will use a directory\n    specified by the `SEABORN_DATA` environment variable (if it exists)\n    or otherwise default to an OS-appropriate user cache location.\n\n    \"\"\"\n    if data_home is None:\n        data_home = os.environ.get(\"SEABORN_DATA\", user_cache_dir(\"seaborn\"))\n    data_home = os.path.expanduser(data_home)\n    if not os.path.exists(data_home):\n        os.makedirs(data_home)\n    return data_home", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_axis_ticklabels_overlap_axes_ticklabels_overlap.return._axis_ticklabels_overlap_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_axis_ticklabels_overlap_axes_ticklabels_overlap.return._axis_ticklabels_overlap_", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 634, "end_line": 672, "span_ids": ["axis_ticklabels_overlap", "axes_ticklabels_overlap"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def axis_ticklabels_overlap(labels):\n    \"\"\"Return a boolean for whether the list of ticklabels have overlaps.\n\n    Parameters\n    ----------\n    labels : list of matplotlib ticklabels\n\n    Returns\n    -------\n    overlap : boolean\n        True if any of the labels overlap.\n\n    \"\"\"\n    if not labels:\n        return False\n    try:\n        bboxes = [l.get_window_extent() for l in labels]\n        overlaps = [b.count_overlaps(bboxes) for b in bboxes]\n        return max(overlaps) > 1\n    except RuntimeError:\n        # Issue on macos backend raises an error in the above code\n        return False\n\n\ndef axes_ticklabels_overlap(ax):\n    \"\"\"Return booleans for whether the x and y ticklabels on an Axes overlap.\n\n    Parameters\n    ----------\n    ax : matplotlib Axes\n\n    Returns\n    -------\n    x_overlap, y_overlap : booleans\n        True when the labels on that axis overlap.\n\n    \"\"\"\n    return (axis_ticklabels_overlap(ax.get_xticklabels()),\n            axis_ticklabels_overlap(ax.get_yticklabels()))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_locator_to_legend_entries_locator_to_legend_entries.return.raw_levels_formatted_lev": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_locator_to_legend_entries_locator_to_legend_entries.return.raw_levels_formatted_lev", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 675, "end_line": 698, "span_ids": ["locator_to_legend_entries", "locator_to_legend_entries.dummy_axis.get_view_interval", "locator_to_legend_entries.dummy_axis"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def locator_to_legend_entries(locator, limits, dtype):\n    \"\"\"Return levels and formatted levels for brief numeric legends.\"\"\"\n    raw_levels = locator.tick_values(*limits).astype(dtype)\n\n    # The locator can return ticks outside the limits, clip them here\n    raw_levels = [l for l in raw_levels if l >= limits[0] and l <= limits[1]]\n\n    class dummy_axis:\n        def get_view_interval(self):\n            return limits\n\n    if isinstance(locator, mpl.ticker.LogLocator):\n        formatter = mpl.ticker.LogFormatter()\n    else:\n        formatter = mpl.ticker.ScalarFormatter()\n    formatter.axis = dummy_axis()\n\n    # TODO: The following two lines should be replaced\n    # once pinned matplotlib>=3.1.0 with:\n    # formatted_levels = formatter.format_ticks(raw_levels)\n    formatter.set_locs(raw_levels)\n    formatted_levels = [formatter(x) for x in raw_levels]\n\n    return raw_levels, formatted_levels", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_relative_luminance_relative_luminance.try_.except_ValueError_.return.lum": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_relative_luminance_relative_luminance.try_.except_ValueError_.return.lum", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 701, "end_line": 720, "span_ids": ["relative_luminance"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def relative_luminance(color):\n    \"\"\"Calculate the relative luminance of a color according to W3C standards\n\n    Parameters\n    ----------\n    color : matplotlib color or sequence of matplotlib colors\n        Hex code, rgb-tuple, or html color name.\n\n    Returns\n    -------\n    luminance : float(s) between 0 and 1\n\n    \"\"\"\n    rgb = mpl.colors.colorConverter.to_rgba_array(color)[:, :3]\n    rgb = np.where(rgb <= .03928, rgb / 12.92, ((rgb + .055) / 1.055) ** 2.4)\n    lum = rgb.dot([.2126, .7152, .0722])\n    try:\n        return lum.item()\n    except ValueError:\n        return lum", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_to_utf8_to_utf8.try_.except_AttributeError_.return.str_obj_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_to_utf8_to_utf8.try_.except_AttributeError_.return.str_obj_", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 723, "end_line": 749, "span_ids": ["to_utf8"], "tokens": 160}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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    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)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__normalize_kwargs__check_argument.if_value_not_in_options_.raise_ValueError_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__normalize_kwargs__check_argument.if_value_not_in_options_.raise_ValueError_", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 752, "end_line": 777, "span_ids": ["_normalize_kwargs", "_check_argument"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _normalize_kwargs(kws, artist):\n    \"\"\"Wrapper for mpl.cbook.normalize_kwargs that supports <= 3.2.1.\"\"\"\n    _alias_map = {\n        'color': ['c'],\n        'linewidth': ['lw'],\n        'linestyle': ['ls'],\n        'facecolor': ['fc'],\n        'edgecolor': ['ec'],\n        'markerfacecolor': ['mfc'],\n        'markeredgecolor': ['mec'],\n        'markeredgewidth': ['mew'],\n        'markersize': ['ms']\n    }\n    try:\n        kws = normalize_kwargs(kws, artist)\n    except AttributeError:\n        kws = normalize_kwargs(kws, _alias_map)\n    return kws\n\n\ndef _check_argument(param, options, value):\n    \"\"\"Raise if value for param is not in options.\"\"\"\n    if value not in options:\n        raise ValueError(\n            f\"`{param}` must be one of {options}, but {repr(value)} was passed.\"\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__assign_default_kwargs__assign_default_kwargs.return.kws": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__assign_default_kwargs__assign_default_kwargs.return.kws", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 787, "end_line": 803, "span_ids": ["_assign_default_kwargs"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _assign_default_kwargs(kws, call_func, source_func):\n    \"\"\"Assign default kwargs for call_func using values from source_func.\"\"\"\n    # This exists so that axes-level functions and figure-level functions can\n    # both call a Plotter method while having the default kwargs be defined in\n    # the signature of the axes-level function.\n    # An alternative would be to have a decorator on the method that sets its\n    # defaults based on those defined in the axes-level function.\n    # Then the figure-level function would not need to worry about defaults.\n    # I am not sure which is better.\n    needed = inspect.signature(call_func).parameters\n    defaults = inspect.signature(source_func).parameters\n\n    for param in needed:\n        if param in defaults and param not in kws:\n            kws[param] = defaults[param].default\n\n    return kws", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_adjust_legend_subtitles_adjust_legend_subtitles.for_hpack_in_hpackers_.if_not_all_artist_get_vis.for_text_in_text_area_get.if_font_size_is_not_None_.text_set_size_font_size_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_adjust_legend_subtitles_adjust_legend_subtitles.for_hpack_in_hpackers_.if_not_all_artist_get_vis.for_text_in_text_area_get.if_font_size_is_not_None_.text_set_size_font_size_", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 806, "end_line": 823, "span_ids": ["adjust_legend_subtitles"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def adjust_legend_subtitles(legend):\n    \"\"\"\n    Make invisible-handle \"subtitles\" entries look more like titles.\n\n    Note: This function is not part of the public API and may be changed or removed.\n\n    \"\"\"\n    # Legend title not in rcParams until 3.0\n    font_size = plt.rcParams.get(\"legend.title_fontsize\", None)\n    hpackers = legend.findobj(mpl.offsetbox.VPacker)[0].get_children()\n    for hpack in hpackers:\n        draw_area, text_area = hpack.get_children()\n        handles = draw_area.get_children()\n        if not all(artist.get_visible() for artist in handles):\n            draw_area.set_width(0)\n            for text in text_area.get_children():\n                if font_size is not None:\n                    text.set_size(font_size)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_np__show_cmap.ax_pcolormesh_x_cmap_cma": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_np__show_cmap.ax_pcolormesh_x_cmap_cma", "embedding": null, "metadata": {"file_path": "seaborn/widgets.py", "file_name": "widgets.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 58, "span_ids": ["impl:14", "impl", "imports:5", "imports:6", "impl:8", "impl:2", "impl:6", "docstring", "_init_mutable_colormap", "_update_lut", "imports:4", "imports", "impl:3", "imports:7", "imports:8", "_show_cmap"], "tokens": 426}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib.colors import LinearSegmentedColormap\n\n# Lots of different places that widgets could come from...\ntry:\n    from ipywidgets import interact, FloatSlider, IntSlider\nexcept ImportError:\n    import warnings\n    # ignore ShimWarning raised by IPython, see GH #892\n    with warnings.catch_warnings():\n        warnings.simplefilter(\"ignore\")\n        try:\n            from IPython.html.widgets import interact, FloatSlider, IntSlider\n        except ImportError:\n            try:\n                from IPython.html.widgets import (interact,\n                                                  FloatSliderWidget,\n                                                  IntSliderWidget)\n                FloatSlider = FloatSliderWidget\n                IntSlider = IntSliderWidget\n            except ImportError:\n                pass\n\n\nfrom .miscplot import palplot\nfrom .palettes import (color_palette, dark_palette, light_palette,\n                       diverging_palette, cubehelix_palette)\n\n\n__all__ = [\"choose_colorbrewer_palette\", \"choose_cubehelix_palette\",\n           \"choose_dark_palette\", \"choose_light_palette\",\n           \"choose_diverging_palette\"]\n\n\ndef _init_mutable_colormap():\n    \"\"\"Create a matplotlib colormap that will be updated by the widgets.\"\"\"\n    greys = color_palette(\"Greys\", 256)\n    cmap = LinearSegmentedColormap.from_list(\"interactive\", greys)\n    cmap._init()\n    cmap._set_extremes()\n    return cmap\n\n\ndef _update_lut(cmap, colors):\n    \"\"\"Change the LUT values in a matplotlib colormap in-place.\"\"\"\n    cmap._lut[:256] = colors\n    cmap._set_extremes()\n\n\ndef _show_cmap(cmap):\n    \"\"\"Show a continuous matplotlib colormap.\"\"\"\n    from .rcmod import axes_style  # Avoid circular import\n    with axes_style(\"white\"):\n        f, ax = plt.subplots(figsize=(8.25, .75))\n    ax.set(xticks=[], yticks=[])\n    x = np.linspace(0, 1, 256)[np.newaxis, :]\n    ax.pcolormesh(x, cmap=cmap)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_colorbrewer_palette_choose_colorbrewer_palette.if_as_cmap_.cmap._init_mutable_colormap_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_colorbrewer_palette_choose_colorbrewer_palette.if_as_cmap_.cmap._init_mutable_colormap_", "embedding": null, "metadata": {"file_path": "seaborn/widgets.py", "file_name": "widgets.py", "file_type": "text/x-python", "category": "implementation", "start_line": 61, "end_line": 98, "span_ids": ["choose_colorbrewer_palette"], "tokens": 304}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def choose_colorbrewer_palette(data_type, as_cmap=False):\n    \"\"\"Select a palette from the ColorBrewer set.\n\n    These palettes are built into matplotlib and can be used by name in\n    many seaborn functions, or by passing the object returned by this function.\n\n    Parameters\n    ----------\n    data_type : {'sequential', 'diverging', 'qualitative'}\n        This describes the kind of data you want to visualize. See the seaborn\n        color palette docs for more information about how to choose this value.\n        Note that you can pass substrings (e.g. 'q' for 'qualitative.\n\n    as_cmap : bool\n        If True, the return value is a matplotlib colormap rather than a\n        list of discrete colors.\n\n    Returns\n    -------\n    pal or cmap : list of colors or matplotlib colormap\n        Object that can be passed to plotting functions.\n\n    See Also\n    --------\n    dark_palette : Create a sequential palette with dark low values.\n    light_palette : Create a sequential palette with bright low values.\n    diverging_palette : Create a diverging palette from selected colors.\n    cubehelix_palette : Create a sequential palette or colormap using the\n                        cubehelix system.\n\n\n    \"\"\"\n    if data_type.startswith(\"q\") and as_cmap:\n        raise ValueError(\"Qualitative palettes cannot be colormaps.\")\n\n    pal = []\n    if as_cmap:\n        cmap = _init_mutable_colormap()\n    # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_colorbrewer_palette.None_2_choose_colorbrewer_palette.return.pal": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_colorbrewer_palette.None_2_choose_colorbrewer_palette.return.pal", "embedding": null, "metadata": {"file_path": "seaborn/widgets.py", "file_name": "widgets.py", "file_type": "text/x-python", "category": "implementation", "start_line": 100, "end_line": 154, "span_ids": ["choose_colorbrewer_palette"], "tokens": 577}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def choose_colorbrewer_palette(data_type, as_cmap=False):\n    # ... other code\n\n    if data_type.startswith(\"s\"):\n        opts = [\"Greys\", \"Reds\", \"Greens\", \"Blues\", \"Oranges\", \"Purples\",\n                \"BuGn\", \"BuPu\", \"GnBu\", \"OrRd\", \"PuBu\", \"PuRd\", \"RdPu\", \"YlGn\",\n                \"PuBuGn\", \"YlGnBu\", \"YlOrBr\", \"YlOrRd\"]\n        variants = [\"regular\", \"reverse\", \"dark\"]\n\n        @interact\n        def choose_sequential(name=opts, n=(2, 18),\n                              desat=FloatSlider(min=0, max=1, value=1),\n                              variant=variants):\n            if variant == \"reverse\":\n                name += \"_r\"\n            elif variant == \"dark\":\n                name += \"_d\"\n\n            if as_cmap:\n                colors = color_palette(name, 256, desat)\n                _update_lut(cmap, np.c_[colors, np.ones(256)])\n                _show_cmap(cmap)\n            else:\n                pal[:] = color_palette(name, n, desat)\n                palplot(pal)\n\n    elif data_type.startswith(\"d\"):\n        opts = [\"RdBu\", \"RdGy\", \"PRGn\", \"PiYG\", \"BrBG\",\n                \"RdYlBu\", \"RdYlGn\", \"Spectral\"]\n        variants = [\"regular\", \"reverse\"]\n\n        @interact\n        def choose_diverging(name=opts, n=(2, 16),\n                             desat=FloatSlider(min=0, max=1, value=1),\n                             variant=variants):\n            if variant == \"reverse\":\n                name += \"_r\"\n            if as_cmap:\n                colors = color_palette(name, 256, desat)\n                _update_lut(cmap, np.c_[colors, np.ones(256)])\n                _show_cmap(cmap)\n            else:\n                pal[:] = color_palette(name, n, desat)\n                palplot(pal)\n\n    elif data_type.startswith(\"q\"):\n        opts = [\"Set1\", \"Set2\", \"Set3\", \"Paired\", \"Accent\",\n                \"Pastel1\", \"Pastel2\", \"Dark2\"]\n\n        @interact\n        def choose_qualitative(name=opts, n=(2, 16),\n                               desat=FloatSlider(min=0, max=1, value=1)):\n            pal[:] = color_palette(name, n, desat)\n            palplot(pal)\n\n    if as_cmap:\n        return cmap\n    return pal", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_dark_palette_choose_dark_palette.return.pal": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_dark_palette_choose_dark_palette.return.pal", "embedding": null, "metadata": {"file_path": "seaborn/widgets.py", "file_name": "widgets.py", "file_type": "text/x-python", "category": "implementation", "start_line": 157, "end_line": 239, "span_ids": ["choose_dark_palette"], "tokens": 655}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def choose_dark_palette(input=\"husl\", as_cmap=False):\n    \"\"\"Launch an interactive widget to create a dark sequential palette.\n\n    This corresponds with the :func:`dark_palette` function. This kind\n    of palette is good for data that range between relatively uninteresting\n    low values and interesting high values.\n\n    Requires IPython 2+ and must be used in the notebook.\n\n    Parameters\n    ----------\n    input : {'husl', 'hls', 'rgb'}\n        Color space for defining the seed value. Note that the default is\n        different than the default input for :func:`dark_palette`.\n    as_cmap : bool\n        If True, the return value is a matplotlib colormap rather than a\n        list of discrete colors.\n\n    Returns\n    -------\n    pal or cmap : list of colors or matplotlib colormap\n        Object that can be passed to plotting functions.\n\n    See Also\n    --------\n    dark_palette : Create a sequential palette with dark low values.\n    light_palette : Create a sequential palette with bright low values.\n    cubehelix_palette : Create a sequential palette or colormap using the\n                        cubehelix system.\n\n    \"\"\"\n    pal = []\n    if as_cmap:\n        cmap = _init_mutable_colormap()\n\n    if input == \"rgb\":\n        @interact\n        def choose_dark_palette_rgb(r=(0., 1.),\n                                    g=(0., 1.),\n                                    b=(0., 1.),\n                                    n=(3, 17)):\n            color = r, g, b\n            if as_cmap:\n                colors = dark_palette(color, 256, input=\"rgb\")\n                _update_lut(cmap, colors)\n                _show_cmap(cmap)\n            else:\n                pal[:] = dark_palette(color, n, input=\"rgb\")\n                palplot(pal)\n\n    elif input == \"hls\":\n        @interact\n        def choose_dark_palette_hls(h=(0., 1.),\n                                    l=(0., 1.),  # noqa: E741\n                                    s=(0., 1.),\n                                    n=(3, 17)):\n            color = h, l, s\n            if as_cmap:\n                colors = dark_palette(color, 256, input=\"hls\")\n                _update_lut(cmap, colors)\n                _show_cmap(cmap)\n            else:\n                pal[:] = dark_palette(color, n, input=\"hls\")\n                palplot(pal)\n\n    elif input == \"husl\":\n        @interact\n        def choose_dark_palette_husl(h=(0, 359),\n                                     s=(0, 99),\n                                     l=(0, 99),  # noqa: E741\n                                     n=(3, 17)):\n            color = h, s, l\n            if as_cmap:\n                colors = dark_palette(color, 256, input=\"husl\")\n                _update_lut(cmap, colors)\n                _show_cmap(cmap)\n            else:\n                pal[:] = dark_palette(color, n, input=\"husl\")\n                palplot(pal)\n\n    if as_cmap:\n        return cmap\n    return pal", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_light_palette_choose_light_palette.return.pal": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_light_palette_choose_light_palette.return.pal", "embedding": null, "metadata": {"file_path": "seaborn/widgets.py", "file_name": "widgets.py", "file_type": "text/x-python", "category": "implementation", "start_line": 242, "end_line": 324, "span_ids": ["choose_light_palette"], "tokens": 655}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def choose_light_palette(input=\"husl\", as_cmap=False):\n    \"\"\"Launch an interactive widget to create a light sequential palette.\n\n    This corresponds with the :func:`light_palette` function. This kind\n    of palette is good for data that range between relatively uninteresting\n    low values and interesting high values.\n\n    Requires IPython 2+ and must be used in the notebook.\n\n    Parameters\n    ----------\n    input : {'husl', 'hls', 'rgb'}\n        Color space for defining the seed value. Note that the default is\n        different than the default input for :func:`light_palette`.\n    as_cmap : bool\n        If True, the return value is a matplotlib colormap rather than a\n        list of discrete colors.\n\n    Returns\n    -------\n    pal or cmap : list of colors or matplotlib colormap\n        Object that can be passed to plotting functions.\n\n    See Also\n    --------\n    light_palette : Create a sequential palette with bright low values.\n    dark_palette : Create a sequential palette with dark low values.\n    cubehelix_palette : Create a sequential palette or colormap using the\n                        cubehelix system.\n\n    \"\"\"\n    pal = []\n    if as_cmap:\n        cmap = _init_mutable_colormap()\n\n    if input == \"rgb\":\n        @interact\n        def choose_light_palette_rgb(r=(0., 1.),\n                                     g=(0., 1.),\n                                     b=(0., 1.),\n                                     n=(3, 17)):\n            color = r, g, b\n            if as_cmap:\n                colors = light_palette(color, 256, input=\"rgb\")\n                _update_lut(cmap, colors)\n                _show_cmap(cmap)\n            else:\n                pal[:] = light_palette(color, n, input=\"rgb\")\n                palplot(pal)\n\n    elif input == \"hls\":\n        @interact\n        def choose_light_palette_hls(h=(0., 1.),\n                                     l=(0., 1.),  # noqa: E741\n                                     s=(0., 1.),\n                                     n=(3, 17)):\n            color = h, l, s\n            if as_cmap:\n                colors = light_palette(color, 256, input=\"hls\")\n                _update_lut(cmap, colors)\n                _show_cmap(cmap)\n            else:\n                pal[:] = light_palette(color, n, input=\"hls\")\n                palplot(pal)\n\n    elif input == \"husl\":\n        @interact\n        def choose_light_palette_husl(h=(0, 359),\n                                      s=(0, 99),\n                                      l=(0, 99),  # noqa: E741\n                                      n=(3, 17)):\n            color = h, s, l\n            if as_cmap:\n                colors = light_palette(color, 256, input=\"husl\")\n                _update_lut(cmap, colors)\n                _show_cmap(cmap)\n            else:\n                pal[:] = light_palette(color, n, input=\"husl\")\n                palplot(pal)\n\n    if as_cmap:\n        return cmap\n    return pal", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_diverging_palette_choose_diverging_palette.if_as_cmap_.cmap._init_mutable_colormap_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_diverging_palette_choose_diverging_palette.if_as_cmap_.cmap._init_mutable_colormap_", "embedding": null, "metadata": {"file_path": "seaborn/widgets.py", "file_name": "widgets.py", "file_type": "text/x-python", "category": "implementation", "start_line": 327, "end_line": 357, "span_ids": ["choose_diverging_palette"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def choose_diverging_palette(as_cmap=False):\n    \"\"\"Launch an interactive widget to choose a diverging color palette.\n\n    This corresponds with the :func:`diverging_palette` function. This kind\n    of palette is good for data that range between interesting low values\n    and interesting high values with a meaningful midpoint. (For example,\n    change scores relative to some baseline value).\n\n    Requires IPython 2+ and must be used in the notebook.\n\n    Parameters\n    ----------\n    as_cmap : bool\n        If True, the return value is a matplotlib colormap rather than a\n        list of discrete colors.\n\n    Returns\n    -------\n    pal or cmap : list of colors or matplotlib colormap\n        Object that can be passed to plotting functions.\n\n    See Also\n    --------\n    diverging_palette : Create a diverging color palette or colormap.\n    choose_colorbrewer_palette : Interactively choose palettes from the\n                                 colorbrewer set, including diverging palettes.\n\n    \"\"\"\n    pal = []\n    if as_cmap:\n        cmap = _init_mutable_colormap()\n    # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_diverging_palette.choose_diverging_palette_choose_diverging_palette.return.pal": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_diverging_palette.choose_diverging_palette_choose_diverging_palette.return.pal", "embedding": null, "metadata": {"file_path": "seaborn/widgets.py", "file_name": "widgets.py", "file_type": "text/x-python", "category": "implementation", "start_line": 359, "end_line": 383, "span_ids": ["choose_diverging_palette"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def choose_diverging_palette(as_cmap=False):\n    # ... other code\n\n    @interact\n    def choose_diverging_palette(\n        h_neg=IntSlider(min=0,\n                        max=359,\n                        value=220),\n        h_pos=IntSlider(min=0,\n                        max=359,\n                        value=10),\n        s=IntSlider(min=0, max=99, value=74),\n        l=IntSlider(min=0, max=99, value=50),  # noqa: E741\n        sep=IntSlider(min=1, max=50, value=10),\n        n=(2, 16),\n        center=[\"light\", \"dark\"]\n    ):\n        if as_cmap:\n            colors = diverging_palette(h_neg, h_pos, s, l, sep, 256, center)\n            _update_lut(cmap, colors)\n            _show_cmap(cmap)\n        else:\n            pal[:] = diverging_palette(h_neg, h_pos, s, l, sep, n, center)\n            palplot(pal)\n\n    if as_cmap:\n        return cmap\n    return pal", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_cubehelix_palette_choose_cubehelix_palette.if_as_cmap_.cmap._init_mutable_colormap_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_cubehelix_palette_choose_cubehelix_palette.if_as_cmap_.cmap._init_mutable_colormap_", "embedding": null, "metadata": {"file_path": "seaborn/widgets.py", "file_name": "widgets.py", "file_type": "text/x-python", "category": "implementation", "start_line": 386, "end_line": 416, "span_ids": ["choose_cubehelix_palette"], "tokens": 230}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def choose_cubehelix_palette(as_cmap=False):\n    \"\"\"Launch an interactive widget to create a sequential cubehelix palette.\n\n    This corresponds with the :func:`cubehelix_palette` function. This kind\n    of palette is good for data that range between relatively uninteresting\n    low values and interesting high values. The cubehelix system allows the\n    palette to have more hue variance across the range, which can be helpful\n    for distinguishing a wider range of values.\n\n    Requires IPython 2+ and must be used in the notebook.\n\n    Parameters\n    ----------\n    as_cmap : bool\n        If True, the return value is a matplotlib colormap rather than a\n        list of discrete colors.\n\n    Returns\n    -------\n    pal or cmap : list of colors or matplotlib colormap\n        Object that can be passed to plotting functions.\n\n    See Also\n    --------\n    cubehelix_palette : Create a sequential palette or colormap using the\n                        cubehelix system.\n\n    \"\"\"\n    pal = []\n    if as_cmap:\n        cmap = _init_mutable_colormap()\n    # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_cubehelix_palette.choose_cubehelix_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/widgets.py_choose_cubehelix_palette.choose_cubehelix_", "embedding": null, "metadata": {"file_path": "seaborn/widgets.py", "file_name": "widgets.py", "file_type": "text/x-python", "category": "implementation", "start_line": 418, "end_line": 441, "span_ids": ["choose_cubehelix_palette"], "tokens": 258}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def choose_cubehelix_palette(as_cmap=False):\n    # ... other code\n\n    @interact\n    def choose_cubehelix(n_colors=IntSlider(min=2, max=16, value=9),\n                         start=FloatSlider(min=0, max=3, value=0),\n                         rot=FloatSlider(min=-1, max=1, value=.4),\n                         gamma=FloatSlider(min=0, max=5, value=1),\n                         hue=FloatSlider(min=0, max=1, value=.8),\n                         light=FloatSlider(min=0, max=1, value=.85),\n                         dark=FloatSlider(min=0, max=1, value=.15),\n                         reverse=False):\n\n        if as_cmap:\n            colors = cubehelix_palette(256, start, rot, gamma,\n                                       hue, light, dark, reverse)\n            _update_lut(cmap, np.c_[colors, np.ones(256)])\n            _show_cmap(cmap)\n        else:\n            pal[:] = cubehelix_palette(n_colors, start, rot, gamma,\n                                       hue, light, dark, reverse)\n            palplot(pal)\n\n    if as_cmap:\n        return cmap\n    return pal", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_functools_TestPlotData.test_named_and_given_vectors.assert_p_ids_size_i": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_functools_TestPlotData.test_named_and_given_vectors.assert_p_ids_size_i", "embedding": null, "metadata": {"file_path": "tests/_core/test_data.py", "file_name": "test_data.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 48, "span_ids": ["impl", "TestPlotData.long_variables", "imports", "TestPlotData.test_named_and_given_vectors", "TestPlotData", "TestPlotData.test_named_vectors"], "tokens": 344}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import functools\nimport numpy as np\nimport pandas as pd\n\nimport pytest\nfrom numpy.testing import assert_array_equal\nfrom pandas.testing import assert_series_equal\n\nfrom seaborn._core.data import PlotData\n\n\nassert_vector_equal = functools.partial(assert_series_equal, check_names=False)\n\n\nclass TestPlotData:\n\n    @pytest.fixture\n    def long_variables(self):\n        variables = dict(x=\"x\", y=\"y\", color=\"a\", size=\"z\", style=\"s_cat\")\n        return variables\n\n    def test_named_vectors(self, long_df, long_variables):\n\n        p = PlotData(long_df, long_variables)\n        assert p.source_data is long_df\n        assert p.source_vars is long_variables\n        for key, val in long_variables.items():\n            assert p.names[key] == val\n            assert_vector_equal(p.frame[key], long_df[val])\n\n    def test_named_and_given_vectors(self, long_df, long_variables):\n\n        long_variables[\"y\"] = long_df[\"b\"]\n        long_variables[\"size\"] = long_df[\"z\"].to_numpy()\n\n        p = PlotData(long_df, long_variables)\n\n        assert_vector_equal(p.frame[\"color\"], long_df[long_variables[\"color\"]])\n        assert_vector_equal(p.frame[\"y\"], long_df[\"b\"])\n        assert_vector_equal(p.frame[\"size\"], long_df[\"z\"])\n\n        assert p.names[\"color\"] == long_variables[\"color\"]\n        assert p.names[\"y\"] == \"b\"\n        assert p.names[\"size\"] is None\n\n        assert p.ids[\"color\"] == long_variables[\"color\"]\n        assert p.ids[\"y\"] == \"b\"\n        assert p.ids[\"size\"] == id(long_variables[\"size\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_index_as_variable_TestPlotData.test_multiindex_as_variables.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_index_as_variable_TestPlotData.test_multiindex_as_variables.None_2", "embedding": null, "metadata": {"file_path": "tests/_core/test_data.py", "file_name": "test_data.py", "file_type": "text/x-python", "category": "test", "start_line": 50, "end_line": 68, "span_ids": ["TestPlotData.test_index_as_variable", "TestPlotData.test_multiindex_as_variables"], "tokens": 245}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotData:\n\n    def test_index_as_variable(self, long_df, long_variables):\n\n        index = pd.Index(np.arange(len(long_df)) * 2 + 10, name=\"i\", dtype=int)\n        long_variables[\"x\"] = \"i\"\n        p = PlotData(long_df.set_index(index), long_variables)\n\n        assert p.names[\"x\"] == p.ids[\"x\"] == \"i\"\n        assert_vector_equal(p.frame[\"x\"], pd.Series(index, index))\n\n    def test_multiindex_as_variables(self, long_df, long_variables):\n\n        index_i = pd.Index(np.arange(len(long_df)) * 2 + 10, name=\"i\", dtype=int)\n        index_j = pd.Index(np.arange(len(long_df)) * 3 + 5, name=\"j\", dtype=int)\n        index = pd.MultiIndex.from_arrays([index_i, index_j])\n        long_variables.update({\"x\": \"i\", \"y\": \"j\"})\n\n        p = PlotData(long_df.set_index(index), long_variables)\n        assert_vector_equal(p.frame[\"x\"], pd.Series(index_i, index))\n        assert_vector_equal(p.frame[\"y\"], pd.Series(index_j, index))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_int_as_variable_key_TestPlotData.test_dict_as_data.for_key_val_in_long_vari.assert_vector_equal_p_fra": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_int_as_variable_key_TestPlotData.test_dict_as_data.for_key_val_in_long_vari.assert_vector_equal_p_fra", "embedding": null, "metadata": {"file_path": "tests/_core/test_data.py", "file_name": "test_data.py", "file_type": "text/x-python", "category": "test", "start_line": 70, "end_line": 104, "span_ids": ["TestPlotData.test_int_as_variable_value", "TestPlotData.test_dict_as_data", "TestPlotData.test_tuple_as_variable_key", "TestPlotData.test_int_as_variable_key"], "tokens": 313}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotData:\n\n    def test_int_as_variable_key(self, rng):\n\n        df = pd.DataFrame(rng.uniform(size=(10, 3)))\n\n        var = \"x\"\n        key = 2\n\n        p = PlotData(df, {var: key})\n        assert_vector_equal(p.frame[var], df[key])\n        assert p.names[var] == p.ids[var] == str(key)\n\n    def test_int_as_variable_value(self, long_df):\n\n        p = PlotData(long_df, {\"x\": 0, \"y\": \"y\"})\n        assert (p.frame[\"x\"] == 0).all()\n        assert p.names[\"x\"] is None\n        assert p.ids[\"x\"] == id(0)\n\n    def test_tuple_as_variable_key(self, rng):\n\n        cols = pd.MultiIndex.from_product([(\"a\", \"b\", \"c\"), (\"x\", \"y\")])\n        df = pd.DataFrame(rng.uniform(size=(10, 6)), columns=cols)\n\n        var = \"color\"\n        key = (\"b\", \"y\")\n        p = PlotData(df, {var: key})\n        assert_vector_equal(p.frame[var], df[key])\n        assert p.names[var] == p.ids[var] == str(key)\n\n    def test_dict_as_data(self, long_dict, long_variables):\n\n        p = PlotData(long_dict, long_variables)\n        assert p.source_data is long_dict\n        for key, val in long_variables.items():\n            assert_vector_equal(p.frame[key], pd.Series(long_dict[val]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_vectors_various_types_TestPlotData.test_vectors_various_types.for_key_val_in_long_vari.if_vector_type_series.else_.assert_array_equal_p_fram": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_vectors_various_types_TestPlotData.test_vectors_various_types.for_key_val_in_long_vari.if_vector_type_series.else_.assert_array_equal_p_fram", "embedding": null, "metadata": {"file_path": "tests/_core/test_data.py", "file_name": "test_data.py", "file_type": "text/x-python", "category": "test", "start_line": 106, "end_line": 132, "span_ids": ["TestPlotData.test_vectors_various_types"], "tokens": 257}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotData:\n\n    @pytest.mark.parametrize(\n        \"vector_type\",\n        [\"series\", \"numpy\", \"list\"],\n    )\n    def test_vectors_various_types(self, long_df, long_variables, vector_type):\n\n        variables = {key: long_df[val] for key, val in long_variables.items()}\n        if vector_type == \"numpy\":\n            variables = {key: val.to_numpy() for key, val in variables.items()}\n        elif vector_type == \"list\":\n            variables = {key: val.to_list() for key, val in variables.items()}\n\n        p = PlotData(None, variables)\n\n        assert list(p.names) == list(long_variables)\n        if vector_type == \"series\":\n            assert p.source_vars is variables\n            assert p.names == p.ids == {key: val.name for key, val in variables.items()}\n        else:\n            assert p.names == {key: None for key in variables}\n            assert p.ids == {key: id(val) for key, val in variables.items()}\n\n        for key, val in long_variables.items():\n            if vector_type == \"series\":\n                assert_vector_equal(p.frame[key], long_df[val])\n            else:\n                assert_array_equal(p.frame[key], long_df[val])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_none_as_variable_value_TestPlotData.test_empty_data_input.if_not_isinstance_arg_pd.assert_not_p_names": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_none_as_variable_value_TestPlotData.test_empty_data_input.if_not_isinstance_arg_pd.assert_not_p_names", "embedding": null, "metadata": {"file_path": "tests/_core/test_data.py", "file_name": "test_data.py", "file_type": "text/x-python", "category": "test", "start_line": 134, "end_line": 158, "span_ids": ["TestPlotData.test_frame_and_vector_mismatched_lengths", "TestPlotData.test_empty_data_input", "TestPlotData.test_none_as_variable_value"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotData:\n\n    def test_none_as_variable_value(self, long_df):\n\n        p = PlotData(long_df, {\"x\": \"z\", \"y\": None})\n        assert list(p.frame.columns) == [\"x\"]\n        assert p.names == p.ids == {\"x\": \"z\"}\n\n    def test_frame_and_vector_mismatched_lengths(self, long_df):\n\n        vector = np.arange(len(long_df) * 2)\n        with pytest.raises(ValueError):\n            PlotData(long_df, {\"x\": \"x\", \"y\": vector})\n\n    @pytest.mark.parametrize(\n        \"arg\", [[], np.array([]), pd.DataFrame()],\n    )\n    def test_empty_data_input(self, arg):\n\n        p = PlotData(arg, {})\n        assert p.frame.empty\n        assert not p.names\n\n        if not isinstance(arg, pd.DataFrame):\n            p = PlotData(None, dict(x=arg, y=arg))\n            assert p.frame.empty\n            assert not p.names", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_index_alignment_series_to_dataframe_TestPlotData.test_index_alignment_series_to_dataframe.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_index_alignment_series_to_dataframe_TestPlotData.test_index_alignment_series_to_dataframe.None_1", "embedding": null, "metadata": {"file_path": "tests/_core/test_data.py", "file_name": "test_data.py", "file_type": "text/x-python", "category": "test", "start_line": 160, "end_line": 176, "span_ids": ["TestPlotData.test_index_alignment_series_to_dataframe"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotData:\n\n    def test_index_alignment_series_to_dataframe(self):\n\n        x = [1, 2, 3]\n        x_index = pd.Index(x, dtype=int)\n\n        y_values = [3, 4, 5]\n        y_index = pd.Index(y_values, dtype=int)\n        y = pd.Series(y_values, y_index, name=\"y\")\n\n        data = pd.DataFrame(dict(x=x), index=x_index)\n\n        p = PlotData(data, {\"x\": \"x\", \"y\": y})\n\n        x_col_expected = pd.Series([1, 2, 3, np.nan, np.nan], np.arange(1, 6))\n        y_col_expected = pd.Series([np.nan, np.nan, 3, 4, 5], np.arange(1, 6))\n        assert_vector_equal(p.frame[\"x\"], x_col_expected)\n        assert_vector_equal(p.frame[\"y\"], y_col_expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_index_alignment_between_series_TestPlotData.test_index_alignment_between_series.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_index_alignment_between_series_TestPlotData.test_index_alignment_between_series.None_1", "embedding": null, "metadata": {"file_path": "tests/_core/test_data.py", "file_name": "test_data.py", "file_type": "text/x-python", "category": "test", "start_line": 178, "end_line": 193, "span_ids": ["TestPlotData.test_index_alignment_between_series"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotData:\n\n    def test_index_alignment_between_series(self):\n\n        x_index = [1, 2, 3]\n        x_values = [10, 20, 30]\n        x = pd.Series(x_values, x_index, name=\"x\")\n\n        y_index = [3, 4, 5]\n        y_values = [300, 400, 500]\n        y = pd.Series(y_values, y_index, name=\"y\")\n\n        p = PlotData(None, {\"x\": x, \"y\": y})\n\n        x_col_expected = pd.Series([10, 20, 30, np.nan, np.nan], np.arange(1, 6))\n        y_col_expected = pd.Series([np.nan, np.nan, 300, 400, 500], np.arange(1, 6))\n        assert_vector_equal(p.frame[\"x\"], x_col_expected)\n        assert_vector_equal(p.frame[\"y\"], y_col_expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_key_not_in_data_raises_TestPlotData.test_join_remove_variable.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_key_not_in_data_raises_TestPlotData.test_join_remove_variable.None_3", "embedding": null, "metadata": {"file_path": "tests/_core/test_data.py", "file_name": "test_data.py", "file_type": "text/x-python", "category": "test", "start_line": 195, "end_line": 276, "span_ids": ["TestPlotData.test_join_remove_variable", "TestPlotData.test_key_with_no_data_raises", "TestPlotData.test_join_replace_variable", "TestPlotData.test_join_add_variable", "TestPlotData.test_undefined_variables_raise", "TestPlotData.test_key_not_in_data_raises", "TestPlotData.test_contains_operation", "TestPlotData.test_data_vector_different_lengths_raises"], "tokens": 653}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotData:\n\n    def test_key_not_in_data_raises(self, long_df):\n\n        var = \"x\"\n        key = \"what\"\n        msg = f\"Could not interpret value `{key}` for `{var}`. An entry with this name\"\n        with pytest.raises(ValueError, match=msg):\n            PlotData(long_df, {var: key})\n\n    def test_key_with_no_data_raises(self):\n\n        var = \"x\"\n        key = \"what\"\n        msg = f\"Could not interpret value `{key}` for `{var}`. Value is a string,\"\n        with pytest.raises(ValueError, match=msg):\n            PlotData(None, {var: key})\n\n    def test_data_vector_different_lengths_raises(self, long_df):\n\n        vector = np.arange(len(long_df) - 5)\n        msg = \"Length of ndarray vectors must match length of `data`\"\n        with pytest.raises(ValueError, match=msg):\n            PlotData(long_df, {\"y\": vector})\n\n    def test_undefined_variables_raise(self, long_df):\n\n        with pytest.raises(ValueError):\n            PlotData(long_df, dict(x=\"not_in_df\"))\n\n        with pytest.raises(ValueError):\n            PlotData(long_df, dict(x=\"x\", y=\"not_in_df\"))\n\n        with pytest.raises(ValueError):\n            PlotData(long_df, dict(x=\"x\", y=\"y\", color=\"not_in_df\"))\n\n    def test_contains_operation(self, long_df):\n\n        p = PlotData(long_df, {\"x\": \"y\", \"color\": long_df[\"a\"]})\n        assert \"x\" in p\n        assert \"y\" not in p\n        assert \"color\" in p\n\n    def test_join_add_variable(self, long_df):\n\n        v1 = {\"x\": \"x\", \"y\": \"f\"}\n        v2 = {\"color\": \"a\"}\n\n        p1 = PlotData(long_df, v1)\n        p2 = p1.join(None, v2)\n\n        for var, key in dict(**v1, **v2).items():\n            assert var in p2\n            assert p2.names[var] == key\n            assert_vector_equal(p2.frame[var], long_df[key])\n\n    def test_join_replace_variable(self, long_df):\n\n        v1 = {\"x\": \"x\", \"y\": \"y\"}\n        v2 = {\"y\": \"s\"}\n\n        p1 = PlotData(long_df, v1)\n        p2 = p1.join(None, v2)\n\n        variables = v1.copy()\n        variables.update(v2)\n\n        for var, key in variables.items():\n            assert var in p2\n            assert p2.names[var] == key\n            assert_vector_equal(p2.frame[var], long_df[key])\n\n    def test_join_remove_variable(self, long_df):\n\n        variables = {\"x\": \"x\", \"y\": \"f\"}\n        drop_var = \"y\"\n\n        p1 = PlotData(long_df, variables)\n        p2 = p1.join(None, {drop_var: None})\n\n        assert drop_var in p1\n        assert drop_var not in p2\n        assert drop_var not in p2.frame\n        assert drop_var not in p2.names", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_join_all_operations_TestPlotData.test_join_all_operations.for_var_key_in_v2_items_.if_key_is_None_.else_.assert_vector_equal_p2_fr": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_join_all_operations_TestPlotData.test_join_all_operations.for_var_key_in_v2_items_.if_key_is_None_.else_.assert_vector_equal_p2_fr", "embedding": null, "metadata": {"file_path": "tests/_core/test_data.py", "file_name": "test_data.py", "file_type": "text/x-python", "category": "test", "start_line": 278, "end_line": 291, "span_ids": ["TestPlotData.test_join_all_operations"], "tokens": 133}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotData:\n\n    def test_join_all_operations(self, long_df):\n\n        v1 = {\"x\": \"x\", \"y\": \"y\", \"color\": \"a\"}\n        v2 = {\"y\": \"s\", \"size\": \"s\", \"color\": None}\n\n        p1 = PlotData(long_df, v1)\n        p2 = p1.join(None, v2)\n\n        for var, key in v2.items():\n            if key is None:\n                assert var not in p2\n            else:\n                assert p2.names[var] == key\n                assert_vector_equal(p2.frame[var], long_df[key])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_join_all_operations_same_data_TestPlotData.test_join_all_operations_same_data.for_var_key_in_v2_items_.if_key_is_None_.else_.assert_vector_equal_p2_fr": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_join_all_operations_same_data_TestPlotData.test_join_all_operations_same_data.for_var_key_in_v2_items_.if_key_is_None_.else_.assert_vector_equal_p2_fr", "embedding": null, "metadata": {"file_path": "tests/_core/test_data.py", "file_name": "test_data.py", "file_type": "text/x-python", "category": "test", "start_line": 293, "end_line": 306, "span_ids": ["TestPlotData.test_join_all_operations_same_data"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotData:\n\n    def test_join_all_operations_same_data(self, long_df):\n\n        v1 = {\"x\": \"x\", \"y\": \"y\", \"color\": \"a\"}\n        v2 = {\"y\": \"s\", \"size\": \"s\", \"color\": None}\n\n        p1 = PlotData(long_df, v1)\n        p2 = p1.join(long_df, v2)\n\n        for var, key in v2.items():\n            if key is None:\n                assert var not in p2\n            else:\n                assert p2.names[var] == key\n                assert_vector_equal(p2.frame[var], long_df[key])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_join_add_variable_new_data_TestPlotData.test_join_add_variable_new_data.for_var_key_in_dict_v1.assert_vector_equal_p2_fr": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_join_add_variable_new_data_TestPlotData.test_join_add_variable_new_data.for_var_key_in_dict_v1.assert_vector_equal_p2_fr", "embedding": null, "metadata": {"file_path": "tests/_core/test_data.py", "file_name": "test_data.py", "file_type": "text/x-python", "category": "test", "start_line": 308, "end_line": 321, "span_ids": ["TestPlotData.test_join_add_variable_new_data"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotData:\n\n    def test_join_add_variable_new_data(self, long_df):\n\n        d1 = long_df[[\"x\", \"y\"]]\n        d2 = long_df[[\"a\", \"s\"]]\n\n        v1 = {\"x\": \"x\", \"y\": \"y\"}\n        v2 = {\"color\": \"a\"}\n\n        p1 = PlotData(d1, v1)\n        p2 = p1.join(d2, v2)\n\n        for var, key in dict(**v1, **v2).items():\n            assert p2.names[var] == key\n            assert_vector_equal(p2.frame[var], long_df[key])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_join_replace_variable_new_data_TestPlotData.test_join_replace_variable_new_data.for_var_key_in_variables.assert_vector_equal_p2_fr": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_join_replace_variable_new_data_TestPlotData.test_join_replace_variable_new_data.for_var_key_in_variables.assert_vector_equal_p2_fr", "embedding": null, "metadata": {"file_path": "tests/_core/test_data.py", "file_name": "test_data.py", "file_type": "text/x-python", "category": "test", "start_line": 323, "end_line": 339, "span_ids": ["TestPlotData.test_join_replace_variable_new_data"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotData:\n\n    def test_join_replace_variable_new_data(self, long_df):\n\n        d1 = long_df[[\"x\", \"y\"]]\n        d2 = long_df[[\"a\", \"s\"]]\n\n        v1 = {\"x\": \"x\", \"y\": \"y\"}\n        v2 = {\"x\": \"a\"}\n\n        p1 = PlotData(d1, v1)\n        p2 = p1.join(d2, v2)\n\n        variables = v1.copy()\n        variables.update(v2)\n\n        for var, key in variables.items():\n            assert p2.names[var] == key\n            assert_vector_equal(p2.frame[var], long_df[key])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_join_add_variable_different_index_TestPlotData.test_join_add_variable_different_index.assert_p2_frame_loc_d1_in": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_join_add_variable_different_index_TestPlotData.test_join_add_variable_different_index.assert_p2_frame_loc_d1_in", "embedding": null, "metadata": {"file_path": "tests/_core/test_data.py", "file_name": "test_data.py", "file_type": "text/x-python", "category": "test", "start_line": 341, "end_line": 359, "span_ids": ["TestPlotData.test_join_add_variable_different_index"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotData:\n\n    def test_join_add_variable_different_index(self, long_df):\n\n        d1 = long_df.iloc[:70]\n        d2 = long_df.iloc[30:]\n\n        v1 = {\"x\": \"a\"}\n        v2 = {\"y\": \"z\"}\n\n        p1 = PlotData(d1, v1)\n        p2 = p1.join(d2, v2)\n\n        (var1, key1), = v1.items()\n        (var2, key2), = v2.items()\n\n        assert_vector_equal(p2.frame.loc[d1.index, var1], d1[key1])\n        assert_vector_equal(p2.frame.loc[d2.index, var2], d2[key2])\n\n        assert p2.frame.loc[d2.index.difference(d1.index), var1].isna().all()\n        assert p2.frame.loc[d1.index.difference(d2.index), var2].isna().all()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_join_replace_variable_different_index_TestPlotData.test_join_replace_variable_different_index.assert_p2_frame_loc_d1_in": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_join_replace_variable_different_index_TestPlotData.test_join_replace_variable_different_index.assert_p2_frame_loc_d1_in", "embedding": null, "metadata": {"file_path": "tests/_core/test_data.py", "file_name": "test_data.py", "file_type": "text/x-python", "category": "test", "start_line": 361, "end_line": 378, "span_ids": ["TestPlotData.test_join_replace_variable_different_index"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotData:\n\n    def test_join_replace_variable_different_index(self, long_df):\n\n        d1 = long_df.iloc[:70]\n        d2 = long_df.iloc[30:]\n\n        var = \"x\"\n        k1, k2 = \"a\", \"z\"\n        v1 = {var: k1}\n        v2 = {var: k2}\n\n        p1 = PlotData(d1, v1)\n        p2 = p1.join(d2, v2)\n\n        (var1, key1), = v1.items()\n        (var2, key2), = v2.items()\n\n        assert_vector_equal(p2.frame.loc[d2.index, var], d2[k2])\n        assert p2.frame.loc[d1.index.difference(d2.index), var].isna().all()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_join_subset_data_inherit_variables_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_data.py_TestPlotData.test_join_subset_data_inherit_variables_", "embedding": null, "metadata": {"file_path": "tests/_core/test_data.py", "file_name": "test_data.py", "file_type": "text/x-python", "category": "test", "start_line": 380, "end_line": 399, "span_ids": ["TestPlotData.test_join_multiple_inherits_from_orig", "TestPlotData.test_join_subset_data_inherit_variables"], "tokens": 237}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotData:\n\n    def test_join_subset_data_inherit_variables(self, long_df):\n\n        sub_df = long_df[long_df[\"a\"] == \"b\"]\n\n        var = \"y\"\n        p1 = PlotData(long_df, {var: var})\n        p2 = p1.join(sub_df, None)\n\n        assert_vector_equal(p2.frame.loc[sub_df.index, var], sub_df[var])\n        assert p2.frame.loc[long_df.index.difference(sub_df.index), var].isna().all()\n\n    def test_join_multiple_inherits_from_orig(self, rng):\n\n        d1 = pd.DataFrame(dict(a=rng.normal(0, 1, 100), b=rng.normal(0, 1, 100)))\n        d2 = pd.DataFrame(dict(a=rng.normal(0, 1, 100)))\n\n        p = PlotData(d1, {\"x\": \"a\"}).join(d2, {\"y\": \"a\"}).join(None, {\"y\": \"a\"})\n        assert_vector_equal(p.frame[\"x\"], d1[\"a\"])\n        assert_vector_equal(p.frame[\"y\"], d1[\"a\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_groupby.py_np_test_agg_one_grouper.assert_array_equal_res_y": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_groupby.py_np_test_agg_one_grouper.assert_array_equal_res_y", "embedding": null, "metadata": {"file_path": "tests/_core/test_groupby.py", "file_name": "test_groupby.py", "file_type": "text/x-python", "category": "test", "start_line": 2, "end_line": 55, "span_ids": ["test_at_least_one_grouping_variable_required", "test_init_from_list", "test_init_from_dict", "test_agg_one_grouper", "df", "imports", "test_init_requires_order"], "tokens": 363}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nimport pandas as pd\n\nimport pytest\nfrom numpy.testing import assert_array_equal\n\nfrom seaborn._core.groupby import GroupBy\n\n\n@pytest.fixture\ndef df():\n\n    return pd.DataFrame(\n        columns=[\"a\", \"b\", \"x\", \"y\"],\n        data=[\n            [\"a\", \"g\", 1, .2],\n            [\"b\", \"h\", 3, .5],\n            [\"a\", \"f\", 2, .8],\n            [\"a\", \"h\", 1, .3],\n            [\"b\", \"f\", 2, .4],\n        ]\n    )\n\n\ndef test_init_from_list():\n    g = GroupBy([\"a\", \"c\", \"b\"])\n    assert g.order == {\"a\": None, \"c\": None, \"b\": None}\n\n\ndef test_init_from_dict():\n    order = {\"a\": [3, 2, 1], \"c\": None, \"b\": [\"x\", \"y\", \"z\"]}\n    g = GroupBy(order)\n    assert g.order == order\n\n\ndef test_init_requires_order():\n\n    with pytest.raises(ValueError, match=\"GroupBy requires at least one\"):\n        GroupBy([])\n\n\ndef test_at_least_one_grouping_variable_required(df):\n\n    with pytest.raises(ValueError, match=\"No grouping variables are present\"):\n        GroupBy([\"z\"]).agg(df, x=\"mean\")\n\n\ndef test_agg_one_grouper(df):\n\n    res = GroupBy([\"a\"]).agg(df, {\"y\": \"max\"})\n    assert_array_equal(res.index, [0, 1])\n    assert_array_equal(res.columns, [\"a\", \"y\"])\n    assert_array_equal(res[\"a\"], [\"a\", \"b\"])\n    assert_array_equal(res[\"y\"], [.8, .5])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_groupby.py_test_agg_two_groupers_test_agg_two_groupers.assert_array_equal_res_y": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_groupby.py_test_agg_two_groupers_test_agg_two_groupers.assert_array_equal_res_y", "embedding": null, "metadata": {"file_path": "tests/_core/test_groupby.py", "file_name": "test_groupby.py", "file_type": "text/x-python", "category": "test", "start_line": 58, "end_line": 65, "span_ids": ["test_agg_two_groupers"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_agg_two_groupers(df):\n\n    res = GroupBy([\"a\", \"x\"]).agg(df, {\"y\": \"min\"})\n    assert_array_equal(res.index, [0, 1, 2, 3, 4, 5])\n    assert_array_equal(res.columns, [\"a\", \"x\", \"y\"])\n    assert_array_equal(res[\"a\"], [\"a\", \"a\", \"a\", \"b\", \"b\", \"b\"])\n    assert_array_equal(res[\"x\"], [1, 2, 3, 1, 2, 3])\n    assert_array_equal(res[\"y\"], [.2, .8, np.nan, np.nan, .4, .5])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_groupby.py_test_agg_two_groupers_ordered_test_agg_two_groupers_ordered.assert_array_equal_res_y": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_groupby.py_test_agg_two_groupers_ordered_test_agg_two_groupers_ordered.assert_array_equal_res_y", "embedding": null, "metadata": {"file_path": "tests/_core/test_groupby.py", "file_name": "test_groupby.py", "file_type": "text/x-python", "category": "test", "start_line": 68, "end_line": 80, "span_ids": ["test_agg_two_groupers_ordered"], "tokens": 271}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_agg_two_groupers_ordered(df):\n\n    order = {\"b\": [\"h\", \"g\", \"f\"], \"x\": [3, 2, 1]}\n    res = GroupBy(order).agg(df, {\"a\": \"min\", \"y\": lambda x: x.iloc[0]})\n    assert_array_equal(res.index, [0, 1, 2, 3, 4, 5, 6, 7, 8])\n    assert_array_equal(res.columns, [\"a\", \"b\", \"x\", \"y\"])\n    assert_array_equal(res[\"b\"], [\"h\", \"h\", \"h\", \"g\", \"g\", \"g\", \"f\", \"f\", \"f\"])\n    assert_array_equal(res[\"x\"], [3, 2, 1, 3, 2, 1, 3, 2, 1])\n\n    T, F = True, False\n    assert_array_equal(res[\"a\"].isna(), [F, T, F, T, T, F, T, F, T])\n    assert_array_equal(res[\"a\"].dropna(), [\"b\", \"a\", \"a\", \"a\"])\n    assert_array_equal(res[\"y\"].dropna(), [.5, .3, .2, .8])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_groupby.py_test_apply_no_grouper_test_apply_one_grouper.assert_array_equal_res_x": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_groupby.py_test_apply_no_grouper_test_apply_one_grouper.assert_array_equal_res_x", "embedding": null, "metadata": {"file_path": "tests/_core/test_groupby.py", "file_name": "test_groupby.py", "file_type": "text/x-python", "category": "test", "start_line": 83, "end_line": 99, "span_ids": ["test_apply_no_grouper", "test_apply_one_grouper"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_apply_no_grouper(df):\n\n    df = df[[\"x\", \"y\"]]\n    res = GroupBy([\"a\"]).apply(df, lambda x: x.sort_values(\"x\"))\n    assert_array_equal(res.columns, [\"x\", \"y\"])\n    assert_array_equal(res[\"x\"], df[\"x\"].sort_values())\n    assert_array_equal(res[\"y\"], df.loc[np.argsort(df[\"x\"]), \"y\"])\n\n\ndef test_apply_one_grouper(df):\n\n    res = GroupBy([\"a\"]).apply(df, lambda x: x.sort_values(\"x\"))\n    assert_array_equal(res.index, [0, 1, 2, 3, 4])\n    assert_array_equal(res.columns, [\"a\", \"b\", \"x\", \"y\"])\n    assert_array_equal(res[\"a\"], [\"a\", \"a\", \"a\", \"b\", \"b\"])\n    assert_array_equal(res[\"b\"], [\"g\", \"h\", \"f\", \"f\", \"h\"])\n    assert_array_equal(res[\"x\"], [1, 1, 2, 2, 3])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_groupby.py_test_apply_mutate_columns_test_apply_mutate_columns.assert_array_equal_res_y": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_groupby.py_test_apply_mutate_columns_test_apply_mutate_columns.assert_array_equal_res_y", "embedding": null, "metadata": {"file_path": "tests/_core/test_groupby.py", "file_name": "test_groupby.py", "file_type": "text/x-python", "category": "test", "start_line": 102, "end_line": 118, "span_ids": ["test_apply_mutate_columns"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_apply_mutate_columns(df):\n\n    xx = np.arange(0, 5)\n    hats = []\n\n    def polyfit(df):\n        fit = np.polyfit(df[\"x\"], df[\"y\"], 1)\n        hat = np.polyval(fit, xx)\n        hats.append(hat)\n        return pd.DataFrame(dict(x=xx, y=hat))\n\n    res = GroupBy([\"a\"]).apply(df, polyfit)\n    assert_array_equal(res.index, np.arange(xx.size * 2))\n    assert_array_equal(res.columns, [\"a\", \"x\", \"y\"])\n    assert_array_equal(res[\"a\"], [\"a\"] * xx.size + [\"b\"] * xx.size)\n    assert_array_equal(res[\"x\"], xx.tolist() + xx.tolist())\n    assert_array_equal(res[\"y\"], np.concatenate(hats))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_groupby.py_test_apply_replace_columns_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_groupby.py_test_apply_replace_columns_", "embedding": null, "metadata": {"file_path": "tests/_core/test_groupby.py", "file_name": "test_groupby.py", "file_type": "text/x-python", "category": "test", "start_line": 121, "end_line": 135, "span_ids": ["test_apply_replace_columns"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_apply_replace_columns(df):\n\n    def add_sorted_cumsum(df):\n\n        x = df[\"x\"].sort_values()\n        z = df.loc[x.index, \"y\"].cumsum()\n        return pd.DataFrame(dict(x=x.values, z=z.values))\n\n    res = GroupBy([\"a\"]).apply(df, add_sorted_cumsum)\n    assert_array_equal(res.index, df.index)\n    assert_array_equal(res.columns, [\"a\", \"x\", \"z\"])\n    assert_array_equal(res[\"a\"], [\"a\", \"a\", \"a\", \"b\", \"b\"])\n    assert_array_equal(res[\"x\"], [1, 1, 2, 2, 3])\n    assert_array_equal(res[\"z\"], [.2, .5, 1.3, .4, .9])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_from_itertools_import_pro_MoveFixtures.df.return.pd_DataFrame_data_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_from_itertools_import_pro_MoveFixtures.df.return.pd_DataFrame_data_", "embedding": null, "metadata": {"file_path": "tests/_core/test_moves.py", "file_name": "test_moves.py", "file_type": "text/x-python", "category": "test", "start_line": 2, "end_line": 30, "span_ids": ["MoveFixtures.df", "imports", "MoveFixtures"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from itertools import product\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.testing import assert_series_equal\nfrom numpy.testing import assert_array_equal, assert_array_almost_equal\n\nfrom seaborn._core.moves import Dodge, Jitter, Shift, Stack, Norm\nfrom seaborn._core.rules import categorical_order\nfrom seaborn._core.groupby import GroupBy\n\nimport pytest\n\n\nclass MoveFixtures:\n\n    @pytest.fixture\n    def df(self, rng):\n\n        n = 50\n        data = {\n            \"x\": rng.choice([0., 1., 2., 3.], n),\n            \"y\": rng.normal(0, 1, n),\n            \"grp2\": rng.choice([\"a\", \"b\"], n),\n            \"grp3\": rng.choice([\"x\", \"y\", \"z\"], n),\n            \"width\": 0.8,\n            \"baseline\": 0,\n        }\n        return pd.DataFrame(data)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_MoveFixtures.toy_df_MoveFixtures.toy_df_widths.return.toy_df": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_MoveFixtures.toy_df_MoveFixtures.toy_df_widths.return.toy_df", "embedding": null, "metadata": {"file_path": "tests/_core/test_moves.py", "file_name": "test_moves.py", "file_type": "text/x-python", "category": "test", "start_line": 32, "end_line": 48, "span_ids": ["MoveFixtures.toy_df", "MoveFixtures.toy_df_widths"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MoveFixtures:\n\n    @pytest.fixture\n    def toy_df(self):\n\n        data = {\n            \"x\": [0, 0, 1],\n            \"y\": [1, 2, 3],\n            \"grp\": [\"a\", \"b\", \"b\"],\n            \"width\": .8,\n            \"baseline\": 0,\n        }\n        return pd.DataFrame(data)\n\n    @pytest.fixture\n    def toy_df_widths(self, toy_df):\n\n        toy_df[\"width\"] = [.8, .2, .4]\n        return toy_df", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_MoveFixtures.toy_df_facets_MoveFixtures.toy_df_facets.return.pd_DataFrame_data_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_MoveFixtures.toy_df_facets_MoveFixtures.toy_df_facets.return.pd_DataFrame_data_", "embedding": null, "metadata": {"file_path": "tests/_core/test_moves.py", "file_name": "test_moves.py", "file_type": "text/x-python", "category": "test", "start_line": 50, "end_line": 61, "span_ids": ["MoveFixtures.toy_df_facets"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MoveFixtures:\n\n    @pytest.fixture\n    def toy_df_facets(self):\n\n        data = {\n            \"x\": [0, 0, 1, 0, 1, 2],\n            \"y\": [1, 2, 3, 1, 2, 3],\n            \"grp\": [\"a\", \"b\", \"a\", \"b\", \"a\", \"b\"],\n            \"col\": [\"x\", \"x\", \"x\", \"y\", \"y\", \"y\"],\n            \"width\": .8,\n            \"baseline\": 0,\n        }\n        return pd.DataFrame(data)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestJitter_TestJitter.test_seed.for_var_in_xy_.assert_series_equal_res1_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestJitter_TestJitter.test_seed.for_var_in_xy_.assert_series_equal_res1_", "embedding": null, "metadata": {"file_path": "tests/_core/test_moves.py", "file_name": "test_moves.py", "file_type": "text/x-python", "category": "test", "start_line": 64, "end_line": 116, "span_ids": ["TestJitter.test_x", "TestJitter", "TestJitter.test_y", "TestJitter.test_width", "TestJitter.test_seed", "TestJitter.check_pos", "TestJitter.check_same", "TestJitter.get_groupby"], "tokens": 495}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestJitter(MoveFixtures):\n\n    def get_groupby(self, data, orient):\n        other = {\"x\": \"y\", \"y\": \"x\"}[orient]\n        variables = [v for v in data if v not in [other, \"width\"]]\n        return GroupBy(variables)\n\n    def check_same(self, res, df, *cols):\n        for col in cols:\n            assert_series_equal(res[col], df[col])\n\n    def check_pos(self, res, df, var, limit):\n\n        assert (res[var] != df[var]).all()\n        assert (res[var] < df[var] + limit / 2).all()\n        assert (res[var] > df[var] - limit / 2).all()\n\n    def test_width(self, df):\n\n        width = .4\n        orient = \"x\"\n        groupby = self.get_groupby(df, orient)\n        res = Jitter(width=width)(df, groupby, orient, {})\n        self.check_same(res, df, \"y\", \"grp2\", \"width\")\n        self.check_pos(res, df, \"x\", width * df[\"width\"])\n\n    def test_x(self, df):\n\n        val = .2\n        orient = \"x\"\n        groupby = self.get_groupby(df, orient)\n        res = Jitter(x=val)(df, groupby, orient, {})\n        self.check_same(res, df, \"y\", \"grp2\", \"width\")\n        self.check_pos(res, df, \"x\", val)\n\n    def test_y(self, df):\n\n        val = .2\n        orient = \"x\"\n        groupby = self.get_groupby(df, orient)\n        res = Jitter(y=val)(df, groupby, orient, {})\n        self.check_same(res, df, \"x\", \"grp2\", \"width\")\n        self.check_pos(res, df, \"y\", val)\n\n    def test_seed(self, df):\n\n        kws = dict(width=.2, y=.1, seed=0)\n        orient = \"x\"\n        groupby = self.get_groupby(df, orient)\n        res1 = Jitter(**kws)(df, groupby, orient, {})\n        res2 = Jitter(**kws)(df, groupby, orient, {})\n        for var in \"xy\":\n            assert_series_equal(res1[var], res2[var])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestDodge_TestDodge.test_widths_drop.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestDodge_TestDodge.test_widths_drop.None_2", "embedding": null, "metadata": {"file_path": "tests/_core/test_moves.py", "file_name": "test_moves.py", "file_type": "text/x-python", "category": "test", "start_line": 119, "end_line": 184, "span_ids": ["TestDodge.test_gap", "TestDodge.test_default", "TestDodge.test_widths_default", "TestDodge", "TestDodge.test_widths_fill", "TestDodge.test_widths_drop", "TestDodge.test_fill", "TestDodge.test_drop"], "tokens": 694}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDodge(MoveFixtures):\n\n    # First some very simple toy examples\n\n    def test_default(self, toy_df):\n\n        groupby = GroupBy([\"x\", \"grp\"])\n        res = Dodge()(toy_df, groupby, \"x\", {})\n\n        assert_array_equal(res[\"y\"], [1, 2, 3]),\n        assert_array_almost_equal(res[\"x\"], [-.2, .2, 1.2])\n        assert_array_almost_equal(res[\"width\"], [.4, .4, .4])\n\n    def test_fill(self, toy_df):\n\n        groupby = GroupBy([\"x\", \"grp\"])\n        res = Dodge(empty=\"fill\")(toy_df, groupby, \"x\", {})\n\n        assert_array_equal(res[\"y\"], [1, 2, 3]),\n        assert_array_almost_equal(res[\"x\"], [-.2, .2, 1])\n        assert_array_almost_equal(res[\"width\"], [.4, .4, .8])\n\n    def test_drop(self, toy_df):\n\n        groupby = GroupBy([\"x\", \"grp\"])\n        res = Dodge(\"drop\")(toy_df, groupby, \"x\", {})\n\n        assert_array_equal(res[\"y\"], [1, 2, 3])\n        assert_array_almost_equal(res[\"x\"], [-.2, .2, 1])\n        assert_array_almost_equal(res[\"width\"], [.4, .4, .4])\n\n    def test_gap(self, toy_df):\n\n        groupby = GroupBy([\"x\", \"grp\"])\n        res = Dodge(gap=.25)(toy_df, groupby, \"x\", {})\n\n        assert_array_equal(res[\"y\"], [1, 2, 3])\n        assert_array_almost_equal(res[\"x\"], [-.2, .2, 1.2])\n        assert_array_almost_equal(res[\"width\"], [.3, .3, .3])\n\n    def test_widths_default(self, toy_df_widths):\n\n        groupby = GroupBy([\"x\", \"grp\"])\n        res = Dodge()(toy_df_widths, groupby, \"x\", {})\n\n        assert_array_equal(res[\"y\"], [1, 2, 3])\n        assert_array_almost_equal(res[\"x\"], [-.08, .32, 1.1])\n        assert_array_almost_equal(res[\"width\"], [.64, .16, .2])\n\n    def test_widths_fill(self, toy_df_widths):\n\n        groupby = GroupBy([\"x\", \"grp\"])\n        res = Dodge(empty=\"fill\")(toy_df_widths, groupby, \"x\", {})\n\n        assert_array_equal(res[\"y\"], [1, 2, 3])\n        assert_array_almost_equal(res[\"x\"], [-.08, .32, 1])\n        assert_array_almost_equal(res[\"width\"], [.64, .16, .4])\n\n    def test_widths_drop(self, toy_df_widths):\n\n        groupby = GroupBy([\"x\", \"grp\"])\n        res = Dodge(empty=\"drop\")(toy_df_widths, groupby, \"x\", {})\n\n        assert_array_equal(res[\"y\"], [1, 2, 3])\n        assert_array_almost_equal(res[\"x\"], [-.08, .32, 1])\n        assert_array_almost_equal(res[\"width\"], [.64, .16, .2])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestDodge.test_faceted_default_TestDodge.test_faceted_default.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestDodge.test_faceted_default_TestDodge.test_faceted_default.None_2", "embedding": null, "metadata": {"file_path": "tests/_core/test_moves.py", "file_name": "test_moves.py", "file_type": "text/x-python", "category": "test", "start_line": 186, "end_line": 193, "span_ids": ["TestDodge.test_faceted_default"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDodge(MoveFixtures):\n\n    def test_faceted_default(self, toy_df_facets):\n\n        groupby = GroupBy([\"x\", \"grp\", \"col\"])\n        res = Dodge()(toy_df_facets, groupby, \"x\", {})\n\n        assert_array_equal(res[\"y\"], [1, 2, 3, 1, 2, 3])\n        assert_array_almost_equal(res[\"x\"], [-.2, .2, .8, .2, .8, 2.2])\n        assert_array_almost_equal(res[\"width\"], [.4] * 6)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestDodge.test_faceted_fill_TestDodge.test_faceted_fill.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestDodge.test_faceted_fill_TestDodge.test_faceted_fill.None_2", "embedding": null, "metadata": {"file_path": "tests/_core/test_moves.py", "file_name": "test_moves.py", "file_type": "text/x-python", "category": "test", "start_line": 195, "end_line": 202, "span_ids": ["TestDodge.test_faceted_fill"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDodge(MoveFixtures):\n\n    def test_faceted_fill(self, toy_df_facets):\n\n        groupby = GroupBy([\"x\", \"grp\", \"col\"])\n        res = Dodge(empty=\"fill\")(toy_df_facets, groupby, \"x\", {})\n\n        assert_array_equal(res[\"y\"], [1, 2, 3, 1, 2, 3])\n        assert_array_almost_equal(res[\"x\"], [-.2, .2, 1, 0, 1, 2])\n        assert_array_almost_equal(res[\"width\"], [.4, .4, .8, .8, .8, .8])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestDodge.test_faceted_drop_TestDodge.test_faceted_drop.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestDodge.test_faceted_drop_TestDodge.test_faceted_drop.None_2", "embedding": null, "metadata": {"file_path": "tests/_core/test_moves.py", "file_name": "test_moves.py", "file_type": "text/x-python", "category": "test", "start_line": 204, "end_line": 211, "span_ids": ["TestDodge.test_faceted_drop"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDodge(MoveFixtures):\n\n    def test_faceted_drop(self, toy_df_facets):\n\n        groupby = GroupBy([\"x\", \"grp\", \"col\"])\n        res = Dodge(empty=\"drop\")(toy_df_facets, groupby, \"x\", {})\n\n        assert_array_equal(res[\"y\"], [1, 2, 3, 1, 2, 3])\n        assert_array_almost_equal(res[\"x\"], [-.2, .2, 1, 0, 1, 2])\n        assert_array_almost_equal(res[\"width\"], [.4] * 6)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestDodge.test_orient_TestDodge._Now_tests_with_slightly": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestDodge.test_orient_TestDodge._Now_tests_with_slightly", "embedding": null, "metadata": {"file_path": "tests/_core/test_moves.py", "file_name": "test_moves.py", "file_type": "text/x-python", "category": "test", "start_line": 213, "end_line": 224, "span_ids": ["TestDodge.test_orient"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDodge(MoveFixtures):\n\n    def test_orient(self, toy_df):\n\n        df = toy_df.assign(x=toy_df[\"y\"], y=toy_df[\"x\"])\n\n        groupby = GroupBy([\"y\", \"grp\"])\n        res = Dodge(\"drop\")(df, groupby, \"y\", {})\n\n        assert_array_equal(res[\"x\"], [1, 2, 3])\n        assert_array_almost_equal(res[\"y\"], [-.2, .2, 1])\n        assert_array_almost_equal(res[\"width\"], [.4, .4, .4])\n\n    # Now tests with slightly more complicated data", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestDodge.test_single_semantic_TestDodge.test_single_semantic.for_val_shift_in_zip_lev.assert_series_equal_res_l": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestDodge.test_single_semantic_TestDodge.test_single_semantic.for_val_shift_in_zip_lev.assert_series_equal_res_l", "embedding": null, "metadata": {"file_path": "tests/_core/test_moves.py", "file_name": "test_moves.py", "file_type": "text/x-python", "category": "test", "start_line": 226, "end_line": 243, "span_ids": ["TestDodge.test_single_semantic"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDodge(MoveFixtures):\n\n    @pytest.mark.parametrize(\"grp\", [\"grp2\", \"grp3\"])\n    def test_single_semantic(self, df, grp):\n\n        groupby = GroupBy([\"x\", grp])\n        res = Dodge()(df, groupby, \"x\", {})\n\n        levels = categorical_order(df[grp])\n        w, n = 0.8, len(levels)\n\n        shifts = np.linspace(0, w - w / n, n)\n        shifts -= shifts.mean()\n\n        assert_series_equal(res[\"y\"], df[\"y\"])\n        assert_series_equal(res[\"width\"], df[\"width\"] / n)\n\n        for val, shift in zip(levels, shifts):\n            rows = df[grp] == val\n            assert_series_equal(res.loc[rows, \"x\"], df.loc[rows, \"x\"] + shift)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestDodge.test_two_semantics_TestDodge.test_two_semantics.for_v2_v3_shift_in_zi.assert_series_equal_res_l": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestDodge.test_two_semantics_TestDodge.test_two_semantics.for_v2_v3_shift_in_zi.assert_series_equal_res_l", "embedding": null, "metadata": {"file_path": "tests/_core/test_moves.py", "file_name": "test_moves.py", "file_type": "text/x-python", "category": "test", "start_line": 245, "end_line": 261, "span_ids": ["TestDodge.test_two_semantics"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDodge(MoveFixtures):\n\n    def test_two_semantics(self, df):\n\n        groupby = GroupBy([\"x\", \"grp2\", \"grp3\"])\n        res = Dodge()(df, groupby, \"x\", {})\n\n        levels = categorical_order(df[\"grp2\"]), categorical_order(df[\"grp3\"])\n        w, n = 0.8, len(levels[0]) * len(levels[1])\n\n        shifts = np.linspace(0, w - w / n, n)\n        shifts -= shifts.mean()\n\n        assert_series_equal(res[\"y\"], df[\"y\"])\n        assert_series_equal(res[\"width\"], df[\"width\"] / n)\n\n        for (v2, v3), shift in zip(product(*levels), shifts):\n            rows = (df[\"grp2\"] == v2) & (df[\"grp3\"] == v3)\n            assert_series_equal(res.loc[rows, \"x\"], df.loc[rows, \"x\"] + shift)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestStack_TestStack.test_faceted.assert_array_equal_res_b": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestStack_TestStack.test_faceted.assert_array_equal_res_b", "embedding": null, "metadata": {"file_path": "tests/_core/test_moves.py", "file_name": "test_moves.py", "file_type": "text/x-python", "category": "test", "start_line": 264, "end_line": 282, "span_ids": ["TestStack.test_faceted", "TestStack", "TestStack.test_basic"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestStack(MoveFixtures):\n\n    def test_basic(self, toy_df):\n\n        groupby = GroupBy([\"color\", \"group\"])\n        res = Stack()(toy_df, groupby, \"x\", {})\n\n        assert_array_equal(res[\"x\"], [0, 0, 1])\n        assert_array_equal(res[\"y\"], [1, 3, 3])\n        assert_array_equal(res[\"baseline\"], [0, 1, 0])\n\n    def test_faceted(self, toy_df_facets):\n\n        groupby = GroupBy([\"color\", \"group\"])\n        res = Stack()(toy_df_facets, groupby, \"x\", {})\n\n        assert_array_equal(res[\"x\"], [0, 0, 1, 0, 1, 2])\n        assert_array_equal(res[\"y\"], [1, 3, 3, 1, 2, 3])\n        assert_array_equal(res[\"baseline\"], [0, 1, 0, 0, 0, 0])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestStack.test_misssing_data_TestStack.test_baseline_homogeneity_check.with_pytest_raises_Runtim.move_toy_df_groupby_x_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestStack.test_misssing_data_TestStack.test_baseline_homogeneity_check.with_pytest_raises_Runtim.move_toy_df_groupby_x_", "embedding": null, "metadata": {"file_path": "tests/_core/test_moves.py", "file_name": "test_moves.py", "file_type": "text/x-python", "category": "test", "start_line": 284, "end_line": 302, "span_ids": ["TestStack.test_misssing_data", "TestStack.test_baseline_homogeneity_check"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestStack(MoveFixtures):\n\n    def test_misssing_data(self, toy_df):\n\n        df = pd.DataFrame({\n            \"x\": [0, 0, 0],\n            \"y\": [2, np.nan, 1],\n            \"baseline\": [0, 0, 0],\n        })\n        res = Stack()(df, None, \"x\", {})\n        assert_array_equal(res[\"y\"], [2, np.nan, 3])\n        assert_array_equal(res[\"baseline\"], [0, np.nan, 2])\n\n    def test_baseline_homogeneity_check(self, toy_df):\n\n        toy_df[\"baseline\"] = [0, 1, 2]\n        groupby = GroupBy([\"color\", \"group\"])\n        move = Stack()\n        err = \"Stack move cannot be used when baselines\"\n        with pytest.raises(RuntimeError, match=err):\n            move(toy_df, groupby, \"x\", {})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestShift_TestShift.test_moves.assert_array_equal_res_y": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestShift_TestShift.test_moves.assert_array_equal_res_y", "embedding": null, "metadata": {"file_path": "tests/_core/test_moves.py", "file_name": "test_moves.py", "file_type": "text/x-python", "category": "test", "start_line": 305, "end_line": 320, "span_ids": ["TestShift.test_moves", "TestShift", "TestShift.test_default"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestShift(MoveFixtures):\n\n    def test_default(self, toy_df):\n\n        gb = GroupBy([\"color\", \"group\"])\n        res = Shift()(toy_df, gb, \"x\", {})\n        for col in toy_df:\n            assert_series_equal(toy_df[col], res[col])\n\n    @pytest.mark.parametrize(\"x,y\", [(.3, 0), (0, .2), (.1, .3)])\n    def test_moves(self, toy_df, x, y):\n\n        gb = GroupBy([\"color\", \"group\"])\n        res = Shift(x=x, y=y)(toy_df, gb, \"x\", {})\n        assert_array_equal(res[\"x\"], toy_df[\"x\"] + x)\n        assert_array_equal(res[\"y\"], toy_df[\"y\"] + y)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestNorm_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_moves.py_TestNorm_", "embedding": null, "metadata": {"file_path": "tests/_core/test_moves.py", "file_name": "test_moves.py", "file_type": "text/x-python", "category": "test", "start_line": 323, "end_line": 359, "span_ids": ["TestNorm.test_default_groups", "TestNorm.test_where", "TestNorm.test_sum", "TestNorm", "TestNorm.test_percent", "TestNorm.test_default_no_groups"], "tokens": 328}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestNorm(MoveFixtures):\n\n    @pytest.mark.parametrize(\"orient\", [\"x\", \"y\"])\n    def test_default_no_groups(self, df, orient):\n\n        other = {\"x\": \"y\", \"y\": \"x\"}[orient]\n        gb = GroupBy([\"null\"])\n        res = Norm()(df, gb, orient, {})\n        assert res[other].max() == pytest.approx(1)\n\n    @pytest.mark.parametrize(\"orient\", [\"x\", \"y\"])\n    def test_default_groups(self, df, orient):\n\n        other = {\"x\": \"y\", \"y\": \"x\"}[orient]\n        gb = GroupBy([\"grp2\"])\n        res = Norm()(df, gb, orient, {})\n        for _, grp in res.groupby(\"grp2\"):\n            assert grp[other].max() == pytest.approx(1)\n\n    def test_sum(self, df):\n\n        gb = GroupBy([\"null\"])\n        res = Norm(\"sum\")(df, gb, \"x\", {})\n        assert res[\"y\"].sum() == pytest.approx(1)\n\n    def test_where(self, df):\n\n        gb = GroupBy([\"null\"])\n        res = Norm(where=\"x == 2\")(df, gb, \"x\", {})\n        assert res.loc[res[\"x\"] == 2, \"y\"].max() == pytest.approx(1)\n\n    def test_percent(self, df):\n\n        gb = GroupBy([\"null\"])\n        res = Norm(percent=True)(df, gb, \"x\", {})\n        assert res[\"y\"].max() == pytest.approx(100)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_MockMark_MockMark._legend_artist.return.a": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_MockMark_MockMark._legend_artist.return.a", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 42, "end_line": 72, "span_ids": ["MockMark._legend_artist", "MockMark", "MockMark._plot"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MockMark(Mark):\n\n    _grouping_props = [\"color\"]\n\n    def __init__(self, *args, **kwargs):\n\n        super().__init__(*args, **kwargs)\n        self.passed_keys = []\n        self.passed_data = []\n        self.passed_axes = []\n        self.passed_scales = None\n        self.passed_orient = None\n        self.n_splits = 0\n\n    def _plot(self, split_gen, scales, orient):\n\n        for keys, data, ax in split_gen():\n            self.n_splits += 1\n            self.passed_keys.append(keys)\n            self.passed_data.append(data)\n            self.passed_axes.append(ax)\n\n        self.passed_scales = scales\n        self.passed_orient = orient\n\n    def _legend_artist(self, variables, value, scales):\n\n        a = mpl.lines.Line2D([], [])\n        a.variables = variables\n        a.value = value\n        return a", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestInit_TestInit.test_positional_x.assert_list_p__data_sourc": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestInit_TestInit.test_positional_x.assert_list_p__data_sourc", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 75, "end_line": 170, "span_ids": ["TestInit.test_df_and_named_variables", "TestInit.test_positional_data_x", "TestInit.test_data_only", "TestInit.test_empty", "TestInit.test_positional_and_named_xy", "TestInit.test_positional_x", "TestInit", "TestInit.test_data_only_named", "TestInit.test_positional_data_x_y", "TestInit.test_positional_x_y", "TestInit.test_df_and_mixed_variables", "TestInit.test_positional_and_named_data", "TestInit.test_vector_variables_no_index", "TestInit.test_vector_variables_only"], "tokens": 799}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestInit:\n\n    def test_empty(self):\n\n        p = Plot()\n        assert p._data.source_data is None\n        assert p._data.source_vars == {}\n\n    def test_data_only(self, long_df):\n\n        p = Plot(long_df)\n        assert p._data.source_data is long_df\n        assert p._data.source_vars == {}\n\n    def test_df_and_named_variables(self, long_df):\n\n        variables = {\"x\": \"a\", \"y\": \"z\"}\n        p = Plot(long_df, **variables)\n        for var, col in variables.items():\n            assert_vector_equal(p._data.frame[var], long_df[col])\n        assert p._data.source_data is long_df\n        assert p._data.source_vars.keys() == variables.keys()\n\n    def test_df_and_mixed_variables(self, long_df):\n\n        variables = {\"x\": \"a\", \"y\": long_df[\"z\"]}\n        p = Plot(long_df, **variables)\n        for var, col in variables.items():\n            if isinstance(col, str):\n                assert_vector_equal(p._data.frame[var], long_df[col])\n            else:\n                assert_vector_equal(p._data.frame[var], col)\n        assert p._data.source_data is long_df\n        assert p._data.source_vars.keys() == variables.keys()\n\n    def test_vector_variables_only(self, long_df):\n\n        variables = {\"x\": long_df[\"a\"], \"y\": long_df[\"z\"]}\n        p = Plot(**variables)\n        for var, col in variables.items():\n            assert_vector_equal(p._data.frame[var], col)\n        assert p._data.source_data is None\n        assert p._data.source_vars.keys() == variables.keys()\n\n    def test_vector_variables_no_index(self, long_df):\n\n        variables = {\"x\": long_df[\"a\"].to_numpy(), \"y\": long_df[\"z\"].to_list()}\n        p = Plot(**variables)\n        for var, col in variables.items():\n            assert_vector_equal(p._data.frame[var], pd.Series(col))\n            assert p._data.names[var] is None\n        assert p._data.source_data is None\n        assert p._data.source_vars.keys() == variables.keys()\n\n    def test_data_only_named(self, long_df):\n\n        p = Plot(data=long_df)\n        assert p._data.source_data is long_df\n        assert p._data.source_vars == {}\n\n    def test_positional_and_named_data(self, long_df):\n\n        err = \"`data` given by both name and position\"\n        with pytest.raises(TypeError, match=err):\n            Plot(long_df, data=long_df)\n\n    @pytest.mark.parametrize(\"var\", [\"x\", \"y\"])\n    def test_positional_and_named_xy(self, long_df, var):\n\n        err = f\"`{var}` given by both name and position\"\n        with pytest.raises(TypeError, match=err):\n            Plot(long_df, \"a\", \"b\", **{var: \"c\"})\n\n    def test_positional_data_x_y(self, long_df):\n\n        p = Plot(long_df, \"a\", \"b\")\n        assert p._data.source_data is long_df\n        assert list(p._data.source_vars) == [\"x\", \"y\"]\n\n    def test_positional_x_y(self, long_df):\n\n        p = Plot(long_df[\"a\"], long_df[\"b\"])\n        assert p._data.source_data is None\n        assert list(p._data.source_vars) == [\"x\", \"y\"]\n\n    def test_positional_data_x(self, long_df):\n\n        p = Plot(long_df, \"a\")\n        assert p._data.source_data is long_df\n        assert list(p._data.source_vars) == [\"x\"]\n\n    def test_positional_x(self, long_df):\n\n        p = Plot(long_df[\"a\"])\n        assert p._data.source_data is None\n        assert list(p._data.source_vars) == [\"x\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestInit.test_positional_too_many_TestInit.test_unknown_keywords.with_pytest_raises_TypeEr.Plot_long_df_bad_x_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestInit.test_positional_too_many_TestInit.test_unknown_keywords.with_pytest_raises_TypeEr.Plot_long_df_bad_x_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 172, "end_line": 182, "span_ids": ["TestInit.test_positional_too_many", "TestInit.test_unknown_keywords"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestInit:\n\n    def test_positional_too_many(self, long_df):\n\n        err = r\"Plot\\(\\) accepts no more than 3 positional arguments \\(data, x, y\\)\"\n        with pytest.raises(TypeError, match=err):\n            Plot(long_df, \"x\", \"y\", \"z\")\n\n    def test_unknown_keywords(self, long_df):\n\n        err = r\"Plot\\(\\) got unexpected keyword argument\\(s\\): bad\"\n        with pytest.raises(TypeError, match=err):\n            Plot(long_df, bad=\"x\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLayerAddition_TestLayerAddition.test_with_late_data_definition.for_var_in_xy_.assert_vector_equal_layer": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLayerAddition_TestLayerAddition.test_with_late_data_definition.for_var_in_xy_.assert_vector_equal_layer", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 185, "end_line": 215, "span_ids": ["TestLayerAddition.test_without_data", "TestLayerAddition", "TestLayerAddition.test_with_late_data_definition", "TestLayerAddition.test_with_new_variable_by_name", "TestLayerAddition.test_with_new_variable_by_vector"], "tokens": 316}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLayerAddition:\n\n    def test_without_data(self, long_df):\n\n        p = Plot(long_df, x=\"x\", y=\"y\").add(MockMark()).plot()\n        layer, = p._layers\n        assert_frame_equal(p._data.frame, layer[\"data\"].frame, check_dtype=False)\n\n    def test_with_new_variable_by_name(self, long_df):\n\n        p = Plot(long_df, x=\"x\").add(MockMark(), y=\"y\").plot()\n        layer, = p._layers\n        assert layer[\"data\"].frame.columns.to_list() == [\"x\", \"y\"]\n        for var in \"xy\":\n            assert_vector_equal(layer[\"data\"].frame[var], long_df[var])\n\n    def test_with_new_variable_by_vector(self, long_df):\n\n        p = Plot(long_df, x=\"x\").add(MockMark(), y=long_df[\"y\"]).plot()\n        layer, = p._layers\n        assert layer[\"data\"].frame.columns.to_list() == [\"x\", \"y\"]\n        for var in \"xy\":\n            assert_vector_equal(layer[\"data\"].frame[var], long_df[var])\n\n    def test_with_late_data_definition(self, long_df):\n\n        p = Plot().add(MockMark(), data=long_df, x=\"x\", y=\"y\").plot()\n        layer, = p._layers\n        assert layer[\"data\"].frame.columns.to_list() == [\"x\", \"y\"]\n        for var in \"xy\":\n            assert_vector_equal(layer[\"data\"].frame[var], long_df[var])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLayerAddition.test_with_new_data_definition_TestLayerAddition.test_with_new_data_definition.for_var_in_xy_.assert_vector_equal_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLayerAddition.test_with_new_data_definition_TestLayerAddition.test_with_new_data_definition.for_var_in_xy_.assert_vector_equal_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 217, "end_line": 227, "span_ids": ["TestLayerAddition.test_with_new_data_definition"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLayerAddition:\n\n    def test_with_new_data_definition(self, long_df):\n\n        long_df_sub = long_df.sample(frac=.5)\n\n        p = Plot(long_df, x=\"x\", y=\"y\").add(MockMark(), data=long_df_sub).plot()\n        layer, = p._layers\n        assert layer[\"data\"].frame.columns.to_list() == [\"x\", \"y\"]\n        for var in \"xy\":\n            assert_vector_equal(\n                layer[\"data\"].frame[var], long_df_sub[var].reindex(long_df.index)\n            )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLayerAddition.test_drop_variable_TestLayerAddition.test_stat_nondefault.assert_layer_stat___cl": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLayerAddition.test_drop_variable_TestLayerAddition.test_stat_nondefault.assert_layer_stat___cl", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 229, "end_line": 256, "span_ids": ["TestLayerAddition.test_stat_nondefault.MarkWithDefaultStat", "TestLayerAddition.test_stat_nondefault", "TestLayerAddition.test_stat_nondefault.OtherMockStat", "TestLayerAddition.test_stat_nondefault.MarkWithDefaultStat:2", "TestLayerAddition.test_stat_nondefault.OtherMockStat:2", "TestLayerAddition.test_stat_default.MarkWithDefaultStat", "TestLayerAddition.test_stat_default.MarkWithDefaultStat:2", "TestLayerAddition.test_stat_default", "TestLayerAddition.test_drop_variable"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLayerAddition:\n\n    def test_drop_variable(self, long_df):\n\n        p = Plot(long_df, x=\"x\", y=\"y\").add(MockMark(), y=None).plot()\n        layer, = p._layers\n        assert layer[\"data\"].frame.columns.to_list() == [\"x\"]\n        assert_vector_equal(layer[\"data\"].frame[\"x\"], long_df[\"x\"], check_dtype=False)\n\n    @pytest.mark.xfail(reason=\"Need decision on default stat\")\n    def test_stat_default(self):\n\n        class MarkWithDefaultStat(Mark):\n            default_stat = Stat\n\n        p = Plot().add(MarkWithDefaultStat())\n        layer, = p._layers\n        assert layer[\"stat\"].__class__ is Stat\n\n    def test_stat_nondefault(self):\n\n        class MarkWithDefaultStat(Mark):\n            default_stat = Stat\n\n        class OtherMockStat(Stat):\n            pass\n\n        p = Plot().add(MarkWithDefaultStat(), OtherMockStat())\n        layer, = p._layers\n        assert layer[\"stat\"].__class__ is OtherMockStat", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLayerAddition.test_orient_TestLayerAddition.test_orient.assert_m_orient_at_call_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLayerAddition.test_orient_TestLayerAddition.test_orient.assert_m_orient_at_call_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 261, "end_line": 282, "span_ids": ["TestLayerAddition.test_orient.MockMoveTrackOrient", "TestLayerAddition.test_orient", "TestLayerAddition.test_orient.MockMoveTrackOrient.__call__", "TestLayerAddition.test_orient.MockStatTrackOrient.__call__", "TestLayerAddition.test_orient.MockStatTrackOrient"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLayerAddition:\n\n    @pytest.mark.parametrize(\n        \"arg,expected\",\n        [(\"x\", \"x\"), (\"y\", \"y\"), (\"v\", \"x\"), (\"h\", \"y\")],\n    )\n    def test_orient(self, arg, expected):\n\n        class MockStatTrackOrient(Stat):\n            def __call__(self, data, groupby, orient, scales):\n                self.orient_at_call = orient\n                return data\n\n        class MockMoveTrackOrient(Move):\n            def __call__(self, data, groupby, orient, scales):\n                self.orient_at_call = orient\n                return data\n\n        s = MockStatTrackOrient()\n        m = MockMoveTrackOrient()\n        Plot(x=[1, 2, 3], y=[1, 2, 3]).add(MockMark(), s, m, orient=arg).plot()\n\n        assert s.orient_at_call == expected\n        assert m.orient_at_call == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling_TestScaling.test_faceted_log_scale.for_ax_in_p__figure_axes_.assert_array_equal_xfm_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling_TestScaling.test_faceted_log_scale.for_ax_in_p__figure_axes_.assert_array_equal_xfm_1", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 332, "end_line": 381, "span_ids": ["TestScaling.test_inferred_categorical_converter", "TestScaling.test_categorical_as_datetime", "TestScaling", "TestScaling.test_faceted_log_scale", "TestScaling.test_explicit_categorical_converter", "TestScaling.test_inference_joins", "TestScaling.test_inference", "TestScaling.test_inference_from_layer_data"], "tokens": 484}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScaling:\n\n    def test_inference(self, long_df):\n\n        for col, scale_type in zip(\"zat\", [\"Continuous\", \"Nominal\", \"Temporal\"]):\n            p = Plot(long_df, x=col, y=col).add(MockMark()).plot()\n            for var in \"xy\":\n                assert p._scales[var].__class__.__name__ == scale_type\n\n    def test_inference_from_layer_data(self):\n\n        p = Plot().add(MockMark(), x=[\"a\", \"b\", \"c\"]).plot()\n        assert p._scales[\"x\"](\"b\") == 1\n\n    def test_inference_joins(self):\n\n        p = (\n            Plot(y=pd.Series([1, 2, 3, 4]))\n            .add(MockMark(), x=pd.Series([1, 2]))\n            .add(MockMark(), x=pd.Series([\"a\", \"b\"], index=[2, 3]))\n            .plot()\n        )\n        assert p._scales[\"x\"](\"a\") == 2\n\n    def test_inferred_categorical_converter(self):\n\n        p = Plot(x=[\"b\", \"c\", \"a\"]).add(MockMark()).plot()\n        ax = p._figure.axes[0]\n        assert ax.xaxis.convert_units(\"c\") == 1\n\n    def test_explicit_categorical_converter(self):\n\n        p = Plot(y=[2, 1, 3]).scale(y=Nominal()).add(MockMark()).plot()\n        ax = p._figure.axes[0]\n        assert ax.yaxis.convert_units(\"3\") == 2\n\n    @pytest.mark.xfail(reason=\"Temporal auto-conversion not implemented\")\n    def test_categorical_as_datetime(self):\n\n        dates = [\"1970-01-03\", \"1970-01-02\", \"1970-01-04\"]\n        p = Plot(x=dates).scale(...).add(MockMark()).plot()\n        p  # TODO\n        ...\n\n    def test_faceted_log_scale(self):\n\n        p = Plot(y=[1, 10]).facet(col=[\"a\", \"b\"]).scale(y=\"log\").plot()\n        for ax in p._figure.axes:\n            xfm = ax.yaxis.get_transform().transform\n            assert_array_equal(xfm([1, 10, 100]), [0, 1, 2])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_paired_single_log_scale_TestScaling.test_paired_single_log_scale.assert_array_equal_xfm_lo": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_paired_single_log_scale_TestScaling.test_paired_single_log_scale.assert_array_equal_xfm_lo", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 369, "end_line": 377, "span_ids": ["TestScaling.test_paired_single_log_scale"], "tokens": 149}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScaling:\n\n    def test_paired_single_log_scale(self):\n\n        x0, x1 = [1, 2, 3], [1, 10, 100]\n        p = Plot().pair(x=[x0, x1]).scale(x1=\"log\").plot()\n        ax_lin, ax_log = p._figure.axes\n        xfm_lin = ax_lin.xaxis.get_transform().transform\n        assert_array_equal(xfm_lin([1, 10, 100]), [1, 10, 100])\n        xfm_log = ax_log.xaxis.get_transform().transform\n        assert_array_equal(xfm_log([1, 10, 100]), [0, 1, 2])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_log_scale_name_TestScaling.test_mark_data_log_transform_is_inverted.assert_vector_equal_m_pas": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_log_scale_name_TestScaling.test_mark_data_log_transform_is_inverted.assert_vector_equal_m_pas", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 379, "end_line": 392, "span_ids": ["TestScaling.test_mark_data_log_transform_is_inverted", "TestScaling.test_log_scale_name"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScaling:\n\n    @pytest.mark.xfail(reason=\"Custom log scale needs log name for consistency\")\n    def test_log_scale_name(self):\n\n        p = Plot().scale(x=\"log\").plot()\n        ax = p._figure.axes[0]\n        assert ax.get_xscale() == \"log\"\n        assert ax.get_yscale() == \"linear\"\n\n    def test_mark_data_log_transform_is_inverted(self, long_df):\n\n        col = \"z\"\n        m = MockMark()\n        Plot(long_df, x=col).scale(x=\"log\").add(m).plot()\n        assert_vector_equal(m.passed_data[0][\"x\"], long_df[col])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_mark_data_log_transfrom_with_stat_TestScaling.test_mark_data_log_transfrom_with_stat.assert_vector_equal_m_pas": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_mark_data_log_transfrom_with_stat_TestScaling.test_mark_data_log_transfrom_with_stat.assert_vector_equal_m_pas", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 394, "end_line": 418, "span_ids": ["TestScaling.test_mark_data_log_transfrom_with_stat.Mean:2", "TestScaling.test_mark_data_log_transfrom_with_stat", "TestScaling.test_mark_data_log_transfrom_with_stat.Mean"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScaling:\n\n    def test_mark_data_log_transfrom_with_stat(self, long_df):\n\n        class Mean(Stat):\n            group_by_orient = True\n\n            def __call__(self, data, groupby, orient, scales):\n                other = {\"x\": \"y\", \"y\": \"x\"}[orient]\n                return groupby.agg(data, {other: \"mean\"})\n\n        col = \"z\"\n        grouper = \"a\"\n        m = MockMark()\n        s = Mean()\n\n        Plot(long_df, x=grouper, y=col).scale(y=\"log\").add(m, s).plot()\n\n        expected = (\n            long_df[col]\n            .pipe(np.log)\n            .groupby(long_df[grouper], sort=False)\n            .mean()\n            .pipe(np.exp)\n            .reset_index(drop=True)\n        )\n        assert_vector_equal(m.passed_data[0][\"y\"], expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_mark_data_from_categorical_TestScaling.test_mark_data_from_datetime.assert_vector_equal_m_pas": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_mark_data_from_categorical_TestScaling.test_mark_data_from_datetime.assert_vector_equal_m_pas", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 420, "end_line": 440, "span_ids": ["TestScaling.test_mark_data_from_categorical", "TestScaling.test_mark_data_from_datetime"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScaling:\n\n    def test_mark_data_from_categorical(self, long_df):\n\n        col = \"a\"\n        m = MockMark()\n        Plot(long_df, x=col).add(m).plot()\n\n        levels = categorical_order(long_df[col])\n        level_map = {x: float(i) for i, x in enumerate(levels)}\n        assert_vector_equal(m.passed_data[0][\"x\"], long_df[col].map(level_map))\n\n    def test_mark_data_from_datetime(self, long_df):\n\n        col = \"t\"\n        m = MockMark()\n        Plot(long_df, x=col).add(m).plot()\n\n        expected = long_df[col].map(mpl.dates.date2num)\n        if Version(mpl.__version__) < Version(\"3.3\"):\n            expected = expected + mpl.dates.date2num(np.datetime64('0000-12-31'))\n\n        assert_vector_equal(m.passed_data[0][\"x\"], expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_facet_categories_TestScaling.test_facet_categories.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_facet_categories_TestScaling.test_facet_categories.None_1", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 442, "end_line": 450, "span_ids": ["TestScaling.test_facet_categories"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScaling:\n\n    def test_facet_categories(self):\n\n        m = MockMark()\n        p = Plot(x=[\"a\", \"b\", \"a\", \"c\"]).facet(col=[\"x\", \"x\", \"y\", \"y\"]).add(m).plot()\n        ax1, ax2 = p._figure.axes\n        assert len(ax1.get_xticks()) == 3\n        assert len(ax2.get_xticks()) == 3\n        assert_vector_equal(m.passed_data[0][\"x\"], pd.Series([0., 1.], [0, 1]))\n        assert_vector_equal(m.passed_data[1][\"x\"], pd.Series([0., 2.], [2, 3]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_facet_categories_unshared_TestScaling.test_facet_categories_unshared.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_facet_categories_unshared_TestScaling.test_facet_categories_unshared.None_1", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 512, "end_line": 526, "span_ids": ["TestScaling.test_facet_categories_unshared"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScaling:\n\n    def test_facet_categories_unshared(self):\n\n        m = MockMark()\n        p = (\n            Plot(x=[\"a\", \"b\", \"a\", \"c\"])\n            .facet(col=[\"x\", \"x\", \"y\", \"y\"])\n            .share(x=False)\n            .add(m)\n            .plot()\n        )\n        ax1, ax2 = p._figure.axes\n        assert len(ax1.get_xticks()) == 2\n        assert len(ax2.get_xticks()) == 2\n        assert_vector_equal(m.passed_data[0][\"x\"], pd.Series([0., 1.], [0, 1]))\n        assert_vector_equal(m.passed_data[1][\"x\"], pd.Series([0., 1.], [2, 3]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_facet_categories_single_dim_shared_TestScaling.test_facet_categories_single_dim_shared.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_facet_categories_single_dim_shared_TestScaling.test_facet_categories_single_dim_shared.None_3", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 528, "end_line": 553, "span_ids": ["TestScaling.test_facet_categories_single_dim_shared"], "tokens": 309}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScaling:\n\n    def test_facet_categories_single_dim_shared(self):\n\n        data = [\n            (\"a\", 1, 1), (\"b\", 1, 1),\n            (\"a\", 1, 2), (\"c\", 1, 2),\n            (\"b\", 2, 1), (\"d\", 2, 1),\n            (\"e\", 2, 2), (\"e\", 2, 1),\n        ]\n        df = pd.DataFrame(data, columns=[\"x\", \"row\", \"col\"]).assign(y=1)\n        m = MockMark()\n        p = (\n            Plot(df, x=\"x\")\n            .facet(row=\"row\", col=\"col\")\n            .add(m)\n            .share(x=\"row\")\n            .plot()\n        )\n\n        axs = p._figure.axes\n        for ax in axs:\n            assert ax.get_xticks() == [0, 1, 2]\n\n        assert_vector_equal(m.passed_data[0][\"x\"], pd.Series([0., 1.], [0, 1]))\n        assert_vector_equal(m.passed_data[1][\"x\"], pd.Series([0., 2.], [2, 3]))\n        assert_vector_equal(m.passed_data[2][\"x\"], pd.Series([0., 1., 2.], [4, 5, 7]))\n        assert_vector_equal(m.passed_data[3][\"x\"], pd.Series([2.], [6]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_pair_categories_TestScaling.test_pair_categories.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_pair_categories_TestScaling.test_pair_categories.None_1", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 495, "end_line": 506, "span_ids": ["TestScaling.test_pair_categories"], "tokens": 176}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScaling:\n\n    def test_pair_categories(self):\n\n        data = [(\"a\", \"a\"), (\"b\", \"c\")]\n        df = pd.DataFrame(data, columns=[\"x1\", \"x2\"]).assign(y=1)\n        m = MockMark()\n        p = Plot(df, y=\"y\").pair(x=[\"x1\", \"x2\"]).add(m).plot()\n\n        ax1, ax2 = p._figure.axes\n        assert ax1.get_xticks() == [0, 1]\n        assert ax2.get_xticks() == [0, 1]\n        assert_vector_equal(m.passed_data[0][\"x\"], pd.Series([0., 1.], [0, 1]))\n        assert_vector_equal(m.passed_data[1][\"x\"], pd.Series([0., 1.], [0, 1]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_pair_categories_shared_TestScaling.test_pair_categories_shared.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_pair_categories_shared_TestScaling.test_pair_categories_shared.None_2", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 568, "end_line": 583, "span_ids": ["TestScaling.test_pair_categories_shared"], "tokens": 213}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScaling:\n\n    @pytest.mark.xfail(\n        Version(mpl.__version__) < Version(\"3.4.0\"),\n        reason=\"Sharing paired categorical axes requires matplotlib>3.4.0\"\n    )\n    def test_pair_categories_shared(self):\n\n        data = [(\"a\", \"a\"), (\"b\", \"c\")]\n        df = pd.DataFrame(data, columns=[\"x1\", \"x2\"]).assign(y=1)\n        m = MockMark()\n        p = Plot(df, y=\"y\").pair(x=[\"x1\", \"x2\"]).add(m).share(x=True).plot()\n\n        for ax in p._figure.axes:\n            assert ax.get_xticks() == [0, 1, 2]\n        print(m.passed_data)\n        assert_vector_equal(m.passed_data[0][\"x\"], pd.Series([0., 1.], [0, 1]))\n        assert_vector_equal(m.passed_data[1][\"x\"], pd.Series([0., 2.], [0, 1]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_identity_mapping_linewidth_TestScaling._TODO_where_should_RGB_c": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_identity_mapping_linewidth_TestScaling._TODO_where_should_RGB_c", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 585, "end_line": 616, "span_ids": ["TestScaling.test_inferred_nominal_passed_to_stat", "TestScaling.test_pair_single_coordinate_stat_orient", "TestScaling.test_pair_single_coordinate_stat_orient.MockStat", "TestScaling.test_inferred_nominal_passed_to_stat.MockStat.__call__", "TestScaling.test_inferred_nominal_passed_to_stat.MockStat", "TestScaling.test_pair_single_coordinate_stat_orient.MockStat.__call__", "TestScaling.test_identity_mapping_linewidth"], "tokens": 290}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScaling:\n\n    def test_identity_mapping_linewidth(self):\n\n        m = MockMark()\n        x = y = [1, 2, 3, 4, 5]\n        lw = pd.Series([.5, .1, .1, .9, 3])\n        Plot(x=x, y=y, linewidth=lw).scale(linewidth=None).add(m).plot()\n        assert_vector_equal(m.passed_scales[\"linewidth\"](lw), lw)\n\n    def test_pair_single_coordinate_stat_orient(self, long_df):\n\n        class MockStat(Stat):\n            def __call__(self, data, groupby, orient, scales):\n                self.orient = orient\n                return data\n\n        s = MockStat()\n        Plot(long_df).pair(x=[\"x\", \"y\"]).add(MockMark(), s).plot()\n        assert s.orient == \"x\"\n\n    def test_inferred_nominal_passed_to_stat(self):\n\n        class MockStat(Stat):\n            def __call__(self, data, groupby, orient, scales):\n                self.scales = scales\n                return data\n\n        s = MockStat()\n        y = [\"a\", \"a\", \"b\", \"c\"]\n        Plot(y=y).add(MockMark(), s).plot()\n        assert s.scales[\"y\"].__class__.__name__ == \"Nominal\"\n\n    # TODO where should RGB consistency be enforced?", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_identity_mapping_color_strings_TestScaling.test_identity_mapping_color_strings.assert_array_equal_m_pass": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_identity_mapping_color_strings_TestScaling.test_identity_mapping_color_strings.assert_array_equal_m_pass", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 557, "end_line": 567, "span_ids": ["TestScaling.test_identity_mapping_color_strings"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScaling:\n    @pytest.mark.xfail(\n        reason=\"Correct output representation for color with identity scale undefined\"\n    )\n    def test_identity_mapping_color_strings(self):\n\n        m = MockMark()\n        x = y = [1, 2, 3]\n        c = [\"C0\", \"C2\", \"C1\"]\n        Plot(x=x, y=y, color=c).scale(color=None).add(m).plot()\n        expected = mpl.colors.to_rgba_array(c)[:, :3]\n        assert_array_equal(m.passed_scales[\"color\"](c), expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_identity_mapping_color_tuples_TestScaling.test_undefined_variable_raises.with_pytest_raises_Runtim.p_plot_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_identity_mapping_color_tuples_TestScaling.test_undefined_variable_raises.with_pytest_raises_Runtim.p_plot_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 569, "end_line": 586, "span_ids": ["TestScaling.test_identity_mapping_color_tuples", "TestScaling.test_undefined_variable_raises"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScaling:\n\n    def test_identity_mapping_color_tuples(self):\n\n        m = MockMark()\n        x = y = [1, 2, 3]\n        c = [(1, 0, 0), (0, 1, 0), (1, 0, 0)]\n        Plot(x=x, y=y, color=c).scale(color=None).add(m).plot()\n        expected = mpl.colors.to_rgba_array(c)[:, :3]\n        assert_array_equal(m.passed_scales[\"color\"](c), expected)\n\n    @pytest.mark.xfail(\n        reason=\"Need decision on what to do with scale defined for unused variable\"\n    )\n    def test_undefined_variable_raises(self):\n\n        p = Plot(x=[1, 2, 3], color=[\"a\", \"b\", \"c\"]).scale(y=Continuous())\n        err = r\"No data found for variable\\(s\\) with explicit scale: {'y'}\"\n        with pytest.raises(RuntimeError, match=err):\n            p.plot()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting_TestPlotting.test_single_split_single_layer.for_col_in_p__data_frame_.assert_series_equal_m_pas": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting_TestPlotting.test_single_split_single_layer.for_col_in_p__data_frame_.assert_series_equal_m_pas", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 589, "end_line": 613, "span_ids": ["TestPlotting", "TestPlotting.test_empty", "TestPlotting.test_matplotlib_object_creation", "TestPlotting.test_single_split_single_layer"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    def test_matplotlib_object_creation(self):\n\n        p = Plot().plot()\n        assert isinstance(p._figure, mpl.figure.Figure)\n        for sub in p._subplots:\n            assert isinstance(sub[\"ax\"], mpl.axes.Axes)\n\n    def test_empty(self):\n\n        m = MockMark()\n        Plot().plot()\n        assert m.n_splits == 0\n\n    def test_single_split_single_layer(self, long_df):\n\n        m = MockMark()\n        p = Plot(long_df, x=\"f\", y=\"z\").add(m).plot()\n        assert m.n_splits == 1\n\n        assert m.passed_keys[0] == {}\n        assert m.passed_axes == [sub[\"ax\"] for sub in p._subplots]\n        for col in p._data.frame:\n            assert_series_equal(m.passed_data[0][col], p._data.frame[col])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_single_split_multi_layer_TestPlotting.check_splits_single_var.for_i_key_in_enumerate_s.for_var_col_in_data_vars.assert_array_equal_mark_p": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_single_split_multi_layer_TestPlotting.check_splits_single_var.for_i_key_in_enumerate_s.for_var_col_in_data_vars.assert_array_equal_mark_p", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 615, "end_line": 640, "span_ids": ["TestPlotting.test_single_split_multi_layer.NoGroupingMark", "TestPlotting.check_splits_single_var", "TestPlotting.test_single_split_multi_layer", "TestPlotting.test_single_split_multi_layer.NoGroupingMark:2"], "tokens": 245}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    def test_single_split_multi_layer(self, long_df):\n\n        vs = [{\"color\": \"a\", \"linewidth\": \"z\"}, {\"color\": \"b\", \"pattern\": \"c\"}]\n\n        class NoGroupingMark(MockMark):\n            _grouping_props = []\n\n        ms = [NoGroupingMark(), NoGroupingMark()]\n        Plot(long_df).add(ms[0], **vs[0]).add(ms[1], **vs[1]).plot()\n\n        for m, v in zip(ms, vs):\n            for var, col in v.items():\n                assert_vector_equal(m.passed_data[0][var], long_df[col])\n\n    def check_splits_single_var(\n        self, data, mark, data_vars, split_var, split_col, split_keys\n    ):\n\n        assert mark.n_splits == len(split_keys)\n        assert mark.passed_keys == [{split_var: key} for key in split_keys]\n\n        for i, key in enumerate(split_keys):\n\n            split_data = data[data[split_col] == key]\n            for var, col in data_vars.items():\n                assert_array_equal(mark.passed_data[i][var], split_data[col])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.check_splits_multi_vars_TestPlotting.check_splits_multi_vars.for_i_keys_in_enumerate_.for_var_col_in_data_vars.assert_array_equal_mark_p": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.check_splits_multi_vars_TestPlotting.check_splits_multi_vars.for_i_keys_in_enumerate_.for_var_col_in_data_vars.assert_array_equal_mark_p", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 642, "end_line": 661, "span_ids": ["TestPlotting.check_splits_multi_vars"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    def check_splits_multi_vars(\n        self, data, mark, data_vars, split_vars, split_cols, split_keys\n    ):\n\n        assert mark.n_splits == np.prod([len(ks) for ks in split_keys])\n\n        expected_keys = [\n            dict(zip(split_vars, level_keys))\n            for level_keys in itertools.product(*split_keys)\n        ]\n        assert mark.passed_keys == expected_keys\n\n        for i, keys in enumerate(itertools.product(*split_keys)):\n\n            use_rows = pd.Series(True, data.index)\n            for var, col, key in zip(split_vars, split_cols, keys):\n                use_rows &= data[col] == key\n            split_data = data[use_rows]\n            for var, col in data_vars.items():\n                assert_array_equal(mark.passed_data[i][var], split_data[col])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_one_grouping_variable_TestPlotting.test_one_grouping_variable.self_check_splits_single_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_one_grouping_variable_TestPlotting.test_one_grouping_variable.self_check_splits_single_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 663, "end_line": 681, "span_ids": ["TestPlotting.test_one_grouping_variable"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    @pytest.mark.parametrize(\n        \"split_var\", [\n            \"color\",  # explicitly declared on the Mark\n            \"group\",  # implicitly used for all Mark classes\n        ])\n    def test_one_grouping_variable(self, long_df, split_var):\n\n        split_col = \"a\"\n        data_vars = {\"x\": \"f\", \"y\": \"z\", split_var: split_col}\n\n        m = MockMark()\n        p = Plot(long_df, **data_vars).add(m).plot()\n\n        split_keys = categorical_order(long_df[split_col])\n        sub, *_ = p._subplots\n        assert m.passed_axes == [sub[\"ax\"] for _ in split_keys]\n        self.check_splits_single_var(\n            long_df, m, data_vars, split_var, split_col, split_keys\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_two_grouping_variables_TestPlotting.test_two_grouping_variables.self_check_splits_multi_v": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_two_grouping_variables_TestPlotting.test_two_grouping_variables.self_check_splits_multi_v", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 683, "end_line": 699, "span_ids": ["TestPlotting.test_two_grouping_variables"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    def test_two_grouping_variables(self, long_df):\n\n        split_vars = [\"color\", \"group\"]\n        split_cols = [\"a\", \"b\"]\n        data_vars = {\"y\": \"z\", **{var: col for var, col in zip(split_vars, split_cols)}}\n\n        m = MockMark()\n        p = Plot(long_df, **data_vars).add(m).plot()\n\n        split_keys = [categorical_order(long_df[col]) for col in split_cols]\n        sub, *_ = p._subplots\n        assert m.passed_axes == [\n            sub[\"ax\"] for _ in itertools.product(*split_keys)\n        ]\n        self.check_splits_multi_vars(\n            long_df, m, data_vars, split_vars, split_cols, split_keys\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_facets_no_subgroups_TestPlotting.test_facets_no_subgroups.self_check_splits_single_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_facets_no_subgroups_TestPlotting.test_facets_no_subgroups.self_check_splits_single_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 701, "end_line": 714, "span_ids": ["TestPlotting.test_facets_no_subgroups"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    def test_facets_no_subgroups(self, long_df):\n\n        split_var = \"col\"\n        split_col = \"b\"\n        data_vars = {\"x\": \"f\", \"y\": \"z\"}\n\n        m = MockMark()\n        p = Plot(long_df, **data_vars).facet(**{split_var: split_col}).add(m).plot()\n\n        split_keys = categorical_order(long_df[split_col])\n        assert m.passed_axes == list(p._figure.axes)\n        self.check_splits_single_var(\n            long_df, m, data_vars, split_var, split_col, split_keys\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_facets_one_subgroup_TestPlotting.test_facets_one_subgroup.self_check_splits_multi_v": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_facets_one_subgroup_TestPlotting.test_facets_one_subgroup.self_check_splits_multi_v", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 716, "end_line": 739, "span_ids": ["TestPlotting.test_facets_one_subgroup"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    def test_facets_one_subgroup(self, long_df):\n\n        facet_var, facet_col = fx = \"col\", \"a\"\n        group_var, group_col = gx = \"group\", \"b\"\n        split_vars, split_cols = zip(*[fx, gx])\n        data_vars = {\"x\": \"f\", \"y\": \"z\", group_var: group_col}\n\n        m = MockMark()\n        p = (\n            Plot(long_df, **data_vars)\n            .facet(**{facet_var: facet_col})\n            .add(m)\n            .plot()\n        )\n\n        split_keys = [categorical_order(long_df[col]) for col in [facet_col, group_col]]\n        assert m.passed_axes == [\n            ax\n            for ax in list(p._figure.axes)\n            for _ in categorical_order(long_df[group_col])\n        ]\n        self.check_splits_multi_vars(\n            long_df, m, data_vars, split_vars, split_cols, split_keys\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_layer_specific_facet_disabling_TestPlotting.test_layer_specific_facet_disabling.for_data_in_m_passed_data.for_var_col_in_axis_vars.assert_vector_equal_data_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_layer_specific_facet_disabling_TestPlotting.test_layer_specific_facet_disabling.for_data_in_m_passed_data.for_var_col_in_axis_vars.assert_vector_equal_data_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 741, "end_line": 754, "span_ids": ["TestPlotting.test_layer_specific_facet_disabling"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    def test_layer_specific_facet_disabling(self, long_df):\n\n        axis_vars = {\"x\": \"y\", \"y\": \"z\"}\n        row_var = \"a\"\n\n        m = MockMark()\n        p = Plot(long_df, **axis_vars).facet(row=row_var).add(m, row=None).plot()\n\n        col_levels = categorical_order(long_df[row_var])\n        assert len(p._figure.axes) == len(col_levels)\n\n        for data in m.passed_data:\n            for var, col in axis_vars.items():\n                assert_vector_equal(data[var], long_df[col])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_paired_variables_TestPlotting.test_paired_one_dimension.for_data_x_i_in_zip_m_pa.assert_vector_equal_data_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_paired_variables_TestPlotting.test_paired_one_dimension.for_data_x_i_in_zip_m_pa.assert_vector_equal_data_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 756, "end_line": 778, "span_ids": ["TestPlotting.test_paired_one_dimension", "TestPlotting.test_paired_variables"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    def test_paired_variables(self, long_df):\n\n        x = [\"x\", \"y\"]\n        y = [\"f\", \"z\"]\n\n        m = MockMark()\n        Plot(long_df).pair(x, y).add(m).plot()\n\n        var_product = itertools.product(x, y)\n\n        for data, (x_i, y_i) in zip(m.passed_data, var_product):\n            assert_vector_equal(data[\"x\"], long_df[x_i].astype(float))\n            assert_vector_equal(data[\"y\"], long_df[y_i].astype(float))\n\n    def test_paired_one_dimension(self, long_df):\n\n        x = [\"y\", \"z\"]\n\n        m = MockMark()\n        Plot(long_df).pair(x).add(m).plot()\n\n        for data, x_i in zip(m.passed_data, x):\n            assert_vector_equal(data[\"x\"], long_df[x_i].astype(float))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_paired_variables_one_subset_TestPlotting.test_paired_variables_one_subset.for_data_x_i_y_i_g_i_.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_paired_variables_one_subset_TestPlotting.test_paired_variables_one_subset.for_data_x_i_y_i_g_i_.None_1", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 780, "end_line": 797, "span_ids": ["TestPlotting.test_paired_variables_one_subset"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    def test_paired_variables_one_subset(self, long_df):\n\n        x = [\"x\", \"y\"]\n        y = [\"f\", \"z\"]\n        group = \"a\"\n\n        long_df[\"x\"] = long_df[\"x\"].astype(float)  # simplify vector comparison\n\n        m = MockMark()\n        Plot(long_df, group=group).pair(x, y).add(m).plot()\n\n        groups = categorical_order(long_df[group])\n        var_product = itertools.product(x, y, groups)\n\n        for data, (x_i, y_i, g_i) in zip(m.passed_data, var_product):\n            rows = long_df[group] == g_i\n            assert_vector_equal(data[\"x\"], long_df.loc[rows, x_i])\n            assert_vector_equal(data[\"y\"], long_df.loc[rows, y_i])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_paired_and_faceted_TestPlotting.test_paired_and_faceted.for_data_x_i_f_i_in_z.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_paired_and_faceted_TestPlotting.test_paired_and_faceted.for_data_x_i_f_i_in_z.None_1", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 799, "end_line": 814, "span_ids": ["TestPlotting.test_paired_and_faceted"], "tokens": 149}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    def test_paired_and_faceted(self, long_df):\n\n        x = [\"y\", \"z\"]\n        y = \"f\"\n        row = \"c\"\n\n        m = MockMark()\n        Plot(long_df, y=y).facet(row=row).pair(x).add(m).plot()\n\n        facets = categorical_order(long_df[row])\n        var_product = itertools.product(x, facets)\n\n        for data, (x_i, f_i) in zip(m.passed_data, var_product):\n            rows = long_df[row] == f_i\n            assert_vector_equal(data[\"x\"], long_df.loc[rows, x_i])\n            assert_vector_equal(data[\"y\"], long_df.loc[rows, y])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_on_type_check_TestPlotting.test_axis_labels_from_constructor.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_on_type_check_TestPlotting.test_axis_labels_from_constructor.None_5", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1086, "end_line": 1118, "span_ids": ["TestPlotting.test_axis_labels_from_constructor", "TestPlotting.test_on_axes_with_subplots_error", "TestPlotting.test_on_type_check", "TestPlotting.test_on_disables_layout_algo"], "tokens": 282}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    def test_on_type_check(self):\n\n        p = Plot()\n        with pytest.raises(TypeError, match=\"The `Plot.on`.+\"):\n            p.on([])\n\n    def test_on_axes_with_subplots_error(self):\n\n        ax = mpl.figure.Figure().subplots()\n\n        p1 = Plot().facet([\"a\", \"b\"]).on(ax)\n        with pytest.raises(RuntimeError, match=\"Cannot create multiple subplots\"):\n            p1.plot()\n\n        p2 = Plot().pair([[\"a\", \"b\"], [\"x\", \"y\"]]).on(ax)\n        with pytest.raises(RuntimeError, match=\"Cannot create multiple subplots\"):\n            p2.plot()\n\n    def test_on_disables_layout_algo(self):\n\n        f = mpl.figure.Figure()\n        p = Plot().on(f).plot()\n        assert not p._figure.get_tight_layout()\n\n    def test_axis_labels_from_constructor(self, long_df):\n\n        ax, = Plot(long_df, x=\"a\", y=\"b\").plot()._figure.axes\n        assert ax.get_xlabel() == \"a\"\n        assert ax.get_ylabel() == \"b\"\n\n        ax, = Plot(x=long_df[\"a\"], y=long_df[\"b\"].to_numpy()).plot()._figure.axes\n        assert ax.get_xlabel() == \"a\"\n        assert ax.get_ylabel() == \"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_axis_labels_from_layer_TestPlotting.test_axis_labels_are_first_name.assert_ax_get_ylabel_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_axis_labels_from_layer_TestPlotting.test_axis_labels_are_first_name.assert_ax_get_ylabel_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 973, "end_line": 996, "span_ids": ["TestPlotting.test_axis_labels_from_layer", "TestPlotting.test_axis_labels_are_first_name"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    def test_axis_labels_from_layer(self, long_df):\n\n        m = MockMark()\n\n        ax, = Plot(long_df).add(m, x=\"a\", y=\"b\").plot()._figure.axes\n        assert ax.get_xlabel() == \"a\"\n        assert ax.get_ylabel() == \"b\"\n\n        p = Plot().add(m, x=long_df[\"a\"], y=long_df[\"b\"].to_list())\n        ax, = p.plot()._figure.axes\n        assert ax.get_xlabel() == \"a\"\n        assert ax.get_ylabel() == \"\"\n\n    def test_axis_labels_are_first_name(self, long_df):\n\n        m = MockMark()\n        p = (\n            Plot(long_df, x=long_df[\"z\"].to_list(), y=\"b\")\n            .add(m, x=\"a\")\n            .add(m, x=\"x\", y=\"y\")\n        )\n        ax, = p.plot()._figure.axes\n        assert ax.get_xlabel() == \"a\"\n        assert ax.get_ylabel() == \"b\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestFacetInterface_TestFacetInterface.check_facet_results_1d.for_subplot_level_in_zip.assert_gridspec_shape_sub": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestFacetInterface_TestFacetInterface.check_facet_results_1d.for_subplot_level_in_zip.assert_gridspec_shape_sub", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1215, "end_line": 1242, "span_ids": ["TestFacetInterface.dim", "TestFacetInterface.check_facet_results_1d", "TestFacetInterface.reorder", "TestFacetInterface"], "tokens": 239}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetInterface:\n\n    @pytest.fixture(scope=\"class\", params=[\"row\", \"col\"])\n    def dim(self, request):\n        return request.param\n\n    @pytest.fixture(scope=\"class\", params=[\"reverse\", \"subset\", \"expand\"])\n    def reorder(self, request):\n        return {\n            \"reverse\": lambda x: x[::-1],\n            \"subset\": lambda x: x[:-1],\n            \"expand\": lambda x: x + [\"z\"],\n        }[request.param]\n\n    def check_facet_results_1d(self, p, df, dim, key, order=None):\n\n        p = p.plot()\n\n        order = categorical_order(df[key], order)\n        assert len(p._figure.axes) == len(order)\n\n        other_dim = {\"row\": \"col\", \"col\": \"row\"}[dim]\n\n        for subplot, level in zip(p._subplots, order):\n            assert subplot[dim] == level\n            assert subplot[other_dim] is None\n            assert subplot[\"ax\"].get_title() == f\"{level}\"\n            assert_gridspec_shape(subplot[\"ax\"], **{f\"n{dim}s\": len(order)})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestFacetInterface.test_1d_TestFacetInterface.test_1d_with_order.self_check_facet_results_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestFacetInterface.test_1d_TestFacetInterface.test_1d_with_order.self_check_facet_results_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1028, "end_line": 1045, "span_ids": ["TestFacetInterface.test_1d_with_order", "TestFacetInterface.test_1d", "TestFacetInterface.test_1d_as_vector"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetInterface:\n\n    def test_1d(self, long_df, dim):\n\n        key = \"a\"\n        p = Plot(long_df).facet(**{dim: key})\n        self.check_facet_results_1d(p, long_df, dim, key)\n\n    def test_1d_as_vector(self, long_df, dim):\n\n        key = \"a\"\n        p = Plot(long_df).facet(**{dim: long_df[key]})\n        self.check_facet_results_1d(p, long_df, dim, key)\n\n    def test_1d_with_order(self, long_df, dim, reorder):\n\n        key = \"a\"\n        order = reorder(categorical_order(long_df[key]))\n        p = Plot(long_df).facet(**{dim: key, \"order\": order})\n        self.check_facet_results_1d(p, long_df, dim, key, order)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestFacetInterface.check_facet_results_2d_TestFacetInterface.check_facet_results_2d.for_subplot_row_level_.assert_gridspec_shape_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestFacetInterface.check_facet_results_2d_TestFacetInterface.check_facet_results_2d.for_subplot_row_level_.assert_gridspec_shape_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1263, "end_line": 1281, "span_ids": ["TestFacetInterface.check_facet_results_2d"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetInterface:\n\n    def check_facet_results_2d(self, p, df, variables, order=None):\n\n        p = p.plot()\n\n        if order is None:\n            order = {dim: categorical_order(df[key]) for dim, key in variables.items()}\n\n        levels = itertools.product(*[order[dim] for dim in [\"row\", \"col\"]])\n        assert len(p._subplots) == len(list(levels))\n\n        for subplot, (row_level, col_level) in zip(p._subplots, levels):\n            assert subplot[\"row\"] == row_level\n            assert subplot[\"col\"] == col_level\n            assert subplot[\"axes\"].get_title() == (\n                f\"{col_level} | {row_level}\"\n            )\n            assert_gridspec_shape(\n                subplot[\"axes\"], len(levels[\"row\"]), len(levels[\"col\"])\n            )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestFacetInterface.test_2d_TestFacetInterface.test_2d_with_order.self_check_facet_results_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestFacetInterface.test_2d_TestFacetInterface.test_2d_with_order.self_check_facet_results_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1067, "end_line": 1082, "span_ids": ["TestFacetInterface.test_2d_with_order", "TestFacetInterface.test_2d"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetInterface:\n\n    def test_2d(self, long_df):\n\n        variables = {\"row\": \"a\", \"col\": \"c\"}\n        p = Plot(long_df).facet(**variables)\n        self.check_facet_results_2d(p, long_df, variables)\n\n    def test_2d_with_order(self, long_df, reorder):\n\n        variables = {\"row\": \"a\", \"col\": \"c\"}\n        order = {\n            dim: reorder(categorical_order(long_df[key]))\n            for dim, key in variables.items()\n        }\n\n        p = Plot(long_df).facet(**variables, order=order)\n        self.check_facet_results_2d(p, long_df, variables, order)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestFacetInterface.test_axis_sharing_TestFacetInterface.test_axis_sharing.for_shared_unshared_v.for_root_other_in_vecto.assert_not_any_shareset_u": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestFacetInterface.test_axis_sharing_TestFacetInterface.test_axis_sharing.for_shared_unshared_v.for_root_other_in_vecto.assert_not_any_shareset_u", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1322, "end_line": 1355, "span_ids": ["TestFacetInterface.test_axis_sharing"], "tokens": 340}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetInterface:\n\n    def test_axis_sharing(self, long_df):\n\n        variables = {\"row\": \"a\", \"col\": \"c\"}\n\n        p = Plot(long_df).facet(**variables)\n\n        p1 = p.plot()\n        root, *other = p1._figure.axes\n        for axis in \"xy\":\n            shareset = getattr(root, f\"get_shared_{axis}_axes\")()\n            assert all(shareset.joined(root, ax) for ax in other)\n\n        p2 = p.share(x=False, y=False).plot()\n        root, *other = p2._figure.axes\n        for axis in \"xy\":\n            shareset = getattr(root, f\"get_shared_{axis}_axes\")()\n            assert not any(shareset.joined(root, ax) for ax in other)\n\n        p3 = p.share(x=\"col\", y=\"row\").plot()\n        shape = (\n            len(categorical_order(long_df[variables[\"row\"]])),\n            len(categorical_order(long_df[variables[\"col\"]])),\n        )\n        axes_matrix = np.reshape(p3._figure.axes, shape)\n\n        for (shared, unshared), vectors in zip(\n            [\"yx\", \"xy\"], [axes_matrix, axes_matrix.T]\n        ):\n            for root, *other in vectors:\n                shareset = {\n                    axis: getattr(root, f\"get_shared_{axis}_axes\")() for axis in \"xy\"\n                }\n                assert all(shareset[shared].joined(root, ax) for ax in other)\n                assert not any(shareset[unshared].joined(root, ax) for ax in other)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestFacetInterface.test_col_wrapping_TestFacetInterface.test_row_wrapping._TODO_test_axis_labels_a": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestFacetInterface.test_col_wrapping_TestFacetInterface.test_row_wrapping._TODO_test_axis_labels_a", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1119, "end_line": 1139, "span_ids": ["TestFacetInterface.test_row_wrapping", "TestFacetInterface.test_col_wrapping"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetInterface:\n\n    def test_col_wrapping(self):\n\n        cols = list(\"abcd\")\n        wrap = 3\n        p = Plot().facet(col=cols, wrap=wrap).plot()\n\n        assert len(p._figure.axes) == 4\n        assert_gridspec_shape(p._figure.axes[0], len(cols) // wrap + 1, wrap)\n\n        # TODO test axis labels and titles\n\n    def test_row_wrapping(self):\n\n        rows = list(\"abcd\")\n        wrap = 3\n        p = Plot().facet(row=rows, wrap=wrap).plot()\n\n        assert_gridspec_shape(p._figure.axes[0], wrap, len(rows) // wrap + 1)\n        assert len(p._figure.axes) == 4\n\n        # TODO test axis labels and titles", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface_TestPairInterface.test_single_dimension.self_check_pair_grid_p_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface_TestPairInterface.test_single_dimension.self_check_pair_grid_p_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1380, "end_line": 1414, "span_ids": ["TestPairInterface.check_pair_grid", "TestPairInterface.test_all_numeric", "TestPairInterface.test_single_dimension", "TestPairInterface.test_single_variable_key_raises", "TestPairInterface"], "tokens": 342}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairInterface:\n\n    def check_pair_grid(self, p, x, y):\n\n        xys = itertools.product(y, x)\n\n        for (y_i, x_j), subplot in zip(xys, p._subplots):\n\n            ax = subplot[\"ax\"]\n            assert ax.get_xlabel() == \"\" if x_j is None else x_j\n            assert ax.get_ylabel() == \"\" if y_i is None else y_i\n            assert_gridspec_shape(subplot[\"ax\"], len(y), len(x))\n\n    @pytest.mark.parametrize(\"vector_type\", [list, pd.Index])\n    def test_all_numeric(self, long_df, vector_type):\n\n        x, y = [\"x\", \"y\", \"z\"], [\"s\", \"f\"]\n        p = Plot(long_df).pair(vector_type(x), vector_type(y)).plot()\n        self.check_pair_grid(p, x, y)\n\n    def test_single_variable_key_raises(self, long_df):\n\n        p = Plot(long_df)\n        err = \"You must pass a sequence of variable keys to `y`\"\n        with pytest.raises(TypeError, match=err):\n            p.pair(x=[\"x\", \"y\"], y=\"z\")\n\n    @pytest.mark.parametrize(\"dim\", [\"x\", \"y\"])\n    def test_single_dimension(self, long_df, dim):\n\n        variables = {\"x\": None, \"y\": None}\n        variables[dim] = [\"x\", \"y\", \"z\"]\n        p = Plot(long_df).pair(**variables).plot()\n        variables = {k: [v] if v is None else v for k, v in variables.items()}\n        self.check_pair_grid(p, **variables)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_non_cross_TestPairInterface.test_non_cross.for_axis_in_xy_.assert_not_any_shareset_j": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_non_cross_TestPairInterface.test_non_cross.for_axis_in_xy_.assert_not_any_shareset_j", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1180, "end_line": 1196, "span_ids": ["TestPairInterface.test_non_cross"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairInterface:\n\n    def test_non_cross(self, long_df):\n\n        x = [\"x\", \"y\"]\n        y = [\"f\", \"z\"]\n\n        p = Plot(long_df).pair(x, y, cross=False).plot()\n\n        for i, subplot in enumerate(p._subplots):\n            ax = subplot[\"ax\"]\n            assert ax.get_xlabel() == x[i]\n            assert ax.get_ylabel() == y[i]\n            assert_gridspec_shape(ax, 1, len(x))\n\n        root, *other = p._figure.axes\n        for axis in \"xy\":\n            shareset = getattr(root, f\"get_shared_{axis}_axes\")()\n            assert not any(shareset.joined(root, ax) for ax in other)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_with_facets_TestPairInterface.test_with_facets.for_y_i_col_i_subplot.assert_gridspec_shape_ax_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_with_facets_TestPairInterface.test_with_facets.for_y_i_col_i_subplot.assert_gridspec_shape_ax_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1447, "end_line": 1464, "span_ids": ["TestPairInterface.test_with_facets"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairInterface:\n\n    def test_with_facets(self, long_df):\n\n        x = \"x\"\n        y = [\"y\", \"z\"]\n        col = \"a\"\n\n        p = Plot(long_df, x=x).facet(col).pair(y=y).plot()\n\n        facet_levels = categorical_order(long_df[col])\n        dims = itertools.product(y, facet_levels)\n\n        for (y_i, col_i), subplot in zip(dims, p._subplots):\n\n            ax = subplot[\"ax\"]\n            assert ax.get_xlabel() == x\n            assert ax.get_ylabel() == y_i\n            assert ax.get_title() == f\"{col_i}\"\n            assert_gridspec_shape(ax, len(y), len(facet_levels))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_error_on_facet_overlap_TestPairInterface.test_error_on_facet_overlap.with_pytest_raises_Runtim.p_plot_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_error_on_facet_overlap_TestPairInterface.test_error_on_facet_overlap.with_pytest_raises_Runtim.p_plot_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1245, "end_line": 1252, "span_ids": ["TestPairInterface.test_error_on_facet_overlap"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairInterface:\n\n    @pytest.mark.parametrize(\"variables\", [(\"rows\", \"y\"), (\"columns\", \"x\")])\n    def test_error_on_facet_overlap(self, long_df, variables):\n\n        facet_dim, pair_axis = variables\n        p = Plot(long_df).facet(**{facet_dim[:3]: \"a\"}).pair(**{pair_axis: [\"x\", \"y\"]})\n        expected = f\"Cannot facet the {facet_dim} while pairing on `{pair_axis}`.\"\n        with pytest.raises(RuntimeError, match=expected):\n            p.plot()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_error_on_wrap_overlap_TestPairInterface.test_error_on_wrap_overlap.with_pytest_raises_Runtim.p_plot_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_error_on_wrap_overlap_TestPairInterface.test_error_on_wrap_overlap.with_pytest_raises_Runtim.p_plot_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1254, "end_line": 1265, "span_ids": ["TestPairInterface.test_error_on_wrap_overlap"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairInterface:\n\n    @pytest.mark.parametrize(\"variables\", [(\"columns\", \"y\"), (\"rows\", \"x\")])\n    def test_error_on_wrap_overlap(self, long_df, variables):\n\n        facet_dim, pair_axis = variables\n        p = (\n            Plot(long_df)\n            .facet(wrap=2, **{facet_dim[:3]: \"a\"})\n            .pair(**{pair_axis: [\"x\", \"y\"]})\n        )\n        expected = f\"Cannot wrap the {facet_dim} while pairing on `{pair_axis}``.\"\n        with pytest.raises(RuntimeError, match=expected):\n            p.plot()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_axis_sharing_TestPairInterface.test_axis_sharing.for_axis_in_xy_.assert_not_any_shareset_j": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_axis_sharing_TestPairInterface.test_axis_sharing.for_axis_in_xy_.assert_not_any_shareset_j", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1488, "end_line": 1512, "span_ids": ["TestPairInterface.test_axis_sharing"], "tokens": 309}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairInterface:\n\n    def test_axis_sharing(self, long_df):\n\n        p = Plot(long_df).pair(x=[\"a\", \"b\"], y=[\"y\", \"z\"])\n        shape = 2, 2\n\n        p1 = p.plot()\n        axes_matrix = np.reshape(p1._figure.axes, shape)\n\n        for root, *other in axes_matrix:  # Test row-wise sharing\n            x_shareset = getattr(root, \"get_shared_x_axes\")()\n            assert not any(x_shareset.joined(root, ax) for ax in other)\n            y_shareset = getattr(root, \"get_shared_y_axes\")()\n            assert all(y_shareset.joined(root, ax) for ax in other)\n\n        for root, *other in axes_matrix.T:  # Test col-wise sharing\n            x_shareset = getattr(root, \"get_shared_x_axes\")()\n            assert all(x_shareset.joined(root, ax) for ax in other)\n            y_shareset = getattr(root, \"get_shared_y_axes\")()\n            assert not any(y_shareset.joined(root, ax) for ax in other)\n\n        p2 = p.share(x=False, y=False).plot()\n        root, *other = p2._figure.axes\n        for axis in \"xy\":\n            shareset = getattr(root, f\"get_shared_{axis}_axes\")()\n            assert not any(shareset.joined(root, ax) for ax in other)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_axis_sharing_with_facets_TestPairInterface.test_axis_sharing_with_facets.None_1.assert_all_y_shareset_joi": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_axis_sharing_with_facets_TestPairInterface.test_axis_sharing_with_facets.None_1.assert_all_y_shareset_joi", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1293, "end_line": 1310, "span_ids": ["TestPairInterface.test_axis_sharing_with_facets"], "tokens": 239}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairInterface:\n\n    def test_axis_sharing_with_facets(self, long_df):\n\n        p = Plot(long_df, y=\"y\").pair(x=[\"a\", \"b\"]).facet(row=\"c\").plot()\n        shape = 2, 2\n\n        axes_matrix = np.reshape(p._figure.axes, shape)\n\n        for root, *other in axes_matrix:  # Test row-wise sharing\n            x_shareset = getattr(root, \"get_shared_x_axes\")()\n            assert not any(x_shareset.joined(root, ax) for ax in other)\n            y_shareset = getattr(root, \"get_shared_y_axes\")()\n            assert all(y_shareset.joined(root, ax) for ax in other)\n\n        for root, *other in axes_matrix.T:  # Test col-wise sharing\n            x_shareset = getattr(root, \"get_shared_x_axes\")()\n            assert all(x_shareset.joined(root, ax) for ax in other)\n            y_shareset = getattr(root, \"get_shared_y_axes\")()\n            assert all(y_shareset.joined(root, ax) for ax in other)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_non_cross_wrapping_TestPairInterface.test_non_cross_wrapping.assert_len_p__figure_axes": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_non_cross_wrapping_TestPairInterface.test_non_cross_wrapping.assert_len_p__figure_axes", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1334, "end_line": 1347, "span_ids": ["TestPairInterface.test_non_cross_wrapping"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairInterface:\n\n    def test_non_cross_wrapping(self, long_df):\n\n        x_vars = [\"a\", \"b\", \"c\", \"t\"]\n        y_vars = [\"f\", \"x\", \"y\", \"z\"]\n        wrap = 3\n\n        p = (\n            Plot(long_df, x=\"x\")\n            .pair(x=x_vars, y=y_vars, wrap=wrap, cross=False)\n            .plot()\n        )\n\n        assert_gridspec_shape(p._figure.axes[0], len(x_vars) // wrap + 1, wrap)\n        assert len(p._figure.axes) == len(x_vars)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLabelVisibility_TestLabelVisibility.test_1d_column.for_s_in_other_.assert_not_any_t_get_visi": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLabelVisibility_TestLabelVisibility.test_1d_column.for_s_in_other_.assert_not_any_t_get_visi", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1386, "end_line": 1420, "span_ids": ["TestLabelVisibility.test_single_subplot", "TestLabelVisibility.test_1d_column", "TestLabelVisibility"], "tokens": 350}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLabelVisibility:\n\n    def test_single_subplot(self, long_df):\n\n        x, y = \"a\", \"z\"\n        p = Plot(long_df, x=x, y=y).plot()\n        subplot, *_ = p._subplots\n        ax = subplot[\"ax\"]\n        assert ax.xaxis.get_label().get_visible()\n        assert ax.yaxis.get_label().get_visible()\n        assert all(t.get_visible() for t in ax.get_xticklabels())\n        assert all(t.get_visible() for t in ax.get_yticklabels())\n\n    @pytest.mark.parametrize(\n        \"facet_kws,pair_kws\", [({\"col\": \"b\"}, {}), ({}, {\"x\": [\"x\", \"y\", \"f\"]})]\n    )\n    def test_1d_column(self, long_df, facet_kws, pair_kws):\n\n        x = None if \"x\" in pair_kws else \"a\"\n        y = \"z\"\n        p = Plot(long_df, x=x, y=y).plot()\n        first, *other = p._subplots\n\n        ax = first[\"ax\"]\n        assert ax.xaxis.get_label().get_visible()\n        assert ax.yaxis.get_label().get_visible()\n        assert all(t.get_visible() for t in ax.get_xticklabels())\n        assert all(t.get_visible() for t in ax.get_yticklabels())\n\n        for s in other:\n            ax = s[\"ax\"]\n            assert ax.xaxis.get_label().get_visible()\n            assert not ax.yaxis.get_label().get_visible()\n            assert all(t.get_visible() for t in ax.get_xticklabels())\n            assert not any(t.get_visible() for t in ax.get_yticklabels())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLabelVisibility.test_1d_row_TestLabelVisibility.test_1d_row.for_s_in_other_.assert_all_t_get_visible_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLabelVisibility.test_1d_row_TestLabelVisibility.test_1d_row.for_s_in_other_.assert_all_t_get_visible_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1422, "end_line": 1443, "span_ids": ["TestLabelVisibility.test_1d_row"], "tokens": 244}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLabelVisibility:\n\n    @pytest.mark.parametrize(\n        \"facet_kws,pair_kws\", [({\"row\": \"b\"}, {}), ({}, {\"y\": [\"x\", \"y\", \"f\"]})]\n    )\n    def test_1d_row(self, long_df, facet_kws, pair_kws):\n\n        x = \"z\"\n        y = None if \"y\" in pair_kws else \"z\"\n        p = Plot(long_df, x=x, y=y).plot()\n        first, *other = p._subplots\n\n        ax = first[\"ax\"]\n        assert ax.xaxis.get_label().get_visible()\n        assert all(t.get_visible() for t in ax.get_xticklabels())\n        assert ax.yaxis.get_label().get_visible()\n        assert all(t.get_visible() for t in ax.get_yticklabels())\n\n        for s in other:\n            ax = s[\"ax\"]\n            assert not ax.xaxis.get_label().get_visible()\n            assert ax.yaxis.get_label().get_visible()\n            assert not any(t.get_visible() for t in ax.get_xticklabels())\n            assert all(t.get_visible() for t in ax.get_yticklabels())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLabelVisibility.test_1d_column_wrapped_TestLabelVisibility.test_1d_column_wrapped.assert_not_any_t_get_visi": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLabelVisibility.test_1d_column_wrapped_TestLabelVisibility.test_1d_column_wrapped.assert_not_any_t_get_visi", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1445, "end_line": 1467, "span_ids": ["TestLabelVisibility.test_1d_column_wrapped"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLabelVisibility:\n\n    def test_1d_column_wrapped(self):\n\n        p = Plot().facet(col=[\"a\", \"b\", \"c\", \"d\"], wrap=3).plot()\n        subplots = list(p._subplots)\n\n        for s in [subplots[0], subplots[-1]]:\n            ax = s[\"ax\"]\n            assert ax.yaxis.get_label().get_visible()\n            assert all(t.get_visible() for t in ax.get_yticklabels())\n\n        for s in subplots[1:]:\n            ax = s[\"ax\"]\n            assert ax.xaxis.get_label().get_visible()\n            assert all(t.get_visible() for t in ax.get_xticklabels())\n\n        for s in subplots[1:-1]:\n            ax = s[\"ax\"]\n            assert not ax.yaxis.get_label().get_visible()\n            assert not any(t.get_visible() for t in ax.get_yticklabels())\n\n        ax = subplots[0][\"ax\"]\n        assert not ax.xaxis.get_label().get_visible()\n        assert not any(t.get_visible() for t in ax.get_xticklabels())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLabelVisibility.test_1d_row_wrapped_TestLabelVisibility.test_1d_row_wrapped.assert_not_any_t_get_visi": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLabelVisibility.test_1d_row_wrapped_TestLabelVisibility.test_1d_row_wrapped.assert_not_any_t_get_visi", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1469, "end_line": 1491, "span_ids": ["TestLabelVisibility.test_1d_row_wrapped"], "tokens": 219}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLabelVisibility:\n\n    def test_1d_row_wrapped(self):\n\n        p = Plot().facet(row=[\"a\", \"b\", \"c\", \"d\"], wrap=3).plot()\n        subplots = list(p._subplots)\n\n        for s in subplots[:-1]:\n            ax = s[\"ax\"]\n            assert ax.yaxis.get_label().get_visible()\n            assert all(t.get_visible() for t in ax.get_yticklabels())\n\n        for s in subplots[-2:]:\n            ax = s[\"ax\"]\n            assert ax.xaxis.get_label().get_visible()\n            assert all(t.get_visible() for t in ax.get_xticklabels())\n\n        for s in subplots[:-2]:\n            ax = s[\"ax\"]\n            assert not ax.xaxis.get_label().get_visible()\n            assert not any(t.get_visible() for t in ax.get_xticklabels())\n\n        ax = subplots[-1][\"ax\"]\n        assert not ax.yaxis.get_label().get_visible()\n        assert not any(t.get_visible() for t in ax.get_yticklabels())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLabelVisibility.test_1d_column_wrapped_non_cross_TestLabelVisibility.test_1d_column_wrapped_non_cross.for_s_in_p__subplots_.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLabelVisibility.test_1d_column_wrapped_non_cross_TestLabelVisibility.test_1d_column_wrapped_non_cross.for_s_in_p__subplots_.None_3", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1493, "end_line": 1505, "span_ids": ["TestLabelVisibility.test_1d_column_wrapped_non_cross"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLabelVisibility:\n\n    def test_1d_column_wrapped_non_cross(self, long_df):\n\n        p = (\n            Plot(long_df)\n            .pair(x=[\"a\", \"b\", \"c\"], y=[\"x\", \"y\", \"z\"], wrap=2, cross=False)\n            .plot()\n        )\n        for s in p._subplots:\n            ax = s[\"ax\"]\n            assert ax.xaxis.get_label().get_visible()\n            assert all(t.get_visible() for t in ax.get_xticklabels())\n            assert ax.yaxis.get_label().get_visible()\n            assert all(t.get_visible() for t in ax.get_yticklabels())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLabelVisibility.test_2d_TestLabelVisibility.test_2d.for_s_in_subplots_1_su.assert_not_any_t_get_visi": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLabelVisibility.test_2d_TestLabelVisibility.test_2d.for_s_in_subplots_1_su.assert_not_any_t_get_visi", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1507, "end_line": 1530, "span_ids": ["TestLabelVisibility.test_2d"], "tokens": 231}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLabelVisibility:\n\n    def test_2d(self):\n\n        p = Plot().facet(col=[\"a\", \"b\"], row=[\"x\", \"y\"]).plot()\n        subplots = list(p._subplots)\n\n        for s in subplots[:2]:\n            ax = s[\"ax\"]\n            assert not ax.xaxis.get_label().get_visible()\n            assert not any(t.get_visible() for t in ax.get_xticklabels())\n\n        for s in subplots[2:]:\n            ax = s[\"ax\"]\n            assert ax.xaxis.get_label().get_visible()\n            assert all(t.get_visible() for t in ax.get_xticklabels())\n\n        for s in [subplots[0], subplots[2]]:\n            ax = s[\"ax\"]\n            assert ax.yaxis.get_label().get_visible()\n            assert all(t.get_visible() for t in ax.get_yticklabels())\n\n        for s in [subplots[1], subplots[3]]:\n            ax = s[\"ax\"]\n            assert not ax.yaxis.get_label().get_visible()\n            assert not any(t.get_visible() for t in ax.get_yticklabels())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLabelVisibility.test_2d_unshared_TestLabelVisibility.test_2d_unshared.for_s_in_subplots_1_su.assert_all_t_get_visible_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLabelVisibility.test_2d_unshared_TestLabelVisibility.test_2d_unshared.for_s_in_subplots_1_su.assert_all_t_get_visible_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1782, "end_line": 1810, "span_ids": ["TestLabelVisibility.test_2d_unshared"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLabelVisibility:\n\n    def test_2d_unshared(self):\n\n        p = (\n            Plot()\n            .facet(col=[\"a\", \"b\"], row=[\"x\", \"y\"])\n            .share(x=False, y=False)\n            .plot()\n        )\n        subplots = list(p._subplots)\n\n        for s in subplots[:2]:\n            ax = s[\"ax\"]\n            assert not ax.xaxis.get_label().get_visible()\n            assert all(t.get_visible() for t in ax.get_xticklabels())\n\n        for s in subplots[2:]:\n            ax = s[\"ax\"]\n            assert ax.xaxis.get_label().get_visible()\n            assert all(t.get_visible() for t in ax.get_xticklabels())\n\n        for s in [subplots[0], subplots[2]]:\n            ax = s[\"ax\"]\n            assert ax.yaxis.get_label().get_visible()\n            assert all(t.get_visible() for t in ax.get_yticklabels())\n\n        for s in [subplots[1], subplots[3]]:\n            ax = s[\"ax\"]\n            assert not ax.yaxis.get_label().get_visible()\n            assert all(t.get_visible() for t in ax.get_yticklabels())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend_TestLegend.test_single_layer_single_variable.for_a_label_in_zip_artis.assert_a_variables_c": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend_TestLegend.test_single_layer_single_variable.for_a_label_in_zip_artis.assert_a_variables_c", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1563, "end_line": 1585, "span_ids": ["TestLegend.xy", "TestLegend", "TestLegend.test_single_layer_single_variable"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLegend:\n\n    @pytest.fixture\n    def xy(self):\n        return dict(x=[1, 2, 3, 4], y=[1, 2, 3, 4])\n\n    def test_single_layer_single_variable(self, xy):\n\n        s = pd.Series([\"a\", \"b\", \"a\", \"c\"], name=\"s\")\n        p = Plot(**xy).add(MockMark(), color=s).plot()\n        e, = p._legend_contents\n\n        labels = categorical_order(s)\n\n        assert e[0] == (s.name, s.name)\n        assert e[-1] == labels\n\n        artists = e[1]\n        assert len(artists) == len(labels)\n        for a, label in zip(artists, labels):\n            assert isinstance(a, mpl.artist.Artist)\n            assert a.value == label\n            assert a.variables == [\"color\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend.test_single_layer_common_variable_TestLegend.test_single_layer_common_variable.for_a_label_in_zip_artis.assert_a_variables_lis": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend.test_single_layer_common_variable_TestLegend.test_single_layer_common_variable.for_a_label_in_zip_artis.assert_a_variables_lis", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1587, "end_line": 1604, "span_ids": ["TestLegend.test_single_layer_common_variable"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLegend:\n\n    def test_single_layer_common_variable(self, xy):\n\n        s = pd.Series([\"a\", \"b\", \"a\", \"c\"], name=\"s\")\n        sem = dict(color=s, marker=s)\n        p = Plot(**xy).add(MockMark(), **sem).plot()\n        e, = p._legend_contents\n\n        labels = categorical_order(s)\n\n        assert e[0] == (s.name, s.name)\n        assert e[-1] == labels\n\n        artists = e[1]\n        assert len(artists) == len(labels)\n        for a, label in zip(artists, labels):\n            assert isinstance(a, mpl.artist.Artist)\n            assert a.value == label\n            assert a.variables == list(sem)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend.test_single_layer_common_unnamed_variable_TestLegend.test_single_layer_common_unnamed_variable.for_a_label_in_zip_artis.assert_a_variables_lis": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend.test_single_layer_common_unnamed_variable_TestLegend.test_single_layer_common_unnamed_variable.for_a_label_in_zip_artis.assert_a_variables_lis", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1856, "end_line": 1874, "span_ids": ["TestLegend.test_single_layer_common_unnamed_variable"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLegend:\n\n    def test_single_layer_common_unnamed_variable(self, xy):\n\n        s = np.array([\"a\", \"b\", \"a\", \"c\"])\n        sem = dict(color=s, marker=s)\n        p = Plot(**xy).add(MockMark(), **sem).plot()\n\n        e, = p._legend_contents\n\n        labels = list(np.unique(s))  # assumes sorted order\n\n        assert e[0] == (\"\", id(s))\n        assert e[-1] == labels\n\n        artists = e[1]\n        assert len(artists) == len(labels)\n        for a, label in zip(artists, labels):\n            assert isinstance(a, mpl.artist.Artist)\n            assert a.value == label\n            assert a.variables == list(sem)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend.test_single_layer_multi_variable_TestLegend.test_single_layer_multi_variable.for_e_s_in_zip_e1_e2_.for_a_label_in_zip_artis.assert_a_variables_va": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend.test_single_layer_multi_variable_TestLegend.test_single_layer_multi_variable.for_e_s_in_zip_e1_e2_.for_a_label_in_zip_artis.assert_a_variables_va", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1626, "end_line": 1647, "span_ids": ["TestLegend.test_single_layer_multi_variable"], "tokens": 225}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLegend:\n\n    def test_single_layer_multi_variable(self, xy):\n\n        s1 = pd.Series([\"a\", \"b\", \"a\", \"c\"], name=\"s1\")\n        s2 = pd.Series([\"m\", \"m\", \"p\", \"m\"], name=\"s2\")\n        sem = dict(color=s1, marker=s2)\n        p = Plot(**xy).add(MockMark(), **sem).plot()\n        e1, e2 = p._legend_contents\n\n        variables = {v.name: k for k, v in sem.items()}\n\n        for e, s in zip([e1, e2], [s1, s2]):\n            assert e[0] == (s.name, s.name)\n\n            labels = categorical_order(s)\n            assert e[-1] == labels\n\n            artists = e[1]\n            assert len(artists) == len(labels)\n            for a, label in zip(artists, labels):\n                assert isinstance(a, mpl.artist.Artist)\n                assert a.value == label\n                assert a.variables == [variables[s.name]]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend.test_multi_layer_single_variable_TestLegend.test_multi_layer_single_variable.for_e_in_e1_e2_.for_a_label_in_zip_artis.assert_a_variables_c": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend.test_multi_layer_single_variable_TestLegend.test_multi_layer_single_variable.for_e_in_e1_e2_.for_a_label_in_zip_artis.assert_a_variables_c", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1649, "end_line": 1668, "span_ids": ["TestLegend.test_multi_layer_single_variable"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLegend:\n\n    def test_multi_layer_single_variable(self, xy):\n\n        s = pd.Series([\"a\", \"b\", \"a\", \"c\"], name=\"s\")\n        p = Plot(**xy, color=s).add(MockMark()).add(MockMark()).plot()\n        e1, e2 = p._legend_contents\n\n        labels = categorical_order(s)\n\n        for e in [e1, e2]:\n            assert e[0] == (s.name, s.name)\n\n            labels = categorical_order(s)\n            assert e[-1] == labels\n\n            artists = e[1]\n            assert len(artists) == len(labels)\n            for a, label in zip(artists, labels):\n                assert isinstance(a, mpl.artist.Artist)\n                assert a.value == label\n                assert a.variables == [\"color\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend.test_multi_layer_multi_variable_TestLegend.test_multi_layer_multi_variable.for_e_s_in_zip_e1_e2_.for_a_label_in_zip_artis.assert_a_variables_va": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend.test_multi_layer_multi_variable_TestLegend.test_multi_layer_multi_variable.for_e_s_in_zip_e1_e2_.for_a_label_in_zip_artis.assert_a_variables_va", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1670, "end_line": 1690, "span_ids": ["TestLegend.test_multi_layer_multi_variable"], "tokens": 237}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLegend:\n\n    def test_multi_layer_multi_variable(self, xy):\n\n        s1 = pd.Series([\"a\", \"b\", \"a\", \"c\"], name=\"s1\")\n        s2 = pd.Series([\"m\", \"m\", \"p\", \"m\"], name=\"s2\")\n        sem = dict(color=s1), dict(marker=s2)\n        variables = {\"s1\": \"color\", \"s2\": \"marker\"}\n        p = Plot(**xy).add(MockMark(), **sem[0]).add(MockMark(), **sem[1]).plot()\n        e1, e2 = p._legend_contents\n\n        for e, s in zip([e1, e2], [s1, s2]):\n            assert e[0] == (s.name, s.name)\n\n            labels = categorical_order(s)\n            assert e[-1] == labels\n\n            artists = e[1]\n            assert len(artists) == len(labels)\n            for a, label in zip(artists, labels):\n                assert isinstance(a, mpl.artist.Artist)\n                assert a.value == label\n                assert a.variables == [variables[s.name]]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend.test_multi_layer_different_artists_TestLegend.test_multi_layer_different_artists.if_Version_mpl___version_.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend.test_multi_layer_different_artists_TestLegend.test_multi_layer_different_artists.if_Version_mpl___version_.None_1", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1692, "end_line": 1714, "span_ids": ["TestLegend.test_multi_layer_different_artists.MockMark1._legend_artist", "TestLegend.test_multi_layer_different_artists", "TestLegend.test_multi_layer_different_artists.MockMark2._legend_artist", "TestLegend.test_multi_layer_different_artists.MockMark1", "TestLegend.test_multi_layer_different_artists.MockMark2"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLegend:\n\n    def test_multi_layer_different_artists(self, xy):\n\n        class MockMark1(MockMark):\n            def _legend_artist(self, variables, value, scales):\n                return mpl.lines.Line2D([], [])\n\n        class MockMark2(MockMark):\n            def _legend_artist(self, variables, value, scales):\n                return mpl.patches.Patch()\n\n        s = pd.Series([\"a\", \"b\", \"a\", \"c\"], name=\"s\")\n        p = Plot(**xy, color=s).add(MockMark1()).add(MockMark2()).plot()\n\n        legend, = p._figure.legends\n\n        names = categorical_order(s)\n        labels = [t.get_text() for t in legend.get_texts()]\n        assert labels == names\n\n        if Version(mpl.__version__) >= Version(\"3.2\"):\n            contents = legend.get_children()[0]\n            assert len(contents.findobj(mpl.lines.Line2D)) == len(names)\n            assert len(contents.findobj(mpl.patches.Patch)) == len(names)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend.test_identity_scale_ignored_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLegend.test_identity_scale_ignored_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1966, "end_line": 1990, "span_ids": ["TestHelpers", "TestLegend.test_suppression_in_add_method", "TestLegend.test_identity_scale_ignored", "TestHelpers.test_default_repr", "TestLegend.test_anonymous_title"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLegend:\n\n    def test_identity_scale_ignored(self, xy):\n\n        s = pd.Series([\"r\", \"g\", \"b\", \"g\"])\n        p = Plot(**xy).add(MockMark(), color=s).scale(color=None).plot()\n        assert not p._legend_contents\n\n    def test_suppression_in_add_method(self, xy):\n\n        s = pd.Series([\"a\", \"b\", \"a\", \"c\"], name=\"s\")\n        p = Plot(**xy).add(MockMark(), color=s, legend=False).plot()\n        assert not p._legend_contents\n\n    def test_anonymous_title(self, xy):\n\n        p = Plot(**xy, color=[\"a\", \"b\", \"c\", \"d\"]).add(MockMark()).plot()\n        legend, = p._figure.legends\n        assert legend.get_title().get_text() == \"\"\n\n\nclass TestHelpers:\n\n    def test_default_repr(self):\n\n        assert repr(Default()) == \"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_np_from_seaborn_palettes_imp": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_np_from_seaborn_palettes_imp", "embedding": null, "metadata": {"file_path": "tests/_core/test_properties.py", "file_name": "test_properties.py", "file_type": "text/x-python", "category": "test", "start_line": 2, "end_line": 25, "span_ids": ["imports"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nimport pandas as pd\nimport matplotlib as mpl\nfrom matplotlib.colors import same_color, to_rgb, to_rgba\n\nimport pytest\nfrom numpy.testing import assert_array_equal\n\nfrom seaborn.external.version import Version\nfrom seaborn._core.rules import categorical_order\nfrom seaborn._core.scales import Nominal, Continuous\nfrom seaborn._core.properties import (\n    Alpha,\n    Color,\n    Coordinate,\n    EdgeWidth,\n    Fill,\n    LineStyle,\n    LineWidth,\n    Marker,\n    PointSize,\n)\nfrom seaborn._compat import MarkerStyle, get_colormap\nfrom seaborn.palettes import color_palette", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_DataFixtures_DataFixtures.vectors.return._num_num_vector_cat_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_DataFixtures_DataFixtures.vectors.return._num_num_vector_cat_", "embedding": null, "metadata": {"file_path": "tests/_core/test_properties.py", "file_name": "test_properties.py", "file_type": "text/x-python", "category": "test", "start_line": 28, "end_line": 56, "span_ids": ["DataFixtures.dt_cat_vector", "DataFixtures.vectors", "DataFixtures.cat_vector", "DataFixtures.cat_order", "DataFixtures", "DataFixtures.num_vector", "DataFixtures.num_order", "DataFixtures.dt_num_vector"], "tokens": 163}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DataFixtures:\n\n    @pytest.fixture\n    def num_vector(self, long_df):\n        return long_df[\"s\"]\n\n    @pytest.fixture\n    def num_order(self, num_vector):\n        return categorical_order(num_vector)\n\n    @pytest.fixture\n    def cat_vector(self, long_df):\n        return long_df[\"a\"]\n\n    @pytest.fixture\n    def cat_order(self, cat_vector):\n        return categorical_order(cat_vector)\n\n    @pytest.fixture\n    def dt_num_vector(self, long_df):\n        return long_df[\"t\"]\n\n    @pytest.fixture\n    def dt_cat_vector(self, long_df):\n        return long_df[\"d\"]\n\n    @pytest.fixture\n    def vectors(self, num_vector, cat_vector):\n        return {\"num\": num_vector, \"cat\": cat_vector}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestCoordinate_TestCoordinate.test_bad_scale_arg_type.with_pytest_raises_TypeEr.Coordinate_x_infer_sca": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestCoordinate_TestCoordinate.test_bad_scale_arg_type.with_pytest_raises_TypeEr.Coordinate_x_infer_sca", "embedding": null, "metadata": {"file_path": "tests/_core/test_properties.py", "file_name": "test_properties.py", "file_type": "text/x-python", "category": "test", "start_line": 59, "end_line": 71, "span_ids": ["TestCoordinate.test_bad_scale_arg_type", "TestCoordinate", "TestCoordinate.test_bad_scale_arg_str"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCoordinate(DataFixtures):\n\n    def test_bad_scale_arg_str(self, num_vector):\n\n        err = \"Unknown magic arg for x scale: 'xxx'.\"\n        with pytest.raises(ValueError, match=err):\n            Coordinate(\"x\").infer_scale(\"xxx\", num_vector)\n\n    def test_bad_scale_arg_type(self, cat_vector):\n\n        err = \"Magic arg for x scale must be str, not list.\"\n        with pytest.raises(TypeError, match=err):\n            Coordinate(\"x\").infer_scale([1, 2, 3], cat_vector)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestColor_TestColor.test_continuous_named_palette.self_assert_same_rgb_m_nu": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestColor_TestColor.test_continuous_named_palette.self_assert_same_rgb_m_nu", "embedding": null, "metadata": {"file_path": "tests/_core/test_properties.py", "file_name": "test_properties.py", "file_type": "text/x-python", "category": "test", "start_line": 74, "end_line": 160, "span_ids": ["TestColor.assert_same_rgb", "TestColor.test_nominal_default_palette", "TestColor.test_nominal_list_too_long", "TestColor.test_continuous_named_palette", "TestColor.test_nominal_default_palette_large", "TestColor.test_nominal_named_palette", "TestColor.test_nominal_list_too_short", "TestColor.test_continuous_default_palette", "TestColor.test_nominal_list_palette", "TestColor", "TestColor.test_nominal_dict_with_missing_keys", "TestColor.test_nominal_dict_palette"], "tokens": 789}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColor(DataFixtures):\n\n    def assert_same_rgb(self, a, b):\n        assert_array_equal(a[:, :3], b[:, :3])\n\n    def test_nominal_default_palette(self, cat_vector, cat_order):\n\n        m = Color().get_mapping(Nominal(), cat_vector)\n        n = len(cat_order)\n        actual = m(np.arange(n))\n        expected = color_palette(None, n)\n        for have, want in zip(actual, expected):\n            assert same_color(have, want)\n\n    def test_nominal_default_palette_large(self):\n\n        vector = pd.Series(list(\"abcdefghijklmnopqrstuvwxyz\"))\n        m = Color().get_mapping(Nominal(), vector)\n        actual = m(np.arange(26))\n        expected = color_palette(\"husl\", 26)\n        for have, want in zip(actual, expected):\n            assert same_color(have, want)\n\n    def test_nominal_named_palette(self, cat_vector, cat_order):\n\n        palette = \"Blues\"\n        m = Color().get_mapping(Nominal(palette), cat_vector)\n        n = len(cat_order)\n        actual = m(np.arange(n))\n        expected = color_palette(palette, n)\n        for have, want in zip(actual, expected):\n            assert same_color(have, want)\n\n    def test_nominal_list_palette(self, cat_vector, cat_order):\n\n        palette = color_palette(\"Reds\", len(cat_order))\n        m = Color().get_mapping(Nominal(palette), cat_vector)\n        actual = m(np.arange(len(palette)))\n        expected = palette\n        for have, want in zip(actual, expected):\n            assert same_color(have, want)\n\n    def test_nominal_dict_palette(self, cat_vector, cat_order):\n\n        colors = color_palette(\"Greens\")\n        palette = dict(zip(cat_order, colors))\n        m = Color().get_mapping(Nominal(palette), cat_vector)\n        n = len(cat_order)\n        actual = m(np.arange(n))\n        expected = colors\n        for have, want in zip(actual, expected):\n            assert same_color(have, want)\n\n    def test_nominal_dict_with_missing_keys(self, cat_vector, cat_order):\n\n        palette = dict(zip(cat_order[1:], color_palette(\"Purples\")))\n        with pytest.raises(ValueError, match=\"No entry in color dict\"):\n            Color(\"color\").get_mapping(Nominal(palette), cat_vector)\n\n    def test_nominal_list_too_short(self, cat_vector, cat_order):\n\n        n = len(cat_order) - 1\n        palette = color_palette(\"Oranges\", n)\n        msg = rf\"The edgecolor list has fewer values \\({n}\\) than needed \\({n + 1}\\)\"\n        with pytest.warns(UserWarning, match=msg):\n            Color(\"edgecolor\").get_mapping(Nominal(palette), cat_vector)\n\n    def test_nominal_list_too_long(self, cat_vector, cat_order):\n\n        n = len(cat_order) + 1\n        palette = color_palette(\"Oranges\", n)\n        msg = rf\"The edgecolor list has more values \\({n}\\) than needed \\({n - 1}\\)\"\n        with pytest.warns(UserWarning, match=msg):\n            Color(\"edgecolor\").get_mapping(Nominal(palette), cat_vector)\n\n    def test_continuous_default_palette(self, num_vector):\n\n        cmap = color_palette(\"ch:\", as_cmap=True)\n        m = Color().get_mapping(Continuous(), num_vector)\n        self.assert_same_rgb(m(num_vector), cmap(num_vector))\n\n    def test_continuous_named_palette(self, num_vector):\n\n        pal = \"flare\"\n        cmap = color_palette(pal, as_cmap=True)\n        m = Color().get_mapping(Continuous(pal), num_vector)\n        self.assert_same_rgb(m(num_vector), cmap(num_vector))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestColor.test_continuous_tuple_palette_TestColor._TODO_default_scales_for": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestColor.test_continuous_tuple_palette_TestColor._TODO_default_scales_for", "embedding": null, "metadata": {"file_path": "tests/_core/test_properties.py", "file_name": "test_properties.py", "file_type": "text/x-python", "category": "test", "start_line": 162, "end_line": 216, "span_ids": ["TestColor.test_continuous_missing", "TestColor.test_default_binary_data", "TestColor.test_bad_scale_values_continuous", "TestColor.test_default_numeric_data_category_dtype", "TestColor.test_continuous_tuple_palette", "TestColor.test_continuous_callable_palette", "TestColor.test_bad_inference_arg", "TestColor.test_bad_scale_values_nominal", "TestColor.test_default"], "tokens": 453}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColor(DataFixtures):\n\n    def test_continuous_tuple_palette(self, num_vector):\n\n        vals = (\"blue\", \"red\")\n        cmap = color_palette(\"blend:\" + \",\".join(vals), as_cmap=True)\n        m = Color().get_mapping(Continuous(vals), num_vector)\n        self.assert_same_rgb(m(num_vector), cmap(num_vector))\n\n    def test_continuous_callable_palette(self, num_vector):\n\n        cmap = get_colormap(\"viridis\")\n        m = Color().get_mapping(Continuous(cmap), num_vector)\n        self.assert_same_rgb(m(num_vector), cmap(num_vector))\n\n    def test_continuous_missing(self):\n\n        x = pd.Series([1, 2, np.nan, 4])\n        m = Color().get_mapping(Continuous(), x)\n        assert np.isnan(m(x)[2]).all()\n\n    def test_bad_scale_values_continuous(self, num_vector):\n\n        with pytest.raises(TypeError, match=\"Scale values for color with a Continuous\"):\n            Color().get_mapping(Continuous([\"r\", \"g\", \"b\"]), num_vector)\n\n    def test_bad_scale_values_nominal(self, cat_vector):\n\n        with pytest.raises(TypeError, match=\"Scale values for color with a Nominal\"):\n            Color().get_mapping(Nominal(get_colormap(\"viridis\")), cat_vector)\n\n    def test_bad_inference_arg(self, cat_vector):\n\n        with pytest.raises(TypeError, match=\"A single scale argument for color\"):\n            Color().infer_scale(123, cat_vector)\n\n    @pytest.mark.parametrize(\n        \"data_type,scale_class\",\n        [(\"cat\", Nominal), (\"num\", Continuous)]\n    )\n    def test_default(self, data_type, scale_class, vectors):\n\n        scale = Color().default_scale(vectors[data_type])\n        assert isinstance(scale, scale_class)\n\n    def test_default_numeric_data_category_dtype(self, num_vector):\n\n        scale = Color().default_scale(num_vector.astype(\"category\"))\n        assert isinstance(scale, Nominal)\n\n    def test_default_binary_data(self):\n\n        x = pd.Series([0, 0, 1, 0, 1], dtype=int)\n        scale = Color().default_scale(x)\n        assert isinstance(scale, Continuous)\n\n    # TODO default scales for other types", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestColor.test_inference_TestColor.test_inference.assert_scale_values_va": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestColor.test_inference_TestColor.test_inference.assert_scale_values_va", "embedding": null, "metadata": {"file_path": "tests/_core/test_properties.py", "file_name": "test_properties.py", "file_type": "text/x-python", "category": "test", "start_line": 218, "end_line": 235, "span_ids": ["TestColor.test_inference"], "tokens": 244}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColor(DataFixtures):\n\n    @pytest.mark.parametrize(\n        \"values,data_type,scale_class\",\n        [\n            (\"viridis\", \"cat\", Nominal),  # Based on variable type\n            (\"viridis\", \"num\", Continuous),  # Based on variable type\n            (\"muted\", \"num\", Nominal),  # Based on qualitative palette\n            ([\"r\", \"g\", \"b\"], \"num\", Nominal),  # Based on list palette\n            ({2: \"r\", 4: \"g\", 8: \"b\"}, \"num\", Nominal),  # Based on dict palette\n            ((\"r\", \"b\"), \"num\", Continuous),  # Based on tuple / variable type\n            ((\"g\", \"m\"), \"cat\", Nominal),  # Based on tuple / variable type\n            (get_colormap(\"inferno\"), \"num\", Continuous),  # Based on callable\n        ]\n    )\n    def test_inference(self, values, data_type, scale_class, vectors):\n\n        scale = Color().infer_scale(values, vectors[data_type])\n        assert isinstance(scale, scale_class)\n        assert scale.values == values", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestColor.test_inference_binary_data_TestColor.test_standardization.if_Version_mpl___version_.assert_f_1234_to_r": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestColor.test_inference_binary_data_TestColor.test_standardization.if_Version_mpl___version_.assert_f_1234_to_r", "embedding": null, "metadata": {"file_path": "tests/_core/test_properties.py", "file_name": "test_properties.py", "file_type": "text/x-python", "category": "test", "start_line": 237, "end_line": 257, "span_ids": ["TestColor.test_standardization", "TestColor.test_inference_binary_data"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColor(DataFixtures):\n\n    def test_inference_binary_data(self):\n\n        x = pd.Series([0, 0, 1, 0, 1], dtype=int)\n        scale = Color().infer_scale(\"viridis\", x)\n        assert isinstance(scale, Nominal)\n\n    def test_standardization(self):\n\n        f = Color().standardize\n        assert f(\"C3\") == to_rgb(\"C3\")\n        assert f(\"dodgerblue\") == to_rgb(\"dodgerblue\")\n\n        assert f((.1, .2, .3)) == (.1, .2, .3)\n        assert f((.1, .2, .3, .4)) == (.1, .2, .3, .4)\n\n        assert f(\"#123456\") == to_rgb(\"#123456\")\n        assert f(\"#12345678\") == to_rgba(\"#12345678\")\n\n        if Version(mpl.__version__) >= Version(\"3.4.0\"):\n            assert f(\"#123\") == to_rgb(\"#123\")\n            assert f(\"#1234\") == to_rgba(\"#1234\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_ObjectPropertyBase_ObjectPropertyBase.test_mapping_from_list.for_i_expected_in_enumer.self_assert_equal_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_ObjectPropertyBase_ObjectPropertyBase.test_mapping_from_list.for_i_expected_in_enumer.self_assert_equal_actual_", "embedding": null, "metadata": {"file_path": "tests/_core/test_properties.py", "file_name": "test_properties.py", "file_type": "text/x-python", "category": "test", "start_line": 260, "end_line": 319, "span_ids": ["ObjectPropertyBase.unpack", "ObjectPropertyBase.test_dict_missing", "ObjectPropertyBase.assert_equal", "ObjectPropertyBase.test_inference_list", "ObjectPropertyBase", "ObjectPropertyBase.test_default", "ObjectPropertyBase.test_inference_dict", "ObjectPropertyBase.test_mapping_default", "ObjectPropertyBase.test_mapping_from_list"], "tokens": 475}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ObjectPropertyBase(DataFixtures):\n\n    def assert_equal(self, a, b):\n\n        assert self.unpack(a) == self.unpack(b)\n\n    def unpack(self, x):\n        return x\n\n    @pytest.mark.parametrize(\"data_type\", [\"cat\", \"num\"])\n    def test_default(self, data_type, vectors):\n\n        scale = self.prop().default_scale(vectors[data_type])\n        assert isinstance(scale, Nominal)\n\n    @pytest.mark.parametrize(\"data_type\", [\"cat\", \"num\"])\n    def test_inference_list(self, data_type, vectors):\n\n        scale = self.prop().infer_scale(self.values, vectors[data_type])\n        assert isinstance(scale, Nominal)\n        assert scale.values == self.values\n\n    @pytest.mark.parametrize(\"data_type\", [\"cat\", \"num\"])\n    def test_inference_dict(self, data_type, vectors):\n\n        x = vectors[data_type]\n        values = dict(zip(categorical_order(x), self.values))\n        scale = self.prop().infer_scale(values, x)\n        assert isinstance(scale, Nominal)\n        assert scale.values == values\n\n    def test_dict_missing(self, cat_vector):\n\n        levels = categorical_order(cat_vector)\n        values = dict(zip(levels, self.values[:-1]))\n        scale = Nominal(values)\n        name = self.prop.__name__.lower()\n        msg = f\"No entry in {name} dictionary for {repr(levels[-1])}\"\n        with pytest.raises(ValueError, match=msg):\n            self.prop().get_mapping(scale, cat_vector)\n\n    @pytest.mark.parametrize(\"data_type\", [\"cat\", \"num\"])\n    def test_mapping_default(self, data_type, vectors):\n\n        x = vectors[data_type]\n        mapping = self.prop().get_mapping(Nominal(), x)\n        n = x.nunique()\n        for i, expected in enumerate(self.prop()._default_values(n)):\n            actual, = mapping([i])\n            self.assert_equal(actual, expected)\n\n    @pytest.mark.parametrize(\"data_type\", [\"cat\", \"num\"])\n    def test_mapping_from_list(self, data_type, vectors):\n\n        x = vectors[data_type]\n        scale = Nominal(self.values)\n        mapping = self.prop().get_mapping(scale, x)\n        for i, expected in enumerate(self.standardized_values):\n            actual, = mapping([i])\n            self.assert_equal(actual, expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_ObjectPropertyBase.test_mapping_from_dict_ObjectPropertyBase.test_mapping_from_dict.for_i_level_in_enumerate.self_assert_equal_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_ObjectPropertyBase.test_mapping_from_dict_ObjectPropertyBase.test_mapping_from_dict.for_i_level_in_enumerate.self_assert_equal_actual_", "embedding": null, "metadata": {"file_path": "tests/_core/test_properties.py", "file_name": "test_properties.py", "file_type": "text/x-python", "category": "test", "start_line": 321, "end_line": 334, "span_ids": ["ObjectPropertyBase.test_mapping_from_dict"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ObjectPropertyBase(DataFixtures):\n\n    @pytest.mark.parametrize(\"data_type\", [\"cat\", \"num\"])\n    def test_mapping_from_dict(self, data_type, vectors):\n\n        x = vectors[data_type]\n        levels = categorical_order(x)\n        values = dict(zip(levels, self.values[::-1]))\n        standardized_values = dict(zip(levels, self.standardized_values[::-1]))\n\n        scale = Nominal(values)\n        mapping = self.prop().get_mapping(scale, x)\n        for i, level in enumerate(levels):\n            actual, = mapping([i])\n            expected = standardized_values[level]\n            self.assert_equal(actual, expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_ObjectPropertyBase.test_mapping_with_null_value_ObjectPropertyBase.test_bad_scale_values.with_pytest_raises_TypeEr.self_prop_get_mapping_N": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_ObjectPropertyBase.test_mapping_with_null_value_ObjectPropertyBase.test_bad_scale_values.with_pytest_raises_TypeEr.self_prop_get_mapping_N", "embedding": null, "metadata": {"file_path": "tests/_core/test_properties.py", "file_name": "test_properties.py", "file_type": "text/x-python", "category": "test", "start_line": 336, "end_line": 356, "span_ids": ["ObjectPropertyBase.test_unique_default_large_n", "ObjectPropertyBase.test_bad_scale_values", "ObjectPropertyBase.test_mapping_with_null_value"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ObjectPropertyBase(DataFixtures):\n\n    def test_mapping_with_null_value(self, cat_vector):\n\n        mapping = self.prop().get_mapping(Nominal(self.values), cat_vector)\n        actual = mapping(np.array([0, np.nan, 2]))\n        v0, _, v2 = self.standardized_values\n        expected = [v0, self.prop.null_value, v2]\n        for a, b in zip(actual, expected):\n            self.assert_equal(a, b)\n\n    def test_unique_default_large_n(self):\n\n        n = 24\n        x = pd.Series(np.arange(n))\n        mapping = self.prop().get_mapping(Nominal(), x)\n        assert len({self.unpack(x_i) for x_i in mapping(x)}) == n\n\n    def test_bad_scale_values(self, cat_vector):\n\n        var_name = self.prop.__name__.lower()\n        with pytest.raises(TypeError, match=f\"Scale values for a {var_name} variable\"):\n            self.prop().get_mapping(Nominal((\"o\", \"s\")), cat_vector)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestMarker_TestLineStyle.test_bad_dashes.with_pytest_raises_TypeEr.p_standardize_1_2_x_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestMarker_TestLineStyle.test_bad_dashes.with_pytest_raises_TypeEr.p_standardize_1_2_x_", "embedding": null, "metadata": {"file_path": "tests/_core/test_properties.py", "file_name": "test_properties.py", "file_type": "text/x-python", "category": "test", "start_line": 359, "end_line": 396, "span_ids": ["TestLineStyle.test_bad_style", "TestLineStyle", "TestLineStyle.test_bad_dashes", "TestMarker.unpack", "TestMarker", "TestLineStyle.test_bad_type"], "tokens": 249}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestMarker(ObjectPropertyBase):\n\n    prop = Marker\n    values = [\"o\", (5, 2, 0), MarkerStyle(\"^\")]\n    standardized_values = [MarkerStyle(x) for x in values]\n\n    def unpack(self, x):\n        return (\n            x.get_path(),\n            x.get_joinstyle(),\n            x.get_transform().to_values(),\n            x.get_fillstyle(),\n        )\n\n\nclass TestLineStyle(ObjectPropertyBase):\n\n    prop = LineStyle\n    values = [\"solid\", \"--\", (1, .5)]\n    standardized_values = [LineStyle._get_dash_pattern(x) for x in values]\n\n    def test_bad_type(self):\n\n        p = LineStyle()\n        with pytest.raises(TypeError, match=\"^Linestyle must be .+, not list.$\"):\n            p.standardize([1, 2])\n\n    def test_bad_style(self):\n\n        p = LineStyle()\n        with pytest.raises(ValueError, match=\"^Linestyle string must be .+, not 'o'.$\"):\n            p.standardize(\"o\")\n\n    def test_bad_dashes(self):\n\n        p = LineStyle()\n        with pytest.raises(TypeError, match=\"^Invalid dash pattern\"):\n            p.standardize((1, 2, \"x\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestFill_TestFill.test_values_error.with_pytest_raises_TypeEr.Fill_get_mapping_Nomina": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestFill_TestFill.test_values_error.with_pytest_raises_TypeEr.Fill_get_mapping_Nomina", "embedding": null, "metadata": {"file_path": "tests/_core/test_properties.py", "file_name": "test_properties.py", "file_type": "text/x-python", "category": "test", "start_line": 399, "end_line": 478, "span_ids": ["TestFill.num_vector", "TestFill.test_mapping_categorical_data", "TestFill.test_default", "TestFill.test_inference_list", "TestFill.test_mapping_numeric_data", "TestFill.test_mapping_truthy_list", "TestFill.cat_vector", "TestFill.test_inference_dict", "TestFill.test_values_error", "TestFill.vectors", "TestFill.test_cycle_warning", "TestFill.test_mapping_dict", "TestFill.test_mapping_list", "TestFill"], "tokens": 651}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFill(DataFixtures):\n\n    @pytest.fixture\n    def vectors(self):\n\n        return {\n            \"cat\": pd.Series([\"a\", \"a\", \"b\"]),\n            \"num\": pd.Series([1, 1, 2]),\n            \"bool\": pd.Series([True, True, False])\n        }\n\n    @pytest.fixture\n    def cat_vector(self, vectors):\n        return vectors[\"cat\"]\n\n    @pytest.fixture\n    def num_vector(self, vectors):\n        return vectors[\"num\"]\n\n    @pytest.mark.parametrize(\"data_type\", [\"cat\", \"num\", \"bool\"])\n    def test_default(self, data_type, vectors):\n\n        x = vectors[data_type]\n        scale = Fill().default_scale(x)\n        assert isinstance(scale, Nominal)\n\n    @pytest.mark.parametrize(\"data_type\", [\"cat\", \"num\", \"bool\"])\n    def test_inference_list(self, data_type, vectors):\n\n        x = vectors[data_type]\n        scale = Fill().infer_scale([True, False], x)\n        assert isinstance(scale, Nominal)\n        assert scale.values == [True, False]\n\n    @pytest.mark.parametrize(\"data_type\", [\"cat\", \"num\", \"bool\"])\n    def test_inference_dict(self, data_type, vectors):\n\n        x = vectors[data_type]\n        values = dict(zip(x.unique(), [True, False]))\n        scale = Fill().infer_scale(values, x)\n        assert isinstance(scale, Nominal)\n        assert scale.values == values\n\n    def test_mapping_categorical_data(self, cat_vector):\n\n        mapping = Fill().get_mapping(Nominal(), cat_vector)\n        assert_array_equal(mapping([0, 1, 0]), [True, False, True])\n\n    def test_mapping_numeric_data(self, num_vector):\n\n        mapping = Fill().get_mapping(Nominal(), num_vector)\n        assert_array_equal(mapping([0, 1, 0]), [True, False, True])\n\n    def test_mapping_list(self, cat_vector):\n\n        mapping = Fill().get_mapping(Nominal([False, True]), cat_vector)\n        assert_array_equal(mapping([0, 1, 0]), [False, True, False])\n\n    def test_mapping_truthy_list(self, cat_vector):\n\n        mapping = Fill().get_mapping(Nominal([0, 1]), cat_vector)\n        assert_array_equal(mapping([0, 1, 0]), [False, True, False])\n\n    def test_mapping_dict(self, cat_vector):\n\n        values = dict(zip(cat_vector.unique(), [False, True]))\n        mapping = Fill().get_mapping(Nominal(values), cat_vector)\n        assert_array_equal(mapping([0, 1, 0]), [False, True, False])\n\n    def test_cycle_warning(self):\n\n        x = pd.Series([\"a\", \"b\", \"c\"])\n        with pytest.warns(UserWarning, match=\"The variable assigned to fill\"):\n            Fill().get_mapping(Nominal(), x)\n\n    def test_values_error(self):\n\n        x = pd.Series([\"a\", \"b\"])\n        with pytest.raises(TypeError, match=\"Scale values for fill must be\"):\n            Fill().get_mapping(Nominal(\"bad_values\"), x)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_IntervalBase_IntervalBase.test_inference.assert_scale_values_ar": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_IntervalBase_IntervalBase.test_inference.assert_scale_values_ar", "embedding": null, "metadata": {"file_path": "tests/_core/test_properties.py", "file_name": "test_properties.py", "file_type": "text/x-python", "category": "test", "start_line": 481, "end_line": 509, "span_ids": ["IntervalBase.test_default", "IntervalBase.norm", "IntervalBase", "IntervalBase.test_inference"], "tokens": 272}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IntervalBase(DataFixtures):\n\n    def norm(self, x):\n        return (x - x.min()) / (x.max() - x.min())\n\n    @pytest.mark.parametrize(\"data_type,scale_class\", [\n        (\"cat\", Nominal),\n        (\"num\", Continuous),\n    ])\n    def test_default(self, data_type, scale_class, vectors):\n\n        x = vectors[data_type]\n        scale = self.prop().default_scale(x)\n        assert isinstance(scale, scale_class)\n\n    @pytest.mark.parametrize(\"arg,data_type,scale_class\", [\n        ((1, 3), \"cat\", Nominal),\n        ((1, 3), \"num\", Continuous),\n        ([1, 2, 3], \"cat\", Nominal),\n        ([1, 2, 3], \"num\", Nominal),\n        ({\"a\": 1, \"b\": 3, \"c\": 2}, \"cat\", Nominal),\n        ({2: 1, 4: 3, 8: 2}, \"num\", Nominal),\n    ])\n    def test_inference(self, arg, data_type, scale_class, vectors):\n\n        x = vectors[data_type]\n        scale = self.prop().infer_scale(arg, x)\n        assert isinstance(scale, scale_class)\n        assert scale.values == arg", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_IntervalBase.test_mapped_interval_numeric_IntervalBase.test_bad_scale_values_categorical_data.with_pytest_raises_TypeEr.self_prop_get_mapping_N": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_IntervalBase.test_mapped_interval_numeric_IntervalBase.test_bad_scale_values_categorical_data.with_pytest_raises_TypeEr.self_prop_get_mapping_N", "embedding": null, "metadata": {"file_path": "tests/_core/test_properties.py", "file_name": "test_properties.py", "file_type": "text/x-python", "category": "test", "start_line": 511, "end_line": 540, "span_ids": ["IntervalBase.test_mapped_interval_numeric", "IntervalBase.test_bad_scale_values_categorical_data", "IntervalBase.test_mapped_interval_categorical", "IntervalBase.test_bad_scale_values_numeric_data"], "tokens": 298}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class IntervalBase(DataFixtures):\n\n    def test_mapped_interval_numeric(self, num_vector):\n\n        mapping = self.prop().get_mapping(Continuous(), num_vector)\n        assert_array_equal(mapping([0, 1]), self.prop().default_range)\n\n    def test_mapped_interval_categorical(self, cat_vector):\n\n        mapping = self.prop().get_mapping(Nominal(), cat_vector)\n        n = cat_vector.nunique()\n        assert_array_equal(mapping([n - 1, 0]), self.prop().default_range)\n\n    def test_bad_scale_values_numeric_data(self, num_vector):\n\n        prop_name = self.prop.__name__.lower()\n        err_stem = (\n            f\"Values for {prop_name} variables with Continuous scale must be 2-tuple\"\n        )\n\n        with pytest.raises(TypeError, match=f\"{err_stem}; not .\"):\n            self.prop().get_mapping(Continuous(\"abc\"), num_vector)\n\n        with pytest.raises(TypeError, match=f\"{err_stem}; not 3-tuple.\"):\n            self.prop().get_mapping(Continuous((1, 2, 3)), num_vector)\n\n    def test_bad_scale_values_categorical_data(self, cat_vector):\n\n        prop_name = self.prop.__name__.lower()\n        err_text = f\"Values for {prop_name} variables with Nominal scale\"\n        with pytest.raises(TypeError, match=err_text):\n            self.prop().get_mapping(Nominal(\"abc\"), cat_vector)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestAlpha_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_properties.py_TestAlpha_", "embedding": null, "metadata": {"file_path": "tests/_core/test_properties.py", "file_name": "test_properties.py", "file_type": "text/x-python", "category": "test", "start_line": 543, "end_line": 583, "span_ids": ["TestPointSize", "TestPointSize.test_areal_scaling_numeric", "TestLineWidth.test_rcparam_default", "TestAlpha", "TestEdgeWidth.test_rcparam_default", "TestEdgeWidth", "TestLineWidth", "TestPointSize.test_areal_scaling_categorical"], "tokens": 268}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestAlpha(IntervalBase):\n    prop = Alpha\n\n\nclass TestLineWidth(IntervalBase):\n    prop = LineWidth\n\n    def test_rcparam_default(self):\n\n        with mpl.rc_context({\"lines.linewidth\": 2}):\n            assert self.prop().default_range == (1, 4)\n\n\nclass TestEdgeWidth(IntervalBase):\n    prop = EdgeWidth\n\n    def test_rcparam_default(self):\n\n        with mpl.rc_context({\"patch.linewidth\": 2}):\n            assert self.prop().default_range == (1, 4)\n\n\nclass TestPointSize(IntervalBase):\n    prop = PointSize\n\n    def test_areal_scaling_numeric(self, num_vector):\n\n        limits = 5, 10\n        scale = Continuous(limits)\n        mapping = self.prop().get_mapping(scale, num_vector)\n        x = np.linspace(0, 1, 6)\n        expected = np.sqrt(np.linspace(*np.square(limits), num=len(x)))\n        assert_array_equal(mapping(x), expected)\n\n    def test_areal_scaling_categorical(self, cat_vector):\n\n        limits = (2, 4)\n        scale = Nominal(limits)\n        mapping = self.prop().get_mapping(scale, cat_vector)\n        assert_array_equal(mapping(np.arange(3)), [4, np.sqrt(10), 2])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_rules.py_np_test_variable_type.None_17": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_rules.py_np_test_variable_type.None_17", "embedding": null, "metadata": {"file_path": "tests/_core/test_rules.py", "file_name": "test_rules.py", "file_type": "text/x-python", "category": "test", "start_line": 2, "end_line": 57, "span_ids": ["test_vartype_object", "test_variable_type", "imports"], "tokens": 437}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nimport pandas as pd\n\nimport pytest\n\nfrom seaborn._core.rules import (\n    VarType,\n    variable_type,\n    categorical_order,\n)\n\n\ndef test_vartype_object():\n\n    v = VarType(\"numeric\")\n    assert v == \"numeric\"\n    assert v != \"categorical\"\n    with pytest.raises(AssertionError):\n        v == \"number\"\n    with pytest.raises(AssertionError):\n        VarType(\"date\")\n\n\ndef test_variable_type():\n\n    s = pd.Series([1., 2., 3.])\n    assert variable_type(s) == \"numeric\"\n    assert variable_type(s.astype(int)) == \"numeric\"\n    assert variable_type(s.astype(object)) == \"numeric\"\n    assert variable_type(s.to_numpy()) == \"numeric\"\n    assert variable_type(s.to_list()) == \"numeric\"\n\n    s = pd.Series([1, 2, 3, np.nan], dtype=object)\n    assert variable_type(s) == \"numeric\"\n\n    s = pd.Series([np.nan, np.nan])\n    # s = pd.Series([pd.NA, pd.NA])\n    assert variable_type(s) == \"numeric\"\n\n    s = pd.Series([\"1\", \"2\", \"3\"])\n    assert variable_type(s) == \"categorical\"\n    assert variable_type(s.to_numpy()) == \"categorical\"\n    assert variable_type(s.to_list()) == \"categorical\"\n\n    s = pd.Series([True, False, False])\n    assert variable_type(s) == \"numeric\"\n    assert variable_type(s, boolean_type=\"categorical\") == \"categorical\"\n    s_cat = s.astype(\"category\")\n    assert variable_type(s_cat, boolean_type=\"categorical\") == \"categorical\"\n    assert variable_type(s_cat, boolean_type=\"numeric\") == \"categorical\"\n\n    s = pd.Series([pd.Timestamp(1), pd.Timestamp(2)])\n    assert variable_type(s) == \"datetime\"\n    assert variable_type(s.astype(object)) == \"datetime\"\n    assert variable_type(s.to_numpy()) == \"datetime\"\n    assert variable_type(s.to_list()) == \"datetime\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_rules.py_test_categorical_order_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_rules.py_test_categorical_order_", "embedding": null, "metadata": {"file_path": "tests/_core/test_rules.py", "file_name": "test_rules.py", "file_type": "text/x-python", "category": "test", "start_line": 60, "end_line": 95, "span_ids": ["test_categorical_order"], "tokens": 305}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_categorical_order():\n\n    x = pd.Series([\"a\", \"c\", \"c\", \"b\", \"a\", \"d\"])\n    y = pd.Series([3, 2, 5, 1, 4])\n    order = [\"a\", \"b\", \"c\", \"d\"]\n\n    out = categorical_order(x)\n    assert out == [\"a\", \"c\", \"b\", \"d\"]\n\n    out = categorical_order(x, order)\n    assert out == order\n\n    out = categorical_order(x, [\"b\", \"a\"])\n    assert out == [\"b\", \"a\"]\n\n    out = categorical_order(y)\n    assert out == [1, 2, 3, 4, 5]\n\n    out = categorical_order(pd.Series(y))\n    assert out == [1, 2, 3, 4, 5]\n\n    y_cat = pd.Series(pd.Categorical(y, y))\n    out = categorical_order(y_cat)\n    assert out == list(y)\n\n    x = pd.Series(x).astype(\"category\")\n    out = categorical_order(x)\n    assert out == list(x.cat.categories)\n\n    out = categorical_order(x, [\"b\", \"a\"])\n    assert out == [\"b\", \"a\"]\n\n    x = pd.Series([\"a\", np.nan, \"c\", \"c\", \"b\", \"a\", \"d\"])\n    out = categorical_order(x)\n    assert out == [\"a\", \"c\", \"b\", \"d\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestNominal_TestNominal.test_coordinate_axis_with_subset_order.assert_f_format_ticks_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestNominal_TestNominal.test_coordinate_axis_with_subset_order.assert_f_format_ticks_0_", "embedding": null, "metadata": {"file_path": "tests/_core/test_scales.py", "file_name": "test_scales.py", "file_type": "text/x-python", "category": "test", "start_line": 307, "end_line": 356, "span_ids": ["TestNominal.test_coordinate_axis_with_order", "TestNominal", "TestNominal.test_coordinate_defaults", "TestNominal.test_coordinate_axis", "TestNominal.y", "TestNominal.test_coordinate_with_order", "TestNominal.test_coordinate_with_subset_order", "TestNominal.x", "TestNominal.test_coordinate_axis_with_subset_order"], "tokens": 509}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestNominal:\n\n    @pytest.fixture\n    def x(self):\n        return pd.Series([\"a\", \"c\", \"b\", \"c\"], name=\"x\")\n\n    @pytest.fixture\n    def y(self):\n        return pd.Series([1, -1.5, 3, -1.5], name=\"y\")\n\n    def test_coordinate_defaults(self, x):\n\n        s = Nominal()._setup(x, Coordinate())\n        assert_array_equal(s(x), np.array([0, 1, 2, 1], float))\n\n    def test_coordinate_with_order(self, x):\n\n        s = Nominal(order=[\"a\", \"b\", \"c\"])._setup(x, Coordinate())\n        assert_array_equal(s(x), np.array([0, 2, 1, 2], float))\n\n    def test_coordinate_with_subset_order(self, x):\n\n        s = Nominal(order=[\"c\", \"a\"])._setup(x, Coordinate())\n        assert_array_equal(s(x), np.array([1, 0, np.nan, 0], float))\n\n    def test_coordinate_axis(self, x):\n\n        ax = mpl.figure.Figure().subplots()\n        s = Nominal()._setup(x, Coordinate(), ax.xaxis)\n        assert_array_equal(s(x), np.array([0, 1, 2, 1], float))\n        f = ax.xaxis.get_major_formatter()\n        assert f.format_ticks([0, 1, 2]) == [\"a\", \"c\", \"b\"]\n\n    def test_coordinate_axis_with_order(self, x):\n\n        order = [\"a\", \"b\", \"c\"]\n        ax = mpl.figure.Figure().subplots()\n        s = Nominal(order=order)._setup(x, Coordinate(), ax.xaxis)\n        assert_array_equal(s(x), np.array([0, 2, 1, 2], float))\n        f = ax.xaxis.get_major_formatter()\n        assert f.format_ticks([0, 1, 2]) == order\n\n    def test_coordinate_axis_with_subset_order(self, x):\n\n        order = [\"c\", \"a\"]\n        ax = mpl.figure.Figure().subplots()\n        s = Nominal(order=order)._setup(x, Coordinate(), ax.xaxis)\n        assert_array_equal(s(x), np.array([1, 0, np.nan, 0], float))\n        f = ax.xaxis.get_major_formatter()\n        assert f.format_ticks([0, 1, 2]) == [*order, \"\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestNominal.test_coordinate_axis_with_category_dtype_TestNominal.test_coordinate_numeric_data.assert_f_format_ticks_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestNominal.test_coordinate_axis_with_category_dtype_TestNominal.test_coordinate_numeric_data.assert_f_format_ticks_0_", "embedding": null, "metadata": {"file_path": "tests/_core/test_scales.py", "file_name": "test_scales.py", "file_type": "text/x-python", "category": "test", "start_line": 358, "end_line": 374, "span_ids": ["TestNominal.test_coordinate_axis_with_category_dtype", "TestNominal.test_coordinate_numeric_data"], "tokens": 221}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestNominal:\n\n    def test_coordinate_axis_with_category_dtype(self, x):\n\n        order = [\"b\", \"a\", \"d\", \"c\"]\n        x = x.astype(pd.CategoricalDtype(order))\n        ax = mpl.figure.Figure().subplots()\n        s = Nominal()._setup(x, Coordinate(), ax.xaxis)\n        assert_array_equal(s(x), np.array([1, 3, 0, 3], float))\n        f = ax.xaxis.get_major_formatter()\n        assert f.format_ticks([0, 1, 2, 3]) == order\n\n    def test_coordinate_numeric_data(self, y):\n\n        ax = mpl.figure.Figure().subplots()\n        s = Nominal()._setup(y, Coordinate(), ax.yaxis)\n        assert_array_equal(s(y), np.array([1, 0, 2, 0], float))\n        f = ax.yaxis.get_major_formatter()\n        assert f.format_ticks([0, 1, 2]) == [\"-1.5\", \"1.0\", \"3.0\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestNominal.test_coordinate_numeric_data_with_order_TestNominal.test_coordinate_numeric_data_with_order.assert_f_format_ticks_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestNominal.test_coordinate_numeric_data_with_order_TestNominal.test_coordinate_numeric_data_with_order.assert_f_format_ticks_0_", "embedding": null, "metadata": {"file_path": "tests/_core/test_scales.py", "file_name": "test_scales.py", "file_type": "text/x-python", "category": "test", "start_line": 376, "end_line": 383, "span_ids": ["TestNominal.test_coordinate_numeric_data_with_order"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestNominal:\n\n    def test_coordinate_numeric_data_with_order(self, y):\n\n        order = [1, 4, -1.5]\n        ax = mpl.figure.Figure().subplots()\n        s = Nominal(order=order)._setup(y, Coordinate(), ax.yaxis)\n        assert_array_equal(s(y), np.array([0, 2, np.nan, 2], float))\n        f = ax.yaxis.get_major_formatter()\n        assert f.format_ticks([0, 1, 2]) == [\"1.0\", \"4.0\", \"-1.5\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestNominal.test_color_defaults_TestNominal.test_object_dict.assert_s_x_x_z_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestNominal.test_color_defaults_TestNominal.test_object_dict.assert_s_x_x_z_", "embedding": null, "metadata": {"file_path": "tests/_core/test_scales.py", "file_name": "test_scales.py", "file_type": "text/x-python", "category": "test", "start_line": 385, "end_line": 465, "span_ids": ["TestNominal.test_color_named_palette", "TestNominal.test_color_list_palette", "TestNominal.test_color_numeric_int_float_mix", "TestNominal.test_color_dict_palette", "TestNominal.test_color_numeric_data", "TestNominal.test_object_defaults", "TestNominal.test_color_alpha_in_palette", "TestNominal.test_color_numeric_with_order_subset", "TestNominal.test_object_defaults.MockProperty", "TestNominal.test_color_defaults", "TestNominal.test_object_defaults.MockProperty._default_values", "TestNominal.test_object_list", "TestNominal.test_object_dict", "TestNominal.test_color_unknown_palette"], "tokens": 795}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestNominal:\n\n    def test_color_defaults(self, x):\n\n        s = Nominal()._setup(x, Color())\n        cs = color_palette()\n        assert_array_equal(s(x), [cs[0], cs[1], cs[2], cs[1]])\n\n    def test_color_named_palette(self, x):\n\n        pal = \"flare\"\n        s = Nominal(pal)._setup(x, Color())\n        cs = color_palette(pal, 3)\n        assert_array_equal(s(x), [cs[0], cs[1], cs[2], cs[1]])\n\n    def test_color_list_palette(self, x):\n\n        cs = color_palette(\"crest\", 3)\n        s = Nominal(cs)._setup(x, Color())\n        assert_array_equal(s(x), [cs[0], cs[1], cs[2], cs[1]])\n\n    def test_color_dict_palette(self, x):\n\n        cs = color_palette(\"crest\", 3)\n        pal = dict(zip(\"bac\", cs))\n        s = Nominal(pal)._setup(x, Color())\n        assert_array_equal(s(x), [cs[1], cs[2], cs[0], cs[2]])\n\n    def test_color_numeric_data(self, y):\n\n        s = Nominal()._setup(y, Color())\n        cs = color_palette()\n        assert_array_equal(s(y), [cs[1], cs[0], cs[2], cs[0]])\n\n    def test_color_numeric_with_order_subset(self, y):\n\n        s = Nominal(order=[-1.5, 1])._setup(y, Color())\n        c1, c2 = color_palette(n_colors=2)\n        null = (np.nan, np.nan, np.nan)\n        assert_array_equal(s(y), [c2, c1, null, c1])\n\n    @pytest.mark.xfail(reason=\"Need to sort out float/int order\")\n    def test_color_numeric_int_float_mix(self):\n\n        z = pd.Series([1, 2], name=\"z\")\n        s = Nominal(order=[1.0, 2])._setup(z, Color())\n        c1, c2 = color_palette(n_colors=2)\n        null = (np.nan, np.nan, np.nan)\n        assert_array_equal(s(z), [c1, null, c2])\n\n    def test_color_alpha_in_palette(self, x):\n\n        cs = [(.2, .2, .3, .5), (.1, .2, .3, 1), (.5, .6, .2, 0)]\n        s = Nominal(cs)._setup(x, Color())\n        assert_array_equal(s(x), [cs[0], cs[1], cs[2], cs[1]])\n\n    def test_color_unknown_palette(self, x):\n\n        pal = \"not_a_palette\"\n        err = f\"{pal} is not a valid palette name\"\n        with pytest.raises(ValueError, match=err):\n            Nominal(pal)._setup(x, Color())\n\n    def test_object_defaults(self, x):\n\n        class MockProperty(ObjectProperty):\n            def _default_values(self, n):\n                return list(\"xyz\"[:n])\n\n        s = Nominal()._setup(x, MockProperty())\n        assert s(x) == [\"x\", \"y\", \"z\", \"y\"]\n\n    def test_object_list(self, x):\n\n        vs = [\"x\", \"y\", \"z\"]\n        s = Nominal(vs)._setup(x, ObjectProperty())\n        assert s(x) == [\"x\", \"y\", \"z\", \"y\"]\n\n    def test_object_dict(self, x):\n\n        vs = {\"a\": \"x\", \"b\": \"y\", \"c\": \"z\"}\n        s = Nominal(vs)._setup(x, ObjectProperty())\n        assert s(x) == [\"x\", \"z\", \"y\", \"z\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestNominal.test_object_order_TestNominal.test_interval_with_transform.assert_array_equal_s_x_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestNominal.test_object_order_TestNominal.test_interval_with_transform.assert_array_equal_s_x_", "embedding": null, "metadata": {"file_path": "tests/_core/test_scales.py", "file_name": "test_scales.py", "file_type": "text/x-python", "category": "test", "start_line": 467, "end_line": 547, "span_ids": ["TestNominal.test_interval_with_transform.MockProperty:2", "TestNominal.test_fill_dict", "TestNominal.test_interval_defaults.MockProperty", "TestNominal.test_interval_tuple", "TestNominal.test_interval_dict", "TestNominal.test_interval_defaults", "TestNominal.test_interval_with_transform", "TestNominal.test_interval_list", "TestNominal.test_interval_defaults.MockProperty:2", "TestNominal.test_interval_with_transform.MockProperty", "TestNominal.test_interval_tuple_numeric", "TestNominal.test_fill", "TestNominal.test_object_order", "TestNominal.test_alpha_default", "TestNominal.test_objects_that_are_weird", "TestNominal.test_fill_nunique_warning", "TestNominal.test_object_order_subset"], "tokens": 782}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestNominal:\n\n    def test_object_order(self, x):\n\n        vs = [\"x\", \"y\", \"z\"]\n        s = Nominal(vs, order=[\"c\", \"a\", \"b\"])._setup(x, ObjectProperty())\n        assert s(x) == [\"y\", \"x\", \"z\", \"x\"]\n\n    def test_object_order_subset(self, x):\n\n        vs = [\"x\", \"y\"]\n        s = Nominal(vs, order=[\"a\", \"c\"])._setup(x, ObjectProperty())\n        assert s(x) == [\"x\", \"y\", None, \"y\"]\n\n    def test_objects_that_are_weird(self, x):\n\n        vs = [(\"x\", 1), (None, None, 0), {}]\n        s = Nominal(vs)._setup(x, ObjectProperty())\n        assert s(x) == [vs[0], vs[1], vs[2], vs[1]]\n\n    def test_alpha_default(self, x):\n\n        s = Nominal()._setup(x, Alpha())\n        assert_array_equal(s(x), [.95, .625, .3, .625])\n\n    def test_fill(self):\n\n        x = pd.Series([\"a\", \"a\", \"b\", \"a\"], name=\"x\")\n        s = Nominal()._setup(x, Fill())\n        assert_array_equal(s(x), [True, True, False, True])\n\n    def test_fill_dict(self):\n\n        x = pd.Series([\"a\", \"a\", \"b\", \"a\"], name=\"x\")\n        vs = {\"a\": False, \"b\": True}\n        s = Nominal(vs)._setup(x, Fill())\n        assert_array_equal(s(x), [False, False, True, False])\n\n    def test_fill_nunique_warning(self):\n\n        x = pd.Series([\"a\", \"b\", \"c\", \"a\", \"b\"], name=\"x\")\n        with pytest.warns(UserWarning, match=\"The variable assigned to fill\"):\n            s = Nominal()._setup(x, Fill())\n        assert_array_equal(s(x), [True, False, True, True, False])\n\n    def test_interval_defaults(self, x):\n\n        class MockProperty(IntervalProperty):\n            _default_range = (1, 2)\n\n        s = Nominal()._setup(x, MockProperty())\n        assert_array_equal(s(x), [2, 1.5, 1, 1.5])\n\n    def test_interval_tuple(self, x):\n\n        s = Nominal((1, 2))._setup(x, IntervalProperty())\n        assert_array_equal(s(x), [2, 1.5, 1, 1.5])\n\n    def test_interval_tuple_numeric(self, y):\n\n        s = Nominal((1, 2))._setup(y, IntervalProperty())\n        assert_array_equal(s(y), [1.5, 2, 1, 2])\n\n    def test_interval_list(self, x):\n\n        vs = [2, 5, 4]\n        s = Nominal(vs)._setup(x, IntervalProperty())\n        assert_array_equal(s(x), [2, 5, 4, 5])\n\n    def test_interval_dict(self, x):\n\n        vs = {\"a\": 3, \"b\": 4, \"c\": 6}\n        s = Nominal(vs)._setup(x, IntervalProperty())\n        assert_array_equal(s(x), [3, 6, 4, 6])\n\n    def test_interval_with_transform(self, x):\n\n        class MockProperty(IntervalProperty):\n            _forward = np.square\n            _inverse = np.sqrt\n\n        s = Nominal((2, 4))._setup(x, MockProperty())\n        assert_array_equal(s(x), [4, np.sqrt(10), 2, np.sqrt(10)])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_itertools_TestSpecificationChecks.test_wrapped_x_pairing_and_facetd_rows.with_pytest_raises_Runtim.Subplots_facet_spec_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_itertools_TestSpecificationChecks.test_wrapped_x_pairing_and_facetd_rows.with_pytest_raises_Runtim.Subplots_facet_spec_", "embedding": null, "metadata": {"file_path": "tests/_core/test_subplots.py", "file_name": "test_subplots.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 47, "span_ids": ["TestSpecificationChecks", "TestSpecificationChecks.test_wrapped_x_pairing_and_facetd_rows", "TestSpecificationChecks.test_cross_xy_pairing_and_wrap", "imports", "TestSpecificationChecks.test_col_facets_and_x_pairing", "TestSpecificationChecks.test_both_facets_and_wrap", "TestSpecificationChecks.test_wrapped_columns_and_y_pairing"], "tokens": 428}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import itertools\n\nimport numpy as np\nimport pytest\n\nfrom seaborn._core.subplots import Subplots\n\n\nclass TestSpecificationChecks:\n\n    def test_both_facets_and_wrap(self):\n\n        err = \"Cannot wrap facets when specifying both `col` and `row`.\"\n        facet_spec = {\"wrap\": 3, \"variables\": {\"col\": \"a\", \"row\": \"b\"}}\n        with pytest.raises(RuntimeError, match=err):\n            Subplots({}, facet_spec, {})\n\n    def test_cross_xy_pairing_and_wrap(self):\n\n        err = \"Cannot wrap subplots when pairing on both `x` and `y`.\"\n        pair_spec = {\"wrap\": 3, \"structure\": {\"x\": [\"a\", \"b\"], \"y\": [\"y\", \"z\"]}}\n        with pytest.raises(RuntimeError, match=err):\n            Subplots({}, {}, pair_spec)\n\n    def test_col_facets_and_x_pairing(self):\n\n        err = \"Cannot facet the columns while pairing on `x`.\"\n        facet_spec = {\"variables\": {\"col\": \"a\"}}\n        pair_spec = {\"structure\": {\"x\": [\"x\", \"y\"]}}\n        with pytest.raises(RuntimeError, match=err):\n            Subplots({}, facet_spec, pair_spec)\n\n    def test_wrapped_columns_and_y_pairing(self):\n\n        err = \"Cannot wrap the columns while pairing on `y`.\"\n        facet_spec = {\"variables\": {\"col\": \"a\"}, \"wrap\": 2}\n        pair_spec = {\"structure\": {\"y\": [\"x\", \"y\"]}}\n        with pytest.raises(RuntimeError, match=err):\n            Subplots({}, facet_spec, pair_spec)\n\n    def test_wrapped_x_pairing_and_facetd_rows(self):\n\n        err = \"Cannot wrap the columns while faceting the rows.\"\n        facet_spec = {\"variables\": {\"row\": \"a\"}}\n        pair_spec = {\"structure\": {\"x\": [\"x\", \"y\"]}, \"wrap\": 2}\n        with pytest.raises(RuntimeError, match=err):\n            Subplots({}, facet_spec, pair_spec)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec_TestSubplotSpec.test_single_facet.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec_TestSubplotSpec.test_single_facet.None_4", "embedding": null, "metadata": {"file_path": "tests/_core/test_subplots.py", "file_name": "test_subplots.py", "file_type": "text/x-python", "category": "test", "start_line": 50, "end_line": 73, "span_ids": ["TestSubplotSpec", "TestSubplotSpec.test_single_facet", "TestSubplotSpec.test_single_subplot"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSubplotSpec:\n\n    def test_single_subplot(self):\n\n        s = Subplots({}, {}, {})\n\n        assert s.n_subplots == 1\n        assert s.subplot_spec[\"ncols\"] == 1\n        assert s.subplot_spec[\"nrows\"] == 1\n        assert s.subplot_spec[\"sharex\"] is True\n        assert s.subplot_spec[\"sharey\"] is True\n\n    def test_single_facet(self):\n\n        key = \"a\"\n        order = list(\"abc\")\n        spec = {\"variables\": {\"col\": key}, \"structure\": {\"col\": order}}\n        s = Subplots({}, spec, {})\n\n        assert s.n_subplots == len(order)\n        assert s.subplot_spec[\"ncols\"] == len(order)\n        assert s.subplot_spec[\"nrows\"] == 1\n        assert s.subplot_spec[\"sharex\"] is True\n        assert s.subplot_spec[\"sharey\"] is True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_two_facets_TestSubplotSpec.test_two_facets.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_two_facets_TestSubplotSpec.test_two_facets.None_4", "embedding": null, "metadata": {"file_path": "tests/_core/test_subplots.py", "file_name": "test_subplots.py", "file_type": "text/x-python", "category": "test", "start_line": 75, "end_line": 92, "span_ids": ["TestSubplotSpec.test_two_facets"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSubplotSpec:\n\n    def test_two_facets(self):\n\n        col_key = \"a\"\n        row_key = \"b\"\n        col_order = list(\"xy\")\n        row_order = list(\"xyz\")\n        spec = {\n            \"variables\": {\"col\": col_key, \"row\": row_key},\n            \"structure\": {\"col\": col_order, \"row\": row_order},\n\n        }\n        s = Subplots({}, spec, {})\n\n        assert s.n_subplots == len(col_order) * len(row_order)\n        assert s.subplot_spec[\"ncols\"] == len(col_order)\n        assert s.subplot_spec[\"nrows\"] == len(row_order)\n        assert s.subplot_spec[\"sharex\"] is True\n        assert s.subplot_spec[\"sharey\"] is True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_col_facet_wrapped_TestSubplotSpec.test_col_facet_wrapped.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_col_facet_wrapped_TestSubplotSpec.test_col_facet_wrapped.None_4", "embedding": null, "metadata": {"file_path": "tests/_core/test_subplots.py", "file_name": "test_subplots.py", "file_type": "text/x-python", "category": "test", "start_line": 94, "end_line": 106, "span_ids": ["TestSubplotSpec.test_col_facet_wrapped"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSubplotSpec:\n\n    def test_col_facet_wrapped(self):\n\n        key = \"b\"\n        wrap = 3\n        order = list(\"abcde\")\n        spec = {\"variables\": {\"col\": key}, \"structure\": {\"col\": order}, \"wrap\": wrap}\n        s = Subplots({}, spec, {})\n\n        assert s.n_subplots == len(order)\n        assert s.subplot_spec[\"ncols\"] == wrap\n        assert s.subplot_spec[\"nrows\"] == len(order) // wrap + 1\n        assert s.subplot_spec[\"sharex\"] is True\n        assert s.subplot_spec[\"sharey\"] is True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_row_facet_wrapped_TestSubplotSpec.test_row_facet_wrapped.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_row_facet_wrapped_TestSubplotSpec.test_row_facet_wrapped.None_4", "embedding": null, "metadata": {"file_path": "tests/_core/test_subplots.py", "file_name": "test_subplots.py", "file_type": "text/x-python", "category": "test", "start_line": 108, "end_line": 120, "span_ids": ["TestSubplotSpec.test_row_facet_wrapped"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSubplotSpec:\n\n    def test_row_facet_wrapped(self):\n\n        key = \"b\"\n        wrap = 3\n        order = list(\"abcde\")\n        spec = {\"variables\": {\"row\": key}, \"structure\": {\"row\": order}, \"wrap\": wrap}\n        s = Subplots({}, spec, {})\n\n        assert s.n_subplots == len(order)\n        assert s.subplot_spec[\"ncols\"] == len(order) // wrap + 1\n        assert s.subplot_spec[\"nrows\"] == wrap\n        assert s.subplot_spec[\"sharex\"] is True\n        assert s.subplot_spec[\"sharey\"] is True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_col_facet_wrapped_single_row_TestSubplotSpec.test_col_facet_wrapped_single_row.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_col_facet_wrapped_single_row_TestSubplotSpec.test_col_facet_wrapped_single_row.None_4", "embedding": null, "metadata": {"file_path": "tests/_core/test_subplots.py", "file_name": "test_subplots.py", "file_type": "text/x-python", "category": "test", "start_line": 122, "end_line": 134, "span_ids": ["TestSubplotSpec.test_col_facet_wrapped_single_row"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSubplotSpec:\n\n    def test_col_facet_wrapped_single_row(self):\n\n        key = \"b\"\n        order = list(\"abc\")\n        wrap = len(order) + 2\n        spec = {\"variables\": {\"col\": key}, \"structure\": {\"col\": order}, \"wrap\": wrap}\n        s = Subplots({}, spec, {})\n\n        assert s.n_subplots == len(order)\n        assert s.subplot_spec[\"ncols\"] == len(order)\n        assert s.subplot_spec[\"nrows\"] == 1\n        assert s.subplot_spec[\"sharex\"] is True\n        assert s.subplot_spec[\"sharey\"] is True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_x_and_y_paired_TestSubplotSpec.test_x_and_y_paired.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_x_and_y_paired_TestSubplotSpec.test_x_and_y_paired.None_4", "embedding": null, "metadata": {"file_path": "tests/_core/test_subplots.py", "file_name": "test_subplots.py", "file_type": "text/x-python", "category": "test", "start_line": 136, "end_line": 146, "span_ids": ["TestSubplotSpec.test_x_and_y_paired"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSubplotSpec:\n\n    def test_x_and_y_paired(self):\n\n        x = [\"x\", \"y\", \"z\"]\n        y = [\"a\", \"b\"]\n        s = Subplots({}, {}, {\"structure\": {\"x\": x, \"y\": y}})\n\n        assert s.n_subplots == len(x) * len(y)\n        assert s.subplot_spec[\"ncols\"] == len(x)\n        assert s.subplot_spec[\"nrows\"] == len(y)\n        assert s.subplot_spec[\"sharex\"] == \"col\"\n        assert s.subplot_spec[\"sharey\"] == \"row\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_x_paired_TestSubplotSpec.test_y_paired.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_x_paired_TestSubplotSpec.test_y_paired.None_4", "embedding": null, "metadata": {"file_path": "tests/_core/test_subplots.py", "file_name": "test_subplots.py", "file_type": "text/x-python", "category": "test", "start_line": 148, "end_line": 168, "span_ids": ["TestSubplotSpec.test_y_paired", "TestSubplotSpec.test_x_paired"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSubplotSpec:\n\n    def test_x_paired(self):\n\n        x = [\"x\", \"y\", \"z\"]\n        s = Subplots({}, {}, {\"structure\": {\"x\": x}})\n\n        assert s.n_subplots == len(x)\n        assert s.subplot_spec[\"ncols\"] == len(x)\n        assert s.subplot_spec[\"nrows\"] == 1\n        assert s.subplot_spec[\"sharex\"] == \"col\"\n        assert s.subplot_spec[\"sharey\"] is True\n\n    def test_y_paired(self):\n\n        y = [\"x\", \"y\", \"z\"]\n        s = Subplots({}, {}, {\"structure\": {\"y\": y}})\n\n        assert s.n_subplots == len(y)\n        assert s.subplot_spec[\"ncols\"] == 1\n        assert s.subplot_spec[\"nrows\"] == len(y)\n        assert s.subplot_spec[\"sharex\"] is True\n        assert s.subplot_spec[\"sharey\"] == \"row\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_x_paired_and_wrapped_TestSubplotSpec.test_x_paired_and_wrapped.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_x_paired_and_wrapped_TestSubplotSpec.test_x_paired_and_wrapped.None_4", "embedding": null, "metadata": {"file_path": "tests/_core/test_subplots.py", "file_name": "test_subplots.py", "file_type": "text/x-python", "category": "test", "start_line": 170, "end_line": 180, "span_ids": ["TestSubplotSpec.test_x_paired_and_wrapped"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSubplotSpec:\n\n    def test_x_paired_and_wrapped(self):\n\n        x = [\"a\", \"b\", \"x\", \"y\", \"z\"]\n        wrap = 3\n        s = Subplots({}, {}, {\"structure\": {\"x\": x}, \"wrap\": wrap})\n\n        assert s.n_subplots == len(x)\n        assert s.subplot_spec[\"ncols\"] == wrap\n        assert s.subplot_spec[\"nrows\"] == len(x) // wrap + 1\n        assert s.subplot_spec[\"sharex\"] is False\n        assert s.subplot_spec[\"sharey\"] is True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_col_faceted_y_paired_TestSubplotSpec.test_col_faceted_y_paired.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_col_faceted_y_paired_TestSubplotSpec.test_col_faceted_y_paired.None_4", "embedding": null, "metadata": {"file_path": "tests/_core/test_subplots.py", "file_name": "test_subplots.py", "file_type": "text/x-python", "category": "test", "start_line": 194, "end_line": 207, "span_ids": ["TestSubplotSpec.test_col_faceted_y_paired"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSubplotSpec:\n\n    def test_col_faceted_y_paired(self):\n\n        y = [\"x\", \"y\", \"z\"]\n        key = \"a\"\n        order = list(\"abc\")\n        facet_spec = {\"variables\": {\"col\": key}, \"structure\": {\"col\": order}}\n        pair_spec = {\"structure\": {\"y\": y}}\n        s = Subplots({}, facet_spec, pair_spec)\n\n        assert s.n_subplots == len(order) * len(y)\n        assert s.subplot_spec[\"ncols\"] == len(order)\n        assert s.subplot_spec[\"nrows\"] == len(y)\n        assert s.subplot_spec[\"sharex\"] is True\n        assert s.subplot_spec[\"sharey\"] == \"row\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_row_faceted_x_paired_TestSubplotSpec.test_row_faceted_x_paired.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_row_faceted_x_paired_TestSubplotSpec.test_row_faceted_x_paired.None_4", "embedding": null, "metadata": {"file_path": "tests/_core/test_subplots.py", "file_name": "test_subplots.py", "file_type": "text/x-python", "category": "test", "start_line": 209, "end_line": 222, "span_ids": ["TestSubplotSpec.test_row_faceted_x_paired"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSubplotSpec:\n\n    def test_row_faceted_x_paired(self):\n\n        x = [\"f\", \"s\"]\n        key = \"a\"\n        order = list(\"abc\")\n        facet_spec = {\"variables\": {\"row\": key}, \"structure\": {\"row\": order}}\n        pair_spec = {\"structure\": {\"x\": x}}\n        s = Subplots({}, facet_spec, pair_spec)\n\n        assert s.n_subplots == len(order) * len(x)\n        assert s.subplot_spec[\"ncols\"] == len(x)\n        assert s.subplot_spec[\"nrows\"] == len(order)\n        assert s.subplot_spec[\"sharex\"] == \"col\"\n        assert s.subplot_spec[\"sharey\"] is True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_x_any_y_paired_non_cross_TestSubplotSpec.test_x_any_y_paired_non_cross.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_x_any_y_paired_non_cross_TestSubplotSpec.test_x_any_y_paired_non_cross.None_4", "embedding": null, "metadata": {"file_path": "tests/_core/test_subplots.py", "file_name": "test_subplots.py", "file_type": "text/x-python", "category": "test", "start_line": 224, "end_line": 235, "span_ids": ["TestSubplotSpec.test_x_any_y_paired_non_cross"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSubplotSpec:\n\n    def test_x_any_y_paired_non_cross(self):\n\n        x = [\"a\", \"b\", \"c\"]\n        y = [\"x\", \"y\", \"z\"]\n        spec = {\"structure\": {\"x\": x, \"y\": y}, \"cross\": False}\n        s = Subplots({}, {}, spec)\n\n        assert s.n_subplots == len(x)\n        assert s.subplot_spec[\"ncols\"] == len(y)\n        assert s.subplot_spec[\"nrows\"] == 1\n        assert s.subplot_spec[\"sharex\"] is False\n        assert s.subplot_spec[\"sharey\"] is False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_x_any_y_paired_non_cross_wrapped_TestSubplotSpec.test_forced_unshared_facets.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_x_any_y_paired_non_cross_wrapped_TestSubplotSpec.test_forced_unshared_facets.None_1", "embedding": null, "metadata": {"file_path": "tests/_core/test_subplots.py", "file_name": "test_subplots.py", "file_type": "text/x-python", "category": "test", "start_line": 237, "end_line": 255, "span_ids": ["TestSubplotSpec.test_x_any_y_paired_non_cross_wrapped", "TestSubplotSpec.test_forced_unshared_facets"], "tokens": 206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSubplotSpec:\n\n    def test_x_any_y_paired_non_cross_wrapped(self):\n\n        x = [\"a\", \"b\", \"c\"]\n        y = [\"x\", \"y\", \"z\"]\n        wrap = 2\n        spec = {\"structure\": {\"x\": x, \"y\": y}, \"cross\": False, \"wrap\": wrap}\n        s = Subplots({}, {}, spec)\n\n        assert s.n_subplots == len(x)\n        assert s.subplot_spec[\"ncols\"] == wrap\n        assert s.subplot_spec[\"nrows\"] == len(x) // wrap + 1\n        assert s.subplot_spec[\"sharex\"] is False\n        assert s.subplot_spec[\"sharey\"] is False\n\n    def test_forced_unshared_facets(self):\n\n        s = Subplots({\"sharex\": False, \"sharey\": \"row\"}, {}, {})\n        assert s.subplot_spec[\"sharex\"] is False\n        assert s.subplot_spec[\"sharey\"] == \"row\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements_TestSubplotElements.test_single_facet_dim.for_i_e_in_enumerate_s_.assert_e_right_dim": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements_TestSubplotElements.test_single_facet_dim.for_i_e_in_enumerate_s_.assert_e_right_dim", "embedding": null, "metadata": {"file_path": "tests/_core/test_subplots.py", "file_name": "test_subplots.py", "file_type": "text/x-python", "category": "test", "start_line": 258, "end_line": 293, "span_ids": ["TestSubplotElements", "TestSubplotElements.test_single_subplot", "TestSubplotElements.test_single_facet_dim"], "tokens": 314}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSubplotElements:\n\n    def test_single_subplot(self):\n\n        s = Subplots({}, {}, {})\n        f = s.init_figure({}, {})\n\n        assert len(s) == 1\n        for i, e in enumerate(s):\n            for side in [\"left\", \"right\", \"bottom\", \"top\"]:\n                assert e[side]\n            for dim in [\"col\", \"row\"]:\n                assert e[dim] is None\n            for axis in \"xy\":\n                assert e[axis] == axis\n            assert e[\"ax\"] == f.axes[i]\n\n    @pytest.mark.parametrize(\"dim\", [\"col\", \"row\"])\n    def test_single_facet_dim(self, dim):\n\n        key = \"a\"\n        order = list(\"abc\")\n        spec = {\"variables\": {dim: key}, \"structure\": {dim: order}}\n        s = Subplots({}, spec, {})\n        s.init_figure(spec, {})\n\n        assert len(s) == len(order)\n\n        for i, e in enumerate(s):\n            assert e[dim] == order[i]\n            for axis in \"xy\":\n                assert e[axis] == axis\n            assert e[\"top\"] == (dim == \"col\" or i == 0)\n            assert e[\"bottom\"] == (dim == \"col\" or i == len(order) - 1)\n            assert e[\"left\"] == (dim == \"row\" or i == 0)\n            assert e[\"right\"] == (dim == \"row\" or i == len(order) - 1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements.test_single_facet_dim_wrapped_TestSubplotElements.test_single_facet_dim_wrapped.for_i_e_in_enumerate_s_.for_side_expected_in_zip.assert_e_side_expecte": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements.test_single_facet_dim_wrapped_TestSubplotElements.test_single_facet_dim_wrapped.for_i_e_in_enumerate_s_.for_side_expected_in_zip.assert_e_side_expecte", "embedding": null, "metadata": {"file_path": "tests/_core/test_subplots.py", "file_name": "test_subplots.py", "file_type": "text/x-python", "category": "test", "start_line": 295, "end_line": 324, "span_ids": ["TestSubplotElements.test_single_facet_dim_wrapped"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSubplotElements:\n\n    @pytest.mark.parametrize(\"dim\", [\"col\", \"row\"])\n    def test_single_facet_dim_wrapped(self, dim):\n\n        key = \"b\"\n        order = list(\"abc\")\n        wrap = len(order) - 1\n        spec = {\"variables\": {dim: key}, \"structure\": {dim: order}, \"wrap\": wrap}\n        s = Subplots({}, spec, {})\n        s.init_figure(spec, {})\n\n        assert len(s) == len(order)\n\n        for i, e in enumerate(s):\n            assert e[dim] == order[i]\n            for axis in \"xy\":\n                assert e[axis] == axis\n\n            sides = {\n                \"col\": [\"top\", \"bottom\", \"left\", \"right\"],\n                \"row\": [\"left\", \"right\", \"top\", \"bottom\"],\n            }\n            tests = (\n                i < wrap,\n                i >= wrap or i >= len(s) % wrap,\n                i % wrap == 0,\n                i % wrap == wrap - 1 or i + 1 == len(s),\n            )\n\n            for side, expected in zip(sides[dim], tests):\n                assert e[side] == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements.test_both_facet_dims_TestSubplotElements.test_both_facet_dims.for_e_in_es_.assert_e_y_y_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements.test_both_facet_dims_TestSubplotElements.test_both_facet_dims.for_e_in_es_.assert_e_y_y_", "embedding": null, "metadata": {"file_path": "tests/_core/test_subplots.py", "file_name": "test_subplots.py", "file_type": "text/x-python", "category": "test", "start_line": 326, "end_line": 359, "span_ids": ["TestSubplotElements.test_both_facet_dims"], "tokens": 265}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSubplotElements:\n\n    def test_both_facet_dims(self):\n\n        col = \"a\"\n        row = \"b\"\n        col_order = list(\"ab\")\n        row_order = list(\"xyz\")\n        facet_spec = {\n            \"variables\": {\"col\": col, \"row\": row},\n            \"structure\": {\"col\": col_order, \"row\": row_order},\n        }\n        s = Subplots({}, facet_spec, {})\n        s.init_figure(facet_spec, {})\n\n        n_cols = len(col_order)\n        n_rows = len(row_order)\n        assert len(s) == n_cols * n_rows\n        es = list(s)\n\n        for e in es[:n_cols]:\n            assert e[\"top\"]\n        for e in es[::n_cols]:\n            assert e[\"left\"]\n        for e in es[n_cols - 1::n_cols]:\n            assert e[\"right\"]\n        for e in es[-n_cols:]:\n            assert e[\"bottom\"]\n\n        for e, (row_, col_) in zip(es, itertools.product(row_order, col_order)):\n            assert e[\"col\"] == col_\n            assert e[\"row\"] == row_\n\n        for e in es:\n            assert e[\"x\"] == \"x\"\n            assert e[\"y\"] == \"y\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements.test_single_paired_var_TestSubplotElements.test_single_paired_var.for_side_expected_in_zip.assert_e_side_expecte": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements.test_single_paired_var_TestSubplotElements.test_single_paired_var.for_side_expected_in_zip.assert_e_side_expecte", "embedding": null, "metadata": {"file_path": "tests/_core/test_subplots.py", "file_name": "test_subplots.py", "file_type": "text/x-python", "category": "test", "start_line": 361, "end_line": 388, "span_ids": ["TestSubplotElements.test_single_paired_var"], "tokens": 273}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSubplotElements:\n\n    @pytest.mark.parametrize(\"var\", [\"x\", \"y\"])\n    def test_single_paired_var(self, var):\n\n        other_var = {\"x\": \"y\", \"y\": \"x\"}[var]\n        pairings = [\"x\", \"y\", \"z\"]\n        pair_spec = {\n            \"variables\": {f\"{var}{i}\": v for i, v in enumerate(pairings)},\n            \"structure\": {var: [f\"{var}{i}\" for i, _ in enumerate(pairings)]},\n        }\n\n        s = Subplots({}, {}, pair_spec)\n        s.init_figure(pair_spec)\n\n        assert len(s) == len(pair_spec[\"structure\"][var])\n\n        for i, e in enumerate(s):\n            assert e[var] == f\"{var}{i}\"\n            assert e[other_var] == other_var\n            assert e[\"col\"] is e[\"row\"] is None\n\n        tests = i == 0, True, True, i == len(s) - 1\n        sides = {\n            \"x\": [\"left\", \"right\", \"top\", \"bottom\"],\n            \"y\": [\"top\", \"bottom\", \"left\", \"right\"],\n        }\n\n        for side, expected in zip(sides[var], tests):\n            assert e[side] == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements.test_single_paired_var_wrapped_TestSubplotElements.test_single_paired_var_wrapped.for_i_e_in_enumerate_s_.for_side_expected_in_zip.assert_e_side_expecte": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements.test_single_paired_var_wrapped_TestSubplotElements.test_single_paired_var_wrapped.for_i_e_in_enumerate_s_.for_side_expected_in_zip.assert_e_side_expecte", "embedding": null, "metadata": {"file_path": "tests/_core/test_subplots.py", "file_name": "test_subplots.py", "file_type": "text/x-python", "category": "test", "start_line": 390, "end_line": 422, "span_ids": ["TestSubplotElements.test_single_paired_var_wrapped"], "tokens": 323}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSubplotElements:\n\n    @pytest.mark.parametrize(\"var\", [\"x\", \"y\"])\n    def test_single_paired_var_wrapped(self, var):\n\n        other_var = {\"x\": \"y\", \"y\": \"x\"}[var]\n        pairings = [\"x\", \"y\", \"z\", \"a\", \"b\"]\n        wrap = len(pairings) - 2\n        pair_spec = {\n            \"variables\": {f\"{var}{i}\": val for i, val in enumerate(pairings)},\n            \"structure\": {var: [f\"{var}{i}\" for i, _ in enumerate(pairings)]},\n            \"wrap\": wrap\n        }\n        s = Subplots({}, {}, pair_spec)\n        s.init_figure(pair_spec)\n\n        assert len(s) == len(pairings)\n\n        for i, e in enumerate(s):\n            assert e[var] == f\"{var}{i}\"\n            assert e[other_var] == other_var\n            assert e[\"col\"] is e[\"row\"] is None\n\n            tests = (\n                i < wrap,\n                i >= wrap or i >= len(s) % wrap,\n                i % wrap == 0,\n                i % wrap == wrap - 1 or i + 1 == len(s),\n            )\n            sides = {\n                \"x\": [\"top\", \"bottom\", \"left\", \"right\"],\n                \"y\": [\"left\", \"right\", \"top\", \"bottom\"],\n            }\n            for side, expected in zip(sides[var], tests):\n                assert e[side] == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements.test_both_paired_variables_TestSubplotElements.test_both_paired_variables.for_i_in_range_len_y_.for_j_in_range_len_x_.assert_e_y_f_y_i_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements.test_both_paired_variables_TestSubplotElements.test_both_paired_variables.for_i_in_range_len_y_.for_j_in_range_len_x_.assert_e_y_f_y_i_", "embedding": null, "metadata": {"file_path": "tests/_core/test_subplots.py", "file_name": "test_subplots.py", "file_type": "text/x-python", "category": "test", "start_line": 424, "end_line": 453, "span_ids": ["TestSubplotElements.test_both_paired_variables"], "tokens": 244}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSubplotElements:\n\n    def test_both_paired_variables(self):\n\n        x = [\"x0\", \"x1\"]\n        y = [\"y0\", \"y1\", \"y2\"]\n        pair_spec = {\"structure\": {\"x\": x, \"y\": y}}\n        s = Subplots({}, {}, pair_spec)\n        s.init_figure(pair_spec)\n\n        n_cols = len(x)\n        n_rows = len(y)\n        assert len(s) == n_cols * n_rows\n        es = list(s)\n\n        for e in es[:n_cols]:\n            assert e[\"top\"]\n        for e in es[::n_cols]:\n            assert e[\"left\"]\n        for e in es[n_cols - 1::n_cols]:\n            assert e[\"right\"]\n        for e in es[-n_cols:]:\n            assert e[\"bottom\"]\n\n        for e in es:\n            assert e[\"col\"] is e[\"row\"] is None\n\n        for i in range(len(y)):\n            for j in range(len(x)):\n                e = es[i * len(x) + j]\n                assert e[\"x\"] == f\"x{j}\"\n                assert e[\"y\"] == f\"y{i}\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements.test_both_paired_non_cross_TestSubplotElements.test_both_paired_non_cross.for_i_e_in_enumerate_s_.assert_e_bottom_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements.test_both_paired_non_cross_TestSubplotElements.test_both_paired_non_cross.for_i_e_in_enumerate_s_.assert_e_bottom_", "embedding": null, "metadata": {"file_path": "tests/_core/test_subplots.py", "file_name": "test_subplots.py", "file_type": "text/x-python", "category": "test", "start_line": 455, "end_line": 471, "span_ids": ["TestSubplotElements.test_both_paired_non_cross"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSubplotElements:\n\n    def test_both_paired_non_cross(self):\n\n        pair_spec = {\n            \"structure\": {\"x\": [\"x0\", \"x1\", \"x2\"], \"y\": [\"y0\", \"y1\", \"y2\"]},\n            \"cross\": False\n        }\n        s = Subplots({}, {}, pair_spec)\n        s.init_figure(pair_spec)\n\n        for i, e in enumerate(s):\n            assert e[\"x\"] == f\"x{i}\"\n            assert e[\"y\"] == f\"y{i}\"\n            assert e[\"col\"] is e[\"row\"] is None\n            assert e[\"left\"] == (i == 0)\n            assert e[\"right\"] == (i == (len(s) - 1))\n            assert e[\"top\"]\n            assert e[\"bottom\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements.test_one_facet_one_paired_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotElements.test_one_facet_one_paired_", "embedding": null, "metadata": {"file_path": "tests/_core/test_subplots.py", "file_name": "test_subplots.py", "file_type": "text/x-python", "category": "test", "start_line": 473, "end_line": 514, "span_ids": ["TestSubplotElements.test_one_facet_one_paired"], "tokens": 397}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSubplotElements:\n\n    @pytest.mark.parametrize(\"dim,var\", [(\"col\", \"y\"), (\"row\", \"x\")])\n    def test_one_facet_one_paired(self, dim, var):\n\n        other_var = {\"x\": \"y\", \"y\": \"x\"}[var]\n        other_dim = {\"col\": \"row\", \"row\": \"col\"}[dim]\n        order = list(\"abc\")\n        facet_spec = {\"variables\": {dim: \"s\"}, \"structure\": {dim: order}}\n\n        pairings = [\"x\", \"y\", \"t\"]\n        pair_spec = {\n            \"variables\": {f\"{var}{i}\": val for i, val in enumerate(pairings)},\n            \"structure\": {var: [f\"{var}{i}\" for i, _ in enumerate(pairings)]},\n        }\n\n        s = Subplots({}, facet_spec, pair_spec)\n        s.init_figure(pair_spec)\n\n        n_cols = len(order) if dim == \"col\" else len(pairings)\n        n_rows = len(order) if dim == \"row\" else len(pairings)\n\n        assert len(s) == len(order) * len(pairings)\n\n        es = list(s)\n\n        for e in es[:n_cols]:\n            assert e[\"top\"]\n        for e in es[::n_cols]:\n            assert e[\"left\"]\n        for e in es[n_cols - 1::n_cols]:\n            assert e[\"right\"]\n        for e in es[-n_cols:]:\n            assert e[\"bottom\"]\n\n        if dim == \"row\":\n            es = np.reshape(es, (n_rows, n_cols)).T.ravel()\n\n        for i, e in enumerate(es):\n            assert e[dim] == order[i % len(pairings)]\n            assert e[other_dim] is None\n            assert e[var] == f\"{var}{i // len(order)}\"\n            assert e[other_var] == other_var", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_area.py_mpl_TestAreaMarks.test_single_defaults.assert_array_equal_lw_mp": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_area.py_mpl_TestAreaMarks.test_single_defaults.assert_array_equal_lw_mp", "embedding": null, "metadata": {"file_path": "tests/_marks/test_area.py", "file_name": "test_area.py", "file_type": "text/x-python", "category": "test", "start_line": 2, "end_line": 34, "span_ids": ["TestAreaMarks.test_single_defaults", "TestAreaMarks", "imports"], "tokens": 268}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import matplotlib as mpl\nfrom matplotlib.colors import to_rgba, to_rgba_array\n\nfrom numpy.testing import assert_array_equal\n\nfrom seaborn._core.plot import Plot\nfrom seaborn._marks.area import Area, Band\n\n\nclass TestAreaMarks:\n\n    def test_single_defaults(self):\n\n        x, y = [1, 2, 3], [1, 2, 1]\n        p = Plot(x=x, y=y).add(Area()).plot()\n        ax = p._figure.axes[0]\n        poly = ax.patches[0]\n        verts = poly.get_path().vertices.T\n\n        expected_x = [1, 2, 3, 3, 2, 1, 1]\n        assert_array_equal(verts[0], expected_x)\n\n        expected_y = [0, 0, 0, 1, 2, 1, 0]\n        assert_array_equal(verts[1], expected_y)\n\n        fc = poly.get_facecolor()\n        assert_array_equal(fc, to_rgba(\"C0\", .2))\n\n        ec = poly.get_edgecolor()\n        assert_array_equal(ec, to_rgba(\"C0\", 1))\n\n        lw = poly.get_linewidth()\n        assert_array_equal(lw, mpl.rcParams[\"patch.linewidth\"] * 2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_base.py_from_dataclasses_import_d_TestMappable.test_rcparam.assert_array_equal_m__res": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_base.py_from_dataclasses_import_d_TestMappable.test_rcparam.assert_array_equal_m__res", "embedding": null, "metadata": {"file_path": "tests/_marks/test_base.py", "file_name": "test_base.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 71, "span_ids": ["TestMappable.test_input_checks", "TestMappable.test_default", "TestMappable.test_rcparam", "TestMappable.mark", "TestMappable.mark.MockMark:2", "TestMappable.test_repr", "TestMappable.mark.MockMark", "imports", "TestMappable.test_value", "TestMappable"], "tokens": 491}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dataclasses import dataclass\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib as mpl\n\nimport pytest\nfrom numpy.testing import assert_array_equal\n\nfrom seaborn._marks.base import Mark, Mappable, resolve_color\n\n\nclass TestMappable:\n\n    def mark(self, **features):\n\n        @dataclass\n        class MockMark(Mark):\n            linewidth: float = Mappable(rc=\"lines.linewidth\")\n            pointsize: float = Mappable(4)\n            color: str = Mappable(\"C0\")\n            fillcolor: str = Mappable(depend=\"color\")\n            alpha: float = Mappable(1)\n            fillalpha: float = Mappable(depend=\"alpha\")\n\n        m = MockMark(**features)\n        return m\n\n    def test_repr(self):\n\n        assert str(Mappable(.5)) == \"<0.5>\"\n        assert str(Mappable(\"CO\")) == \"<'CO'>\"\n        assert str(Mappable(rc=\"lines.linewidth\")) == \"\"\n        assert str(Mappable(depend=\"color\")) == \"\"\n        assert str(Mappable(auto=True)) == \"\"\n\n    def test_input_checks(self):\n\n        with pytest.raises(AssertionError):\n            Mappable(rc=\"bogus.parameter\")\n        with pytest.raises(AssertionError):\n            Mappable(depend=\"nonexistent_feature\")\n\n    def test_value(self):\n\n        val = 3\n        m = self.mark(linewidth=val)\n        assert m._resolve({}, \"linewidth\") == val\n\n        df = pd.DataFrame(index=pd.RangeIndex(10))\n        assert_array_equal(m._resolve(df, \"linewidth\"), np.full(len(df), val))\n\n    def test_default(self):\n\n        val = 3\n        m = self.mark(linewidth=Mappable(val))\n        assert m._resolve({}, \"linewidth\") == val\n\n        df = pd.DataFrame(index=pd.RangeIndex(10))\n        assert_array_equal(m._resolve(df, \"linewidth\"), np.full(len(df), val))\n\n    def test_rcparam(self):\n\n        param = \"lines.linewidth\"\n        val = mpl.rcParams[param]\n\n        m = self.mark(linewidth=Mappable(rc=param))\n        assert m._resolve({}, \"linewidth\") == val\n\n        df = pd.DataFrame(index=pd.RangeIndex(10))\n        assert_array_equal(m._resolve(df, \"linewidth\"), np.full(len(df), val))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_base.py_TestMappable.test_depends_TestMappable.test_depends.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_base.py_TestMappable.test_depends_TestMappable.test_depends.None_1", "embedding": null, "metadata": {"file_path": "tests/_marks/test_base.py", "file_name": "test_base.py", "file_type": "text/x-python", "category": "test", "start_line": 72, "end_line": 83, "span_ids": ["TestMappable.test_depends"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestMappable:\n\n    def test_depends(self):\n\n        val = 2\n        df = pd.DataFrame(index=pd.RangeIndex(10))\n\n        m = self.mark(pointsize=Mappable(val), linewidth=Mappable(depend=\"pointsize\"))\n        assert m._resolve({}, \"linewidth\") == val\n        assert_array_equal(m._resolve(df, \"linewidth\"), np.full(len(df), val))\n\n        m = self.mark(pointsize=val * 2, linewidth=Mappable(depend=\"pointsize\"))\n        assert m._resolve({}, \"linewidth\") == val * 2\n        assert_array_equal(m._resolve(df, \"linewidth\"), np.full(len(df), val * 2))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_base.py_TestMappable.test_mapped_TestMappable.test_color.assert_array_equal_resolv": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_base.py_TestMappable.test_mapped_TestMappable.test_color.assert_array_equal_resolv", "embedding": null, "metadata": {"file_path": "tests/_marks/test_base.py", "file_name": "test_base.py", "file_type": "text/x-python", "category": "test", "start_line": 85, "end_line": 110, "span_ids": ["TestMappable.test_color", "TestMappable.test_mapped"], "tokens": 229}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestMappable:\n\n    def test_mapped(self):\n\n        values = {\"a\": 1, \"b\": 2, \"c\": 3}\n\n        def f(x):\n            return np.array([values[x_i] for x_i in x])\n\n        m = self.mark(linewidth=Mappable(2))\n        scales = {\"linewidth\": f}\n\n        assert m._resolve({\"linewidth\": \"c\"}, \"linewidth\", scales) == 3\n\n        df = pd.DataFrame({\"linewidth\": [\"a\", \"b\", \"c\"]})\n        expected = np.array([1, 2, 3], float)\n        assert_array_equal(m._resolve(df, \"linewidth\", scales), expected)\n\n    def test_color(self):\n\n        c, a = \"C1\", .5\n        m = self.mark(color=c, alpha=a)\n\n        assert resolve_color(m, {}) == mpl.colors.to_rgba(c, a)\n\n        df = pd.DataFrame(index=pd.RangeIndex(10))\n        cs = [c] * len(df)\n        assert_array_equal(resolve_color(m, df), mpl.colors.to_rgba_array(cs, a))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_base.py_TestMappable.test_color_mapped_alpha_TestMappable.test_color_mapped_alpha.assert_array_equal_resolv": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_base.py_TestMappable.test_color_mapped_alpha_TestMappable.test_color_mapped_alpha.assert_array_equal_resolv", "embedding": null, "metadata": {"file_path": "tests/_marks/test_base.py", "file_name": "test_base.py", "file_type": "text/x-python", "category": "test", "start_line": 112, "end_line": 128, "span_ids": ["TestMappable.test_color_mapped_alpha"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestMappable:\n\n    def test_color_mapped_alpha(self):\n\n        c = \"r\"\n        values = {\"a\": .2, \"b\": .5, \"c\": .8}\n\n        m = self.mark(color=c, alpha=Mappable(1))\n        scales = {\"alpha\": lambda s: np.array([values[s_i] for s_i in s])}\n\n        assert resolve_color(m, {\"alpha\": \"b\"}, \"\", scales) == mpl.colors.to_rgba(c, .5)\n\n        df = pd.DataFrame({\"alpha\": list(values.keys())})\n\n        # Do this in two steps for mpl 3.2 compat\n        expected = mpl.colors.to_rgba_array([c] * len(df))\n        expected[:, 3] = list(values.values())\n\n        assert_array_equal(resolve_color(m, df, \"\", scales), expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_base.py_TestMappable.test_color_scaled_as_strings_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_base.py_TestMappable.test_color_scaled_as_strings_", "embedding": null, "metadata": {"file_path": "tests/_marks/test_base.py", "file_name": "test_base.py", "file_type": "text/x-python", "category": "test", "start_line": 130, "end_line": 158, "span_ids": ["TestMappable.test_fillcolor", "TestMappable.test_color_scaled_as_strings"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestMappable:\n\n    def test_color_scaled_as_strings(self):\n\n        colors = [\"C1\", \"dodgerblue\", \"#445566\"]\n        m = self.mark()\n        scales = {\"color\": lambda s: colors}\n\n        actual = resolve_color(m, {\"color\": pd.Series([\"a\", \"b\", \"c\"])}, \"\", scales)\n        expected = mpl.colors.to_rgba_array(colors)\n        assert_array_equal(actual, expected)\n\n    def test_fillcolor(self):\n\n        c, a = \"green\", .8\n        fa = .2\n        m = self.mark(\n            color=c, alpha=a,\n            fillcolor=Mappable(depend=\"color\"), fillalpha=Mappable(fa),\n        )\n\n        assert resolve_color(m, {}) == mpl.colors.to_rgba(c, a)\n        assert resolve_color(m, {}, \"fill\") == mpl.colors.to_rgba(c, fa)\n\n        df = pd.DataFrame(index=pd.RangeIndex(10))\n        cs = [c] * len(df)\n        assert_array_equal(resolve_color(m, df), mpl.colors.to_rgba_array(cs, a))\n        assert_array_equal(\n            resolve_color(m, df, \"fill\"), mpl.colors.to_rgba_array(cs, fa)\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_regression.py_np_TestPolyFit.test_no_grouper.assert_array_almost_equal": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_regression.py_np_TestPolyFit.test_no_grouper.assert_array_almost_equal", "embedding": null, "metadata": {"file_path": "tests/_stats/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 2, "end_line": 36, "span_ids": ["TestPolyFit", "TestPolyFit.test_no_grouper", "imports", "TestPolyFit.df"], "tokens": 253}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nimport pandas as pd\n\nimport pytest\nfrom numpy.testing import assert_array_equal, assert_array_almost_equal\n\nfrom seaborn._core.groupby import GroupBy\nfrom seaborn._stats.regression import PolyFit\n\n\nclass TestPolyFit:\n\n    @pytest.fixture\n    def df(self, rng):\n\n        n = 100\n        return pd.DataFrame(dict(\n            x=rng.normal(0, 1, n),\n            y=rng.normal(0, 1, n),\n            color=rng.choice([\"a\", \"b\", \"c\"], n),\n            group=rng.choice([\"x\", \"y\"], n),\n        ))\n\n    def test_no_grouper(self, df):\n\n        groupby = GroupBy([\"group\"])\n        res = PolyFit(order=1, gridsize=100)(df[[\"x\", \"y\"]], groupby, \"x\", {})\n\n        assert_array_equal(res.columns, [\"x\", \"y\"])\n\n        grid = np.linspace(df[\"x\"].min(), df[\"x\"].max(), 100)\n        assert_array_equal(res[\"x\"], grid)\n        assert_array_almost_equal(\n            res[\"y\"].diff().diff().dropna(), np.zeros(grid.size - 2)\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_regression.py_TestPolyFit.test_one_grouper_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_regression.py_TestPolyFit.test_one_grouper_", "embedding": null, "metadata": {"file_path": "tests/_stats/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 38, "end_line": 53, "span_ids": ["TestPolyFit.test_one_grouper"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPolyFit:\n\n    def test_one_grouper(self, df):\n\n        groupby = GroupBy([\"group\"])\n        gridsize = 50\n        res = PolyFit(gridsize=gridsize)(df, groupby, \"x\", {})\n\n        assert res.columns.to_list() == [\"x\", \"y\", \"group\"]\n\n        ngroups = df[\"group\"].nunique()\n        assert_array_equal(res.index, np.arange(ngroups * gridsize))\n\n        for _, part in res.groupby(\"group\"):\n            grid = np.linspace(part[\"x\"].min(), part[\"x\"].max(), gridsize)\n            assert_array_equal(part[\"x\"], grid)\n            assert part[\"y\"].diff().diff().dropna().abs().gt(0).all()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/conftest.py_np_remove_pandas_unit_conversion.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/conftest.py_np_remove_pandas_unit_conversion.None_2", "embedding": null, "metadata": {"file_path": "tests/conftest.py", "file_name": "conftest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 19, "span_ids": ["imports", "remove_pandas_unit_conversion"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nimport pandas as pd\nimport datetime\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\n\nimport pytest\n\n\n@pytest.fixture(scope=\"session\", autouse=True)\ndef remove_pandas_unit_conversion():\n    # Prior to pandas 1.0, it registered its own datetime converters,\n    # but they are less powerful than what matplotlib added in 2.2,\n    # and we rely on that functionality in seaborn.\n    # https://github.com/matplotlib/matplotlib/pull/9779\n    # https://github.com/pandas-dev/pandas/issues/27036\n    mpl.units.registry[np.datetime64] = mpl.dates.DateConverter()\n    mpl.units.registry[datetime.date] = mpl.dates.DateConverter()\n    mpl.units.registry[datetime.datetime] = mpl.dates.DateConverter()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/conftest.py_close_figs_wide_dict_of_lists.return._s_name_s_to_list_for_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/conftest.py_close_figs_wide_dict_of_lists.return._s_name_s_to_list_for_", "embedding": null, "metadata": {"file_path": "tests/conftest.py", "file_name": "conftest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 22, "end_line": 123, "span_ids": ["rng", "wide_array", "wide_list_of_lists", "wide_dict_of_lists", "wide_list_of_arrays", "wide_dict_of_arrays", "close_figs", "flat_series", "flat_array", "random_seed", "wide_list_of_series", "wide_dict_of_series", "flat_list", "wide_df", "flat_data"], "tokens": 542}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture(autouse=True)\ndef close_figs():\n    yield\n    plt.close(\"all\")\n\n\n@pytest.fixture(autouse=True)\ndef random_seed():\n    seed = sum(map(ord, \"seaborn random global\"))\n    np.random.seed(seed)\n\n\n@pytest.fixture()\ndef rng():\n    seed = sum(map(ord, \"seaborn random object\"))\n    return np.random.RandomState(seed)\n\n\n@pytest.fixture\ndef wide_df(rng):\n\n    columns = list(\"abc\")\n    index = pd.RangeIndex(10, 50, 2, name=\"wide_index\")\n    values = rng.normal(size=(len(index), len(columns)))\n    return pd.DataFrame(values, index=index, columns=columns)\n\n\n@pytest.fixture\ndef wide_array(wide_df):\n\n    return wide_df.to_numpy()\n\n\n# TODO s/flat/thin?\n@pytest.fixture\ndef flat_series(rng):\n\n    index = pd.RangeIndex(10, 30, name=\"t\")\n    return pd.Series(rng.normal(size=20), index, name=\"s\")\n\n\n@pytest.fixture\ndef flat_array(flat_series):\n\n    return flat_series.to_numpy()\n\n\n@pytest.fixture\ndef flat_list(flat_series):\n\n    return flat_series.to_list()\n\n\n@pytest.fixture(params=[\"series\", \"array\", \"list\"])\ndef flat_data(rng, request):\n\n    index = pd.RangeIndex(10, 30, name=\"t\")\n    series = pd.Series(rng.normal(size=20), index, name=\"s\")\n    if request.param == \"series\":\n        data = series\n    elif request.param == \"array\":\n        data = series.to_numpy()\n    elif request.param == \"list\":\n        data = series.to_list()\n    return data\n\n\n@pytest.fixture\ndef wide_list_of_series(rng):\n\n    return [pd.Series(rng.normal(size=20), np.arange(20), name=\"a\"),\n            pd.Series(rng.normal(size=10), np.arange(5, 15), name=\"b\")]\n\n\n@pytest.fixture\ndef wide_list_of_arrays(wide_list_of_series):\n\n    return [s.to_numpy() for s in wide_list_of_series]\n\n\n@pytest.fixture\ndef wide_list_of_lists(wide_list_of_series):\n\n    return [s.to_list() for s in wide_list_of_series]\n\n\n@pytest.fixture\ndef wide_dict_of_series(wide_list_of_series):\n\n    return {s.name: s for s in wide_list_of_series}\n\n\n@pytest.fixture\ndef wide_dict_of_arrays(wide_list_of_series):\n\n    return {s.name: s.to_numpy() for s in wide_list_of_series}\n\n\n@pytest.fixture\ndef wide_dict_of_lists(wide_list_of_series):\n\n    return {s.name: s.to_list() for s in wide_list_of_series}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/conftest.py_long_df_long_df.return.df": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/conftest.py_long_df_long_df.return.df", "embedding": null, "metadata": {"file_path": "tests/conftest.py", "file_name": "conftest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 126, "end_line": 150, "span_ids": ["long_df"], "tokens": 271}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture\ndef long_df(rng):\n\n    n = 100\n    df = pd.DataFrame(dict(\n        x=rng.uniform(0, 20, n).round().astype(\"int\"),\n        y=rng.normal(size=n),\n        z=rng.lognormal(size=n),\n        a=rng.choice(list(\"abc\"), n),\n        b=rng.choice(list(\"mnop\"), n),\n        c=rng.choice([0, 1], n, [.3, .7]),\n        d=rng.choice(np.arange(\"2004-07-30\", \"2007-07-30\", dtype=\"datetime64[Y]\"), n),\n        t=rng.choice(np.arange(\"2004-07-30\", \"2004-07-31\", dtype=\"datetime64[m]\"), n),\n        s=rng.choice([2, 4, 8], n),\n        f=rng.choice([0.2, 0.3], n),\n    ))\n\n    a_cat = df[\"a\"].astype(\"category\")\n    new_categories = np.roll(a_cat.cat.categories, 1)\n    df[\"a_cat\"] = a_cat.cat.reorder_categories(new_categories)\n\n    df[\"s_cat\"] = df[\"s\"].astype(\"category\")\n    df[\"s_str\"] = df[\"s\"].astype(str)\n\n    return df", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/conftest.py_long_dict_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/conftest.py_long_dict_", "embedding": null, "metadata": {"file_path": "tests/conftest.py", "file_name": "conftest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 153, "end_line": 195, "span_ids": ["long_dict", "missing_df", "object_df", "null_series", "repeated_df"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture\ndef long_dict(long_df):\n\n    return long_df.to_dict()\n\n\n@pytest.fixture\ndef repeated_df(rng):\n\n    n = 100\n    return pd.DataFrame(dict(\n        x=np.tile(np.arange(n // 2), 2),\n        y=rng.normal(size=n),\n        a=rng.choice(list(\"abc\"), n),\n        u=np.repeat(np.arange(2), n // 2),\n    ))\n\n\n@pytest.fixture\ndef missing_df(rng, long_df):\n\n    df = long_df.copy()\n    for col in df:\n        idx = rng.permutation(df.index)[:10]\n        df.loc[idx, col] = np.nan\n    return df\n\n\n@pytest.fixture\ndef object_df(rng, long_df):\n\n    df = long_df.copy()\n    # objectify numeric columns\n    for col in [\"c\", \"s\", \"f\"]:\n        df[col] = df[col].astype(object)\n    return df\n\n\n@pytest.fixture\ndef null_series(flat_series):\n\n    return pd.Series(index=flat_series.index, dtype='float64')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_np_test_bootstrap_range.assert_amax_out_max_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_np_test_bootstrap_range.assert_amax_out_max_", "embedding": null, "metadata": {"file_path": "tests/test_algorithms.py", "file_name": "test_algorithms.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 43, "span_ids": ["imports", "random", "test_bootstrap_range", "test_bootstrap_length", "test_bootstrap"], "tokens": 302}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nimport numpy.random as npr\n\nimport pytest\nfrom numpy.testing import assert_array_equal\n\nfrom seaborn import algorithms as algo\nfrom seaborn.external.version import Version\n\n\n@pytest.fixture\ndef random():\n    np.random.seed(sum(map(ord, \"test_algorithms\")))\n\n\ndef test_bootstrap(random):\n    \"\"\"Test that bootstrapping gives the right answer in dumb cases.\"\"\"\n    a_ones = np.ones(10)\n    n_boot = 5\n    out1 = algo.bootstrap(a_ones, n_boot=n_boot)\n    assert_array_equal(out1, np.ones(n_boot))\n    out2 = algo.bootstrap(a_ones, n_boot=n_boot, func=np.median)\n    assert_array_equal(out2, np.ones(n_boot))\n\n\ndef test_bootstrap_length(random):\n    \"\"\"Test that we get a bootstrap array of the right shape.\"\"\"\n    a_norm = np.random.randn(1000)\n    out = algo.bootstrap(a_norm)\n    assert len(out) == 10000\n\n    n_boot = 100\n    out = algo.bootstrap(a_norm, n_boot=n_boot)\n    assert len(out) == n_boot\n\n\ndef test_bootstrap_range(random):\n    \"\"\"Test that bootstrapping a random array stays within the right range.\"\"\"\n    a_norm = np.random.randn(1000)\n    amin, amax = a_norm.min(), a_norm.max()\n    out = algo.bootstrap(a_norm)\n    assert amin <= out.min()\n    assert amax >= out.max()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_bootstrap_multiarg_test_bootstrap_multiarg.assert_array_equal_out_ac": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_bootstrap_multiarg_test_bootstrap_multiarg.assert_array_equal_out_ac", "embedding": null, "metadata": {"file_path": "tests/test_algorithms.py", "file_name": "test_algorithms.py", "file_type": "text/x-python", "category": "test", "start_line": 46, "end_line": 56, "span_ids": ["test_bootstrap_multiarg"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_bootstrap_multiarg(random):\n    \"\"\"Test that bootstrap works with multiple input arrays.\"\"\"\n    x = np.vstack([[1, 10] for i in range(10)])\n    y = np.vstack([[5, 5] for i in range(10)])\n\n    def f(x, y):\n        return np.vstack((x, y)).max(axis=0)\n\n    out_actual = algo.bootstrap(x, y, n_boot=2, func=f)\n    out_wanted = np.array([[5, 10], [5, 10]])\n    assert_array_equal(out_actual, out_wanted)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_bootstrap_axis_test_bootstrap_seed.assert_array_equal_boots1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_bootstrap_axis_test_bootstrap_seed.assert_array_equal_boots1", "embedding": null, "metadata": {"file_path": "tests/test_algorithms.py", "file_name": "test_algorithms.py", "file_type": "text/x-python", "category": "test", "start_line": 59, "end_line": 77, "span_ids": ["test_bootstrap_seed", "test_bootstrap_axis"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_bootstrap_axis(random):\n    \"\"\"Test axis kwarg to bootstrap function.\"\"\"\n    x = np.random.randn(10, 20)\n    n_boot = 100\n\n    out_default = algo.bootstrap(x, n_boot=n_boot)\n    assert out_default.shape == (n_boot,)\n\n    out_axis = algo.bootstrap(x, n_boot=n_boot, axis=0)\n    assert out_axis.shape, (n_boot, x.shape[1])\n\n\ndef test_bootstrap_seed(random):\n    \"\"\"Test that we can get reproducible resamples by seeding the RNG.\"\"\"\n    data = np.random.randn(50)\n    seed = 42\n    boots1 = algo.bootstrap(data, seed=seed)\n    boots2 = algo.bootstrap(data, seed=seed)\n    assert_array_equal(boots1, boots2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_bootstrap_ols_test_bootstrap_ols.assert_w_boot_noisy_std_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_bootstrap_ols_test_bootstrap_ols.assert_w_boot_noisy_std_", "embedding": null, "metadata": {"file_path": "tests/test_algorithms.py", "file_name": "test_algorithms.py", "file_type": "text/x-python", "category": "test", "start_line": 80, "end_line": 101, "span_ids": ["test_bootstrap_ols"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_bootstrap_ols(random):\n    \"\"\"Test bootstrap of OLS model fit.\"\"\"\n    def ols_fit(X, y):\n        XtXinv = np.linalg.inv(np.dot(X.T, X))\n        return XtXinv.dot(X.T).dot(y)\n\n    X = np.column_stack((np.random.randn(50, 4), np.ones(50)))\n    w = [2, 4, 0, 3, 5]\n    y_noisy = np.dot(X, w) + np.random.randn(50) * 20\n    y_lownoise = np.dot(X, w) + np.random.randn(50)\n\n    n_boot = 500\n    w_boot_noisy = algo.bootstrap(X, y_noisy,\n                                  n_boot=n_boot,\n                                  func=ols_fit)\n    w_boot_lownoise = algo.bootstrap(X, y_lownoise,\n                                     n_boot=n_boot,\n                                     func=ols_fit)\n\n    assert w_boot_noisy.shape == (n_boot, 5)\n    assert w_boot_lownoise.shape == (n_boot, 5)\n    assert w_boot_noisy.std() > w_boot_lownoise.std()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_bootstrap_units_test_bootstrap_arglength.with_pytest_raises_ValueE.algo_bootstrap_np_arange_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_bootstrap_units_test_bootstrap_arglength.with_pytest_raises_ValueE.algo_bootstrap_np_arange_", "embedding": null, "metadata": {"file_path": "tests/test_algorithms.py", "file_name": "test_algorithms.py", "file_type": "text/x-python", "category": "test", "start_line": 104, "end_line": 121, "span_ids": ["test_bootstrap_units", "test_bootstrap_arglength"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_bootstrap_units(random):\n    \"\"\"Test that results make sense when passing unit IDs to bootstrap.\"\"\"\n    data = np.random.randn(50)\n    ids = np.repeat(range(10), 5)\n    bwerr = np.random.normal(0, 2, 10)\n    bwerr = bwerr[ids]\n    data_rm = data + bwerr\n    seed = 77\n\n    boots_orig = algo.bootstrap(data_rm, seed=seed)\n    boots_rm = algo.bootstrap(data_rm, units=ids, seed=seed)\n    assert boots_rm.std() > boots_orig.std()\n\n\ndef test_bootstrap_arglength():\n    \"\"\"Test that different length args raise ValueError.\"\"\"\n    with pytest.raises(ValueError):\n        algo.bootstrap(np.arange(5), np.arange(10))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_bootstrap_string_func_test_bootstrap_string_func.with_pytest_raises_Attrib.algo_bootstrap_x_func_n": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_bootstrap_string_func_test_bootstrap_string_func.with_pytest_raises_Attrib.algo_bootstrap_x_func_n", "embedding": null, "metadata": {"file_path": "tests/test_algorithms.py", "file_name": "test_algorithms.py", "file_type": "text/x-python", "category": "test", "start_line": 124, "end_line": 137, "span_ids": ["test_bootstrap_string_func"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_bootstrap_string_func():\n    \"\"\"Test that named numpy methods are the same as the numpy function.\"\"\"\n    x = np.random.randn(100)\n\n    res_a = algo.bootstrap(x, func=\"mean\", seed=0)\n    res_b = algo.bootstrap(x, func=np.mean, seed=0)\n    assert np.array_equal(res_a, res_b)\n\n    res_a = algo.bootstrap(x, func=\"std\", seed=0)\n    res_b = algo.bootstrap(x, func=np.std, seed=0)\n    assert np.array_equal(res_a, res_b)\n\n    with pytest.raises(AttributeError):\n        algo.bootstrap(x, func=\"not_a_method_name\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_bootstrap_reproducibility_test_bootstrap_reproducibility.with_pytest_warns_UserWar.assert_array_equal_boots1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_bootstrap_reproducibility_test_bootstrap_reproducibility.with_pytest_warns_UserWar.assert_array_equal_boots1", "embedding": null, "metadata": {"file_path": "tests/test_algorithms.py", "file_name": "test_algorithms.py", "file_type": "text/x-python", "category": "test", "start_line": 140, "end_line": 151, "span_ids": ["test_bootstrap_reproducibility"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_bootstrap_reproducibility(random):\n    \"\"\"Test that bootstrapping uses the internal random state.\"\"\"\n    data = np.random.randn(50)\n    boots1 = algo.bootstrap(data, seed=100)\n    boots2 = algo.bootstrap(data, seed=100)\n    assert_array_equal(boots1, boots2)\n\n    with pytest.warns(UserWarning):\n        # Deprecatd, remove when removing random_seed\n        boots1 = algo.bootstrap(data, random_seed=100)\n        boots2 = algo.bootstrap(data, random_seed=100)\n        assert_array_equal(boots1, boots2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_seed_new_test_seed_new.for_seed1_seed2_rng_cla.assert_rng1_uniform_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_seed_new_test_seed_new.for_seed1_seed2_rng_cla.assert_rng1_uniform_", "embedding": null, "metadata": {"file_path": "tests/test_algorithms.py", "file_name": "test_algorithms.py", "file_type": "text/x-python", "category": "test", "start_line": 154, "end_line": 177, "span_ids": ["test_seed_new"], "tokens": 320}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(Version(np.__version__) < Version(\"1.17\"),\n                    reason=\"Tests new numpy random functionality\")\ndef test_seed_new():\n\n    # Can't use pytest parametrize because tests will fail where the new\n    # Generator object and related function are not defined\n\n    test_bank = [\n        (None, None, npr.Generator, False),\n        (npr.RandomState(0), npr.RandomState(0), npr.RandomState, True),\n        (npr.RandomState(0), npr.RandomState(1), npr.RandomState, False),\n        (npr.default_rng(1), npr.default_rng(1), npr.Generator, True),\n        (npr.default_rng(1), npr.default_rng(2), npr.Generator, False),\n        (npr.SeedSequence(10), npr.SeedSequence(10), npr.Generator, True),\n        (npr.SeedSequence(10), npr.SeedSequence(20), npr.Generator, False),\n        (100, 100, npr.Generator, True),\n        (100, 200, npr.Generator, False),\n    ]\n    for seed1, seed2, rng_class, match in test_bank:\n        rng1 = algo._handle_random_seed(seed1)\n        rng2 = algo._handle_random_seed(seed2)\n        assert isinstance(rng1, rng_class)\n        assert isinstance(rng2, rng_class)\n        assert (rng1.uniform() == rng2.uniform()) == match", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_seed_old_test_seed_old.assert_rng1_uniform_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_seed_old_test_seed_old.assert_rng1_uniform_", "embedding": null, "metadata": {"file_path": "tests/test_algorithms.py", "file_name": "test_algorithms.py", "file_type": "text/x-python", "category": "test", "start_line": 180, "end_line": 194, "span_ids": ["test_seed_old"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(Version(np.__version__) >= Version(\"1.17\"),\n                    reason=\"Tests old numpy random functionality\")\n@pytest.mark.parametrize(\"seed1, seed2, match\", [\n    (None, None, False),\n    (npr.RandomState(0), npr.RandomState(0), True),\n    (npr.RandomState(0), npr.RandomState(1), False),\n    (100, 100, True),\n    (100, 200, False),\n])\ndef test_seed_old(seed1, seed2, match):\n    rng1 = algo._handle_random_seed(seed1)\n    rng2 = algo._handle_random_seed(seed2)\n    assert isinstance(rng1, np.random.RandomState)\n    assert isinstance(rng2, np.random.RandomState)\n    assert (rng1.uniform() == rng2.uniform()) == match", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_bad_seed_old_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_algorithms.py_test_bad_seed_old_", "embedding": null, "metadata": {"file_path": "tests/test_algorithms.py", "file_name": "test_algorithms.py", "file_type": "text/x-python", "category": "test", "start_line": 197, "end_line": 220, "span_ids": ["test_nanaware_func_warning", "test_bad_seed_old", "test_nanaware_func_auto"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(Version(np.__version__) >= Version(\"1.17\"),\n                    reason=\"Tests old numpy random functionality\")\ndef test_bad_seed_old():\n\n    with pytest.raises(ValueError):\n        algo._handle_random_seed(\"not_a_random_seed\")\n\n\ndef test_nanaware_func_auto(random):\n\n    x = np.random.normal(size=10)\n    x[0] = np.nan\n    boots = algo.bootstrap(x, func=\"mean\")\n    assert not np.isnan(boots).any()\n\n\ndef test_nanaware_func_warning(random):\n\n    x = np.random.normal(size=10)\n    x[0] = np.nan\n    with pytest.warns(UserWarning, match=\"Data contain nans but\"):\n        boots = algo.bootstrap(x, func=\"ptp\")\n    assert np.isnan(boots).any()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_np_rs.np_random_RandomState_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_np_rs.np_random_RandomState_0_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 26, "span_ids": ["impl", "impl:2", "imports:9", "imports", "impl:3", "imports:8"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nimport pandas as pd\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\n\nimport pytest\nimport numpy.testing as npt\nfrom numpy.testing import assert_array_equal\ntry:\n    import pandas.testing as tm\nexcept ImportError:\n    import pandas.util.testing as tm\n\nfrom seaborn._oldcore import categorical_order\nfrom seaborn import rcmod\nfrom seaborn.palettes import color_palette\nfrom seaborn.relational import scatterplot\nfrom seaborn.distributions import histplot, kdeplot, distplot\nfrom seaborn.categorical import pointplot\nfrom seaborn import axisgrid as ag\nfrom seaborn._testing import (\n    assert_plots_equal,\n    assert_colors_equal,\n)\n\nrs = np.random.RandomState(0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid_TestFacetGrid.test_self_axes.for_ax_in_g_axes_flat_.assert_isinstance_ax_plt": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid_TestFacetGrid.test_self_axes.for_ax_in_g_axes_flat_.assert_isinstance_ax_plt", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 29, "end_line": 53, "span_ids": ["TestFacetGrid.test_self_data", "TestFacetGrid", "TestFacetGrid.test_self_axes", "TestFacetGrid.test_self_figure"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    df = pd.DataFrame(dict(x=rs.normal(size=60),\n                           y=rs.gamma(4, size=60),\n                           a=np.repeat(list(\"abc\"), 20),\n                           b=np.tile(list(\"mn\"), 30),\n                           c=np.tile(list(\"tuv\"), 20),\n                           d=np.tile(list(\"abcdefghijkl\"), 5)))\n\n    def test_self_data(self):\n\n        g = ag.FacetGrid(self.df)\n        assert g.data is self.df\n\n    def test_self_figure(self):\n\n        g = ag.FacetGrid(self.df)\n        assert isinstance(g.figure, plt.Figure)\n        assert g.figure is g._figure\n\n    def test_self_axes(self):\n\n        g = ag.FacetGrid(self.df, row=\"a\", col=\"b\", hue=\"c\")\n        for ax in g.axes.flat:\n            assert isinstance(ax, plt.Axes)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_axes_array_size_TestFacetGrid.test_single_axes.None_2.g_ax": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_axes_array_size_TestFacetGrid.test_single_axes.None_2.g_ax", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 55, "end_line": 89, "span_ids": ["TestFacetGrid.test_single_axes", "TestFacetGrid.test_axes_array_size"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_axes_array_size(self):\n\n        g = ag.FacetGrid(self.df)\n        assert g.axes.shape == (1, 1)\n\n        g = ag.FacetGrid(self.df, row=\"a\")\n        assert g.axes.shape == (3, 1)\n\n        g = ag.FacetGrid(self.df, col=\"b\")\n        assert g.axes.shape == (1, 2)\n\n        g = ag.FacetGrid(self.df, hue=\"c\")\n        assert g.axes.shape == (1, 1)\n\n        g = ag.FacetGrid(self.df, row=\"a\", col=\"b\", hue=\"c\")\n        assert g.axes.shape == (3, 2)\n        for ax in g.axes.flat:\n            assert isinstance(ax, plt.Axes)\n\n    def test_single_axes(self):\n\n        g = ag.FacetGrid(self.df)\n        assert isinstance(g.ax, plt.Axes)\n\n        g = ag.FacetGrid(self.df, row=\"a\")\n        with pytest.raises(AttributeError):\n            g.ax\n\n        g = ag.FacetGrid(self.df, col=\"a\")\n        with pytest.raises(AttributeError):\n            g.ax\n\n        g = ag.FacetGrid(self.df, col=\"a\", row=\"b\")\n        with pytest.raises(AttributeError):\n            g.ax", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_col_wrap_TestFacetGrid.test_col_wrap.assert_len_list_g_facet_d": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_col_wrap_TestFacetGrid.test_col_wrap.assert_len_list_g_facet_d", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 91, "end_line": 117, "span_ids": ["TestFacetGrid.test_col_wrap"], "tokens": 286}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_col_wrap(self):\n\n        n = len(self.df.d.unique())\n\n        g = ag.FacetGrid(self.df, col=\"d\")\n        assert g.axes.shape == (1, n)\n        assert g.facet_axis(0, 8) is g.axes[0, 8]\n\n        g_wrap = ag.FacetGrid(self.df, col=\"d\", col_wrap=4)\n        assert g_wrap.axes.shape == (n,)\n        assert g_wrap.facet_axis(0, 8) is g_wrap.axes[8]\n        assert g_wrap._ncol == 4\n        assert g_wrap._nrow == (n / 4)\n\n        with pytest.raises(ValueError):\n            g = ag.FacetGrid(self.df, row=\"b\", col=\"d\", col_wrap=4)\n\n        df = self.df.copy()\n        df.loc[df.d == \"j\"] = np.nan\n        g_missing = ag.FacetGrid(df, col=\"d\")\n        assert g_missing.axes.shape == (1, n - 1)\n\n        g_missing_wrap = ag.FacetGrid(df, col=\"d\", col_wrap=4)\n        assert g_missing_wrap.axes.shape == (n - 1,)\n\n        g = ag.FacetGrid(self.df, col=\"d\", col_wrap=1)\n        assert len(list(g.facet_data())) == n", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_normal_axes_TestFacetGrid.test_normal_axes.None_19": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_normal_axes_TestFacetGrid.test_normal_axes.None_19", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 119, "end_line": 149, "span_ids": ["TestFacetGrid.test_normal_axes"], "tokens": 417}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_normal_axes(self):\n\n        null = np.empty(0, object).flat\n\n        g = ag.FacetGrid(self.df)\n        npt.assert_array_equal(g._bottom_axes, g.axes.flat)\n        npt.assert_array_equal(g._not_bottom_axes, null)\n        npt.assert_array_equal(g._left_axes, g.axes.flat)\n        npt.assert_array_equal(g._not_left_axes, null)\n        npt.assert_array_equal(g._inner_axes, null)\n\n        g = ag.FacetGrid(self.df, col=\"c\")\n        npt.assert_array_equal(g._bottom_axes, g.axes.flat)\n        npt.assert_array_equal(g._not_bottom_axes, null)\n        npt.assert_array_equal(g._left_axes, g.axes[:, 0].flat)\n        npt.assert_array_equal(g._not_left_axes, g.axes[:, 1:].flat)\n        npt.assert_array_equal(g._inner_axes, null)\n\n        g = ag.FacetGrid(self.df, row=\"c\")\n        npt.assert_array_equal(g._bottom_axes, g.axes[-1, :].flat)\n        npt.assert_array_equal(g._not_bottom_axes, g.axes[:-1, :].flat)\n        npt.assert_array_equal(g._left_axes, g.axes.flat)\n        npt.assert_array_equal(g._not_left_axes, null)\n        npt.assert_array_equal(g._inner_axes, null)\n\n        g = ag.FacetGrid(self.df, col=\"a\", row=\"c\")\n        npt.assert_array_equal(g._bottom_axes, g.axes[-1, :].flat)\n        npt.assert_array_equal(g._not_bottom_axes, g.axes[:-1, :].flat)\n        npt.assert_array_equal(g._left_axes, g.axes[:, 0].flat)\n        npt.assert_array_equal(g._not_left_axes, g.axes[:, 1:].flat)\n        npt.assert_array_equal(g._inner_axes, g.axes[:-1, 1:].flat)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_wrapped_axes_TestFacetGrid.test_wrapped_axes.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_wrapped_axes_TestFacetGrid.test_wrapped_axes.None_4", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 151, "end_line": 161, "span_ids": ["TestFacetGrid.test_wrapped_axes"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_wrapped_axes(self):\n\n        null = np.empty(0, object).flat\n\n        g = ag.FacetGrid(self.df, col=\"a\", col_wrap=2)\n        npt.assert_array_equal(g._bottom_axes,\n                               g.axes[np.array([1, 2])].flat)\n        npt.assert_array_equal(g._not_bottom_axes, g.axes[:1].flat)\n        npt.assert_array_equal(g._left_axes, g.axes[np.array([0, 2])].flat)\n        npt.assert_array_equal(g._not_left_axes, g.axes[np.array([1])].flat)\n        npt.assert_array_equal(g._inner_axes, null)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_axes_dict_TestFacetGrid.test_axes_dict.for_row_var_col_var_a.assert_g_axes_i_j_is_ax": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_axes_dict_TestFacetGrid.test_axes_dict.for_row_var_col_var_a.assert_g_axes_i_j_is_ax", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 163, "end_line": 188, "span_ids": ["TestFacetGrid.test_axes_dict"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_axes_dict(self):\n\n        g = ag.FacetGrid(self.df)\n        assert isinstance(g.axes_dict, dict)\n        assert not g.axes_dict\n\n        g = ag.FacetGrid(self.df, row=\"c\")\n        assert list(g.axes_dict.keys()) == g.row_names\n        for (name, ax) in zip(g.row_names, g.axes.flat):\n            assert g.axes_dict[name] is ax\n\n        g = ag.FacetGrid(self.df, col=\"c\")\n        assert list(g.axes_dict.keys()) == g.col_names\n        for (name, ax) in zip(g.col_names, g.axes.flat):\n            assert g.axes_dict[name] is ax\n\n        g = ag.FacetGrid(self.df, col=\"a\", col_wrap=2)\n        assert list(g.axes_dict.keys()) == g.col_names\n        for (name, ax) in zip(g.col_names, g.axes.flat):\n            assert g.axes_dict[name] is ax\n\n        g = ag.FacetGrid(self.df, row=\"a\", col=\"c\")\n        for (row_var, col_var), ax in g.axes_dict.items():\n            i = g.row_names.index(row_var)\n            j = g.col_names.index(col_var)\n            assert g.axes[i, j] is ax", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_figure_size_TestFacetGrid.test_figure_size.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_figure_size_TestFacetGrid.test_figure_size.None_2", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 190, "end_line": 199, "span_ids": ["TestFacetGrid.test_figure_size"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_figure_size(self):\n\n        g = ag.FacetGrid(self.df, row=\"a\", col=\"b\")\n        npt.assert_array_equal(g.figure.get_size_inches(), (6, 9))\n\n        g = ag.FacetGrid(self.df, row=\"a\", col=\"b\", height=6)\n        npt.assert_array_equal(g.figure.get_size_inches(), (12, 18))\n\n        g = ag.FacetGrid(self.df, col=\"c\", height=4, aspect=.5)\n        npt.assert_array_equal(g.figure.get_size_inches(), (6, 4))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_figure_size_with_legend_TestFacetGrid.test_figure_size_with_legend.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_figure_size_with_legend_TestFacetGrid.test_figure_size_with_legend.None_4", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 201, "end_line": 212, "span_ids": ["TestFacetGrid.test_figure_size_with_legend"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_figure_size_with_legend(self):\n\n        g = ag.FacetGrid(self.df, col=\"a\", hue=\"c\", height=4, aspect=.5)\n        npt.assert_array_equal(g.figure.get_size_inches(), (6, 4))\n        g.add_legend()\n        assert g.figure.get_size_inches()[0] > 6\n\n        g = ag.FacetGrid(self.df, col=\"a\", hue=\"c\", height=4, aspect=.5,\n                         legend_out=False)\n        npt.assert_array_equal(g.figure.get_size_inches(), (6, 4))\n        g.add_legend()\n        npt.assert_array_equal(g.figure.get_size_inches(), (6, 4))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_legend_data_TestFacetGrid.test_legend_data.for_label_level_in_zip_l.assert_label_get_text_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_legend_data_TestFacetGrid.test_legend_data.for_label_level_in_zip_l.assert_label_get_text_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 214, "end_line": 235, "span_ids": ["TestFacetGrid.test_legend_data"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_legend_data(self):\n\n        g = ag.FacetGrid(self.df, hue=\"a\")\n        g.map(plt.plot, \"x\", \"y\")\n        g.add_legend()\n        palette = color_palette(n_colors=3)\n\n        assert g._legend.get_title().get_text() == \"a\"\n\n        a_levels = sorted(self.df.a.unique())\n\n        lines = g._legend.get_lines()\n        assert len(lines) == len(a_levels)\n\n        for line, hue in zip(lines, palette):\n            assert_colors_equal(line.get_color(), hue)\n\n        labels = g._legend.get_texts()\n        assert len(labels) == len(a_levels)\n\n        for label, level in zip(labels, a_levels):\n            assert label.get_text() == level", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_legend_data_missing_level_TestFacetGrid.test_legend_data_missing_level.for_label_level_in_zip_l.assert_label_get_text_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_legend_data_missing_level_TestFacetGrid.test_legend_data_missing_level.for_label_level_in_zip_l.assert_label_get_text_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 237, "end_line": 260, "span_ids": ["TestFacetGrid.test_legend_data_missing_level"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_legend_data_missing_level(self):\n\n        g = ag.FacetGrid(self.df, hue=\"a\", hue_order=list(\"azbc\"))\n        g.map(plt.plot, \"x\", \"y\")\n        g.add_legend()\n\n        c1, c2, c3, c4 = color_palette(n_colors=4)\n        palette = [c1, c3, c4]\n\n        assert g._legend.get_title().get_text() == \"a\"\n\n        a_levels = sorted(self.df.a.unique())\n\n        lines = g._legend.get_lines()\n        assert len(lines) == len(a_levels)\n\n        for line, hue in zip(lines, palette):\n            assert_colors_equal(line.get_color(), hue)\n\n        labels = g._legend.get_texts()\n        assert len(labels) == 4\n\n        for label, level in zip(labels, list(\"azbc\")):\n            assert label.get_text() == level", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_get_boolean_legend_data_TestFacetGrid.test_get_boolean_legend_data.for_label_level_in_zip_l.assert_label_get_text_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_get_boolean_legend_data_TestFacetGrid.test_get_boolean_legend_data.for_label_level_in_zip_l.assert_label_get_text_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 262, "end_line": 284, "span_ids": ["TestFacetGrid.test_get_boolean_legend_data"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_get_boolean_legend_data(self):\n\n        self.df[\"b_bool\"] = self.df.b == \"m\"\n        g = ag.FacetGrid(self.df, hue=\"b_bool\")\n        g.map(plt.plot, \"x\", \"y\")\n        g.add_legend()\n        palette = color_palette(n_colors=2)\n\n        assert g._legend.get_title().get_text() == \"b_bool\"\n\n        b_levels = list(map(str, categorical_order(self.df.b_bool)))\n\n        lines = g._legend.get_lines()\n        assert len(lines) == len(b_levels)\n\n        for line, hue in zip(lines, palette):\n            assert_colors_equal(line.get_color(), hue)\n\n        labels = g._legend.get_texts()\n        assert len(labels) == len(b_levels)\n\n        for label, level in zip(labels, b_levels):\n            assert label.get_text() == level", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_legend_tuples_TestFacetGrid.test_subplot_kws.for_ax_in_g_axes_flat_.assert_PolarAxesSubplot_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_legend_tuples_TestFacetGrid.test_subplot_kws.for_ax_in_g_axes_flat_.assert_PolarAxesSubplot_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 286, "end_line": 334, "span_ids": ["TestFacetGrid.test_legendout_with_colwrap", "TestFacetGrid.test_legend_tuples", "TestFacetGrid.test_subplot_kws", "TestFacetGrid.test_legend_options", "TestFacetGrid.test_legend_tight_layout"], "tokens": 412}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_legend_tuples(self):\n\n        g = ag.FacetGrid(self.df, hue=\"a\")\n        g.map(plt.plot, \"x\", \"y\")\n\n        handles, labels = g.ax.get_legend_handles_labels()\n        label_tuples = [(\"\", l) for l in labels]\n        legend_data = dict(zip(label_tuples, handles))\n        g.add_legend(legend_data, label_tuples)\n        for entry, label in zip(g._legend.get_texts(), labels):\n            assert entry.get_text() == label\n\n    def test_legend_options(self):\n\n        g = ag.FacetGrid(self.df, hue=\"b\")\n        g.map(plt.plot, \"x\", \"y\")\n        g.add_legend()\n\n        g1 = ag.FacetGrid(self.df, hue=\"b\", legend_out=False)\n        g1.add_legend(adjust_subtitles=True)\n\n        g1 = ag.FacetGrid(self.df, hue=\"b\", legend_out=False)\n        g1.add_legend(adjust_subtitles=False)\n\n    def test_legendout_with_colwrap(self):\n\n        g = ag.FacetGrid(self.df, col=\"d\", hue='b',\n                         col_wrap=4, legend_out=False)\n        g.map(plt.plot, \"x\", \"y\", linewidth=3)\n        g.add_legend()\n\n    def test_legend_tight_layout(self):\n\n        g = ag.FacetGrid(self.df, hue='b')\n        g.map(plt.plot, \"x\", \"y\", linewidth=3)\n        g.add_legend()\n        g.tight_layout()\n\n        axes_right_edge = g.ax.get_window_extent().xmax\n        legend_left_edge = g._legend.get_window_extent().xmin\n\n        assert axes_right_edge < legend_left_edge\n\n    def test_subplot_kws(self):\n\n        g = ag.FacetGrid(self.df, despine=False,\n                         subplot_kws=dict(projection=\"polar\"))\n        for ax in g.axes.flat:\n            assert \"PolarAxesSubplot\" in str(type(ax))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_gridspec_kws_TestFacetGrid.test_gridspec_kws_col_wrap.with_pytest_warns_UserWar.ag_FacetGrid_self_df_col": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_gridspec_kws_TestFacetGrid.test_gridspec_kws_col_wrap.with_pytest_warns_UserWar.ag_FacetGrid_self_df_col", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 336, "end_line": 357, "span_ids": ["TestFacetGrid.test_gridspec_kws_col_wrap", "TestFacetGrid.test_gridspec_kws"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_gridspec_kws(self):\n        ratios = [3, 1, 2]\n\n        gskws = dict(width_ratios=ratios)\n        g = ag.FacetGrid(self.df, col='c', row='a', gridspec_kws=gskws)\n\n        for ax in g.axes.flat:\n            ax.set_xticks([])\n            ax.set_yticks([])\n\n        g.figure.tight_layout()\n\n        for (l, m, r) in g.axes:\n            assert l.get_position().width > m.get_position().width\n            assert r.get_position().width > m.get_position().width\n\n    def test_gridspec_kws_col_wrap(self):\n        ratios = [3, 1, 2, 1, 1]\n\n        gskws = dict(width_ratios=ratios)\n        with pytest.warns(UserWarning):\n            ag.FacetGrid(self.df, col='d', col_wrap=5, gridspec_kws=gskws)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_data_generator_TestFacetGrid.test_data_generator.assert_data_c_u_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_data_generator_TestFacetGrid.test_data_generator.assert_data_c_u_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 359, "end_line": 397, "span_ids": ["TestFacetGrid.test_data_generator"], "tokens": 362}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_data_generator(self):\n\n        g = ag.FacetGrid(self.df, row=\"a\")\n        d = list(g.facet_data())\n        assert len(d) == 3\n\n        tup, data = d[0]\n        assert tup == (0, 0, 0)\n        assert (data[\"a\"] == \"a\").all()\n\n        tup, data = d[1]\n        assert tup == (1, 0, 0)\n        assert (data[\"a\"] == \"b\").all()\n\n        g = ag.FacetGrid(self.df, row=\"a\", col=\"b\")\n        d = list(g.facet_data())\n        assert len(d) == 6\n\n        tup, data = d[0]\n        assert tup == (0, 0, 0)\n        assert (data[\"a\"] == \"a\").all()\n        assert (data[\"b\"] == \"m\").all()\n\n        tup, data = d[1]\n        assert tup == (0, 1, 0)\n        assert (data[\"a\"] == \"a\").all()\n        assert (data[\"b\"] == \"n\").all()\n\n        tup, data = d[2]\n        assert tup == (1, 0, 0)\n        assert (data[\"a\"] == \"b\").all()\n        assert (data[\"b\"] == \"m\").all()\n\n        g = ag.FacetGrid(self.df, hue=\"c\")\n        d = list(g.facet_data())\n        assert len(d) == 3\n        tup, data = d[1]\n        assert tup == (0, 0, 1)\n        assert (data[\"c\"] == \"u\").all()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_map_TestFacetGrid.test_map.npt_assert_array_equal_y_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_map_TestFacetGrid.test_map.npt_assert_array_equal_y_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 399, "end_line": 412, "span_ids": ["TestFacetGrid.test_map"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_map(self):\n\n        g = ag.FacetGrid(self.df, row=\"a\", col=\"b\", hue=\"c\")\n        g.map(plt.plot, \"x\", \"y\", linewidth=3)\n\n        lines = g.axes[0, 0].lines\n        assert len(lines) == 3\n\n        line1, _, _ = lines\n        assert line1.get_linewidth() == 3\n        x, y = line1.get_data()\n        mask = (self.df.a == \"a\") & (self.df.b == \"m\") & (self.df.c == \"t\")\n        npt.assert_array_equal(x, self.df.x[mask])\n        npt.assert_array_equal(y, self.df.y[mask])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_map_dataframe_TestFacetGrid.test_map_dataframe.npt_assert_array_equal_y_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_map_dataframe_TestFacetGrid.test_map_dataframe.npt_assert_array_equal_y_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 414, "end_line": 433, "span_ids": ["TestFacetGrid.test_map_dataframe"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_map_dataframe(self):\n\n        g = ag.FacetGrid(self.df, row=\"a\", col=\"b\", hue=\"c\")\n\n        def plot(x, y, data=None, **kws):\n            plt.plot(data[x], data[y], **kws)\n        # Modify __module__ so this doesn't look like a seaborn function\n        plot.__module__ = \"test\"\n\n        g.map_dataframe(plot, \"x\", \"y\", linestyle=\"--\")\n\n        lines = g.axes[0, 0].lines\n        assert len(g.axes[0, 0].lines) == 3\n\n        line1, _, _ = lines\n        assert line1.get_linestyle() == \"--\"\n        x, y = line1.get_data()\n        mask = (self.df.a == \"a\") & (self.df.b == \"m\") & (self.df.c == \"t\")\n        npt.assert_array_equal(x, self.df.x[mask])\n        npt.assert_array_equal(y, self.df.y[mask])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_set_TestFacetGrid.test_set.for_ax_in_g_axes_flat_.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_set_TestFacetGrid.test_set.for_ax_in_g_axes_flat_.None_3", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 435, "end_line": 447, "span_ids": ["TestFacetGrid.test_set"], "tokens": 163}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_set(self):\n\n        g = ag.FacetGrid(self.df, row=\"a\", col=\"b\")\n        xlim = (-2, 5)\n        ylim = (3, 6)\n        xticks = [-2, 0, 3, 5]\n        yticks = [3, 4.5, 6]\n        g.set(xlim=xlim, ylim=ylim, xticks=xticks, yticks=yticks)\n        for ax in g.axes.flat:\n            npt.assert_array_equal(ax.get_xlim(), xlim)\n            npt.assert_array_equal(ax.get_ylim(), ylim)\n            npt.assert_array_equal(ax.get_xticks(), xticks)\n            npt.assert_array_equal(ax.get_yticks(), yticks)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_set_titles_TestFacetGrid.test_set_titles.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_set_titles_TestFacetGrid.test_set_titles.None_3", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 449, "end_line": 475, "span_ids": ["TestFacetGrid.test_set_titles"], "tokens": 345}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_set_titles(self):\n\n        g = ag.FacetGrid(self.df, row=\"a\", col=\"b\")\n        g.map(plt.plot, \"x\", \"y\")\n\n        # Test the default titles\n        assert g.axes[0, 0].get_title() == \"a = a | b = m\"\n        assert g.axes[0, 1].get_title() == \"a = a | b = n\"\n        assert g.axes[1, 0].get_title() == \"a = b | b = m\"\n\n        # Test a provided title\n        g.set_titles(\"{row_var} == {row_name} \\\\/ {col_var} == {col_name}\")\n        assert g.axes[0, 0].get_title() == \"a == a \\\\/ b == m\"\n        assert g.axes[0, 1].get_title() == \"a == a \\\\/ b == n\"\n        assert g.axes[1, 0].get_title() == \"a == b \\\\/ b == m\"\n\n        # Test a single row\n        g = ag.FacetGrid(self.df, col=\"b\")\n        g.map(plt.plot, \"x\", \"y\")\n\n        # Test the default titles\n        assert g.axes[0, 0].get_title() == \"b = m\"\n        assert g.axes[0, 1].get_title() == \"b = n\"\n\n        # test with dropna=False\n        g = ag.FacetGrid(self.df, col=\"b\", hue=\"b\", dropna=False)\n        g.map(plt.plot, 'x', 'y')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_set_titles_margin_titles_TestFacetGrid.test_set_titles_margin_titles.None_10": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_set_titles_margin_titles_TestFacetGrid.test_set_titles_margin_titles.None_10", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 477, "end_line": 499, "span_ids": ["TestFacetGrid.test_set_titles_margin_titles"], "tokens": 296}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_set_titles_margin_titles(self):\n\n        g = ag.FacetGrid(self.df, row=\"a\", col=\"b\", margin_titles=True)\n        g.map(plt.plot, \"x\", \"y\")\n\n        # Test the default titles\n        assert g.axes[0, 0].get_title() == \"b = m\"\n        assert g.axes[0, 1].get_title() == \"b = n\"\n        assert g.axes[1, 0].get_title() == \"\"\n\n        # Test the row \"titles\"\n        assert g.axes[0, 1].texts[0].get_text() == \"a = a\"\n        assert g.axes[1, 1].texts[0].get_text() == \"a = b\"\n        assert g.axes[0, 1].texts[0] is g._margin_titles_texts[0]\n\n        # Test provided titles\n        g.set_titles(col_template=\"{col_name}\", row_template=\"{row_name}\")\n        assert g.axes[0, 0].get_title() == \"m\"\n        assert g.axes[0, 1].get_title() == \"n\"\n        assert g.axes[1, 0].get_title() == \"\"\n\n        assert len(g.axes[1, 1].texts) == 1\n        assert g.axes[1, 1].texts[0].get_text() == \"b\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_set_ticklabels_TestFacetGrid.test_set_ticklabels.for_ax_in_g__left_axes_.for_l_in_ax_get_yticklabe.assert_l_get_rotation_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_set_ticklabels_TestFacetGrid.test_set_ticklabels.for_ax_in_g__left_axes_.for_l_in_ax_get_yticklabe.assert_l_get_rotation_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 501, "end_line": 533, "span_ids": ["TestFacetGrid.test_set_ticklabels"], "tokens": 413}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_set_ticklabels(self):\n\n        g = ag.FacetGrid(self.df, row=\"a\", col=\"b\")\n        g.map(plt.plot, \"x\", \"y\")\n\n        ax = g.axes[-1, 0]\n        xlab = [l.get_text() + \"h\" for l in ax.get_xticklabels()]\n        ylab = [l.get_text() + \"i\" for l in ax.get_yticklabels()]\n\n        g.set_xticklabels(xlab)\n        g.set_yticklabels(ylab)\n        got_x = [l.get_text() for l in g.axes[-1, 1].get_xticklabels()]\n        got_y = [l.get_text() for l in g.axes[0, 0].get_yticklabels()]\n        npt.assert_array_equal(got_x, xlab)\n        npt.assert_array_equal(got_y, ylab)\n\n        x, y = np.arange(10), np.arange(10)\n        df = pd.DataFrame(np.c_[x, y], columns=[\"x\", \"y\"])\n        g = ag.FacetGrid(df).map_dataframe(pointplot, x=\"x\", y=\"y\", order=x)\n        g.set_xticklabels(step=2)\n        got_x = [int(l.get_text()) for l in g.axes[0, 0].get_xticklabels()]\n        npt.assert_array_equal(x[::2], got_x)\n\n        g = ag.FacetGrid(self.df, col=\"d\", col_wrap=5)\n        g.map(plt.plot, \"x\", \"y\")\n        g.set_xticklabels(rotation=45)\n        g.set_yticklabels(rotation=75)\n        for ax in g._bottom_axes:\n            for l in ax.get_xticklabels():\n                assert l.get_rotation() == 45\n        for ax in g._left_axes:\n            for l in ax.get_yticklabels():\n                assert l.get_rotation() == 75", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_set_axis_labels_TestFacetGrid.test_axis_lims.assert_g_axes_0_0_get_y": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_set_axis_labels_TestFacetGrid.test_axis_lims.assert_g_axes_0_0_get_y", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 535, "end_line": 562, "span_ids": ["TestFacetGrid.test_set_axis_labels", "TestFacetGrid.test_axis_lims"], "tokens": 278}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_set_axis_labels(self):\n\n        g = ag.FacetGrid(self.df, row=\"a\", col=\"b\")\n        g.map(plt.plot, \"x\", \"y\")\n        xlab = 'xx'\n        ylab = 'yy'\n\n        g.set_axis_labels(xlab, ylab)\n\n        got_x = [ax.get_xlabel() for ax in g.axes[-1, :]]\n        got_y = [ax.get_ylabel() for ax in g.axes[:, 0]]\n        npt.assert_array_equal(got_x, xlab)\n        npt.assert_array_equal(got_y, ylab)\n\n        for ax in g.axes.flat:\n            ax.set(xlabel=\"x\", ylabel=\"y\")\n\n        g.set_axis_labels(xlab, ylab)\n        for ax in g._not_bottom_axes:\n            assert not ax.get_xlabel()\n        for ax in g._not_left_axes:\n            assert not ax.get_ylabel()\n\n    def test_axis_lims(self):\n\n        g = ag.FacetGrid(self.df, row=\"a\", col=\"b\", xlim=(0, 4), ylim=(-2, 3))\n        assert g.axes[0, 0].get_xlim() == (0, 4)\n        assert g.axes[0, 0].get_ylim() == (-2, 3)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_data_orders_TestFacetGrid.test_data_orders.assert_g_axes_shape_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_data_orders_TestFacetGrid.test_data_orders.assert_g_axes_shape_4", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 564, "end_line": 591, "span_ids": ["TestFacetGrid.test_data_orders"], "tokens": 261}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_data_orders(self):\n\n        g = ag.FacetGrid(self.df, row=\"a\", col=\"b\", hue=\"c\")\n\n        assert g.row_names == list(\"abc\")\n        assert g.col_names == list(\"mn\")\n        assert g.hue_names == list(\"tuv\")\n        assert g.axes.shape == (3, 2)\n\n        g = ag.FacetGrid(self.df, row=\"a\", col=\"b\", hue=\"c\",\n                         row_order=list(\"bca\"),\n                         col_order=list(\"nm\"),\n                         hue_order=list(\"vtu\"))\n\n        assert g.row_names == list(\"bca\")\n        assert g.col_names == list(\"nm\")\n        assert g.hue_names == list(\"vtu\")\n        assert g.axes.shape == (3, 2)\n\n        g = ag.FacetGrid(self.df, row=\"a\", col=\"b\", hue=\"c\",\n                         row_order=list(\"bcda\"),\n                         col_order=list(\"nom\"),\n                         hue_order=list(\"qvtu\"))\n\n        assert g.row_names == list(\"bcda\")\n        assert g.col_names == list(\"nom\")\n        assert g.hue_names == list(\"qvtu\")\n        assert g.axes.shape == (4, 3)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_palette_TestFacetGrid.test_palette.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_palette_TestFacetGrid.test_palette.None_4", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 593, "end_line": 614, "span_ids": ["TestFacetGrid.test_palette"], "tokens": 230}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_palette(self):\n\n        rcmod.set()\n\n        g = ag.FacetGrid(self.df, hue=\"c\")\n        assert g._colors == color_palette(n_colors=len(self.df.c.unique()))\n\n        g = ag.FacetGrid(self.df, hue=\"d\")\n        assert g._colors == color_palette(\"husl\", len(self.df.d.unique()))\n\n        g = ag.FacetGrid(self.df, hue=\"c\", palette=\"Set2\")\n        assert g._colors == color_palette(\"Set2\", len(self.df.c.unique()))\n\n        dict_pal = dict(t=\"red\", u=\"green\", v=\"blue\")\n        list_pal = color_palette([\"red\", \"green\", \"blue\"], 3)\n        g = ag.FacetGrid(self.df, hue=\"c\", palette=dict_pal)\n        assert g._colors == list_pal\n\n        list_pal = color_palette([\"green\", \"blue\", \"red\"], 3)\n        g = ag.FacetGrid(self.df, hue=\"c\", hue_order=list(\"uvt\"),\n                         palette=dict_pal)\n        assert g._colors == list_pal", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_hue_kws_TestFacetGrid.test_dropna.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_hue_kws_TestFacetGrid.test_dropna.None_3", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 616, "end_line": 635, "span_ids": ["TestFacetGrid.test_hue_kws", "TestFacetGrid.test_dropna"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_hue_kws(self):\n\n        kws = dict(marker=[\"o\", \"s\", \"D\"])\n        g = ag.FacetGrid(self.df, hue=\"c\", hue_kws=kws)\n        g.map(plt.plot, \"x\", \"y\")\n\n        for line, marker in zip(g.axes[0, 0].lines, kws[\"marker\"]):\n            assert line.get_marker() == marker\n\n    def test_dropna(self):\n\n        df = self.df.copy()\n        hasna = pd.Series(np.tile(np.arange(6), 10), dtype=float)\n        hasna[hasna == 5] = np.nan\n        df[\"hasna\"] = hasna\n        g = ag.FacetGrid(df, dropna=False, row=\"hasna\")\n        assert g._not_na.sum() == 60\n\n        g = ag.FacetGrid(df, dropna=True, row=\"hasna\")\n        assert g._not_na.sum() == 50", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_categorical_column_missing_categories_TestFacetGrid.test_categorical_warning.with_pytest_warns_UserWar.g_map_pointplot_b_x_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_categorical_column_missing_categories_TestFacetGrid.test_categorical_warning.with_pytest_warns_UserWar.g_map_pointplot_b_x_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 637, "end_line": 650, "span_ids": ["TestFacetGrid.test_categorical_column_missing_categories", "TestFacetGrid.test_categorical_warning"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_categorical_column_missing_categories(self):\n\n        df = self.df.copy()\n        df['a'] = df['a'].astype('category')\n\n        g = ag.FacetGrid(df[df['a'] == 'a'], col=\"a\", col_wrap=1)\n\n        assert g.axes.shape == (len(df['a'].cat.categories),)\n\n    def test_categorical_warning(self):\n\n        g = ag.FacetGrid(self.df, col=\"b\")\n        with pytest.warns(UserWarning):\n            g.map(pointplot, \"b\", \"x\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_refline_TestFacetGrid.test_refline.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_refline_TestFacetGrid.test_refline.None_2", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 652, "end_line": 674, "span_ids": ["TestFacetGrid.test_refline"], "tokens": 288}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_refline(self):\n\n        g = ag.FacetGrid(self.df, row=\"a\", col=\"b\")\n        g.refline()\n        for ax in g.axes.flat:\n            assert not ax.lines\n\n        refx = refy = 0.5\n        hline = np.array([[0, refy], [1, refy]])\n        vline = np.array([[refx, 0], [refx, 1]])\n        g.refline(x=refx, y=refy)\n        for ax in g.axes.flat:\n            assert ax.lines[0].get_color() == '.5'\n            assert ax.lines[0].get_linestyle() == '--'\n            assert len(ax.lines) == 2\n            npt.assert_array_equal(ax.lines[0].get_xydata(), vline)\n            npt.assert_array_equal(ax.lines[1].get_xydata(), hline)\n\n        color, linestyle = 'red', '-'\n        g.refline(x=refx, color=color, linestyle=linestyle)\n        npt.assert_array_equal(g.axes[0, 0].lines[-1].get_xydata(), vline)\n        assert g.axes[0, 0].lines[-1].get_color() == color\n        assert g.axes[0, 0].lines[-1].get_linestyle() == linestyle", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid_TestPairGrid.test_remove_hue_from_default.assert_hue_in_g_y_vars": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid_TestPairGrid.test_remove_hue_from_default.assert_hue_in_g_y_vars", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 677, "end_line": 738, "span_ids": ["TestPairGrid.test_specific_square_axes", "TestPairGrid.test_self_axes", "TestPairGrid", "TestPairGrid.test_self_data", "TestPairGrid.test_remove_hue_from_default", "TestPairGrid.test_ignore_datelike_data", "TestPairGrid.test_default_axes", "TestPairGrid.test_self_figure"], "tokens": 495}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    rs = np.random.RandomState(sum(map(ord, \"PairGrid\")))\n    df = pd.DataFrame(dict(x=rs.normal(size=60),\n                           y=rs.randint(0, 4, size=(60)),\n                           z=rs.gamma(3, size=60),\n                           a=np.repeat(list(\"abc\"), 20),\n                           b=np.repeat(list(\"abcdefghijkl\"), 5)))\n\n    def test_self_data(self):\n\n        g = ag.PairGrid(self.df)\n        assert g.data is self.df\n\n    def test_ignore_datelike_data(self):\n\n        df = self.df.copy()\n        df['date'] = pd.date_range('2010-01-01', periods=len(df), freq='d')\n        result = ag.PairGrid(self.df).data\n        expected = df.drop('date', axis=1)\n        tm.assert_frame_equal(result, expected)\n\n    def test_self_figure(self):\n\n        g = ag.PairGrid(self.df)\n        assert isinstance(g.figure, plt.Figure)\n        assert g.figure is g._figure\n\n    def test_self_axes(self):\n\n        g = ag.PairGrid(self.df)\n        for ax in g.axes.flat:\n            assert isinstance(ax, plt.Axes)\n\n    def test_default_axes(self):\n\n        g = ag.PairGrid(self.df)\n        assert g.axes.shape == (3, 3)\n        assert g.x_vars == [\"x\", \"y\", \"z\"]\n        assert g.y_vars == [\"x\", \"y\", \"z\"]\n        assert g.square_grid\n\n    @pytest.mark.parametrize(\"vars\", [[\"z\", \"x\"], np.array([\"z\", \"x\"])])\n    def test_specific_square_axes(self, vars):\n\n        g = ag.PairGrid(self.df, vars=vars)\n        assert g.axes.shape == (len(vars), len(vars))\n        assert g.x_vars == list(vars)\n        assert g.y_vars == list(vars)\n        assert g.square_grid\n\n    def test_remove_hue_from_default(self):\n\n        hue = \"z\"\n        g = ag.PairGrid(self.df, hue=hue)\n        assert hue not in g.x_vars\n        assert hue not in g.y_vars\n\n        vars = [\"x\", \"y\", \"z\"]\n        g = ag.PairGrid(self.df, hue=hue, vars=vars)\n        assert hue in g.x_vars\n        assert hue in g.y_vars", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_specific_nonsquare_axes_TestPairGrid.test_specific_nonsquare_axes.assert_not_g_square_grid": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_specific_nonsquare_axes_TestPairGrid.test_specific_nonsquare_axes.assert_not_g_square_grid", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 740, "end_line": 754, "span_ids": ["TestPairGrid.test_specific_nonsquare_axes"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    @pytest.mark.parametrize(\n        \"x_vars, y_vars\",\n        [\n            ([\"x\", \"y\"], [\"z\", \"y\", \"x\"]),\n            ([\"x\", \"y\"], \"z\"),\n            (np.array([\"x\", \"y\"]), np.array([\"z\", \"y\", \"x\"])),\n        ],\n    )\n    def test_specific_nonsquare_axes(self, x_vars, y_vars):\n\n        g = ag.PairGrid(self.df, x_vars=x_vars, y_vars=y_vars)\n        assert g.axes.shape == (len(y_vars), len(x_vars))\n        assert g.x_vars == list(x_vars)\n        assert g.y_vars == list(y_vars)\n        assert not g.square_grid", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_size_TestPairGrid.test_empty_grid.with_pytest_raises_ValueE.ag_PairGrid_self_df_a_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_size_TestPairGrid.test_empty_grid.with_pytest_raises_ValueE.ag_PairGrid_self_df_a_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 775, "end_line": 790, "span_ids": ["TestPairGrid.test_empty_grid", "TestPairGrid.test_size"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_size(self):\n\n        g1 = ag.PairGrid(self.df, height=3)\n        npt.assert_array_equal(g1.fig.get_size_inches(), (9, 9))\n\n        g2 = ag.PairGrid(self.df, height=4, aspect=.5)\n        npt.assert_array_equal(g2.fig.get_size_inches(), (6, 12))\n\n        g3 = ag.PairGrid(self.df, y_vars=[\"z\"], x_vars=[\"x\", \"y\"],\n                         height=2, aspect=2)\n        npt.assert_array_equal(g3.fig.get_size_inches(), (8, 2))\n\n    def test_empty_grid(self):\n\n        with pytest.raises(ValueError, match=\"No variables found\"):\n            ag.PairGrid(self.df[[\"a\", \"b\"]])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_TestPairGrid.test_map.None_1.for_j_ax_in_enumerate_ax.npt_assert_array_equal_y_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_TestPairGrid.test_map.None_1.for_j_ax_in_enumerate_ax.npt_assert_array_equal_y_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 792, "end_line": 818, "span_ids": ["TestPairGrid.test_map"], "tokens": 275}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_map(self):\n\n        vars = [\"x\", \"y\", \"z\"]\n        g1 = ag.PairGrid(self.df)\n        g1.map(plt.scatter)\n\n        for i, axes_i in enumerate(g1.axes):\n            for j, ax in enumerate(axes_i):\n                x_in = self.df[vars[j]]\n                y_in = self.df[vars[i]]\n                x_out, y_out = ax.collections[0].get_offsets().T\n                npt.assert_array_equal(x_in, x_out)\n                npt.assert_array_equal(y_in, y_out)\n\n        g2 = ag.PairGrid(self.df, hue=\"a\")\n        g2.map(plt.scatter)\n\n        for i, axes_i in enumerate(g2.axes):\n            for j, ax in enumerate(axes_i):\n                x_in = self.df[vars[j]]\n                y_in = self.df[vars[i]]\n                for k, k_level in enumerate(self.df.a.unique()):\n                    x_in_k = x_in[self.df.a == k_level]\n                    y_in_k = y_in[self.df.a == k_level]\n                    x_out, y_out = ax.collections[k].get_offsets().T\n                npt.assert_array_equal(x_in_k, x_out)\n                npt.assert_array_equal(y_in_k, y_out)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_nonsquare_TestPairGrid.test_map_nonsquare.for_i_i_var_in_enumerate.npt_assert_array_equal_y_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_nonsquare_TestPairGrid.test_map_nonsquare.for_i_i_var_in_enumerate.npt_assert_array_equal_y_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 820, "end_line": 833, "span_ids": ["TestPairGrid.test_map_nonsquare"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_map_nonsquare(self):\n\n        x_vars = [\"x\"]\n        y_vars = [\"y\", \"z\"]\n        g = ag.PairGrid(self.df, x_vars=x_vars, y_vars=y_vars)\n        g.map(plt.scatter)\n\n        x_in = self.df.x\n        for i, i_var in enumerate(y_vars):\n            ax = g.axes[i, 0]\n            y_in = self.df[i_var]\n            x_out, y_out = ax.collections[0].get_offsets().T\n            npt.assert_array_equal(x_in, x_out)\n            npt.assert_array_equal(y_in, y_out)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_lower_TestPairGrid.test_map_lower.for_i_j_in_zip_np_triu_.assert_len_ax_collections": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_lower_TestPairGrid.test_map_lower.for_i_j_in_zip_np_triu_.assert_len_ax_collections", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 835, "end_line": 851, "span_ids": ["TestPairGrid.test_map_lower"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_map_lower(self):\n\n        vars = [\"x\", \"y\", \"z\"]\n        g = ag.PairGrid(self.df)\n        g.map_lower(plt.scatter)\n\n        for i, j in zip(*np.tril_indices_from(g.axes, -1)):\n            ax = g.axes[i, j]\n            x_in = self.df[vars[j]]\n            y_in = self.df[vars[i]]\n            x_out, y_out = ax.collections[0].get_offsets().T\n            npt.assert_array_equal(x_in, x_out)\n            npt.assert_array_equal(y_in, y_out)\n\n        for i, j in zip(*np.triu_indices_from(g.axes)):\n            ax = g.axes[i, j]\n            assert len(ax.collections) == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_upper_TestPairGrid.test_map_upper.for_i_j_in_zip_np_tril_.assert_len_ax_collections": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_upper_TestPairGrid.test_map_upper.for_i_j_in_zip_np_tril_.assert_len_ax_collections", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 853, "end_line": 869, "span_ids": ["TestPairGrid.test_map_upper"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_map_upper(self):\n\n        vars = [\"x\", \"y\", \"z\"]\n        g = ag.PairGrid(self.df)\n        g.map_upper(plt.scatter)\n\n        for i, j in zip(*np.triu_indices_from(g.axes, 1)):\n            ax = g.axes[i, j]\n            x_in = self.df[vars[j]]\n            y_in = self.df[vars[i]]\n            x_out, y_out = ax.collections[0].get_offsets().T\n            npt.assert_array_equal(x_in, x_out)\n            npt.assert_array_equal(y_in, y_out)\n\n        for i, j in zip(*np.tril_indices_from(g.axes)):\n            ax = g.axes[i, j]\n            assert len(ax.collections) == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_mixed_funcsig_TestPairGrid.test_map_mixed_funcsig.for_i_j_in_zip_np_triu_.npt_assert_array_equal_y_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_mixed_funcsig_TestPairGrid.test_map_mixed_funcsig.for_i_j_in_zip_np_triu_.npt_assert_array_equal_y_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 871, "end_line": 884, "span_ids": ["TestPairGrid.test_map_mixed_funcsig"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_map_mixed_funcsig(self):\n\n        vars = [\"x\", \"y\", \"z\"]\n        g = ag.PairGrid(self.df, vars=vars)\n        g.map_lower(scatterplot)\n        g.map_upper(plt.scatter)\n\n        for i, j in zip(*np.triu_indices_from(g.axes, 1)):\n            ax = g.axes[i, j]\n            x_in = self.df[vars[j]]\n            y_in = self.df[vars[i]]\n            x_out, y_out = ax.collections[0].get_offsets().T\n            npt.assert_array_equal(x_in, x_out)\n            npt.assert_array_equal(y_in, y_out)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_diag_TestPairGrid.test_map_diag.None_2.for_ptch_in_ax_patches_.assert_not_ptch_fill": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_diag_TestPairGrid.test_map_diag.None_2.for_ptch_in_ax_patches_.assert_not_ptch_fill", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 886, "end_line": 906, "span_ids": ["TestPairGrid.test_map_diag"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_map_diag(self):\n\n        g = ag.PairGrid(self.df)\n        g.map_diag(plt.hist)\n\n        for var, ax in zip(g.diag_vars, g.diag_axes):\n            assert len(ax.patches) == 10\n            assert pytest.approx(ax.patches[0].get_x()) == self.df[var].min()\n\n        g = ag.PairGrid(self.df, hue=\"a\")\n        g.map_diag(plt.hist)\n\n        for ax in g.diag_axes:\n            assert len(ax.patches) == 30\n\n        g = ag.PairGrid(self.df, hue=\"a\")\n        g.map_diag(plt.hist, histtype='step')\n\n        for ax in g.diag_axes:\n            for ptch in ax.patches:\n                assert not ptch.fill", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_diag_rectangular_TestPairGrid.test_map_diag_rectangular.None_4.for_i_y_var_in_enumerate.if_x_var_y_var_.else_.assert_array_equal_y_sel": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_diag_rectangular_TestPairGrid.test_map_diag_rectangular.None_4.for_i_y_var_in_enumerate.if_x_var_y_var_.else_.assert_array_equal_y_sel", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 908, "end_line": 966, "span_ids": ["TestPairGrid.test_map_diag_rectangular"], "tokens": 583}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_map_diag_rectangular(self):\n\n        x_vars = [\"x\", \"y\"]\n        y_vars = [\"x\", \"z\", \"y\"]\n        g1 = ag.PairGrid(self.df, x_vars=x_vars, y_vars=y_vars)\n        g1.map_diag(plt.hist)\n        g1.map_offdiag(plt.scatter)\n\n        assert set(g1.diag_vars) == (set(x_vars) & set(y_vars))\n\n        for var, ax in zip(g1.diag_vars, g1.diag_axes):\n            assert len(ax.patches) == 10\n            assert pytest.approx(ax.patches[0].get_x()) == self.df[var].min()\n\n        for j, x_var in enumerate(x_vars):\n            for i, y_var in enumerate(y_vars):\n\n                ax = g1.axes[i, j]\n                if x_var == y_var:\n                    diag_ax = g1.diag_axes[j]  # because fewer x than y vars\n                    assert ax.bbox.bounds == diag_ax.bbox.bounds\n\n                else:\n                    x, y = ax.collections[0].get_offsets().T\n                    assert_array_equal(x, self.df[x_var])\n                    assert_array_equal(y, self.df[y_var])\n\n        g2 = ag.PairGrid(self.df, x_vars=x_vars, y_vars=y_vars, hue=\"a\")\n        g2.map_diag(plt.hist)\n        g2.map_offdiag(plt.scatter)\n\n        assert set(g2.diag_vars) == (set(x_vars) & set(y_vars))\n\n        for ax in g2.diag_axes:\n            assert len(ax.patches) == 30\n\n        x_vars = [\"x\", \"y\", \"z\"]\n        y_vars = [\"x\", \"z\"]\n        g3 = ag.PairGrid(self.df, x_vars=x_vars, y_vars=y_vars)\n        g3.map_diag(plt.hist)\n        g3.map_offdiag(plt.scatter)\n\n        assert set(g3.diag_vars) == (set(x_vars) & set(y_vars))\n\n        for var, ax in zip(g3.diag_vars, g3.diag_axes):\n            assert len(ax.patches) == 10\n            assert pytest.approx(ax.patches[0].get_x()) == self.df[var].min()\n\n        for j, x_var in enumerate(x_vars):\n            for i, y_var in enumerate(y_vars):\n\n                ax = g3.axes[i, j]\n                if x_var == y_var:\n                    diag_ax = g3.diag_axes[i]  # because fewer y than x vars\n                    assert ax.bbox.bounds == diag_ax.bbox.bounds\n                else:\n                    x, y = ax.collections[0].get_offsets().T\n                    assert_array_equal(x, self.df[x_var])\n                    assert_array_equal(y, self.df[y_var])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_diag_color_TestPairGrid.test_map_diag_palette.for_ax_in_g_diag_axes_.for_line_color_in_zip_ax.assert_colors_equal_line_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_diag_color_TestPairGrid.test_map_diag_palette.for_ax_in_g_diag_axes_.for_line_color_in_zip_ax.assert_colors_equal_line_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 968, "end_line": 995, "span_ids": ["TestPairGrid.test_map_diag_palette", "TestPairGrid.test_map_diag_color"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_map_diag_color(self):\n\n        color = \"red\"\n\n        g1 = ag.PairGrid(self.df)\n        g1.map_diag(plt.hist, color=color)\n\n        for ax in g1.diag_axes:\n            for patch in ax.patches:\n                assert_colors_equal(patch.get_facecolor(), color)\n\n        g2 = ag.PairGrid(self.df)\n        g2.map_diag(kdeplot, color='red')\n\n        for ax in g2.diag_axes:\n            for line in ax.lines:\n                assert_colors_equal(line.get_color(), color)\n\n    def test_map_diag_palette(self):\n\n        palette = \"muted\"\n        pal = color_palette(palette, n_colors=len(self.df.a.unique()))\n        g = ag.PairGrid(self.df, hue=\"a\", palette=palette)\n        g.map_diag(kdeplot)\n\n        for ax in g.diag_axes:\n            for line, color in zip(ax.lines[::-1], pal):\n                assert_colors_equal(line.get_color(), color)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_diag_and_offdiag_TestPairGrid.test_map_diag_and_offdiag.for_i_j_in_zip_np_diag_.assert_len_ax_collections": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_map_diag_and_offdiag_TestPairGrid.test_map_diag_and_offdiag.for_i_j_in_zip_np_diag_.assert_len_ax_collections", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 997, "end_line": 1025, "span_ids": ["TestPairGrid.test_map_diag_and_offdiag"], "tokens": 284}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_map_diag_and_offdiag(self):\n\n        vars = [\"x\", \"y\", \"z\"]\n        g = ag.PairGrid(self.df)\n        g.map_offdiag(plt.scatter)\n        g.map_diag(plt.hist)\n\n        for ax in g.diag_axes:\n            assert len(ax.patches) == 10\n\n        for i, j in zip(*np.triu_indices_from(g.axes, 1)):\n            ax = g.axes[i, j]\n            x_in = self.df[vars[j]]\n            y_in = self.df[vars[i]]\n            x_out, y_out = ax.collections[0].get_offsets().T\n            npt.assert_array_equal(x_in, x_out)\n            npt.assert_array_equal(y_in, y_out)\n\n        for i, j in zip(*np.tril_indices_from(g.axes, -1)):\n            ax = g.axes[i, j]\n            x_in = self.df[vars[j]]\n            y_in = self.df[vars[i]]\n            x_out, y_out = ax.collections[0].get_offsets().T\n            npt.assert_array_equal(x_in, x_out)\n            npt.assert_array_equal(y_in, y_out)\n\n        for i, j in zip(*np.diag_indices_from(g.axes)):\n            ax = g.axes[i, j]\n            assert len(ax.collections) == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_diag_sharey_TestPairGrid.test_map_diag_matplotlib.None_1.assert_len_ax_patches_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_diag_sharey_TestPairGrid.test_map_diag_matplotlib.None_1.assert_len_ax_patches_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1027, "end_line": 1046, "span_ids": ["TestPairGrid.test_diag_sharey", "TestPairGrid.test_map_diag_matplotlib"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_diag_sharey(self):\n\n        g = ag.PairGrid(self.df, diag_sharey=True)\n        g.map_diag(kdeplot)\n        for ax in g.diag_axes[1:]:\n            assert ax.get_ylim() == g.diag_axes[0].get_ylim()\n\n    def test_map_diag_matplotlib(self):\n\n        bins = 10\n        g = ag.PairGrid(self.df)\n        g.map_diag(plt.hist, bins=bins)\n        for ax in g.diag_axes:\n            assert len(ax.patches) == bins\n\n        levels = len(self.df[\"a\"].unique())\n        g = ag.PairGrid(self.df, hue=\"a\")\n        g.map_diag(plt.hist, bins=bins)\n        for ax in g.diag_axes:\n            assert len(ax.patches) == (bins * levels)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_palette_TestPairGrid.test_palette.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_palette_TestPairGrid.test_palette.None_4", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1048, "end_line": 1069, "span_ids": ["TestPairGrid.test_palette"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_palette(self):\n\n        rcmod.set()\n\n        g = ag.PairGrid(self.df, hue=\"a\")\n        assert g.palette == color_palette(n_colors=len(self.df.a.unique()))\n\n        g = ag.PairGrid(self.df, hue=\"b\")\n        assert g.palette == color_palette(\"husl\", len(self.df.b.unique()))\n\n        g = ag.PairGrid(self.df, hue=\"a\", palette=\"Set2\")\n        assert g.palette == color_palette(\"Set2\", len(self.df.a.unique()))\n\n        dict_pal = dict(a=\"red\", b=\"green\", c=\"blue\")\n        list_pal = color_palette([\"red\", \"green\", \"blue\"])\n        g = ag.PairGrid(self.df, hue=\"a\", palette=dict_pal)\n        assert g.palette == list_pal\n\n        list_pal = color_palette([\"blue\", \"red\", \"green\"])\n        g = ag.PairGrid(self.df, hue=\"a\", hue_order=list(\"cab\"),\n                        palette=dict_pal)\n        assert g.palette == list_pal", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_hue_kws_TestPairGrid.test_hue_kws.None_1.assert_line_get_marker_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_hue_kws_TestPairGrid.test_hue_kws.None_1.assert_line_get_marker_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1071, "end_line": 1085, "span_ids": ["TestPairGrid.test_hue_kws"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_hue_kws(self):\n\n        kws = dict(marker=[\"o\", \"s\", \"d\", \"+\"])\n        g = ag.PairGrid(self.df, hue=\"a\", hue_kws=kws)\n        g.map(plt.plot)\n\n        for line, marker in zip(g.axes[0, 0].lines, kws[\"marker\"]):\n            assert line.get_marker() == marker\n\n        g = ag.PairGrid(self.df, hue=\"a\", hue_kws=kws,\n                        hue_order=list(\"dcab\"))\n        g.map(plt.plot)\n\n        for line, marker in zip(g.axes[0, 0].lines, kws[\"marker\"]):\n            assert line.get_marker() == marker", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_hue_order_TestPairGrid.test_hue_order.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_hue_order_TestPairGrid.test_hue_order.None_7", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1087, "end_line": 1128, "span_ids": ["TestPairGrid.test_hue_order"], "tokens": 436}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_hue_order(self):\n\n        order = list(\"dcab\")\n        g = ag.PairGrid(self.df, hue=\"a\", hue_order=order)\n        g.map(plt.plot)\n\n        for line, level in zip(g.axes[1, 0].lines, order):\n            x, y = line.get_xydata().T\n            npt.assert_array_equal(x, self.df.loc[self.df.a == level, \"x\"])\n            npt.assert_array_equal(y, self.df.loc[self.df.a == level, \"y\"])\n\n        plt.close(\"all\")\n\n        g = ag.PairGrid(self.df, hue=\"a\", hue_order=order)\n        g.map_diag(plt.plot)\n\n        for line, level in zip(g.axes[0, 0].lines, order):\n            x, y = line.get_xydata().T\n            npt.assert_array_equal(x, self.df.loc[self.df.a == level, \"x\"])\n            npt.assert_array_equal(y, self.df.loc[self.df.a == level, \"x\"])\n\n        plt.close(\"all\")\n\n        g = ag.PairGrid(self.df, hue=\"a\", hue_order=order)\n        g.map_lower(plt.plot)\n\n        for line, level in zip(g.axes[1, 0].lines, order):\n            x, y = line.get_xydata().T\n            npt.assert_array_equal(x, self.df.loc[self.df.a == level, \"x\"])\n            npt.assert_array_equal(y, self.df.loc[self.df.a == level, \"y\"])\n\n        plt.close(\"all\")\n\n        g = ag.PairGrid(self.df, hue=\"a\", hue_order=order)\n        g.map_upper(plt.plot)\n\n        for line, level in zip(g.axes[0, 1].lines, order):\n            x, y = line.get_xydata().T\n            npt.assert_array_equal(x, self.df.loc[self.df.a == level, \"y\"])\n            npt.assert_array_equal(y, self.df.loc[self.df.a == level, \"x\"])\n\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_hue_order_missing_level_TestPairGrid.test_hue_order_missing_level.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_hue_order_missing_level_TestPairGrid.test_hue_order_missing_level.None_7", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1130, "end_line": 1171, "span_ids": ["TestPairGrid.test_hue_order_missing_level"], "tokens": 439}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_hue_order_missing_level(self):\n\n        order = list(\"dcaeb\")\n        g = ag.PairGrid(self.df, hue=\"a\", hue_order=order)\n        g.map(plt.plot)\n\n        for line, level in zip(g.axes[1, 0].lines, order):\n            x, y = line.get_xydata().T\n            npt.assert_array_equal(x, self.df.loc[self.df.a == level, \"x\"])\n            npt.assert_array_equal(y, self.df.loc[self.df.a == level, \"y\"])\n\n        plt.close(\"all\")\n\n        g = ag.PairGrid(self.df, hue=\"a\", hue_order=order)\n        g.map_diag(plt.plot)\n\n        for line, level in zip(g.axes[0, 0].lines, order):\n            x, y = line.get_xydata().T\n            npt.assert_array_equal(x, self.df.loc[self.df.a == level, \"x\"])\n            npt.assert_array_equal(y, self.df.loc[self.df.a == level, \"x\"])\n\n        plt.close(\"all\")\n\n        g = ag.PairGrid(self.df, hue=\"a\", hue_order=order)\n        g.map_lower(plt.plot)\n\n        for line, level in zip(g.axes[1, 0].lines, order):\n            x, y = line.get_xydata().T\n            npt.assert_array_equal(x, self.df.loc[self.df.a == level, \"x\"])\n            npt.assert_array_equal(y, self.df.loc[self.df.a == level, \"y\"])\n\n        plt.close(\"all\")\n\n        g = ag.PairGrid(self.df, hue=\"a\", hue_order=order)\n        g.map_upper(plt.plot)\n\n        for line, level in zip(g.axes[0, 1].lines, order):\n            x, y = line.get_xydata().T\n            npt.assert_array_equal(x, self.df.loc[self.df.a == level, \"y\"])\n            npt.assert_array_equal(y, self.df.loc[self.df.a == level, \"x\"])\n\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_hue_in_map_TestPairGrid.test_nondefault_index.None_1.for_j_ax_in_enumerate_ax.for_k_k_level_in_enumera.npt_assert_array_equal_y_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_hue_in_map_TestPairGrid.test_nondefault_index.None_1.for_j_ax_in_enumerate_ax.for_k_k_level_in_enumera.npt_assert_array_equal_y_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1173, "end_line": 1209, "span_ids": ["TestPairGrid.test_nondefault_index", "TestPairGrid.test_hue_in_map"], "tokens": 368}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_hue_in_map(self, long_df):\n\n        g = ag.PairGrid(long_df, vars=[\"x\", \"y\"])\n        g.map(scatterplot, hue=long_df[\"a\"])\n        ax = g.axes.flat[0]\n        points = ax.collections[0]\n        assert len(set(map(tuple, points.get_facecolors()))) == 3\n\n    def test_nondefault_index(self):\n\n        df = self.df.copy().set_index(\"b\")\n\n        plot_vars = [\"x\", \"y\", \"z\"]\n        g1 = ag.PairGrid(df)\n        g1.map(plt.scatter)\n\n        for i, axes_i in enumerate(g1.axes):\n            for j, ax in enumerate(axes_i):\n                x_in = self.df[plot_vars[j]]\n                y_in = self.df[plot_vars[i]]\n                x_out, y_out = ax.collections[0].get_offsets().T\n                npt.assert_array_equal(x_in, x_out)\n                npt.assert_array_equal(y_in, y_out)\n\n        g2 = ag.PairGrid(df, hue=\"a\")\n        g2.map(plt.scatter)\n\n        for i, axes_i in enumerate(g2.axes):\n            for j, ax in enumerate(axes_i):\n                x_in = self.df[plot_vars[j]]\n                y_in = self.df[plot_vars[i]]\n                for k, k_level in enumerate(self.df.a.unique()):\n                    x_in_k = x_in[self.df.a == k_level]\n                    y_in_k = y_in[self.df.a == k_level]\n                    x_out, y_out = ax.collections[k].get_offsets().T\n                    npt.assert_array_equal(x_in_k, x_out)\n                    npt.assert_array_equal(y_in_k, y_out)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_dropna_TestPairGrid.test_histplot_legend.assert_len_g__legend_lege": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_dropna_TestPairGrid.test_histplot_legend.assert_len_g__legend_lege", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1211, "end_line": 1247, "span_ids": ["TestPairGrid.test_dropna", "TestPairGrid.test_histplot_legend"], "tokens": 312}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    @pytest.mark.parametrize(\"func\", [scatterplot, plt.scatter])\n    def test_dropna(self, func):\n\n        df = self.df.copy()\n        n_null = 20\n        df.loc[np.arange(n_null), \"x\"] = np.nan\n\n        plot_vars = [\"x\", \"y\", \"z\"]\n\n        g1 = ag.PairGrid(df, vars=plot_vars, dropna=True)\n        g1.map(func)\n\n        for i, axes_i in enumerate(g1.axes):\n            for j, ax in enumerate(axes_i):\n                x_in = df[plot_vars[j]]\n                y_in = df[plot_vars[i]]\n                x_out, y_out = ax.collections[0].get_offsets().T\n\n                n_valid = (x_in * y_in).notnull().sum()\n\n                assert n_valid == len(x_out)\n                assert n_valid == len(y_out)\n\n        g1.map_diag(histplot)\n        for i, ax in enumerate(g1.diag_axes):\n            var = plot_vars[i]\n            count = sum(p.get_height() for p in ax.patches)\n            assert count == df[var].notna().sum()\n\n    def test_histplot_legend(self):\n\n        # Tests _extract_legend_handles\n        g = ag.PairGrid(self.df, vars=[\"x\", \"y\"], hue=\"a\")\n        g.map_offdiag(histplot)\n        g.add_legend()\n\n        assert len(g._legend.legendHandles) == len(self.df[\"a\"].unique())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_pairplot_TestPairGrid.test_pairplot.None_4.assert_len_ax_collections": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_pairplot_TestPairGrid.test_pairplot.None_4.assert_len_ax_collections", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1249, "end_line": 1281, "span_ids": ["TestPairGrid.test_pairplot"], "tokens": 302}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_pairplot(self):\n\n        vars = [\"x\", \"y\", \"z\"]\n        g = ag.pairplot(self.df)\n\n        for ax in g.diag_axes:\n            assert len(ax.patches) > 1\n\n        for i, j in zip(*np.triu_indices_from(g.axes, 1)):\n            ax = g.axes[i, j]\n            x_in = self.df[vars[j]]\n            y_in = self.df[vars[i]]\n            x_out, y_out = ax.collections[0].get_offsets().T\n            npt.assert_array_equal(x_in, x_out)\n            npt.assert_array_equal(y_in, y_out)\n\n        for i, j in zip(*np.tril_indices_from(g.axes, -1)):\n            ax = g.axes[i, j]\n            x_in = self.df[vars[j]]\n            y_in = self.df[vars[i]]\n            x_out, y_out = ax.collections[0].get_offsets().T\n            npt.assert_array_equal(x_in, x_out)\n            npt.assert_array_equal(y_in, y_out)\n\n        for i, j in zip(*np.diag_indices_from(g.axes)):\n            ax = g.axes[i, j]\n            assert len(ax.collections) == 0\n\n        g = ag.pairplot(self.df, hue=\"a\")\n        n = len(self.df.a.unique())\n\n        for ax in g.diag_axes:\n            assert len(ax.collections) == n", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_pairplot_reg_TestPairGrid.test_pairplot_reg.for_i_j_in_zip_np_diag_.assert_len_ax_collections": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_pairplot_reg_TestPairGrid.test_pairplot_reg.for_i_j_in_zip_np_diag_.assert_len_ax_collections", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1283, "end_line": 1315, "span_ids": ["TestPairGrid.test_pairplot_reg"], "tokens": 309}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_pairplot_reg(self):\n\n        vars = [\"x\", \"y\", \"z\"]\n        g = ag.pairplot(self.df, diag_kind=\"hist\", kind=\"reg\")\n\n        for ax in g.diag_axes:\n            assert len(ax.patches)\n\n        for i, j in zip(*np.triu_indices_from(g.axes, 1)):\n            ax = g.axes[i, j]\n            x_in = self.df[vars[j]]\n            y_in = self.df[vars[i]]\n            x_out, y_out = ax.collections[0].get_offsets().T\n            npt.assert_array_equal(x_in, x_out)\n            npt.assert_array_equal(y_in, y_out)\n\n            assert len(ax.lines) == 1\n            assert len(ax.collections) == 2\n\n        for i, j in zip(*np.tril_indices_from(g.axes, -1)):\n            ax = g.axes[i, j]\n            x_in = self.df[vars[j]]\n            y_in = self.df[vars[i]]\n            x_out, y_out = ax.collections[0].get_offsets().T\n            npt.assert_array_equal(x_in, x_out)\n            npt.assert_array_equal(y_in, y_out)\n\n            assert len(ax.lines) == 1\n            assert len(ax.collections) == 2\n\n        for i, j in zip(*np.diag_indices_from(g.axes)):\n            ax = g.axes[i, j]\n            assert len(ax.collections) == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_pairplot_reg_hue_TestPairGrid.test_pairplot_reg_hue.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_pairplot_reg_hue_TestPairGrid.test_pairplot_reg_hue.None_1", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1317, "end_line": 1329, "span_ids": ["TestPairGrid.test_pairplot_reg_hue"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_pairplot_reg_hue(self):\n\n        markers = [\"o\", \"s\", \"d\"]\n        g = ag.pairplot(self.df, kind=\"reg\", hue=\"a\", markers=markers)\n\n        ax = g.axes[-1, 0]\n        c1 = ax.collections[0]\n        c2 = ax.collections[2]\n\n        assert not np.array_equal(c1.get_facecolor(), c2.get_facecolor())\n        assert not np.array_equal(\n            c1.get_paths()[0].vertices, c2.get_paths()[0].vertices,\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_pairplot_diag_kde_TestPairGrid.test_pairplot_diag_kde.for_i_j_in_zip_np_diag_.assert_len_ax_collections": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_pairplot_diag_kde_TestPairGrid.test_pairplot_diag_kde.for_i_j_in_zip_np_diag_.assert_len_ax_collections", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1331, "end_line": 1357, "span_ids": ["TestPairGrid.test_pairplot_diag_kde"], "tokens": 271}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_pairplot_diag_kde(self):\n\n        vars = [\"x\", \"y\", \"z\"]\n        g = ag.pairplot(self.df, diag_kind=\"kde\")\n\n        for ax in g.diag_axes:\n            assert len(ax.collections) == 1\n\n        for i, j in zip(*np.triu_indices_from(g.axes, 1)):\n            ax = g.axes[i, j]\n            x_in = self.df[vars[j]]\n            y_in = self.df[vars[i]]\n            x_out, y_out = ax.collections[0].get_offsets().T\n            npt.assert_array_equal(x_in, x_out)\n            npt.assert_array_equal(y_in, y_out)\n\n        for i, j in zip(*np.tril_indices_from(g.axes, -1)):\n            ax = g.axes[i, j]\n            x_in = self.df[vars[j]]\n            y_in = self.df[vars[i]]\n            x_out, y_out = ax.collections[0].get_offsets().T\n            npt.assert_array_equal(x_in, x_out)\n            npt.assert_array_equal(y_in, y_out)\n\n        for i, j in zip(*np.diag_indices_from(g.axes)):\n            ax = g.axes[i, j]\n            assert len(ax.collections) == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_pairplot_kde_TestPairGrid.test_pairplot_hist.assert_plots_equal_ax1_a": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_pairplot_kde_TestPairGrid.test_pairplot_hist.assert_plots_equal_ax1_a", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1359, "end_line": 1377, "span_ids": ["TestPairGrid.test_pairplot_kde", "TestPairGrid.test_pairplot_hist"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_pairplot_kde(self):\n\n        f, ax1 = plt.subplots()\n        kdeplot(data=self.df, x=\"x\", y=\"y\", ax=ax1)\n\n        g = ag.pairplot(self.df, kind=\"kde\")\n        ax2 = g.axes[1, 0]\n\n        assert_plots_equal(ax1, ax2, labels=False)\n\n    def test_pairplot_hist(self):\n\n        f, ax1 = plt.subplots()\n        histplot(data=self.df, x=\"x\", y=\"y\", ax=ax1)\n\n        g = ag.pairplot(self.df, kind=\"hist\")\n        ax2 = g.axes[1, 0]\n\n        assert_plots_equal(ax1, ax2, labels=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointGrid_TestJointGrid.test_axlims.assert_g_ax_marg_y_get_yl": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointGrid_TestJointGrid.test_axlims.assert_g_ax_marg_y_get_yl", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1412, "end_line": 1481, "span_ids": ["TestJointGrid.test_margin_grid_from_lists", "TestJointGrid.test_margin_grid_axis_labels", "TestJointGrid.test_axlims", "TestJointGrid.test_dropna", "TestJointGrid.test_margin_grid_from_dataframe", "TestJointGrid.test_margin_grid_from_series", "TestJointGrid.test_margin_grid_from_arrays", "TestJointGrid.test_margin_grid_from_dataframe_bad_variable", "TestJointGrid"], "tokens": 594}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestJointGrid:\n\n    rs = np.random.RandomState(sum(map(ord, \"JointGrid\")))\n    x = rs.randn(100)\n    y = rs.randn(100)\n    x_na = x.copy()\n    x_na[10] = np.nan\n    x_na[20] = np.nan\n    data = pd.DataFrame(dict(x=x, y=y, x_na=x_na))\n\n    def test_margin_grid_from_lists(self):\n\n        g = ag.JointGrid(x=self.x.tolist(), y=self.y.tolist())\n        npt.assert_array_equal(g.x, self.x)\n        npt.assert_array_equal(g.y, self.y)\n\n    def test_margin_grid_from_arrays(self):\n\n        g = ag.JointGrid(x=self.x, y=self.y)\n        npt.assert_array_equal(g.x, self.x)\n        npt.assert_array_equal(g.y, self.y)\n\n    def test_margin_grid_from_series(self):\n\n        g = ag.JointGrid(x=self.data.x, y=self.data.y)\n        npt.assert_array_equal(g.x, self.x)\n        npt.assert_array_equal(g.y, self.y)\n\n    def test_margin_grid_from_dataframe(self):\n\n        g = ag.JointGrid(x=\"x\", y=\"y\", data=self.data)\n        npt.assert_array_equal(g.x, self.x)\n        npt.assert_array_equal(g.y, self.y)\n\n    def test_margin_grid_from_dataframe_bad_variable(self):\n\n        with pytest.raises(ValueError):\n            ag.JointGrid(x=\"x\", y=\"bad_column\", data=self.data)\n\n    def test_margin_grid_axis_labels(self):\n\n        g = ag.JointGrid(x=\"x\", y=\"y\", data=self.data)\n\n        xlabel, ylabel = g.ax_joint.get_xlabel(), g.ax_joint.get_ylabel()\n        assert xlabel == \"x\"\n        assert ylabel == \"y\"\n\n        g.set_axis_labels(\"x variable\", \"y variable\")\n        xlabel, ylabel = g.ax_joint.get_xlabel(), g.ax_joint.get_ylabel()\n        assert xlabel == \"x variable\"\n        assert ylabel == \"y variable\"\n\n    def test_dropna(self):\n\n        g = ag.JointGrid(x=\"x_na\", y=\"y\", data=self.data, dropna=False)\n        assert len(g.x) == len(self.x_na)\n\n        g = ag.JointGrid(x=\"x_na\", y=\"y\", data=self.data, dropna=True)\n        assert len(g.x) == pd.notnull(self.x_na).sum()\n\n    def test_axlims(self):\n\n        lim = (-3, 3)\n        g = ag.JointGrid(x=\"x\", y=\"y\", data=self.data, xlim=lim, ylim=lim)\n\n        assert g.ax_joint.get_xlim() == lim\n        assert g.ax_joint.get_ylim() == lim\n\n        assert g.ax_marg_x.get_xlim() == lim\n        assert g.ax_marg_y.get_ylim() == lim", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointGrid.test_marginal_ticks_TestJointGrid.test_marginal_ticks.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointGrid.test_marginal_ticks_TestJointGrid.test_marginal_ticks.None_3", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1483, "end_line": 1491, "span_ids": ["TestJointGrid.test_marginal_ticks"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestJointGrid:\n\n    def test_marginal_ticks(self):\n\n        g = ag.JointGrid(marginal_ticks=False)\n        assert not sum(t.get_visible() for t in g.ax_marg_x.get_yticklabels())\n        assert not sum(t.get_visible() for t in g.ax_marg_y.get_xticklabels())\n\n        g = ag.JointGrid(marginal_ticks=True)\n        assert sum(t.get_visible() for t in g.ax_marg_x.get_yticklabels())\n        assert sum(t.get_visible() for t in g.ax_marg_y.get_xticklabels())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointGrid.test_bivariate_plot_TestJointGrid.test_univariate_plot.npt_assert_array_equal_y1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointGrid.test_bivariate_plot_TestJointGrid.test_univariate_plot.npt_assert_array_equal_y1", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1493, "end_line": 1509, "span_ids": ["TestJointGrid.test_univariate_plot", "TestJointGrid.test_bivariate_plot"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestJointGrid:\n\n    def test_bivariate_plot(self):\n\n        g = ag.JointGrid(x=\"x\", y=\"y\", data=self.data)\n        g.plot_joint(plt.plot)\n\n        x, y = g.ax_joint.lines[0].get_xydata().T\n        npt.assert_array_equal(x, self.x)\n        npt.assert_array_equal(y, self.y)\n\n    def test_univariate_plot(self):\n\n        g = ag.JointGrid(x=\"x\", y=\"x\", data=self.data)\n        g.plot_marginals(kdeplot)\n\n        _, y1 = g.ax_marg_x.lines[0].get_xydata().T\n        y2, _ = g.ax_marg_y.lines[0].get_xydata().T\n        npt.assert_array_equal(y1, y2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointGrid.test_univariate_plot_distplot_TestJointGrid.test_univariate_plot_matplotlib.assert_len_g_ax_marg_y_pa": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointGrid.test_univariate_plot_distplot_TestJointGrid.test_univariate_plot_matplotlib.assert_len_g_ax_marg_y_pa", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1511, "end_line": 1528, "span_ids": ["TestJointGrid.test_univariate_plot_matplotlib", "TestJointGrid.test_univariate_plot_distplot"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestJointGrid:\n\n    def test_univariate_plot_distplot(self):\n\n        bins = 10\n        g = ag.JointGrid(x=\"x\", y=\"x\", data=self.data)\n        with pytest.warns(UserWarning):\n            g.plot_marginals(distplot, bins=bins)\n        assert len(g.ax_marg_x.patches) == bins\n        assert len(g.ax_marg_y.patches) == bins\n        for x, y in zip(g.ax_marg_x.patches, g.ax_marg_y.patches):\n            assert x.get_height() == y.get_width()\n\n    def test_univariate_plot_matplotlib(self):\n\n        bins = 10\n        g = ag.JointGrid(x=\"x\", y=\"x\", data=self.data)\n        g.plot_marginals(plt.hist, bins=bins)\n        assert len(g.ax_marg_x.patches) == bins\n        assert len(g.ax_marg_y.patches) == bins", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointGrid.test_plot_TestJointGrid.test_space.assert_joint_bounds_3_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointGrid.test_plot_TestJointGrid.test_space.assert_joint_bounds_3_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1530, "end_line": 1552, "span_ids": ["TestJointGrid.test_plot", "TestJointGrid.test_space"], "tokens": 230}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestJointGrid:\n\n    def test_plot(self):\n\n        g = ag.JointGrid(x=\"x\", y=\"x\", data=self.data)\n        g.plot(plt.plot, kdeplot)\n\n        x, y = g.ax_joint.lines[0].get_xydata().T\n        npt.assert_array_equal(x, self.x)\n        npt.assert_array_equal(y, self.x)\n\n        _, y1 = g.ax_marg_x.lines[0].get_xydata().T\n        y2, _ = g.ax_marg_y.lines[0].get_xydata().T\n        npt.assert_array_equal(y1, y2)\n\n    def test_space(self):\n\n        g = ag.JointGrid(x=\"x\", y=\"y\", data=self.data, space=0)\n\n        joint_bounds = g.ax_joint.bbox.bounds\n        marg_x_bounds = g.ax_marg_x.bbox.bounds\n        marg_y_bounds = g.ax_marg_y.bbox.bounds\n\n        assert joint_bounds[2] == marg_x_bounds[2]\n        assert joint_bounds[3] == marg_y_bounds[3]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointGrid.test_hue_TestJointGrid.test_hue.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointGrid.test_hue_TestJointGrid.test_hue.None_7", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1554, "end_line": 1577, "span_ids": ["TestJointGrid.test_hue"], "tokens": 262}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestJointGrid:\n\n    @pytest.mark.parametrize(\n        \"as_vector\", [True, False],\n    )\n    def test_hue(self, long_df, as_vector):\n\n        if as_vector:\n            data = None\n            x, y, hue = long_df[\"x\"], long_df[\"y\"], long_df[\"a\"]\n        else:\n            data = long_df\n            x, y, hue = \"x\", \"y\", \"a\"\n\n        g = ag.JointGrid(data=data, x=x, y=y, hue=hue)\n        g.plot_joint(scatterplot)\n        g.plot_marginals(histplot)\n\n        g2 = ag.JointGrid()\n        scatterplot(data=long_df, x=x, y=y, hue=hue, ax=g2.ax_joint)\n        histplot(data=long_df, x=x, hue=hue, ax=g2.ax_marg_x)\n        histplot(data=long_df, y=y, hue=hue, ax=g2.ax_marg_y)\n\n        assert_plots_equal(g.ax_joint, g2.ax_joint)\n        assert_plots_equal(g.ax_marg_x, g2.ax_marg_x, labels=False)\n        assert_plots_equal(g.ax_marg_y, g2.ax_marg_y, labels=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointGrid.test_refline_TestJointGrid.test_refline.None_13": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointGrid.test_refline_TestJointGrid.test_refline.None_13", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1579, "end_line": 1620, "span_ids": ["TestJointGrid.test_refline"], "tokens": 595}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestJointGrid:\n\n    def test_refline(self):\n\n        g = ag.JointGrid(x=\"x\", y=\"y\", data=self.data)\n        g.plot(scatterplot, histplot)\n        g.refline()\n        assert not g.ax_joint.lines and not g.ax_marg_x.lines and not g.ax_marg_y.lines\n\n        refx = refy = 0.5\n        hline = np.array([[0, refy], [1, refy]])\n        vline = np.array([[refx, 0], [refx, 1]])\n        g.refline(x=refx, y=refy, joint=False, marginal=False)\n        assert not g.ax_joint.lines and not g.ax_marg_x.lines and not g.ax_marg_y.lines\n\n        g.refline(x=refx, y=refy)\n        assert g.ax_joint.lines[0].get_color() == '.5'\n        assert g.ax_joint.lines[0].get_linestyle() == '--'\n        assert len(g.ax_joint.lines) == 2\n        assert len(g.ax_marg_x.lines) == 1\n        assert len(g.ax_marg_y.lines) == 1\n        npt.assert_array_equal(g.ax_joint.lines[0].get_xydata(), vline)\n        npt.assert_array_equal(g.ax_joint.lines[1].get_xydata(), hline)\n        npt.assert_array_equal(g.ax_marg_x.lines[0].get_xydata(), vline)\n        npt.assert_array_equal(g.ax_marg_y.lines[0].get_xydata(), hline)\n\n        color, linestyle = 'red', '-'\n        g.refline(x=refx, marginal=False, color=color, linestyle=linestyle)\n        npt.assert_array_equal(g.ax_joint.lines[-1].get_xydata(), vline)\n        assert g.ax_joint.lines[-1].get_color() == color\n        assert g.ax_joint.lines[-1].get_linestyle() == linestyle\n        assert len(g.ax_marg_x.lines) == len(g.ax_marg_y.lines)\n\n        g.refline(x=refx, joint=False)\n        npt.assert_array_equal(g.ax_marg_x.lines[-1].get_xydata(), vline)\n        assert len(g.ax_marg_x.lines) == len(g.ax_marg_y.lines) + 1\n\n        g.refline(y=refy, joint=False)\n        npt.assert_array_equal(g.ax_marg_y.lines[-1].get_xydata(), hline)\n        assert len(g.ax_marg_x.lines) == len(g.ax_marg_y.lines)\n\n        g.refline(y=refy, marginal=False)\n        npt.assert_array_equal(g.ax_joint.lines[-1].get_xydata(), hline)\n        assert len(g.ax_marg_x.lines) == len(g.ax_marg_y.lines)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot_TestJointPlot.test_scatter.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot_TestJointPlot.test_scatter.None_3", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1623, "end_line": 1647, "span_ids": ["TestJointPlot", "TestJointPlot.test_scatter"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestJointPlot:\n\n    rs = np.random.RandomState(sum(map(ord, \"jointplot\")))\n    x = rs.randn(100)\n    y = rs.randn(100)\n    data = pd.DataFrame(dict(x=x, y=y))\n\n    def test_scatter(self):\n\n        g = ag.jointplot(x=\"x\", y=\"y\", data=self.data)\n        assert len(g.ax_joint.collections) == 1\n\n        x, y = g.ax_joint.collections[0].get_offsets().T\n        assert_array_equal(self.x, x)\n        assert_array_equal(self.y, y)\n\n        assert_array_equal(\n            [b.get_x() for b in g.ax_marg_x.patches],\n            np.histogram_bin_edges(self.x, \"auto\")[:-1],\n        )\n\n        assert_array_equal(\n            [b.get_y() for b in g.ax_marg_y.patches],\n            np.histogram_bin_edges(self.y, \"auto\")[:-1],\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot.test_scatter_hue_TestJointPlot.test_scatter_hue.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot.test_scatter_hue_TestJointPlot.test_scatter_hue.None_5", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1649, "end_line": 1660, "span_ids": ["TestJointPlot.test_scatter_hue"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestJointPlot:\n\n    def test_scatter_hue(self, long_df):\n\n        g1 = ag.jointplot(data=long_df, x=\"x\", y=\"y\", hue=\"a\")\n\n        g2 = ag.JointGrid()\n        scatterplot(data=long_df, x=\"x\", y=\"y\", hue=\"a\", ax=g2.ax_joint)\n        kdeplot(data=long_df, x=\"x\", hue=\"a\", ax=g2.ax_marg_x, fill=True)\n        kdeplot(data=long_df, y=\"y\", hue=\"a\", ax=g2.ax_marg_y, fill=True)\n\n        assert_plots_equal(g1.ax_joint, g2.ax_joint)\n        assert_plots_equal(g1.ax_marg_x, g2.ax_marg_x, labels=False)\n        assert_plots_equal(g1.ax_marg_y, g2.ax_marg_y, labels=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot.test_reg_TestJointPlot.test_resid.assert_not_g_ax_marg_y_li": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot.test_reg_TestJointPlot.test_resid.assert_not_g_ax_marg_y_li", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1662, "end_line": 1683, "span_ids": ["TestJointPlot.test_resid", "TestJointPlot.test_reg"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestJointPlot:\n\n    def test_reg(self):\n\n        g = ag.jointplot(x=\"x\", y=\"y\", data=self.data, kind=\"reg\")\n        assert len(g.ax_joint.collections) == 2\n\n        x, y = g.ax_joint.collections[0].get_offsets().T\n        assert_array_equal(self.x, x)\n        assert_array_equal(self.y, y)\n\n        assert g.ax_marg_x.patches\n        assert g.ax_marg_y.patches\n\n        assert g.ax_marg_x.lines\n        assert g.ax_marg_y.lines\n\n    def test_resid(self):\n\n        g = ag.jointplot(x=\"x\", y=\"y\", data=self.data, kind=\"resid\")\n        assert g.ax_joint.collections\n        assert g.ax_joint.lines\n        assert not g.ax_marg_x.lines\n        assert not g.ax_marg_y.lines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot.test_hist_TestJointPlot.test_hist.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot.test_hist_TestJointPlot.test_hist.None_5", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1685, "end_line": 1697, "span_ids": ["TestJointPlot.test_hist"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestJointPlot:\n\n    def test_hist(self, long_df):\n\n        bins = 3, 6\n        g1 = ag.jointplot(data=long_df, x=\"x\", y=\"y\", kind=\"hist\", bins=bins)\n\n        g2 = ag.JointGrid()\n        histplot(data=long_df, x=\"x\", y=\"y\", ax=g2.ax_joint, bins=bins)\n        histplot(data=long_df, x=\"x\", ax=g2.ax_marg_x, bins=bins[0])\n        histplot(data=long_df, y=\"y\", ax=g2.ax_marg_y, bins=bins[1])\n\n        assert_plots_equal(g1.ax_joint, g2.ax_joint)\n        assert_plots_equal(g1.ax_marg_x, g2.ax_marg_x, labels=False)\n        assert_plots_equal(g1.ax_marg_y, g2.ax_marg_y, labels=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot.test_hex_TestJointPlot.test_kde.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot.test_hex_TestJointPlot.test_kde.None_5", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1699, "end_line": 1717, "span_ids": ["TestJointPlot.test_kde", "TestJointPlot.test_hex"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestJointPlot:\n\n    def test_hex(self):\n\n        g = ag.jointplot(x=\"x\", y=\"y\", data=self.data, kind=\"hex\")\n        assert g.ax_joint.collections\n        assert g.ax_marg_x.patches\n        assert g.ax_marg_y.patches\n\n    def test_kde(self, long_df):\n\n        g1 = ag.jointplot(data=long_df, x=\"x\", y=\"y\", kind=\"kde\")\n\n        g2 = ag.JointGrid()\n        kdeplot(data=long_df, x=\"x\", y=\"y\", ax=g2.ax_joint)\n        kdeplot(data=long_df, x=\"x\", ax=g2.ax_marg_x)\n        kdeplot(data=long_df, y=\"y\", ax=g2.ax_marg_y)\n\n        assert_plots_equal(g1.ax_joint, g2.ax_joint)\n        assert_plots_equal(g1.ax_marg_x, g2.ax_marg_x, labels=False)\n        assert_plots_equal(g1.ax_marg_y, g2.ax_marg_y, labels=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot.test_kde_hue_TestJointPlot.test_kde_hue.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot.test_kde_hue_TestJointPlot.test_kde_hue.None_5", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1719, "end_line": 1730, "span_ids": ["TestJointPlot.test_kde_hue"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestJointPlot:\n\n    def test_kde_hue(self, long_df):\n\n        g1 = ag.jointplot(data=long_df, x=\"x\", y=\"y\", hue=\"a\", kind=\"kde\")\n\n        g2 = ag.JointGrid()\n        kdeplot(data=long_df, x=\"x\", y=\"y\", hue=\"a\", ax=g2.ax_joint)\n        kdeplot(data=long_df, x=\"x\", hue=\"a\", ax=g2.ax_marg_x)\n        kdeplot(data=long_df, y=\"y\", hue=\"a\", ax=g2.ax_marg_y)\n\n        assert_plots_equal(g1.ax_joint, g2.ax_joint)\n        assert_plots_equal(g1.ax_marg_x, g2.ax_marg_x, labels=False)\n        assert_plots_equal(g1.ax_marg_y, g2.ax_marg_y, labels=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot.test_color_TestJointPlot.test_palette.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot.test_color_TestJointPlot.test_palette.None_5", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1732, "end_line": 1755, "span_ids": ["TestJointPlot.test_palette", "TestJointPlot.test_color"], "tokens": 271}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestJointPlot:\n\n    def test_color(self):\n\n        g = ag.jointplot(x=\"x\", y=\"y\", data=self.data, color=\"purple\")\n\n        scatter_color = g.ax_joint.collections[0].get_facecolor()\n        assert_colors_equal(scatter_color, \"purple\")\n\n        hist_color = g.ax_marg_x.patches[0].get_facecolor()[:3]\n        assert_colors_equal(hist_color, \"purple\")\n\n    def test_palette(self, long_df):\n\n        kws = dict(data=long_df, hue=\"a\", palette=\"Set2\")\n\n        g1 = ag.jointplot(x=\"x\", y=\"y\", **kws)\n\n        g2 = ag.JointGrid()\n        scatterplot(x=\"x\", y=\"y\", ax=g2.ax_joint, **kws)\n        kdeplot(x=\"x\", ax=g2.ax_marg_x, fill=True, **kws)\n        kdeplot(y=\"y\", ax=g2.ax_marg_y, fill=True, **kws)\n\n        assert_plots_equal(g1.ax_joint, g2.ax_joint)\n        assert_plots_equal(g1.ax_marg_x, g2.ax_marg_x, labels=False)\n        assert_plots_equal(g1.ax_marg_y, g2.ax_marg_y, labels=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot.test_hex_customise_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestJointPlot.test_hex_customise_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1806, "end_line": 1848, "span_ids": ["TestJointPlot.test_ax_warning", "TestJointPlot.test_unsupported_hue_kind", "TestJointPlot.test_leaky_dict", "TestJointPlot.test_distplot_kwarg_warning", "TestJointPlot.test_hex_customise", "TestJointPlot.test_bad_kind"], "tokens": 409}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestJointPlot:\n\n    def test_hex_customise(self):\n\n        # test that default gridsize can be overridden\n        g = ag.jointplot(x=\"x\", y=\"y\", data=self.data, kind=\"hex\",\n                         joint_kws=dict(gridsize=5))\n        assert len(g.ax_joint.collections) == 1\n        a = g.ax_joint.collections[0].get_array()\n        assert a.shape[0] == 28  # 28 hexagons expected for gridsize 5\n\n    def test_bad_kind(self):\n\n        with pytest.raises(ValueError):\n            ag.jointplot(x=\"x\", y=\"y\", data=self.data, kind=\"not_a_kind\")\n\n    def test_unsupported_hue_kind(self):\n\n        for kind in [\"reg\", \"resid\", \"hex\"]:\n            with pytest.raises(ValueError):\n                ag.jointplot(x=\"x\", y=\"y\", hue=\"a\", data=self.data, kind=kind)\n\n    def test_leaky_dict(self):\n        # Validate input dicts are unchanged by jointplot plotting function\n\n        for kwarg in (\"joint_kws\", \"marginal_kws\"):\n            for kind in (\"hex\", \"kde\", \"resid\", \"reg\", \"scatter\"):\n                empty_dict = {}\n                ag.jointplot(x=\"x\", y=\"y\", data=self.data, kind=kind,\n                             **{kwarg: empty_dict})\n                assert empty_dict == {}\n\n    def test_distplot_kwarg_warning(self, long_df):\n\n        with pytest.warns(UserWarning):\n            g = ag.jointplot(data=long_df, x=\"x\", y=\"y\", marginal_kws=dict(rug=True))\n        assert g.ax_marg_x.patches\n\n    def test_ax_warning(self, long_df):\n\n        ax = plt.gca()\n        with pytest.warns(UserWarning):\n            g = ag.jointplot(data=long_df, x=\"x\", y=\"y\", ax=ax)\n        assert g.ax_joint.collections", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_itertools_PLOT_FUNCS._": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_itertools_PLOT_FUNCS._", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 40, "span_ids": ["impl", "imports"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import itertools\nfrom functools import partial\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nfrom matplotlib.colors import rgb2hex, same_color, to_rgb, to_rgba\n\nimport pytest\nfrom pytest import approx\nimport numpy.testing as npt\nfrom numpy.testing import (\n    assert_array_equal,\n    assert_array_less,\n)\n\nfrom seaborn import categorical as cat\nfrom seaborn import palettes\n\nfrom seaborn.external.version import Version\nfrom seaborn._oldcore import categorical_order\nfrom seaborn.categorical import (\n    _CategoricalPlotterNew,\n    Beeswarm,\n    catplot,\n    stripplot,\n    swarmplot,\n)\nfrom seaborn.palettes import color_palette\nfrom seaborn.utils import _normal_quantile_func, _draw_figure\nfrom seaborn._compat import get_colormap\nfrom seaborn._testing import assert_plots_equal\n\n\nPLOT_FUNCS = [\n    catplot,\n    stripplot,\n    swarmplot,\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotterNew_TestCategoricalPlotterNew.test_axis_labels.for_axis_in_xy_.assert_label_func_va": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotterNew_TestCategoricalPlotterNew.test_axis_labels.for_axis_in_xy_.assert_label_func_va", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 42, "end_line": 64, "span_ids": ["TestCategoricalPlotterNew.test_axis_labels", "TestCategoricalPlotterNew"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalPlotterNew:\n\n    @pytest.mark.parametrize(\n        \"func,kwargs\",\n        itertools.product(\n            PLOT_FUNCS,\n            [\n                {\"x\": \"x\", \"y\": \"a\"},\n                {\"x\": \"a\", \"y\": \"y\"},\n                {\"x\": \"y\"},\n                {\"y\": \"x\"},\n            ],\n        ),\n    )\n    def test_axis_labels(self, long_df, func, kwargs):\n\n        func(data=long_df, **kwargs)\n\n        ax = plt.gca()\n        for axis in \"xy\":\n            val = kwargs.get(axis, \"\")\n            label_func = getattr(ax, f\"get_{axis}label\")\n            assert label_func() == val", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotterNew.test_empty_TestCategoricalPlotterNew.test_redundant_hue_backcompat.assert_all_isinstance_k_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotterNew.test_empty_TestCategoricalPlotterNew.test_redundant_hue_backcompat.assert_all_isinstance_k_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 66, "end_line": 96, "span_ids": ["TestCategoricalPlotterNew.test_empty", "TestCategoricalPlotterNew.test_redundant_hue_backcompat"], "tokens": 225}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalPlotterNew:\n\n    @pytest.mark.parametrize(\"func\", PLOT_FUNCS)\n    def test_empty(self, func):\n\n        func()\n        ax = plt.gca()\n        assert not ax.collections\n        assert not ax.patches\n        assert not ax.lines\n\n        func(x=[], y=[])\n        ax = plt.gca()\n        assert not ax.collections\n        assert not ax.patches\n        assert not ax.lines\n\n    def test_redundant_hue_backcompat(self, long_df):\n\n        p = _CategoricalPlotterNew(\n            data=long_df,\n            variables={\"x\": \"s\", \"y\": \"y\"},\n        )\n\n        color = None\n        palette = dict(zip(long_df[\"s\"].unique(), color_palette()))\n        hue_order = None\n\n        palette, _ = p._hue_backcompat(color, palette, hue_order, force_hue=True)\n\n        assert p.variables[\"hue\"] == \"s\"\n        assert_array_equal(p.plot_data[\"hue\"], p.plot_data[\"x\"])\n        assert all(isinstance(k, str) for k in palette)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_CategoricalFixture_CategoricalFixture.get_box_artists.if_Version_mpl___version_.else_.return._p_for_p_in_ax_patches_if": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_CategoricalFixture_CategoricalFixture.get_box_artists.if_Version_mpl___version_.else_.return._p_for_p_in_ax_patches_if", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 99, "end_line": 119, "span_ids": ["CategoricalFixture.get_box_artists", "CategoricalFixture"], "tokens": 261}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CategoricalFixture:\n    \"\"\"Test boxplot (also base class for things like violinplots).\"\"\"\n    rs = np.random.RandomState(30)\n    n_total = 60\n    x = rs.randn(int(n_total / 3), 3)\n    x_df = pd.DataFrame(x, columns=pd.Series(list(\"XYZ\"), name=\"big\"))\n    y = pd.Series(rs.randn(n_total), name=\"y_data\")\n    y_perm = y.reindex(rs.choice(y.index, y.size, replace=False))\n    g = pd.Series(np.repeat(list(\"abc\"), int(n_total / 3)), name=\"small\")\n    h = pd.Series(np.tile(list(\"mn\"), int(n_total / 2)), name=\"medium\")\n    u = pd.Series(np.tile(list(\"jkh\"), int(n_total / 3)))\n    df = pd.DataFrame(dict(y=y, g=g, h=h, u=u))\n    x_df[\"W\"] = g\n\n    def get_box_artists(self, ax):\n\n        if Version(mpl.__version__) < Version(\"3.5.0b0\"):\n            return ax.artists\n        else:\n            # Exclude labeled patches, which are for the legend\n            return [p for p in ax.patches if not p.get_label()]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter_TestCategoricalPlotter.test_wide_df_data.with_pytest_raises_ValueE.p_establish_variables_hue": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter_TestCategoricalPlotter.test_wide_df_data.with_pytest_raises_ValueE.p_establish_variables_hue", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 122, "end_line": 147, "span_ids": ["TestCategoricalPlotter.test_wide_df_data", "TestCategoricalPlotter"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalPlotter(CategoricalFixture):\n\n    def test_wide_df_data(self):\n\n        p = cat._CategoricalPlotter()\n\n        # Test basic wide DataFrame\n        p.establish_variables(data=self.x_df)\n\n        # Check data attribute\n        for x, y, in zip(p.plot_data, self.x_df[[\"X\", \"Y\", \"Z\"]].values.T):\n            npt.assert_array_equal(x, y)\n\n        # Check semantic attributes\n        assert p.orient == \"v\"\n        assert p.plot_hues is None\n        assert p.group_label == \"big\"\n        assert p.value_label is None\n\n        # Test wide dataframe with forced horizontal orientation\n        p.establish_variables(data=self.x_df, orient=\"horiz\")\n        assert p.orient == \"h\"\n\n        # Test exception by trying to hue-group with a wide dataframe\n        with pytest.raises(ValueError):\n            p.establish_variables(hue=\"d\", data=self.x_df)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_1d_input_data_TestCategoricalPlotter.test_1d_input_data.None_12": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_1d_input_data_TestCategoricalPlotter.test_1d_input_data.None_12", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 149, "end_line": 178, "span_ids": ["TestCategoricalPlotter.test_1d_input_data"], "tokens": 298}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalPlotter(CategoricalFixture):\n\n    def test_1d_input_data(self):\n\n        p = cat._CategoricalPlotter()\n\n        # Test basic vector data\n        x_1d_array = self.x.ravel()\n        p.establish_variables(data=x_1d_array)\n        assert len(p.plot_data) == 1\n        assert len(p.plot_data[0]) == self.n_total\n        assert p.group_label is None\n        assert p.value_label is None\n\n        # Test basic vector data in list form\n        x_1d_list = x_1d_array.tolist()\n        p.establish_variables(data=x_1d_list)\n        assert len(p.plot_data) == 1\n        assert len(p.plot_data[0]) == self.n_total\n        assert p.group_label is None\n        assert p.value_label is None\n\n        # Test an object array that looks 1D but isn't\n        x_notreally_1d = np.array([self.x.ravel(),\n                                   self.x.ravel()[:int(self.n_total / 2)]],\n                                  dtype=object)\n        p.establish_variables(data=x_notreally_1d)\n        assert len(p.plot_data) == 2\n        assert len(p.plot_data[0]) == self.n_total\n        assert len(p.plot_data[1]) == self.n_total / 2\n        assert p.group_label is None\n        assert p.value_label is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_2d_input_data_TestCategoricalPlotter.test_2d_input_data.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_2d_input_data_TestCategoricalPlotter.test_2d_input_data.None_7", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 180, "end_line": 198, "span_ids": ["TestCategoricalPlotter.test_2d_input_data"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalPlotter(CategoricalFixture):\n\n    def test_2d_input_data(self):\n\n        p = cat._CategoricalPlotter()\n\n        x = self.x[:, 0]\n\n        # Test vector data that looks 2D but doesn't really have columns\n        p.establish_variables(data=x[:, np.newaxis])\n        assert len(p.plot_data) == 1\n        assert len(p.plot_data[0]) == self.x.shape[0]\n        assert p.group_label is None\n        assert p.value_label is None\n\n        # Test vector data that looks 2D but doesn't really have rows\n        p.establish_variables(data=x[np.newaxis, :])\n        assert len(p.plot_data) == 1\n        assert len(p.plot_data[0]) == self.x.shape[0]\n        assert p.group_label is None\n        assert p.value_label is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_3d_input_data_TestCategoricalPlotter.test_wide_array_input_data.assert_p_value_label_is_N": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_3d_input_data_TestCategoricalPlotter.test_wide_array_input_data.assert_p_value_label_is_N", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 200, "end_line": 234, "span_ids": ["TestCategoricalPlotter.test_list_of_array_input_data", "TestCategoricalPlotter.test_wide_array_input_data", "TestCategoricalPlotter.test_3d_input_data"], "tokens": 266}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalPlotter(CategoricalFixture):\n\n    def test_3d_input_data(self):\n\n        p = cat._CategoricalPlotter()\n\n        # Test that passing actually 3D data raises\n        x = np.zeros((5, 5, 5))\n        with pytest.raises(ValueError):\n            p.establish_variables(data=x)\n\n    def test_list_of_array_input_data(self):\n\n        p = cat._CategoricalPlotter()\n\n        # Test 2D input in list form\n        x_list = self.x.T.tolist()\n        p.establish_variables(data=x_list)\n        assert len(p.plot_data) == 3\n\n        lengths = [len(v_i) for v_i in p.plot_data]\n        assert lengths == [self.n_total / 3] * 3\n\n        assert p.group_label is None\n        assert p.value_label is None\n\n    def test_wide_array_input_data(self):\n\n        p = cat._CategoricalPlotter()\n\n        # Test 2D input in array form\n        p.establish_variables(data=self.x)\n        assert np.shape(p.plot_data) == (3, self.n_total / 3)\n        npt.assert_array_equal(p.plot_data, self.x.T)\n\n        assert p.group_label is None\n        assert p.value_label is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_single_long_direct_inputs_TestCategoricalPlotter.test_single_long_direct_inputs.assert_len_p_plot_data_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_single_long_direct_inputs_TestCategoricalPlotter.test_single_long_direct_inputs.assert_len_p_plot_data_0_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 236, "end_line": 265, "span_ids": ["TestCategoricalPlotter.test_single_long_direct_inputs"], "tokens": 287}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalPlotter(CategoricalFixture):\n\n    def test_single_long_direct_inputs(self):\n\n        p = cat._CategoricalPlotter()\n\n        # Test passing a series to the x variable\n        p.establish_variables(x=self.y)\n        npt.assert_equal(p.plot_data, [self.y])\n        assert p.orient == \"h\"\n        assert p.value_label == \"y_data\"\n        assert p.group_label is None\n\n        # Test passing a series to the y variable\n        p.establish_variables(y=self.y)\n        npt.assert_equal(p.plot_data, [self.y])\n        assert p.orient == \"v\"\n        assert p.value_label == \"y_data\"\n        assert p.group_label is None\n\n        # Test passing an array to the y variable\n        p.establish_variables(y=self.y.values)\n        npt.assert_equal(p.plot_data, [self.y])\n        assert p.orient == \"v\"\n        assert p.group_label is None\n        assert p.value_label is None\n\n        # Test array and series with non-default index\n        x = pd.Series([1, 1, 1, 1], index=[0, 2, 4, 6])\n        y = np.array([1, 2, 3, 4])\n        p.establish_variables(x, y)\n        assert len(p.plot_data[0]) == 4", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_single_long_indirect_inputs_TestCategoricalPlotter.test_single_long_indirect_inputs.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_single_long_indirect_inputs_TestCategoricalPlotter.test_single_long_indirect_inputs.None_5", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 267, "end_line": 283, "span_ids": ["TestCategoricalPlotter.test_single_long_indirect_inputs"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalPlotter(CategoricalFixture):\n\n    def test_single_long_indirect_inputs(self):\n\n        p = cat._CategoricalPlotter()\n\n        # Test referencing a DataFrame series in the x variable\n        p.establish_variables(x=\"y\", data=self.df)\n        npt.assert_equal(p.plot_data, [self.y])\n        assert p.orient == \"h\"\n        assert p.value_label == \"y\"\n        assert p.group_label is None\n\n        # Test referencing a DataFrame series in the y variable\n        p.establish_variables(y=\"y\", data=self.df)\n        npt.assert_equal(p.plot_data, [self.y])\n        assert p.orient == \"v\"\n        assert p.value_label == \"y\"\n        assert p.group_label is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_longform_groupby_TestCategoricalPlotter.test_longform_groupby.for_i_d1_d2_in_enumer.assert_np_array_equal_d1_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_longform_groupby_TestCategoricalPlotter.test_longform_groupby.for_i_d1_d2_in_enumer.assert_np_array_equal_d1_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 285, "end_line": 343, "span_ids": ["TestCategoricalPlotter.test_longform_groupby"], "tokens": 632}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalPlotter(CategoricalFixture):\n\n    def test_longform_groupby(self):\n\n        p = cat._CategoricalPlotter()\n\n        # Test a vertically oriented grouped and nested plot\n        p.establish_variables(\"g\", \"y\", hue=\"h\", data=self.df)\n        assert len(p.plot_data) == 3\n        assert len(p.plot_hues) == 3\n        assert p.orient == \"v\"\n        assert p.value_label == \"y\"\n        assert p.group_label == \"g\"\n        assert p.hue_title == \"h\"\n\n        for group, vals in zip([\"a\", \"b\", \"c\"], p.plot_data):\n            npt.assert_array_equal(vals, self.y[self.g == group])\n\n        for group, hues in zip([\"a\", \"b\", \"c\"], p.plot_hues):\n            npt.assert_array_equal(hues, self.h[self.g == group])\n\n        # Test a grouped and nested plot with direct array value data\n        p.establish_variables(\"g\", self.y.values, \"h\", self.df)\n        assert p.value_label is None\n        assert p.group_label == \"g\"\n\n        for group, vals in zip([\"a\", \"b\", \"c\"], p.plot_data):\n            npt.assert_array_equal(vals, self.y[self.g == group])\n\n        # Test a grouped and nested plot with direct array hue data\n        p.establish_variables(\"g\", \"y\", self.h.values, self.df)\n\n        for group, hues in zip([\"a\", \"b\", \"c\"], p.plot_hues):\n            npt.assert_array_equal(hues, self.h[self.g == group])\n\n        # Test categorical grouping data\n        df = self.df.copy()\n        df.g = df.g.astype(\"category\")\n\n        # Test that horizontal orientation is automatically detected\n        p.establish_variables(\"y\", \"g\", hue=\"h\", data=df)\n        assert len(p.plot_data) == 3\n        assert len(p.plot_hues) == 3\n        assert p.orient == \"h\"\n        assert p.value_label == \"y\"\n        assert p.group_label == \"g\"\n        assert p.hue_title == \"h\"\n\n        for group, vals in zip([\"a\", \"b\", \"c\"], p.plot_data):\n            npt.assert_array_equal(vals, self.y[self.g == group])\n\n        for group, hues in zip([\"a\", \"b\", \"c\"], p.plot_hues):\n            npt.assert_array_equal(hues, self.h[self.g == group])\n\n        # Test grouped data that matches on index\n        p1 = cat._CategoricalPlotter()\n        p1.establish_variables(self.g, self.y, hue=self.h)\n        p2 = cat._CategoricalPlotter()\n        p2.establish_variables(self.g, self.y[::-1], self.h)\n        for i, (d1, d2) in enumerate(zip(p1.plot_data, p2.plot_data)):\n            assert np.array_equal(d1.sort_index(), d2.sort_index())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_input_validation_TestCategoricalPlotter.test_order.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_input_validation_TestCategoricalPlotter.test_order.None_5", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 345, "end_line": 398, "span_ids": ["TestCategoricalPlotter.test_input_validation", "TestCategoricalPlotter.test_order"], "tokens": 565}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalPlotter(CategoricalFixture):\n\n    def test_input_validation(self):\n\n        p = cat._CategoricalPlotter()\n\n        kws = dict(x=\"g\", y=\"y\", hue=\"h\", units=\"u\", data=self.df)\n        for var in [\"x\", \"y\", \"hue\", \"units\"]:\n            input_kws = kws.copy()\n            input_kws[var] = \"bad_input\"\n            with pytest.raises(ValueError):\n                p.establish_variables(**input_kws)\n\n    def test_order(self):\n\n        p = cat._CategoricalPlotter()\n\n        # Test inferred order from a wide dataframe input\n        p.establish_variables(data=self.x_df)\n        assert p.group_names == [\"X\", \"Y\", \"Z\"]\n\n        # Test specified order with a wide dataframe input\n        p.establish_variables(data=self.x_df, order=[\"Y\", \"Z\", \"X\"])\n        assert p.group_names == [\"Y\", \"Z\", \"X\"]\n\n        for group, vals in zip([\"Y\", \"Z\", \"X\"], p.plot_data):\n            npt.assert_array_equal(vals, self.x_df[group])\n\n        with pytest.raises(ValueError):\n            p.establish_variables(data=self.x, order=[1, 2, 0])\n\n        # Test inferred order from a grouped longform input\n        p.establish_variables(\"g\", \"y\", data=self.df)\n        assert p.group_names == [\"a\", \"b\", \"c\"]\n\n        # Test specified order from a grouped longform input\n        p.establish_variables(\"g\", \"y\", data=self.df, order=[\"b\", \"a\", \"c\"])\n        assert p.group_names == [\"b\", \"a\", \"c\"]\n\n        for group, vals in zip([\"b\", \"a\", \"c\"], p.plot_data):\n            npt.assert_array_equal(vals, self.y[self.g == group])\n\n        # Test inferred order from a grouped input with categorical groups\n        df = self.df.copy()\n        df.g = df.g.astype(\"category\")\n        df.g = df.g.cat.reorder_categories([\"c\", \"b\", \"a\"])\n        p.establish_variables(\"g\", \"y\", data=df)\n        assert p.group_names == [\"c\", \"b\", \"a\"]\n\n        for group, vals in zip([\"c\", \"b\", \"a\"], p.plot_data):\n            npt.assert_array_equal(vals, self.y[self.g == group])\n\n        df.g = (df.g.cat.add_categories(\"d\")\n                    .cat.reorder_categories([\"c\", \"b\", \"d\", \"a\"]))\n        p.establish_variables(\"g\", \"y\", data=df)\n        assert p.group_names == [\"c\", \"b\", \"d\", \"a\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_hue_order_TestCategoricalPlotter.test_hue_order.assert_p_hue_names_o": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_hue_order_TestCategoricalPlotter.test_hue_order.assert_p_hue_names_o", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 400, "end_line": 423, "span_ids": ["TestCategoricalPlotter.test_hue_order"], "tokens": 253}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalPlotter(CategoricalFixture):\n\n    def test_hue_order(self):\n\n        p = cat._CategoricalPlotter()\n\n        # Test inferred hue order\n        p.establish_variables(\"g\", \"y\", hue=\"h\", data=self.df)\n        assert p.hue_names == [\"m\", \"n\"]\n\n        # Test specified hue order\n        p.establish_variables(\"g\", \"y\", hue=\"h\", data=self.df,\n                              hue_order=[\"n\", \"m\"])\n        assert p.hue_names == [\"n\", \"m\"]\n\n        # Test inferred hue order from a categorical hue input\n        df = self.df.copy()\n        df.h = df.h.astype(\"category\")\n        df.h = df.h.cat.reorder_categories([\"n\", \"m\"])\n        p.establish_variables(\"g\", \"y\", hue=\"h\", data=df)\n        assert p.hue_names == [\"n\", \"m\"]\n\n        df.h = (df.h.cat.add_categories(\"o\")\n                    .cat.reorder_categories([\"o\", \"m\", \"n\"]))\n        p.establish_variables(\"g\", \"y\", hue=\"h\", data=df)\n        assert p.hue_names == [\"o\", \"m\", \"n\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_plot_units_TestCategoricalPlotter.test_default_palettes.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_plot_units_TestCategoricalPlotter.test_default_palettes.None_1", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 425, "end_line": 447, "span_ids": ["TestCategoricalPlotter.test_plot_units", "TestCategoricalPlotter.test_default_palettes"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalPlotter(CategoricalFixture):\n\n    def test_plot_units(self):\n\n        p = cat._CategoricalPlotter()\n        p.establish_variables(\"g\", \"y\", hue=\"h\", data=self.df)\n        assert p.plot_units is None\n\n        p.establish_variables(\"g\", \"y\", hue=\"h\", data=self.df, units=\"u\")\n        for group, units in zip([\"a\", \"b\", \"c\"], p.plot_units):\n            npt.assert_array_equal(units, self.u[self.g == group])\n\n    def test_default_palettes(self):\n\n        p = cat._CategoricalPlotter()\n\n        # Test palette mapping the x position\n        p.establish_variables(\"g\", \"y\", data=self.df)\n        p.establish_colors(None, None, 1)\n        assert p.colors == palettes.color_palette(n_colors=3)\n\n        # Test palette mapping the hue position\n        p.establish_variables(\"g\", \"y\", hue=\"h\", data=self.df)\n        p.establish_colors(None, None, 1)\n        assert p.colors == palettes.color_palette(n_colors=2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_default_palette_with_many_levels_TestCategoricalPlotter.test_specific_color.npt_assert_array_almost_e": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_default_palette_with_many_levels_TestCategoricalPlotter.test_specific_color.npt_assert_array_almost_e", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 449, "end_line": 473, "span_ids": ["TestCategoricalPlotter.test_specific_color", "TestCategoricalPlotter.test_default_palette_with_many_levels"], "tokens": 262}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalPlotter(CategoricalFixture):\n\n    def test_default_palette_with_many_levels(self):\n\n        with palettes.color_palette([\"blue\", \"red\"], 2):\n            p = cat._CategoricalPlotter()\n            p.establish_variables(\"g\", \"y\", data=self.df)\n            p.establish_colors(None, None, 1)\n            npt.assert_array_equal(p.colors,\n                                   palettes.husl_palette(3, l=.7))  # noqa\n\n    def test_specific_color(self):\n\n        p = cat._CategoricalPlotter()\n\n        # Test the same color for each x position\n        p.establish_variables(\"g\", \"y\", data=self.df)\n        p.establish_colors(\"blue\", None, 1)\n        blue_rgb = mpl.colors.colorConverter.to_rgb(\"blue\")\n        assert p.colors == [blue_rgb] * 3\n\n        # Test a color-based blend for the hue mapping\n        p.establish_variables(\"g\", \"y\", hue=\"h\", data=self.df)\n        p.establish_colors(\"#ff0022\", None, 1)\n        rgba_array = np.array(palettes.light_palette(\"#ff0022\", 2))\n        npt.assert_array_almost_equal(p.colors,\n                                      rgba_array[:, :3])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_specific_palette_TestCategoricalPlotter.test_specific_palette.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_specific_palette_TestCategoricalPlotter.test_specific_palette.None_2", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 475, "end_line": 493, "span_ids": ["TestCategoricalPlotter.test_specific_palette"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalPlotter(CategoricalFixture):\n\n    def test_specific_palette(self):\n\n        p = cat._CategoricalPlotter()\n\n        # Test palette mapping the x position\n        p.establish_variables(\"g\", \"y\", data=self.df)\n        p.establish_colors(None, \"dark\", 1)\n        assert p.colors == palettes.color_palette(\"dark\", 3)\n\n        # Test that non-None `color` and `hue` raises an error\n        p.establish_variables(\"g\", \"y\", hue=\"h\", data=self.df)\n        p.establish_colors(None, \"muted\", 1)\n        assert p.colors == palettes.color_palette(\"muted\", 2)\n\n        # Test that specified palette overrides specified color\n        p = cat._CategoricalPlotter()\n        p.establish_variables(\"g\", \"y\", data=self.df)\n        p.establish_colors(\"blue\", \"deep\", 1)\n        assert p.colors == palettes.color_palette(\"deep\", 3)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_dict_as_palette_TestCategoricalPlotter.test_palette_desaturation.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalPlotter.test_dict_as_palette_TestCategoricalPlotter.test_palette_desaturation.None_1", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 495, "end_line": 511, "span_ids": ["TestCategoricalPlotter.test_palette_desaturation", "TestCategoricalPlotter.test_dict_as_palette"], "tokens": 245}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalPlotter(CategoricalFixture):\n\n    def test_dict_as_palette(self):\n\n        p = cat._CategoricalPlotter()\n        p.establish_variables(\"g\", \"y\", hue=\"h\", data=self.df)\n        pal = {\"m\": (0, 0, 1), \"n\": (1, 0, 0)}\n        p.establish_colors(None, pal, 1)\n        assert p.colors == [(0, 0, 1), (1, 0, 0)]\n\n    def test_palette_desaturation(self):\n\n        p = cat._CategoricalPlotter()\n        p.establish_variables(\"g\", \"y\", data=self.df)\n        p.establish_colors((0, 0, 1), None, .5)\n        assert p.colors == [(.25, .25, .75)] * 3\n\n        p.establish_colors(None, [(0, 0, 1), (1, 0, 0), \"w\"], .5)\n        assert p.colors == [(.25, .25, .75), (.75, .25, .25), (1, 1, 1)]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter_TestCategoricalStatPlotter.test_no_bootstrappig.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter_TestCategoricalStatPlotter.test_no_bootstrappig.None_5", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 515, "end_line": 526, "span_ids": ["TestCategoricalStatPlotter", "TestCategoricalStatPlotter.test_no_bootstrappig"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalStatPlotter(CategoricalFixture):\n\n    def test_no_bootstrappig(self):\n\n        p = cat._CategoricalStatPlotter()\n        p.establish_variables(\"g\", \"y\", data=self.df)\n        p.estimate_statistic(\"mean\", None, 100, None)\n        npt.assert_array_equal(p.confint, np.array([]))\n\n        p.establish_variables(\"g\", \"y\", hue=\"h\", data=self.df)\n        p.estimate_statistic(np.mean, None, 100, None)\n        npt.assert_array_equal(p.confint, np.array([[], [], []]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_single_layer_stats_TestCategoricalStatPlotter.test_single_layer_stats.for_ci___grp_y_in_zip.npt_assert_array_almost_e": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_single_layer_stats_TestCategoricalStatPlotter.test_single_layer_stats.for_ci___grp_y_in_zip.npt_assert_array_almost_e", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 528, "end_line": 549, "span_ids": ["TestCategoricalStatPlotter.test_single_layer_stats"], "tokens": 218}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalStatPlotter(CategoricalFixture):\n\n    def test_single_layer_stats(self):\n\n        p = cat._CategoricalStatPlotter()\n\n        g = pd.Series(np.repeat(list(\"abc\"), 100))\n        y = pd.Series(np.random.RandomState(0).randn(300))\n\n        p.establish_variables(g, y)\n        p.estimate_statistic(\"mean\", (\"ci\", 95), 10000, None)\n\n        assert p.statistic.shape == (3,)\n        assert p.confint.shape == (3, 2)\n\n        npt.assert_array_almost_equal(p.statistic,\n                                      y.groupby(g).mean())\n\n        for ci, (_, grp_y) in zip(p.confint, y.groupby(g)):\n            sem = grp_y.std() / np.sqrt(len(grp_y))\n            mean = grp_y.mean()\n            half_ci = _normal_quantile_func(.975) * sem\n            ci_want = mean - half_ci, mean + half_ci\n            npt.assert_array_almost_equal(ci_want, ci, 2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_single_layer_stats_with_units_TestCategoricalStatPlotter.test_single_layer_stats_with_units.npt_assert_array_less_ci1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_single_layer_stats_with_units_TestCategoricalStatPlotter.test_single_layer_stats_with_units.npt_assert_array_less_ci1", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 551, "end_line": 572, "span_ids": ["TestCategoricalStatPlotter.test_single_layer_stats_with_units"], "tokens": 259}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalStatPlotter(CategoricalFixture):\n\n    def test_single_layer_stats_with_units(self):\n\n        p = cat._CategoricalStatPlotter()\n\n        g = pd.Series(np.repeat(list(\"abc\"), 90))\n        y = pd.Series(np.random.RandomState(0).randn(270))\n        u = pd.Series(np.repeat(np.tile(list(\"xyz\"), 30), 3))\n        y[u == \"x\"] -= 3\n        y[u == \"y\"] += 3\n\n        p.establish_variables(g, y)\n        p.estimate_statistic(\"mean\", (\"ci\", 95), 10000, None)\n        stat1, ci1 = p.statistic, p.confint\n\n        p.establish_variables(g, y, units=u)\n        p.estimate_statistic(\"mean\", (\"ci\", 95), 10000, None)\n        stat2, ci2 = p.statistic, p.confint\n\n        npt.assert_array_equal(stat1, stat2)\n        ci1_size = ci1[:, 1] - ci1[:, 0]\n        ci2_size = ci2[:, 1] - ci2[:, 0]\n        npt.assert_array_less(ci1_size, ci2_size)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_single_layer_stats_with_missing_data_TestCategoricalStatPlotter.test_single_layer_stats_with_missing_data.npt_assert_array_equal_p_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_single_layer_stats_with_missing_data_TestCategoricalStatPlotter.test_single_layer_stats_with_missing_data.npt_assert_array_equal_p_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 574, "end_line": 596, "span_ids": ["TestCategoricalStatPlotter.test_single_layer_stats_with_missing_data"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalStatPlotter(CategoricalFixture):\n\n    def test_single_layer_stats_with_missing_data(self):\n\n        p = cat._CategoricalStatPlotter()\n\n        g = pd.Series(np.repeat(list(\"abc\"), 100))\n        y = pd.Series(np.random.RandomState(0).randn(300))\n\n        p.establish_variables(g, y, order=list(\"abdc\"))\n        p.estimate_statistic(\"mean\", (\"ci\", 95), 10000, None)\n\n        assert p.statistic.shape == (4,)\n        assert p.confint.shape == (4, 2)\n\n        rows = g == \"b\"\n        mean = y[rows].mean()\n        sem = y[rows].std() / np.sqrt(rows.sum())\n        half_ci = _normal_quantile_func(.975) * sem\n        ci = mean - half_ci, mean + half_ci\n        npt.assert_almost_equal(p.statistic[1], mean)\n        npt.assert_array_almost_equal(p.confint[1], ci, 2)\n\n        npt.assert_equal(p.statistic[2], np.nan)\n        npt.assert_array_equal(p.confint[2], (np.nan, np.nan))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_nested_stats_TestCategoricalStatPlotter.test_nested_stats.for_ci_g___grp_y_in_z.for_ci_hue_y_in_zip_ci_g.npt_assert_array_almost_e": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_nested_stats_TestCategoricalStatPlotter.test_nested_stats.for_ci_g___grp_y_in_z.for_ci_hue_y_in_zip_ci_g.npt_assert_array_almost_e", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 598, "end_line": 621, "span_ids": ["TestCategoricalStatPlotter.test_nested_stats"], "tokens": 272}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalStatPlotter(CategoricalFixture):\n\n    def test_nested_stats(self):\n\n        p = cat._CategoricalStatPlotter()\n\n        g = pd.Series(np.repeat(list(\"abc\"), 100))\n        h = pd.Series(np.tile(list(\"xy\"), 150))\n        y = pd.Series(np.random.RandomState(0).randn(300))\n\n        p.establish_variables(g, y, h)\n        p.estimate_statistic(\"mean\", (\"ci\", 95), 50000, None)\n\n        assert p.statistic.shape == (3, 2)\n        assert p.confint.shape == (3, 2, 2)\n\n        npt.assert_array_almost_equal(p.statistic,\n                                      y.groupby([g, h]).mean().unstack())\n\n        for ci_g, (_, grp_y) in zip(p.confint, y.groupby(g)):\n            for ci, hue_y in zip(ci_g, [grp_y[::2], grp_y[1::2]]):\n                sem = hue_y.std() / np.sqrt(len(hue_y))\n                mean = hue_y.mean()\n                half_ci = _normal_quantile_func(.975) * sem\n                ci_want = mean - half_ci, mean + half_ci\n                npt.assert_array_almost_equal(ci_want, ci, 2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_bootstrap_seed_TestCategoricalStatPlotter.test_bootstrap_seed.npt_assert_array_equal_co": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_bootstrap_seed_TestCategoricalStatPlotter.test_bootstrap_seed.npt_assert_array_equal_co", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 623, "end_line": 637, "span_ids": ["TestCategoricalStatPlotter.test_bootstrap_seed"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalStatPlotter(CategoricalFixture):\n\n    def test_bootstrap_seed(self):\n\n        p = cat._CategoricalStatPlotter()\n\n        g = pd.Series(np.repeat(list(\"abc\"), 100))\n        h = pd.Series(np.tile(list(\"xy\"), 150))\n        y = pd.Series(np.random.RandomState(0).randn(300))\n\n        p.establish_variables(g, y, h)\n        p.estimate_statistic(\"mean\", (\"ci\", 95), 1000, 0)\n        confint_1 = p.confint\n        p.estimate_statistic(\"mean\", (\"ci\", 95), 1000, 0)\n        confint_2 = p.confint\n\n        npt.assert_array_equal(confint_1, confint_2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_nested_stats_with_units_TestCategoricalStatPlotter.test_nested_stats_with_units.npt_assert_array_less_ci1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_nested_stats_with_units_TestCategoricalStatPlotter.test_nested_stats_with_units.npt_assert_array_less_ci1", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 639, "end_line": 661, "span_ids": ["TestCategoricalStatPlotter.test_nested_stats_with_units"], "tokens": 284}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalStatPlotter(CategoricalFixture):\n\n    def test_nested_stats_with_units(self):\n\n        p = cat._CategoricalStatPlotter()\n\n        g = pd.Series(np.repeat(list(\"abc\"), 90))\n        h = pd.Series(np.tile(list(\"xy\"), 135))\n        u = pd.Series(np.repeat(list(\"ijkijk\"), 45))\n        y = pd.Series(np.random.RandomState(0).randn(270))\n        y[u == \"i\"] -= 3\n        y[u == \"k\"] += 3\n\n        p.establish_variables(g, y, h)\n        p.estimate_statistic(\"mean\", (\"ci\", 95), 10000, None)\n        stat1, ci1 = p.statistic, p.confint\n\n        p.establish_variables(g, y, h, units=u)\n        p.estimate_statistic(\"mean\", (\"ci\", 95), 10000, None)\n        stat2, ci2 = p.statistic, p.confint\n\n        npt.assert_array_equal(stat1, stat2)\n        ci1_size = ci1[:, 0, 1] - ci1[:, 0, 0]\n        ci2_size = ci2[:, 0, 1] - ci2[:, 0, 0]\n        npt.assert_array_less(ci1_size, ci2_size)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_nested_stats_with_missing_data_TestCategoricalStatPlotter.test_nested_stats_with_missing_data.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_nested_stats_with_missing_data_TestCategoricalStatPlotter.test_nested_stats_with_missing_data.None_7", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 663, "end_line": 692, "span_ids": ["TestCategoricalStatPlotter.test_nested_stats_with_missing_data"], "tokens": 351}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalStatPlotter(CategoricalFixture):\n\n    def test_nested_stats_with_missing_data(self):\n\n        p = cat._CategoricalStatPlotter()\n\n        g = pd.Series(np.repeat(list(\"abc\"), 100))\n        y = pd.Series(np.random.RandomState(0).randn(300))\n        h = pd.Series(np.tile(list(\"xy\"), 150))\n\n        p.establish_variables(g, y, h,\n                              order=list(\"abdc\"),\n                              hue_order=list(\"zyx\"))\n        p.estimate_statistic(\"mean\", (\"ci\", 95), 50000, None)\n\n        assert p.statistic.shape == (4, 3)\n        assert p.confint.shape == (4, 3, 2)\n\n        rows = (g == \"b\") & (h == \"x\")\n        mean = y[rows].mean()\n        sem = y[rows].std() / np.sqrt(rows.sum())\n        half_ci = _normal_quantile_func(.975) * sem\n        ci = mean - half_ci, mean + half_ci\n        npt.assert_almost_equal(p.statistic[1, 2], mean)\n        npt.assert_array_almost_equal(p.confint[1, 2], ci, 2)\n\n        npt.assert_array_equal(p.statistic[:, 0], [np.nan] * 4)\n        npt.assert_array_equal(p.statistic[2], [np.nan] * 3)\n        npt.assert_array_equal(p.confint[:, 0],\n                               np.zeros((4, 2)) * np.nan)\n        npt.assert_array_equal(p.confint[2],\n                               np.zeros((3, 2)) * np.nan)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_sd_error_bars_TestCategoricalStatPlotter.test_sd_error_bars.for_ci___grp_y_in_zip.npt_assert_array_almost_e": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_sd_error_bars_TestCategoricalStatPlotter.test_sd_error_bars.for_ci___grp_y_in_zip.npt_assert_array_almost_e", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 693, "end_line": 713, "span_ids": ["TestCategoricalStatPlotter.test_sd_error_bars"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalStatPlotter(CategoricalFixture):\n\n    def test_sd_error_bars(self):\n\n        p = cat._CategoricalStatPlotter()\n\n        g = pd.Series(np.repeat(list(\"abc\"), 100))\n        y = pd.Series(np.random.RandomState(0).randn(300))\n\n        p.establish_variables(g, y)\n        p.estimate_statistic(np.mean, \"sd\", None, None)\n\n        assert p.statistic.shape == (3,)\n        assert p.confint.shape == (3, 2)\n\n        npt.assert_array_almost_equal(p.statistic,\n                                      y.groupby(g).mean())\n\n        for ci, (_, grp_y) in zip(p.confint, y.groupby(g)):\n            mean = grp_y.mean()\n            half_ci = np.std(grp_y)\n            ci_want = mean - half_ci, mean + half_ci\n            npt.assert_array_almost_equal(ci_want, ci, 2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_nested_sd_error_bars_TestCategoricalStatPlotter.test_nested_sd_error_bars.for_ci_g___grp_y_in_z.for_ci_hue_y_in_zip_ci_g.npt_assert_array_almost_e": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_nested_sd_error_bars_TestCategoricalStatPlotter.test_nested_sd_error_bars.for_ci_g___grp_y_in_z.for_ci_hue_y_in_zip_ci_g.npt_assert_array_almost_e", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 715, "end_line": 737, "span_ids": ["TestCategoricalStatPlotter.test_nested_sd_error_bars"], "tokens": 250}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalStatPlotter(CategoricalFixture):\n\n    def test_nested_sd_error_bars(self):\n\n        p = cat._CategoricalStatPlotter()\n\n        g = pd.Series(np.repeat(list(\"abc\"), 100))\n        h = pd.Series(np.tile(list(\"xy\"), 150))\n        y = pd.Series(np.random.RandomState(0).randn(300))\n\n        p.establish_variables(g, y, h)\n        p.estimate_statistic(np.mean, \"sd\", None, None)\n\n        assert p.statistic.shape == (3, 2)\n        assert p.confint.shape == (3, 2, 2)\n\n        npt.assert_array_almost_equal(p.statistic,\n                                      y.groupby([g, h]).mean().unstack())\n\n        for ci_g, (_, grp_y) in zip(p.confint, y.groupby(g)):\n            for ci, hue_y in zip(ci_g, [grp_y[::2], grp_y[1::2]]):\n                mean = hue_y.mean()\n                half_ci = np.std(hue_y)\n                ci_want = mean - half_ci, mean + half_ci\n                npt.assert_array_almost_equal(ci_want, ci, 2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_draw_cis_TestCategoricalStatPlotter.test_draw_cis.None_10": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCategoricalStatPlotter.test_draw_cis_TestCategoricalStatPlotter.test_draw_cis.None_10", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 739, "end_line": 817, "span_ids": ["TestCategoricalStatPlotter.test_draw_cis"], "tokens": 697}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCategoricalStatPlotter(CategoricalFixture):\n\n    def test_draw_cis(self):\n\n        p = cat._CategoricalStatPlotter()\n\n        # Test vertical CIs\n        p.orient = \"v\"\n\n        f, ax = plt.subplots()\n        at_group = [0, 1]\n        confints = [(.5, 1.5), (.25, .8)]\n        colors = [\".2\", \".3\"]\n        p.draw_confints(ax, at_group, confints, colors)\n\n        lines = ax.lines\n        for line, at, ci, c in zip(lines, at_group, confints, colors):\n            x, y = line.get_xydata().T\n            npt.assert_array_equal(x, [at, at])\n            npt.assert_array_equal(y, ci)\n            assert line.get_color() == c\n\n        plt.close(\"all\")\n\n        # Test horizontal CIs\n        p.orient = \"h\"\n\n        f, ax = plt.subplots()\n        p.draw_confints(ax, at_group, confints, colors)\n\n        lines = ax.lines\n        for line, at, ci, c in zip(lines, at_group, confints, colors):\n            x, y = line.get_xydata().T\n            npt.assert_array_equal(x, ci)\n            npt.assert_array_equal(y, [at, at])\n            assert line.get_color() == c\n\n        plt.close(\"all\")\n\n        # Test vertical CIs with endcaps\n        p.orient = \"v\"\n\n        f, ax = plt.subplots()\n        p.draw_confints(ax, at_group, confints, colors, capsize=0.3)\n        capline = ax.lines[len(ax.lines) - 1]\n        caplinestart = capline.get_xdata()[0]\n        caplineend = capline.get_xdata()[1]\n        caplinelength = abs(caplineend - caplinestart)\n        assert caplinelength == approx(0.3)\n        assert len(ax.lines) == 6\n\n        plt.close(\"all\")\n\n        # Test horizontal CIs with endcaps\n        p.orient = \"h\"\n\n        f, ax = plt.subplots()\n        p.draw_confints(ax, at_group, confints, colors, capsize=0.3)\n        capline = ax.lines[len(ax.lines) - 1]\n        caplinestart = capline.get_ydata()[0]\n        caplineend = capline.get_ydata()[1]\n        caplinelength = abs(caplineend - caplinestart)\n        assert caplinelength == approx(0.3)\n        assert len(ax.lines) == 6\n\n        # Test extra keyword arguments\n        f, ax = plt.subplots()\n        p.draw_confints(ax, at_group, confints, colors, lw=4)\n        line = ax.lines[0]\n        assert line.get_linewidth() == 4\n\n        plt.close(\"all\")\n\n        # Test errwidth is set appropriately\n        f, ax = plt.subplots()\n        p.draw_confints(ax, at_group, confints, colors, errwidth=2)\n        capline = ax.lines[len(ax.lines) - 1]\n        assert capline._linewidth == 2\n        assert len(ax.lines) == 2\n\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxPlotter_TestBoxPlotter.test_nested_width.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxPlotter_TestBoxPlotter.test_nested_width.None_4", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 820, "end_line": 845, "span_ids": ["TestBoxPlotter", "TestBoxPlotter.test_nested_width"], "tokens": 252}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxPlotter(CategoricalFixture):\n\n    default_kws = dict(x=None, y=None, hue=None, data=None,\n                       order=None, hue_order=None,\n                       orient=None, color=None, palette=None,\n                       saturation=.75, width=.8, dodge=True,\n                       fliersize=5, linewidth=None)\n\n    def test_nested_width(self):\n\n        kws = self.default_kws.copy()\n        p = cat._BoxPlotter(**kws)\n        p.establish_variables(\"g\", \"y\", hue=\"h\", data=self.df)\n        assert p.nested_width == .4 * .98\n\n        kws = self.default_kws.copy()\n        kws[\"width\"] = .6\n        p = cat._BoxPlotter(**kws)\n        p.establish_variables(\"g\", \"y\", hue=\"h\", data=self.df)\n        assert p.nested_width == .3 * .98\n\n        kws = self.default_kws.copy()\n        kws[\"dodge\"] = False\n        p = cat._BoxPlotter(**kws)\n        p.establish_variables(\"g\", \"y\", hue=\"h\", data=self.df)\n        assert p.nested_width == .8", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxPlotter.test_hue_offsets_TestBoxPlotter.test_hue_offsets.npt_assert_array_almost_e": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxPlotter.test_hue_offsets_TestBoxPlotter.test_hue_offsets.npt_assert_array_almost_e", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 847, "end_line": 861, "span_ids": ["TestBoxPlotter.test_hue_offsets"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxPlotter(CategoricalFixture):\n\n    def test_hue_offsets(self):\n\n        p = cat._BoxPlotter(**self.default_kws)\n        p.establish_variables(\"g\", \"y\", hue=\"h\", data=self.df)\n        npt.assert_array_equal(p.hue_offsets, [-.2, .2])\n\n        kws = self.default_kws.copy()\n        kws[\"width\"] = .6\n        p = cat._BoxPlotter(**kws)\n        p.establish_variables(\"g\", \"y\", hue=\"h\", data=self.df)\n        npt.assert_array_equal(p.hue_offsets, [-.15, .15])\n\n        p = cat._BoxPlotter(**kws)\n        p.establish_variables(\"h\", \"y\", \"g\", data=self.df)\n        npt.assert_array_almost_equal(p.hue_offsets, [-.2, 0, .2])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxPlotter.test_axes_data_TestBoxPlotter.test_box_colors.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxPlotter.test_axes_data_TestBoxPlotter.test_box_colors.None_1", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 863, "end_line": 889, "span_ids": ["TestBoxPlotter.test_axes_data", "TestBoxPlotter.test_box_colors"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxPlotter(CategoricalFixture):\n\n    def test_axes_data(self):\n\n        ax = cat.boxplot(x=\"g\", y=\"y\", data=self.df)\n        assert len(self.get_box_artists(ax)) == 3\n\n        plt.close(\"all\")\n\n        ax = cat.boxplot(x=\"g\", y=\"y\", hue=\"h\", data=self.df)\n        assert len(self.get_box_artists(ax)) == 6\n\n        plt.close(\"all\")\n\n    def test_box_colors(self):\n\n        ax = cat.boxplot(x=\"g\", y=\"y\", data=self.df, saturation=1)\n        pal = palettes.color_palette(n_colors=3)\n        assert same_color([patch.get_facecolor() for patch in self.get_box_artists(ax)],\n                          pal)\n\n        plt.close(\"all\")\n\n        ax = cat.boxplot(x=\"g\", y=\"y\", hue=\"h\", data=self.df, saturation=1)\n        pal = palettes.color_palette(n_colors=2)\n        assert same_color([patch.get_facecolor() for patch in self.get_box_artists(ax)],\n                          pal * 3)\n\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxPlotter.test_draw_missing_boxes_TestBoxPlotter.test_missing_data.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxPlotter.test_draw_missing_boxes_TestBoxPlotter.test_missing_data.None_1", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 891, "end_line": 913, "span_ids": ["TestBoxPlotter.test_missing_data", "TestBoxPlotter.test_draw_missing_boxes"], "tokens": 218}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxPlotter(CategoricalFixture):\n\n    def test_draw_missing_boxes(self):\n\n        ax = cat.boxplot(x=\"g\", y=\"y\", data=self.df,\n                         order=[\"a\", \"b\", \"c\", \"d\"])\n        assert len(self.get_box_artists(ax)) == 3\n\n    def test_missing_data(self):\n\n        x = [\"a\", \"a\", \"b\", \"b\", \"c\", \"c\", \"d\", \"d\"]\n        h = [\"x\", \"y\", \"x\", \"y\", \"x\", \"y\", \"x\", \"y\"]\n        y = self.rs.randn(8)\n        y[-2:] = np.nan\n\n        ax = cat.boxplot(x=x, y=y)\n        assert len(self.get_box_artists(ax)) == 3\n\n        plt.close(\"all\")\n\n        y[-1] = 0\n        ax = cat.boxplot(x=x, y=y, hue=h)\n        assert len(self.get_box_artists(ax)) == 7\n\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxPlotter.test_unaligned_index_TestBoxPlotter.test_unaligned_index.None_1.assert_np_array_equal_l1_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxPlotter.test_unaligned_index_TestBoxPlotter.test_unaligned_index.None_1.assert_np_array_equal_l1_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 915, "end_line": 930, "span_ids": ["TestBoxPlotter.test_unaligned_index"], "tokens": 213}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxPlotter(CategoricalFixture):\n\n    def test_unaligned_index(self):\n\n        f, (ax1, ax2) = plt.subplots(2)\n        cat.boxplot(x=self.g, y=self.y, ax=ax1)\n        cat.boxplot(x=self.g, y=self.y_perm, ax=ax2)\n        for l1, l2 in zip(ax1.lines, ax2.lines):\n            assert np.array_equal(l1.get_xydata(), l2.get_xydata())\n\n        f, (ax1, ax2) = plt.subplots(2)\n        hue_order = self.h.unique()\n        cat.boxplot(x=self.g, y=self.y, hue=self.h,\n                    hue_order=hue_order, ax=ax1)\n        cat.boxplot(x=self.g, y=self.y_perm, hue=self.h,\n                    hue_order=hue_order, ax=ax2)\n        for l1, l2 in zip(ax1.lines, ax2.lines):\n            assert np.array_equal(l1.get_xydata(), l2.get_xydata())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxPlotter.test_boxplots_TestBoxPlotter.test_boxplots.None_15": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxPlotter.test_boxplots_TestBoxPlotter.test_boxplots.None_15", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 932, "end_line": 958, "span_ids": ["TestBoxPlotter.test_boxplots"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxPlotter(CategoricalFixture):\n\n    def test_boxplots(self):\n\n        # Smoke test the high level boxplot options\n\n        cat.boxplot(x=\"y\", data=self.df)\n        plt.close(\"all\")\n\n        cat.boxplot(y=\"y\", data=self.df)\n        plt.close(\"all\")\n\n        cat.boxplot(x=\"g\", y=\"y\", data=self.df)\n        plt.close(\"all\")\n\n        cat.boxplot(x=\"y\", y=\"g\", data=self.df, orient=\"h\")\n        plt.close(\"all\")\n\n        cat.boxplot(x=\"g\", y=\"y\", hue=\"h\", data=self.df)\n        plt.close(\"all\")\n\n        cat.boxplot(x=\"g\", y=\"y\", hue=\"h\", order=list(\"nabc\"), data=self.df)\n        plt.close(\"all\")\n\n        cat.boxplot(x=\"g\", y=\"y\", hue=\"h\", hue_order=list(\"omn\"), data=self.df)\n        plt.close(\"all\")\n\n        cat.boxplot(x=\"y\", y=\"g\", hue=\"h\", data=self.df, orient=\"h\")\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxPlotter.test_axes_annotation_TestBoxPlotter.test_axes_annotation.None_9": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxPlotter.test_axes_annotation_TestBoxPlotter.test_axes_annotation.None_9", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 960, "end_line": 991, "span_ids": ["TestBoxPlotter.test_axes_annotation"], "tokens": 364}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxPlotter(CategoricalFixture):\n\n    def test_axes_annotation(self):\n\n        ax = cat.boxplot(x=\"g\", y=\"y\", data=self.df)\n        assert ax.get_xlabel() == \"g\"\n        assert ax.get_ylabel() == \"y\"\n        assert ax.get_xlim() == (-.5, 2.5)\n        npt.assert_array_equal(ax.get_xticks(), [0, 1, 2])\n        npt.assert_array_equal([l.get_text() for l in ax.get_xticklabels()],\n                               [\"a\", \"b\", \"c\"])\n\n        plt.close(\"all\")\n\n        ax = cat.boxplot(x=\"g\", y=\"y\", hue=\"h\", data=self.df)\n        assert ax.get_xlabel() == \"g\"\n        assert ax.get_ylabel() == \"y\"\n        npt.assert_array_equal(ax.get_xticks(), [0, 1, 2])\n        npt.assert_array_equal([l.get_text() for l in ax.get_xticklabels()],\n                               [\"a\", \"b\", \"c\"])\n        npt.assert_array_equal([l.get_text() for l in ax.legend_.get_texts()],\n                               [\"m\", \"n\"])\n\n        plt.close(\"all\")\n\n        ax = cat.boxplot(x=\"y\", y=\"g\", data=self.df, orient=\"h\")\n        assert ax.get_xlabel() == \"y\"\n        assert ax.get_ylabel() == \"g\"\n        assert ax.get_ylim() == (2.5, -.5)\n        npt.assert_array_equal(ax.get_yticks(), [0, 1, 2])\n        npt.assert_array_equal([l.get_text() for l in ax.get_yticklabels()],\n                               [\"a\", \"b\", \"c\"])\n\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter_TestViolinPlotter.test_split_error.with_pytest_raises_ValueE.cat__ViolinPlotter_kws_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter_TestViolinPlotter.test_split_error.with_pytest_raises_ValueE.cat__ViolinPlotter_kws_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 994, "end_line": 1009, "span_ids": ["TestViolinPlotter", "TestViolinPlotter.test_split_error"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestViolinPlotter(CategoricalFixture):\n\n    default_kws = dict(x=None, y=None, hue=None, data=None,\n                       order=None, hue_order=None,\n                       bw=\"scott\", cut=2, scale=\"area\", scale_hue=True,\n                       gridsize=100, width=.8, inner=\"box\", split=False,\n                       dodge=True, orient=None, linewidth=None,\n                       color=None, palette=None, saturation=.75)\n\n    def test_split_error(self):\n\n        kws = self.default_kws.copy()\n        kws.update(dict(x=\"h\", y=\"y\", hue=\"g\", data=self.df, split=True))\n\n        with pytest.raises(ValueError):\n            cat._ViolinPlotter(**kws)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_no_observations_TestViolinPlotter.test_no_observations.None_12": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_no_observations_TestViolinPlotter.test_no_observations.None_12", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1011, "end_line": 1048, "span_ids": ["TestViolinPlotter.test_no_observations"], "tokens": 385}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestViolinPlotter(CategoricalFixture):\n\n    def test_no_observations(self):\n\n        p = cat._ViolinPlotter(**self.default_kws)\n\n        x = [\"a\", \"a\", \"b\"]\n        y = self.rs.randn(3)\n        y[-1] = np.nan\n        p.establish_variables(x, y)\n        p.estimate_densities(\"scott\", 2, \"area\", True, 20)\n\n        assert len(p.support[0]) == 20\n        assert len(p.support[1]) == 0\n\n        assert len(p.density[0]) == 20\n        assert len(p.density[1]) == 1\n\n        assert p.density[1].item() == 1\n\n        p.estimate_densities(\"scott\", 2, \"count\", True, 20)\n        assert p.density[1].item() == 0\n\n        x = [\"a\"] * 4 + [\"b\"] * 2\n        y = self.rs.randn(6)\n        h = [\"m\", \"n\"] * 2 + [\"m\"] * 2\n\n        p.establish_variables(x, y, hue=h)\n        p.estimate_densities(\"scott\", 2, \"area\", True, 20)\n\n        assert len(p.support[1][0]) == 20\n        assert len(p.support[1][1]) == 0\n\n        assert len(p.density[1][0]) == 20\n        assert len(p.density[1][1]) == 1\n\n        assert p.density[1][1].item() == 1\n\n        p.estimate_densities(\"scott\", 2, \"count\", False, 20)\n        assert p.density[1][1].item() == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_single_observation_TestViolinPlotter.test_single_observation.None_11": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_single_observation_TestViolinPlotter.test_single_observation.None_11", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1050, "end_line": 1086, "span_ids": ["TestViolinPlotter.test_single_observation"], "tokens": 373}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestViolinPlotter(CategoricalFixture):\n\n    def test_single_observation(self):\n\n        p = cat._ViolinPlotter(**self.default_kws)\n\n        x = [\"a\", \"a\", \"b\"]\n        y = self.rs.randn(3)\n        p.establish_variables(x, y)\n        p.estimate_densities(\"scott\", 2, \"area\", True, 20)\n\n        assert len(p.support[0]) == 20\n        assert len(p.support[1]) == 1\n\n        assert len(p.density[0]) == 20\n        assert len(p.density[1]) == 1\n\n        assert p.density[1].item() == 1\n\n        p.estimate_densities(\"scott\", 2, \"count\", True, 20)\n        assert p.density[1].item() == .5\n\n        x = [\"b\"] * 4 + [\"a\"] * 3\n        y = self.rs.randn(7)\n        h = ([\"m\", \"n\"] * 4)[:-1]\n\n        p.establish_variables(x, y, hue=h)\n        p.estimate_densities(\"scott\", 2, \"area\", True, 20)\n\n        assert len(p.support[1][0]) == 20\n        assert len(p.support[1][1]) == 1\n\n        assert len(p.density[1][0]) == 20\n        assert len(p.density[1][1]) == 1\n\n        assert p.density[1][1].item() == 1\n\n        p.estimate_densities(\"scott\", 2, \"count\", False, 20)\n        assert p.density[1][1].item() == .5", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_dwidth_TestViolinPlotter.test_dwidth.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_dwidth_TestViolinPlotter.test_dwidth.None_3", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1088, "end_line": 1106, "span_ids": ["TestViolinPlotter.test_dwidth"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestViolinPlotter(CategoricalFixture):\n\n    def test_dwidth(self):\n\n        kws = self.default_kws.copy()\n        kws.update(dict(x=\"g\", y=\"y\", data=self.df))\n\n        p = cat._ViolinPlotter(**kws)\n        assert p.dwidth == .4\n\n        kws.update(dict(width=.4))\n        p = cat._ViolinPlotter(**kws)\n        assert p.dwidth == .2\n\n        kws.update(dict(hue=\"h\", width=.8))\n        p = cat._ViolinPlotter(**kws)\n        assert p.dwidth == .2\n\n        kws.update(dict(split=True))\n        p = cat._ViolinPlotter(**kws)\n        assert p.dwidth == .4", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_scale_area_TestViolinPlotter.test_scale_area.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_scale_area_TestViolinPlotter.test_scale_area.None_7", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1108, "end_line": 1153, "span_ids": ["TestViolinPlotter.test_scale_area"], "tokens": 583}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestViolinPlotter(CategoricalFixture):\n\n    def test_scale_area(self):\n\n        kws = self.default_kws.copy()\n        kws[\"scale\"] = \"area\"\n        p = cat._ViolinPlotter(**kws)\n\n        # Test single layer of grouping\n        p.hue_names = None\n        density = [self.rs.uniform(0, .8, 50), self.rs.uniform(0, .2, 50)]\n        max_before = np.array([d.max() for d in density])\n        p.scale_area(density, max_before, False)\n        max_after = np.array([d.max() for d in density])\n        assert max_after[0] == 1\n\n        before_ratio = max_before[1] / max_before[0]\n        after_ratio = max_after[1] / max_after[0]\n        assert before_ratio == after_ratio\n\n        # Test nested grouping scaling across all densities\n        p.hue_names = [\"foo\", \"bar\"]\n        density = [[self.rs.uniform(0, .8, 50), self.rs.uniform(0, .2, 50)],\n                   [self.rs.uniform(0, .1, 50), self.rs.uniform(0, .02, 50)]]\n\n        max_before = np.array([[r.max() for r in row] for row in density])\n        p.scale_area(density, max_before, False)\n        max_after = np.array([[r.max() for r in row] for row in density])\n        assert max_after[0, 0] == 1\n\n        before_ratio = max_before[1, 1] / max_before[0, 0]\n        after_ratio = max_after[1, 1] / max_after[0, 0]\n        assert before_ratio == after_ratio\n\n        # Test nested grouping scaling within hue\n        p.hue_names = [\"foo\", \"bar\"]\n        density = [[self.rs.uniform(0, .8, 50), self.rs.uniform(0, .2, 50)],\n                   [self.rs.uniform(0, .1, 50), self.rs.uniform(0, .02, 50)]]\n\n        max_before = np.array([[r.max() for r in row] for row in density])\n        p.scale_area(density, max_before, True)\n        max_after = np.array([[r.max() for r in row] for row in density])\n        assert max_after[0, 0] == 1\n        assert max_after[1, 0] == 1\n\n        before_ratio = max_before[1, 1] / max_before[1, 0]\n        after_ratio = max_after[1, 1] / max_after[1, 0]\n        assert before_ratio == after_ratio", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_scale_width_TestViolinPlotter.test_scale_width.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_scale_width_TestViolinPlotter.test_scale_width.None_3", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1155, "end_line": 1175, "span_ids": ["TestViolinPlotter.test_scale_width"], "tokens": 252}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestViolinPlotter(CategoricalFixture):\n\n    def test_scale_width(self):\n\n        kws = self.default_kws.copy()\n        kws[\"scale\"] = \"width\"\n        p = cat._ViolinPlotter(**kws)\n\n        # Test single layer of grouping\n        p.hue_names = None\n        density = [self.rs.uniform(0, .8, 50), self.rs.uniform(0, .2, 50)]\n        p.scale_width(density)\n        max_after = np.array([d.max() for d in density])\n        npt.assert_array_equal(max_after, [1, 1])\n\n        # Test nested grouping\n        p.hue_names = [\"foo\", \"bar\"]\n        density = [[self.rs.uniform(0, .8, 50), self.rs.uniform(0, .2, 50)],\n                   [self.rs.uniform(0, .1, 50), self.rs.uniform(0, .02, 50)]]\n\n        p.scale_width(density)\n        max_after = np.array([[r.max() for r in row] for row in density])\n        npt.assert_array_equal(max_after, [[1, 1], [1, 1]])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_scale_count_TestViolinPlotter.test_scale_count.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_scale_count_TestViolinPlotter.test_scale_count.None_5", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1177, "end_line": 1209, "span_ids": ["TestViolinPlotter.test_scale_count"], "tokens": 439}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestViolinPlotter(CategoricalFixture):\n\n    def test_scale_count(self):\n\n        kws = self.default_kws.copy()\n        kws[\"scale\"] = \"count\"\n        p = cat._ViolinPlotter(**kws)\n\n        # Test single layer of grouping\n        p.hue_names = None\n        density = [self.rs.uniform(0, .8, 20), self.rs.uniform(0, .2, 40)]\n        counts = np.array([20, 40])\n        p.scale_count(density, counts, False)\n        max_after = np.array([d.max() for d in density])\n        npt.assert_array_equal(max_after, [.5, 1])\n\n        # Test nested grouping scaling across all densities\n        p.hue_names = [\"foo\", \"bar\"]\n        density = [[self.rs.uniform(0, .8, 5), self.rs.uniform(0, .2, 40)],\n                   [self.rs.uniform(0, .1, 100), self.rs.uniform(0, .02, 50)]]\n\n        counts = np.array([[5, 40], [100, 50]])\n        p.scale_count(density, counts, False)\n        max_after = np.array([[r.max() for r in row] for row in density])\n        npt.assert_array_equal(max_after, [[.05, .4], [1, .5]])\n\n        # Test nested grouping scaling within hue\n        p.hue_names = [\"foo\", \"bar\"]\n        density = [[self.rs.uniform(0, .8, 5), self.rs.uniform(0, .2, 40)],\n                   [self.rs.uniform(0, .1, 100), self.rs.uniform(0, .02, 50)]]\n\n        counts = np.array([[5, 40], [100, 50]])\n        p.scale_count(density, counts, True)\n        max_after = np.array([[r.max() for r in row] for row in density])\n        npt.assert_array_equal(max_after, [[.125, 1], [1, .5]])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_bad_scale_TestViolinPlotter.test_kde_fit.assert_bw_2_data_st": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_bad_scale_TestViolinPlotter.test_kde_fit.assert_bw_2_data_st", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1211, "end_line": 1232, "span_ids": ["TestViolinPlotter.test_kde_fit", "TestViolinPlotter.test_bad_scale"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestViolinPlotter(CategoricalFixture):\n\n    def test_bad_scale(self):\n\n        kws = self.default_kws.copy()\n        kws[\"scale\"] = \"not_a_scale_type\"\n        with pytest.raises(ValueError):\n            cat._ViolinPlotter(**kws)\n\n    def test_kde_fit(self):\n\n        p = cat._ViolinPlotter(**self.default_kws)\n        data = self.y\n        data_std = data.std(ddof=1)\n\n        # Test reference rule bandwidth\n        kde, bw = p.fit_kde(data, \"scott\")\n        assert kde.factor == kde.scotts_factor()\n        assert bw == kde.scotts_factor() * data_std\n\n        # Test numeric scale factor\n        kde, bw = p.fit_kde(self.y, .2)\n        assert kde.factor == .2\n        assert bw == .2 * data_std", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_to_density_TestViolinPlotter.test_draw_to_density.None_23": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_to_density_TestViolinPlotter.test_draw_to_density.None_23", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1234, "end_line": 1295, "span_ids": ["TestViolinPlotter.test_draw_to_density"], "tokens": 650}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestViolinPlotter(CategoricalFixture):\n\n    def test_draw_to_density(self):\n\n        p = cat._ViolinPlotter(**self.default_kws)\n        # p.dwidth will be 1 for easier testing\n        p.width = 2\n\n        # Test vertical plots\n        support = np.array([.2, .6])\n        density = np.array([.1, .4])\n\n        # Test full vertical plot\n        _, ax = plt.subplots()\n        p.draw_to_density(ax, 0, .5, support, density, False)\n        x, y = ax.lines[0].get_xydata().T\n        npt.assert_array_equal(x, [.99 * -.4, .99 * .4])\n        npt.assert_array_equal(y, [.5, .5])\n        plt.close(\"all\")\n\n        # Test left vertical plot\n        _, ax = plt.subplots()\n        p.draw_to_density(ax, 0, .5, support, density, \"left\")\n        x, y = ax.lines[0].get_xydata().T\n        npt.assert_array_equal(x, [.99 * -.4, 0])\n        npt.assert_array_equal(y, [.5, .5])\n        plt.close(\"all\")\n\n        # Test right vertical plot\n        _, ax = plt.subplots()\n        p.draw_to_density(ax, 0, .5, support, density, \"right\")\n        x, y = ax.lines[0].get_xydata().T\n        npt.assert_array_equal(x, [0, .99 * .4])\n        npt.assert_array_equal(y, [.5, .5])\n        plt.close(\"all\")\n\n        # Switch orientation to test horizontal plots\n        p.orient = \"h\"\n        support = np.array([.2, .5])\n        density = np.array([.3, .7])\n\n        # Test full horizontal plot\n        _, ax = plt.subplots()\n        p.draw_to_density(ax, 0, .6, support, density, False)\n        x, y = ax.lines[0].get_xydata().T\n        npt.assert_array_equal(x, [.6, .6])\n        npt.assert_array_equal(y, [.99 * -.7, .99 * .7])\n        plt.close(\"all\")\n\n        # Test left horizontal plot\n        _, ax = plt.subplots()\n        p.draw_to_density(ax, 0, .6, support, density, \"left\")\n        x, y = ax.lines[0].get_xydata().T\n        npt.assert_array_equal(x, [.6, .6])\n        npt.assert_array_equal(y, [.99 * -.7, 0])\n        plt.close(\"all\")\n\n        # Test right horizontal plot\n        _, ax = plt.subplots()\n        p.draw_to_density(ax, 0, .6, support, density, \"right\")\n        x, y = ax.lines[0].get_xydata().T\n        npt.assert_array_equal(x, [.6, .6])\n        npt.assert_array_equal(y, [0, .99 * .7])\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_single_observations_TestViolinPlotter.test_draw_single_observations.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_single_observations_TestViolinPlotter.test_draw_single_observations.None_7", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1297, "end_line": 1317, "span_ids": ["TestViolinPlotter.test_draw_single_observations"], "tokens": 225}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestViolinPlotter(CategoricalFixture):\n\n    def test_draw_single_observations(self):\n\n        p = cat._ViolinPlotter(**self.default_kws)\n        p.width = 2\n\n        # Test vertical plot\n        _, ax = plt.subplots()\n        p.draw_single_observation(ax, 1, 1.5, 1)\n        x, y = ax.lines[0].get_xydata().T\n        npt.assert_array_equal(x, [0, 2])\n        npt.assert_array_equal(y, [1.5, 1.5])\n        plt.close(\"all\")\n\n        # Test horizontal plot\n        p.orient = \"h\"\n        _, ax = plt.subplots()\n        p.draw_single_observation(ax, 2, 2.2, .5)\n        x, y = ax.lines[0].get_xydata().T\n        npt.assert_array_equal(x, [2.2, 2.2])\n        npt.assert_array_equal(y, [1.5, 2.5])\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_box_lines_TestViolinPlotter.test_draw_box_lines.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_box_lines_TestViolinPlotter.test_draw_box_lines.None_7", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1319, "end_line": 1355, "span_ids": ["TestViolinPlotter.test_draw_box_lines"], "tokens": 334}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestViolinPlotter(CategoricalFixture):\n\n    def test_draw_box_lines(self):\n\n        # Test vertical plot\n        kws = self.default_kws.copy()\n        kws.update(dict(y=\"y\", data=self.df, inner=None))\n        p = cat._ViolinPlotter(**kws)\n\n        _, ax = plt.subplots()\n        p.draw_box_lines(ax, self.y, 0)\n        assert len(ax.lines) == 2\n\n        q25, q50, q75 = np.percentile(self.y, [25, 50, 75])\n        _, y = ax.lines[1].get_xydata().T\n        npt.assert_array_equal(y, [q25, q75])\n\n        _, y = ax.collections[0].get_offsets().T\n        assert y == q50\n\n        plt.close(\"all\")\n\n        # Test horizontal plot\n        kws = self.default_kws.copy()\n        kws.update(dict(x=\"y\", data=self.df, inner=None))\n        p = cat._ViolinPlotter(**kws)\n\n        _, ax = plt.subplots()\n        p.draw_box_lines(ax, self.y, 0)\n        assert len(ax.lines) == 2\n\n        q25, q50, q75 = np.percentile(self.y, [25, 50, 75])\n        x, _ = ax.lines[1].get_xydata().T\n        npt.assert_array_equal(x, [q25, q75])\n\n        x, _ = ax.collections[0].get_offsets().T\n        assert x == q50\n\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_quartiles_TestViolinPlotter.test_draw_quartiles.for_val_line_in_zip_np_p.npt_assert_array_equal_y_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_quartiles_TestViolinPlotter.test_draw_quartiles.for_val_line_in_zip_np_p.npt_assert_array_equal_y_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1357, "end_line": 1367, "span_ids": ["TestViolinPlotter.test_draw_quartiles"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestViolinPlotter(CategoricalFixture):\n\n    def test_draw_quartiles(self):\n\n        kws = self.default_kws.copy()\n        kws.update(dict(y=\"y\", data=self.df, inner=None))\n        p = cat._ViolinPlotter(**kws)\n\n        _, ax = plt.subplots()\n        p.draw_quartiles(ax, self.y, p.support[0], p.density[0], 0)\n        for val, line in zip(np.percentile(self.y, [25, 50, 75]), ax.lines):\n            _, y = line.get_xydata().T\n            npt.assert_array_equal(y, [val, val])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_points_TestViolinPlotter.test_draw_points.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_points_TestViolinPlotter.test_draw_points.None_7", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1369, "end_line": 1388, "span_ids": ["TestViolinPlotter.test_draw_points"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestViolinPlotter(CategoricalFixture):\n\n    def test_draw_points(self):\n\n        p = cat._ViolinPlotter(**self.default_kws)\n\n        # Test vertical plot\n        _, ax = plt.subplots()\n        p.draw_points(ax, self.y, 0)\n        x, y = ax.collections[0].get_offsets().T\n        npt.assert_array_equal(x, np.zeros_like(self.y))\n        npt.assert_array_equal(y, self.y)\n        plt.close(\"all\")\n\n        # Test horizontal plot\n        p.orient = \"h\"\n        _, ax = plt.subplots()\n        p.draw_points(ax, self.y, 0)\n        x, y = ax.collections[0].get_offsets().T\n        npt.assert_array_equal(x, self.y)\n        npt.assert_array_equal(y, np.zeros_like(self.y))\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_sticks_TestViolinPlotter.test_validate_inner.with_pytest_raises_ValueE.cat__ViolinPlotter_kws_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_sticks_TestViolinPlotter.test_validate_inner.with_pytest_raises_ValueE.cat__ViolinPlotter_kws_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1390, "end_line": 1418, "span_ids": ["TestViolinPlotter.test_validate_inner", "TestViolinPlotter.test_draw_sticks"], "tokens": 272}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestViolinPlotter(CategoricalFixture):\n\n    def test_draw_sticks(self):\n\n        kws = self.default_kws.copy()\n        kws.update(dict(y=\"y\", data=self.df, inner=None))\n        p = cat._ViolinPlotter(**kws)\n\n        # Test vertical plot\n        _, ax = plt.subplots()\n        p.draw_stick_lines(ax, self.y, p.support[0], p.density[0], 0)\n        for val, line in zip(self.y, ax.lines):\n            _, y = line.get_xydata().T\n            npt.assert_array_equal(y, [val, val])\n        plt.close(\"all\")\n\n        # Test horizontal plot\n        p.orient = \"h\"\n        _, ax = plt.subplots()\n        p.draw_stick_lines(ax, self.y, p.support[0], p.density[0], 0)\n        for val, line in zip(self.y, ax.lines):\n            x, _ = line.get_xydata().T\n            npt.assert_array_equal(x, [val, val])\n        plt.close(\"all\")\n\n    def test_validate_inner(self):\n\n        kws = self.default_kws.copy()\n        kws.update(dict(inner=\"bad_inner\"))\n        with pytest.raises(ValueError):\n            cat._ViolinPlotter(**kws)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_violinplots_TestViolinPlotter.test_draw_violinplots.None_16": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_violinplots_TestViolinPlotter.test_draw_violinplots.None_16", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1420, "end_line": 1481, "span_ids": ["TestViolinPlotter.test_draw_violinplots"], "tokens": 572}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestViolinPlotter(CategoricalFixture):\n\n    def test_draw_violinplots(self):\n\n        kws = self.default_kws.copy()\n\n        # Test single vertical violin\n        kws.update(dict(y=\"y\", data=self.df, inner=None,\n                        saturation=1, color=(1, 0, 0, 1)))\n        p = cat._ViolinPlotter(**kws)\n\n        _, ax = plt.subplots()\n        p.draw_violins(ax)\n        assert len(ax.collections) == 1\n        npt.assert_array_equal(ax.collections[0].get_facecolors(),\n                               [(1, 0, 0, 1)])\n        plt.close(\"all\")\n\n        # Test single horizontal violin\n        kws.update(dict(x=\"y\", y=None, color=(0, 1, 0, 1)))\n        p = cat._ViolinPlotter(**kws)\n\n        _, ax = plt.subplots()\n        p.draw_violins(ax)\n        assert len(ax.collections) == 1\n        npt.assert_array_equal(ax.collections[0].get_facecolors(),\n                               [(0, 1, 0, 1)])\n        plt.close(\"all\")\n\n        # Test multiple vertical violins\n        kws.update(dict(x=\"g\", y=\"y\", color=None,))\n        p = cat._ViolinPlotter(**kws)\n\n        _, ax = plt.subplots()\n        p.draw_violins(ax)\n        assert len(ax.collections) == 3\n        for violin, color in zip(ax.collections, palettes.color_palette()):\n            npt.assert_array_equal(violin.get_facecolors()[0, :-1], color)\n        plt.close(\"all\")\n\n        # Test multiple violins with hue nesting\n        kws.update(dict(hue=\"h\"))\n        p = cat._ViolinPlotter(**kws)\n\n        _, ax = plt.subplots()\n        p.draw_violins(ax)\n        assert len(ax.collections) == 6\n        for violin, color in zip(ax.collections,\n                                 palettes.color_palette(n_colors=2) * 3):\n            npt.assert_array_equal(violin.get_facecolors()[0, :-1], color)\n        plt.close(\"all\")\n\n        # Test multiple split violins\n        kws.update(dict(split=True, palette=\"muted\"))\n        p = cat._ViolinPlotter(**kws)\n\n        _, ax = plt.subplots()\n        p.draw_violins(ax)\n        assert len(ax.collections) == 6\n        for violin, color in zip(ax.collections,\n                                 palettes.color_palette(\"muted\",\n                                                        n_colors=2) * 3):\n            npt.assert_array_equal(violin.get_facecolors()[0, :-1], color)\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_violinplots_no_observations_TestViolinPlotter.test_draw_violinplots_no_observations.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_violinplots_no_observations_TestViolinPlotter.test_draw_violinplots_no_observations.None_5", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1483, "end_line": 1512, "span_ids": ["TestViolinPlotter.test_draw_violinplots_no_observations"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestViolinPlotter(CategoricalFixture):\n\n    def test_draw_violinplots_no_observations(self):\n\n        kws = self.default_kws.copy()\n        kws[\"inner\"] = None\n\n        # Test single layer of grouping\n        x = [\"a\", \"a\", \"b\"]\n        y = self.rs.randn(3)\n        y[-1] = np.nan\n        kws.update(x=x, y=y)\n        p = cat._ViolinPlotter(**kws)\n\n        _, ax = plt.subplots()\n        p.draw_violins(ax)\n        assert len(ax.collections) == 1\n        assert len(ax.lines) == 0\n        plt.close(\"all\")\n\n        # Test nested hue grouping\n        x = [\"a\"] * 4 + [\"b\"] * 2\n        y = self.rs.randn(6)\n        h = [\"m\", \"n\"] * 2 + [\"m\"] * 2\n        kws.update(x=x, y=y, hue=h)\n        p = cat._ViolinPlotter(**kws)\n\n        _, ax = plt.subplots()\n        p.draw_violins(ax)\n        assert len(ax.collections) == 3\n        assert len(ax.lines) == 0\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_violinplots_single_observations_TestViolinPlotter.test_draw_violinplots_single_observations.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_draw_violinplots_single_observations_TestViolinPlotter.test_draw_violinplots_single_observations.None_7", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1514, "end_line": 1552, "span_ids": ["TestViolinPlotter.test_draw_violinplots_single_observations"], "tokens": 324}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestViolinPlotter(CategoricalFixture):\n\n    def test_draw_violinplots_single_observations(self):\n\n        kws = self.default_kws.copy()\n        kws[\"inner\"] = None\n\n        # Test single layer of grouping\n        x = [\"a\", \"a\", \"b\"]\n        y = self.rs.randn(3)\n        kws.update(x=x, y=y)\n        p = cat._ViolinPlotter(**kws)\n\n        _, ax = plt.subplots()\n        p.draw_violins(ax)\n        assert len(ax.collections) == 1\n        assert len(ax.lines) == 1\n        plt.close(\"all\")\n\n        # Test nested hue grouping\n        x = [\"b\"] * 4 + [\"a\"] * 3\n        y = self.rs.randn(7)\n        h = ([\"m\", \"n\"] * 4)[:-1]\n        kws.update(x=x, y=y, hue=h)\n        p = cat._ViolinPlotter(**kws)\n\n        _, ax = plt.subplots()\n        p.draw_violins(ax)\n        assert len(ax.collections) == 3\n        assert len(ax.lines) == 1\n        plt.close(\"all\")\n\n        # Test nested hue grouping with split\n        kws[\"split\"] = True\n        p = cat._ViolinPlotter(**kws)\n\n        _, ax = plt.subplots()\n        p.draw_violins(ax)\n        assert len(ax.collections) == 3\n        assert len(ax.lines) == 1\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_violinplots_TestViolinPlotter.test_split_one_each.assert_len_ax_lines_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestViolinPlotter.test_violinplots_TestViolinPlotter.test_split_one_each.assert_len_ax_lines_4", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1554, "end_line": 1600, "span_ids": ["TestViolinPlotter.test_violinplots", "TestViolinPlotter.test_split_one_each"], "tokens": 449}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestViolinPlotter(CategoricalFixture):\n\n    def test_violinplots(self):\n\n        # Smoke test the high level violinplot options\n\n        cat.violinplot(x=\"y\", data=self.df)\n        plt.close(\"all\")\n\n        cat.violinplot(y=\"y\", data=self.df)\n        plt.close(\"all\")\n\n        cat.violinplot(x=\"g\", y=\"y\", data=self.df)\n        plt.close(\"all\")\n\n        cat.violinplot(x=\"y\", y=\"g\", data=self.df, orient=\"h\")\n        plt.close(\"all\")\n\n        cat.violinplot(x=\"g\", y=\"y\", hue=\"h\", data=self.df)\n        plt.close(\"all\")\n\n        order = list(\"nabc\")\n        cat.violinplot(x=\"g\", y=\"y\", hue=\"h\", order=order, data=self.df)\n        plt.close(\"all\")\n\n        order = list(\"omn\")\n        cat.violinplot(x=\"g\", y=\"y\", hue=\"h\", hue_order=order, data=self.df)\n        plt.close(\"all\")\n\n        cat.violinplot(x=\"y\", y=\"g\", hue=\"h\", data=self.df, orient=\"h\")\n        plt.close(\"all\")\n\n        for inner in [\"box\", \"quart\", \"point\", \"stick\", None]:\n            cat.violinplot(x=\"g\", y=\"y\", data=self.df, inner=inner)\n            plt.close(\"all\")\n\n            cat.violinplot(x=\"g\", y=\"y\", hue=\"h\", data=self.df, inner=inner)\n            plt.close(\"all\")\n\n            cat.violinplot(x=\"g\", y=\"y\", hue=\"h\", data=self.df,\n                           inner=inner, split=True)\n            plt.close(\"all\")\n\n    def test_split_one_each(self, rng):\n\n        x = np.repeat([0, 1], 5)\n        y = rng.normal(0, 1, 10)\n        ax = cat.violinplot(x=x, y=y, hue=x, split=True, inner=\"box\")\n        assert len(ax.lines) == 4", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py___SharedAxesLevelTests.test_two_calls.assert_ax_get_xlim_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py___SharedAxesLevelTests.test_two_calls.assert_ax_get_xlim_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1603, "end_line": 1633, "span_ids": ["TestViolinPlotter.test_split_one_each", "SharedAxesLevelTests.test_two_calls", "SharedAxesLevelTests.test_color", "SharedAxesLevelTests"], "tokens": 301}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# ====================================================================================\n# ====================================================================================\n\n\nclass SharedAxesLevelTests:\n\n    def test_color(self, long_df):\n\n        ax = plt.figure().subplots()\n        self.func(data=long_df, x=\"a\", y=\"y\", ax=ax)\n        assert self.get_last_color(ax) == to_rgba(\"C0\")\n\n        ax = plt.figure().subplots()\n        self.func(data=long_df, x=\"a\", y=\"y\", ax=ax)\n        self.func(data=long_df, x=\"a\", y=\"y\", ax=ax)\n        assert self.get_last_color(ax) == to_rgba(\"C1\")\n\n        ax = plt.figure().subplots()\n        self.func(data=long_df, x=\"a\", y=\"y\", color=\"C2\", ax=ax)\n        assert self.get_last_color(ax) == to_rgba(\"C2\")\n\n        ax = plt.figure().subplots()\n        self.func(data=long_df, x=\"a\", y=\"y\", color=\"C3\", ax=ax)\n        assert self.get_last_color(ax) == to_rgba(\"C3\")\n\n    def test_two_calls(self):\n\n        ax = plt.figure().subplots()\n        self.func(x=[\"a\", \"b\", \"c\"], y=[1, 2, 3], ax=ax)\n        self.func(x=[\"e\", \"f\"], y=[4, 5], ax=ax)\n        assert ax.get_xlim() == (-.5, 4.5)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests_SharedScatterTests.test_color.if_Version_mpl___version_.assert_self_get_last_colo": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests_SharedScatterTests.test_color.if_Version_mpl___version_.assert_self_get_last_colo", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1636, "end_line": 1661, "span_ids": ["SharedScatterTests.test_color", "SharedScatterTests.get_last_color", "SharedScatterTests"], "tokens": 225}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SharedScatterTests(SharedAxesLevelTests):\n    \"\"\"Tests functionality common to stripplot and swarmplot.\"\"\"\n\n    def get_last_color(self, ax):\n\n        colors = ax.collections[-1].get_facecolors()\n        unique_colors = np.unique(colors, axis=0)\n        assert len(unique_colors) == 1\n        return to_rgba(unique_colors.squeeze())\n\n    # ------------------------------------------------------------------------------\n\n    def test_color(self, long_df):\n\n        super().test_color(long_df)\n\n        ax = plt.figure().subplots()\n        self.func(data=long_df, x=\"a\", y=\"y\", facecolor=\"C4\", ax=ax)\n        assert self.get_last_color(ax) == to_rgba(\"C4\")\n\n        if Version(mpl.__version__) >= Version(\"3.1.0\"):\n            # https://github.com/matplotlib/matplotlib/pull/12851\n\n            ax = plt.figure().subplots()\n            self.func(data=long_df, x=\"a\", y=\"y\", fc=\"C5\", ax=ax)\n            assert self.get_last_color(ax) == to_rgba(\"C5\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_supplied_color_array_SharedScatterTests.test_supplied_color_array.assert_array_equal_ax_col": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_supplied_color_array_SharedScatterTests.test_supplied_color_array.assert_array_equal_ax_col", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1664, "end_line": 1686, "span_ids": ["SharedScatterTests.test_supplied_color_array"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SharedScatterTests(SharedAxesLevelTests):\n\n    def test_supplied_color_array(self, long_df):\n\n        cmap = get_colormap(\"Blues\")\n        norm = mpl.colors.Normalize()\n        colors = cmap(norm(long_df[\"y\"].to_numpy()))\n\n        keys = [\"c\", \"facecolor\", \"facecolors\"]\n\n        if Version(mpl.__version__) >= Version(\"3.1.0\"):\n            # https://github.com/matplotlib/matplotlib/pull/12851\n            keys.append(\"fc\")\n\n        for key in keys:\n\n            ax = plt.figure().subplots()\n            self.func(x=long_df[\"y\"], **{key: colors})\n            _draw_figure(ax.figure)\n            assert_array_equal(ax.collections[0].get_facecolors(), colors)\n\n        ax = plt.figure().subplots()\n        self.func(x=long_df[\"y\"], c=long_df[\"y\"], cmap=cmap)\n        _draw_figure(ax.figure)\n        assert_array_equal(ax.collections[0].get_facecolors(), colors)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_wide_SharedScatterTests.test_wide.for_i_label_in_enumerate.for_point_color_in_points.assert_tuple_point_color_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_wide_SharedScatterTests.test_wide.for_i_label_in_enumerate.for_point_color_in_points.assert_tuple_point_color_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1687, "end_line": 1718, "span_ids": ["SharedScatterTests.test_wide"], "tokens": 262}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SharedScatterTests(SharedAxesLevelTests):\n\n    @pytest.mark.parametrize(\n        \"orient,data_type\",\n        itertools.product([\"h\", \"v\"], [\"dataframe\", \"dict\"]),\n    )\n    def test_wide(self, wide_df, orient, data_type):\n\n        if data_type == \"dict\":\n            wide_df = {k: v.to_numpy() for k, v in wide_df.items()}\n\n        ax = self.func(data=wide_df, orient=orient)\n        _draw_figure(ax.figure)\n        palette = color_palette()\n\n        cat_idx = 0 if orient == \"v\" else 1\n        val_idx = int(not cat_idx)\n\n        axis_objs = ax.xaxis, ax.yaxis\n        cat_axis = axis_objs[cat_idx]\n\n        for i, label in enumerate(cat_axis.get_majorticklabels()):\n\n            key = label.get_text()\n            points = ax.collections[i]\n            point_pos = points.get_offsets().T\n            val_pos = point_pos[val_idx]\n            cat_pos = point_pos[cat_idx]\n\n            assert_array_equal(cat_pos.round(), i)\n            assert_array_equal(val_pos, wide_df[key])\n\n            for point_color in points.get_facecolors():\n                assert tuple(point_color) == to_rgba(palette[i])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_flat_SharedScatterTests.test_flat.assert_array_equal_pos_va": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_flat_SharedScatterTests.test_flat.assert_array_equal_pos_va", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1720, "end_line": 1733, "span_ids": ["SharedScatterTests.test_flat"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SharedScatterTests(SharedAxesLevelTests):\n\n    @pytest.mark.parametrize(\"orient\", [\"h\", \"v\"])\n    def test_flat(self, flat_series, orient):\n\n        ax = self.func(data=flat_series, orient=orient)\n        _draw_figure(ax.figure)\n\n        cat_idx = [\"v\", \"h\"].index(orient)\n        val_idx = int(not cat_idx)\n\n        points = ax.collections[0]\n        pos = points.get_offsets().T\n\n        assert_array_equal(pos[cat_idx].round(), np.zeros(len(flat_series)))\n        assert_array_equal(pos[val_idx], flat_series)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_positions_SharedScatterTests.test_positions.for_i_label_in_enumerate.assert_cat_axis_get_major": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_positions_SharedScatterTests.test_positions.for_i_label_in_enumerate.assert_cat_axis_get_major", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1735, "end_line": 1794, "span_ids": ["SharedScatterTests.test_positions"], "tokens": 676}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SharedScatterTests(SharedAxesLevelTests):\n\n    @pytest.mark.parametrize(\n        \"variables,orient\",\n        [\n            # Order matters for assigning to x/y\n            ({\"cat\": \"a\", \"val\": \"y\", \"hue\": None}, None),\n            ({\"val\": \"y\", \"cat\": \"a\", \"hue\": None}, None),\n            ({\"cat\": \"a\", \"val\": \"y\", \"hue\": \"a\"}, None),\n            ({\"val\": \"y\", \"cat\": \"a\", \"hue\": \"a\"}, None),\n            ({\"cat\": \"a\", \"val\": \"y\", \"hue\": \"b\"}, None),\n            ({\"val\": \"y\", \"cat\": \"a\", \"hue\": \"x\"}, None),\n            ({\"cat\": \"s\", \"val\": \"y\", \"hue\": None}, None),\n            ({\"val\": \"y\", \"cat\": \"s\", \"hue\": None}, \"h\"),\n            ({\"cat\": \"a\", \"val\": \"b\", \"hue\": None}, None),\n            ({\"val\": \"a\", \"cat\": \"b\", \"hue\": None}, \"h\"),\n            ({\"cat\": \"a\", \"val\": \"t\", \"hue\": None}, None),\n            ({\"val\": \"t\", \"cat\": \"a\", \"hue\": None}, None),\n            ({\"cat\": \"d\", \"val\": \"y\", \"hue\": None}, None),\n            ({\"val\": \"y\", \"cat\": \"d\", \"hue\": None}, None),\n            ({\"cat\": \"a_cat\", \"val\": \"y\", \"hue\": None}, None),\n            ({\"val\": \"y\", \"cat\": \"s_cat\", \"hue\": None}, None),\n        ],\n    )\n    def test_positions(self, long_df, variables, orient):\n\n        cat_var = variables[\"cat\"]\n        val_var = variables[\"val\"]\n        hue_var = variables[\"hue\"]\n        var_names = list(variables.values())\n        x_var, y_var, *_ = var_names\n\n        ax = self.func(\n            data=long_df, x=x_var, y=y_var, hue=hue_var, orient=orient,\n        )\n\n        _draw_figure(ax.figure)\n\n        cat_idx = var_names.index(cat_var)\n        val_idx = var_names.index(val_var)\n\n        axis_objs = ax.xaxis, ax.yaxis\n        cat_axis = axis_objs[cat_idx]\n        val_axis = axis_objs[val_idx]\n\n        cat_data = long_df[cat_var]\n        cat_levels = categorical_order(cat_data)\n\n        for i, label in enumerate(cat_levels):\n\n            vals = long_df.loc[cat_data == label, val_var]\n\n            points = ax.collections[i].get_offsets().T\n            cat_pos = points[var_names.index(cat_var)]\n            val_pos = points[var_names.index(val_var)]\n\n            assert_array_equal(val_pos, val_axis.convert_units(vals))\n            assert_array_equal(cat_pos.round(), i)\n            assert 0 <= np.ptp(cat_pos) <= .8\n\n            label = pd.Index([label]).astype(str)[0]\n            assert cat_axis.get_majorticklabels()[i].get_text() == label", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_positions_dodged_SharedScatterTests.test_positions_dodged.for_i_cat_val_in_enumera.for_j_hue_val_in_enumera.assert_0_np_ptp_cat_po": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_positions_dodged_SharedScatterTests.test_positions_dodged.for_i_cat_val_in_enumera.for_j_hue_val_in_enumera.assert_0_np_ptp_cat_po", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1796, "end_line": 1841, "span_ids": ["SharedScatterTests.test_positions_dodged"], "tokens": 435}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SharedScatterTests(SharedAxesLevelTests):\n\n    @pytest.mark.parametrize(\n        \"variables\",\n        [\n            # Order matters for assigning to x/y\n            {\"cat\": \"a\", \"val\": \"y\", \"hue\": \"b\"},\n            {\"val\": \"y\", \"cat\": \"a\", \"hue\": \"c\"},\n            {\"cat\": \"a\", \"val\": \"y\", \"hue\": \"f\"},\n        ],\n    )\n    def test_positions_dodged(self, long_df, variables):\n\n        cat_var = variables[\"cat\"]\n        val_var = variables[\"val\"]\n        hue_var = variables[\"hue\"]\n        var_names = list(variables.values())\n        x_var, y_var, *_ = var_names\n\n        ax = self.func(\n            data=long_df, x=x_var, y=y_var, hue=hue_var, dodge=True,\n        )\n\n        cat_vals = categorical_order(long_df[cat_var])\n        hue_vals = categorical_order(long_df[hue_var])\n\n        n_hue = len(hue_vals)\n        offsets = np.linspace(0, .8, n_hue + 1)[:-1]\n        offsets -= offsets.mean()\n        nest_width = .8 / n_hue\n\n        for i, cat_val in enumerate(cat_vals):\n            for j, hue_val in enumerate(hue_vals):\n                rows = (long_df[cat_var] == cat_val) & (long_df[hue_var] == hue_val)\n                vals = long_df.loc[rows, val_var]\n\n                points = ax.collections[n_hue * i + j].get_offsets().T\n                cat_pos = points[var_names.index(cat_var)]\n                val_pos = points[var_names.index(val_var)]\n\n                if pd.api.types.is_datetime64_any_dtype(vals):\n                    vals = mpl.dates.date2num(vals)\n\n                assert_array_equal(val_pos, vals)\n\n                assert_array_equal(cat_pos.round(), i)\n                assert_array_equal((cat_pos - (i + offsets[j])).round() / nest_width, 0)\n                assert 0 <= np.ptp(cat_pos) <= nest_width", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_positions_unfixed_SharedScatterTests.test_positions_unfixed.for_i_cat_level_cat_da.assert_array_equal_cat_po": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_positions_unfixed_SharedScatterTests.test_positions_unfixed.for_i_cat_level_cat_da.assert_array_equal_cat_po", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1843, "end_line": 1863, "span_ids": ["SharedScatterTests.test_positions_unfixed"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SharedScatterTests(SharedAxesLevelTests):\n\n    @pytest.mark.parametrize(\"cat_var\", [\"a\", \"s\", \"d\"])\n    def test_positions_unfixed(self, long_df, cat_var):\n\n        long_df = long_df.sort_values(cat_var)\n\n        kws = dict(size=.001)\n        if \"stripplot\" in str(self.func):  # can't use __name__ with partial\n            kws[\"jitter\"] = False\n\n        ax = self.func(data=long_df, x=cat_var, y=\"y\", native_scale=True, **kws)\n\n        for i, (cat_level, cat_data) in enumerate(long_df.groupby(cat_var)):\n\n            points = ax.collections[i].get_offsets().T\n            cat_pos = points[0]\n            val_pos = points[1]\n\n            assert_array_equal(val_pos, cat_data[\"y\"])\n\n            comp_level = np.squeeze(ax.xaxis.convert_units(cat_level)).item()\n            assert_array_equal(cat_pos.round(), comp_level)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_order_SharedScatterTests.test_order.for_i_points_in_enumerat.if_x_type_cat_in_x_.else_.assert_not_positions_size": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_order_SharedScatterTests.test_order.for_i_points_in_enumerat.if_x_type_cat_in_x_.else_.assert_not_positions_size", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1865, "end_line": 1909, "span_ids": ["SharedScatterTests.test_order"], "tokens": 352}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SharedScatterTests(SharedAxesLevelTests):\n\n    @pytest.mark.parametrize(\n        \"x_type,order\",\n        [\n            (str, None),\n            (str, [\"a\", \"b\", \"c\"]),\n            (str, [\"c\", \"a\"]),\n            (str, [\"a\", \"b\", \"c\", \"d\"]),\n            (int, None),\n            (int, [3, 1, 2]),\n            (int, [3, 1]),\n            (int, [1, 2, 3, 4]),\n            (int, [\"3\", \"1\", \"2\"]),\n        ]\n    )\n    def test_order(self, x_type, order):\n\n        if x_type is str:\n            x = [\"b\", \"a\", \"c\"]\n        else:\n            x = [2, 1, 3]\n        y = [1, 2, 3]\n\n        ax = self.func(x=x, y=y, order=order)\n        _draw_figure(ax.figure)\n\n        if order is None:\n            order = x\n            if x_type is int:\n                order = np.sort(order)\n\n        assert len(ax.collections) == len(order)\n        tick_labels = ax.xaxis.get_majorticklabels()\n\n        assert ax.get_xlim()[1] == (len(order) - .5)\n\n        for i, points in enumerate(ax.collections):\n            cat = order[i]\n            assert tick_labels[i].get_text() == str(cat)\n\n            positions = points.get_offsets()\n            if x_type(cat) in x:\n                val = y[x.index(x_type(cat))]\n                assert positions[0, 1] == val\n            else:\n                assert not positions.size", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_hue_categorical_SharedScatterTests.test_hue_categorical.for_i_level_in_enumerate.for_hue_color_in_zip_poi.assert_tuple_color_to": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_hue_categorical_SharedScatterTests.test_hue_categorical.for_i_level_in_enumerate.for_hue_color_in_zip_poi.assert_tuple_color_to", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1911, "end_line": 1934, "span_ids": ["SharedScatterTests.test_hue_categorical"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SharedScatterTests(SharedAxesLevelTests):\n\n    @pytest.mark.parametrize(\"hue_var\", [\"a\", \"b\"])\n    def test_hue_categorical(self, long_df, hue_var):\n\n        cat_var = \"b\"\n\n        hue_levels = categorical_order(long_df[hue_var])\n        cat_levels = categorical_order(long_df[cat_var])\n\n        pal_name = \"muted\"\n        palette = dict(zip(hue_levels, color_palette(pal_name)))\n        ax = self.func(data=long_df, x=cat_var, y=\"y\", hue=hue_var, palette=pal_name)\n\n        for i, level in enumerate(cat_levels):\n\n            sub_df = long_df[long_df[cat_var] == level]\n            point_hues = sub_df[hue_var]\n\n            points = ax.collections[i]\n            point_colors = points.get_facecolors()\n\n            assert len(point_hues) == len(point_colors)\n\n            for hue, color in zip(point_hues, point_colors):\n                assert tuple(color) == to_rgba(palette[hue])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_hue_dodged_SharedScatterTests.test_hue_dodged.while_colors_.if_points_get_offsets_a.assert_face_color_expe": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_hue_dodged_SharedScatterTests.test_hue_dodged.while_colors_.if_points_get_offsets_a.assert_face_color_expe", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1936, "end_line": 1951, "span_ids": ["SharedScatterTests.test_hue_dodged"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SharedScatterTests(SharedAxesLevelTests):\n\n    @pytest.mark.parametrize(\"hue_var\", [\"a\", \"b\"])\n    def test_hue_dodged(self, long_df, hue_var):\n\n        ax = self.func(data=long_df, x=\"y\", y=\"a\", hue=hue_var, dodge=True)\n        colors = color_palette(n_colors=long_df[hue_var].nunique())\n        collections = iter(ax.collections)\n\n        # Slightly awkward logic to handle challenges of how the artists work.\n        # e.g. there are empty scatter collections but the because facecolors\n        # for the empty collections will return the default scatter color\n        while colors:\n            points = next(collections)\n            if points.get_offsets().any():\n                face_color = tuple(points.get_facecolors()[0])\n                expected_color = to_rgba(colors.pop(0))\n                assert face_color == expected_color", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_single_SharedScatterTests.test_single.assert_not_ticklabels_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_single_SharedScatterTests.test_single.assert_not_ticklabels_0_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 1954, "end_line": 2000, "span_ids": ["SharedScatterTests.test_single"], "tokens": 408}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SharedScatterTests(SharedAxesLevelTests):\n\n    @pytest.mark.parametrize(\n        \"val_var,val_col,hue_col\",\n        list(itertools.product([\"x\", \"y\"], [\"b\", \"y\", \"t\"], [None, \"a\"])),\n    )\n    def test_single(self, long_df, val_var, val_col, hue_col):\n\n        var_kws = {val_var: val_col, \"hue\": hue_col}\n        ax = self.func(data=long_df, **var_kws)\n        _draw_figure(ax.figure)\n\n        axis_vars = [\"x\", \"y\"]\n        val_idx = axis_vars.index(val_var)\n        cat_idx = int(not val_idx)\n        cat_var = axis_vars[cat_idx]\n\n        cat_axis = getattr(ax, f\"{cat_var}axis\")\n        val_axis = getattr(ax, f\"{val_var}axis\")\n\n        points = ax.collections[0]\n        point_pos = points.get_offsets().T\n        cat_pos = point_pos[cat_idx]\n        val_pos = point_pos[val_idx]\n\n        assert_array_equal(cat_pos.round(), 0)\n        assert cat_pos.max() <= .4\n        assert cat_pos.min() >= -.4\n\n        num_vals = val_axis.convert_units(long_df[val_col])\n        assert_array_equal(val_pos, num_vals)\n\n        if hue_col is not None:\n            palette = dict(zip(\n                categorical_order(long_df[hue_col]), color_palette()\n            ))\n\n        facecolors = points.get_facecolors()\n        for i, color in enumerate(facecolors):\n            if hue_col is None:\n                assert tuple(color) == to_rgba(\"C0\")\n            else:\n                hue_level = long_df.loc[i, hue_col]\n                expected_color = palette[hue_level]\n                assert tuple(color) == to_rgba(expected_color)\n\n        ticklabels = cat_axis.get_majorticklabels()\n        assert len(ticklabels) == 1\n        assert not ticklabels[0].get_text()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_attributes_SharedScatterTests.test_legend_disabled.assert_ax_legend__is_None": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_attributes_SharedScatterTests.test_legend_disabled.assert_ax_legend__is_None", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2001, "end_line": 2039, "span_ids": ["SharedScatterTests.test_three_points", "SharedScatterTests.test_legend_categorical", "SharedScatterTests.test_legend_numeric", "SharedScatterTests.test_attributes", "SharedScatterTests.test_legend_disabled"], "tokens": 348}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SharedScatterTests(SharedAxesLevelTests):\n\n    def test_attributes(self, long_df):\n\n        kwargs = dict(\n            size=2,\n            linewidth=1,\n            edgecolor=\"C2\",\n        )\n\n        ax = self.func(x=long_df[\"y\"], **kwargs)\n        points, = ax.collections\n\n        assert points.get_sizes().item() == kwargs[\"size\"] ** 2\n        assert points.get_linewidths().item() == kwargs[\"linewidth\"]\n        assert tuple(points.get_edgecolors().squeeze()) == to_rgba(kwargs[\"edgecolor\"])\n\n    def test_three_points(self):\n\n        x = np.arange(3)\n        ax = self.func(x=x)\n        for point_color in ax.collections[0].get_facecolor():\n            assert tuple(point_color) == to_rgba(\"C0\")\n\n    def test_legend_categorical(self, long_df):\n\n        ax = self.func(data=long_df, x=\"y\", y=\"a\", hue=\"b\")\n        legend_texts = [t.get_text() for t in ax.legend_.texts]\n        expected = categorical_order(long_df[\"b\"])\n        assert legend_texts == expected\n\n    def test_legend_numeric(self, long_df):\n\n        ax = self.func(data=long_df, x=\"y\", y=\"a\", hue=\"z\")\n        vals = [float(t.get_text()) for t in ax.legend_.texts]\n        assert (vals[1] - vals[0]) == pytest.approx(vals[2] - vals[1])\n\n    def test_legend_disabled(self, long_df):\n\n        ax = self.func(data=long_df, x=\"y\", y=\"a\", hue=\"b\", legend=False)\n        assert ax.legend_ is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_palette_from_color_deprecation_SharedScatterTests.test_palette_with_hue_deprecation.for_strip_color_in_zip_s.assert_same_color_strip_g": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_palette_from_color_deprecation_SharedScatterTests.test_palette_with_hue_deprecation.for_strip_color_in_zip_s.assert_same_color_strip_g", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2041, "end_line": 2064, "span_ids": ["SharedScatterTests.test_palette_with_hue_deprecation", "SharedScatterTests.test_palette_from_color_deprecation"], "tokens": 256}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SharedScatterTests(SharedAxesLevelTests):\n\n    def test_palette_from_color_deprecation(self, long_df):\n\n        color = (.9, .4, .5)\n        hex_color = mpl.colors.to_hex(color)\n\n        hue_var = \"a\"\n        n_hue = long_df[hue_var].nunique()\n        palette = color_palette(f\"dark:{hex_color}\", n_hue)\n\n        with pytest.warns(FutureWarning, match=\"Setting a gradient palette\"):\n            ax = self.func(data=long_df, x=\"z\", hue=hue_var, color=color)\n\n        points = ax.collections[0]\n        for point_color in points.get_facecolors():\n            assert to_rgb(point_color) in palette\n\n    def test_palette_with_hue_deprecation(self, long_df):\n        palette = \"Blues\"\n        with pytest.warns(FutureWarning, match=\"Passing `palette` without\"):\n            ax = self.func(data=long_df, x=\"a\", y=long_df[\"y\"], palette=palette)\n        strips = ax.collections\n        colors = color_palette(palette, len(strips))\n        for strip, color in zip(strips, colors):\n            assert same_color(strip.get_facecolor()[0], color)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_log_scale_SharedScatterTests.test_log_scale.assert_np_ptp_np_log10_ca": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_log_scale_SharedScatterTests.test_log_scale.assert_np_ptp_np_log10_ca", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2066, "end_line": 2098, "span_ids": ["SharedScatterTests.test_log_scale"], "tokens": 313}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SharedScatterTests(SharedAxesLevelTests):\n\n    def test_log_scale(self):\n\n        x = [1, 10, 100, 1000]\n\n        ax = plt.figure().subplots()\n        ax.set_xscale(\"log\")\n        self.func(x=x)\n        vals = ax.collections[0].get_offsets()[:, 0]\n        assert_array_equal(x, vals)\n\n        y = [1, 2, 3, 4]\n\n        ax = plt.figure().subplots()\n        ax.set_xscale(\"log\")\n        self.func(x=x, y=y, native_scale=True)\n        for i, point in enumerate(ax.collections):\n            val = point.get_offsets()[0, 0]\n            assert val == pytest.approx(x[i])\n\n        x = y = np.ones(100)\n\n        # Following test fails on pinned (but not latest) matplotlib.\n        # (Even though visual output is ok -- so it's not an actual bug).\n        # I'm not exactly sure why, so this version check is approximate\n        # and should be revisited on a version bump.\n        if Version(mpl.__version__) < Version(\"3.1\"):\n            pytest.xfail()\n\n        ax = plt.figure().subplots()\n        ax.set_yscale(\"log\")\n        self.func(x=x, y=y, orient=\"h\", native_scale=True)\n        cat_points = ax.collections[0].get_offsets().copy()[:, 1]\n        assert np.ptp(np.log10(cat_points)) <= .8", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_vs_catplot_SharedScatterTests.test_vs_catplot.assert_plots_equal_ax_g_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_SharedScatterTests.test_vs_catplot_SharedScatterTests.test_vs_catplot.assert_plots_equal_ax_g_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2100, "end_line": 2134, "span_ids": ["SharedScatterTests.test_vs_catplot"], "tokens": 322}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SharedScatterTests(SharedAxesLevelTests):\n\n    @pytest.mark.parametrize(\n        \"kwargs\",\n        [\n            dict(data=\"wide\"),\n            dict(data=\"wide\", orient=\"h\"),\n            dict(data=\"long\", x=\"x\", color=\"C3\"),\n            dict(data=\"long\", y=\"y\", hue=\"a\", jitter=False),\n            dict(data=\"long\", x=\"a\", y=\"y\", hue=\"z\", edgecolor=\"w\", linewidth=.5),\n            dict(data=\"long\", x=\"a_cat\", y=\"y\", hue=\"z\"),\n            dict(data=\"long\", x=\"y\", y=\"s\", hue=\"c\", orient=\"h\", dodge=True),\n            dict(data=\"long\", x=\"s\", y=\"y\", hue=\"c\", native_scale=True),\n        ]\n    )\n    def test_vs_catplot(self, long_df, wide_df, kwargs):\n\n        kwargs = kwargs.copy()\n        if kwargs[\"data\"] == \"long\":\n            kwargs[\"data\"] = long_df\n        elif kwargs[\"data\"] == \"wide\":\n            kwargs[\"data\"] = wide_df\n\n        try:\n            name = self.func.__name__[:-4]\n        except AttributeError:\n            name = self.func.func.__name__[:-4]\n        if name == \"swarm\":\n            kwargs.pop(\"jitter\", None)\n\n        np.random.seed(0)  # for jitter\n        ax = self.func(**kwargs)\n\n        np.random.seed(0)\n        g = catplot(**kwargs, kind=name)\n\n        assert_plots_equal(ax, g.ax)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestStripPlot_TestStripPlot.test_jitter_unfixed.assert_p2_std_p1_std_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestStripPlot_TestStripPlot.test_jitter_unfixed.assert_p2_std_p1_std_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2137, "end_line": 2155, "span_ids": ["TestStripPlot", "TestStripPlot.test_jitter_unfixed"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestStripPlot(SharedScatterTests):\n\n    func = staticmethod(stripplot)\n\n    def test_jitter_unfixed(self, long_df):\n\n        ax1, ax2 = plt.figure().subplots(2)\n        kws = dict(data=long_df, x=\"y\", orient=\"h\", native_scale=True)\n\n        np.random.seed(0)\n        stripplot(**kws, y=\"s\", ax=ax1)\n\n        np.random.seed(0)\n        stripplot(**kws, y=long_df[\"s\"] * 2, ax=ax2)\n\n        p1 = ax1.collections[0].get_offsets()[1]\n        p2 = ax2.collections[0].get_offsets()[1]\n\n        assert p2.std() > p1.std()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_draw_vertical_bars_TestBarPlotter.test_draw_vertical_bars.for_bar_pos_stat_in_zip.assert_bar_get_height_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_draw_vertical_bars_TestBarPlotter.test_draw_vertical_bars.for_bar_pos_stat_in_zip.assert_bar_get_height_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2227, "end_line": 2247, "span_ids": ["TestBarPlotter.test_draw_vertical_bars"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBarPlotter(CategoricalFixture):\n\n    def test_draw_vertical_bars(self):\n\n        kws = self.default_kws.copy()\n        kws.update(x=\"g\", y=\"y\", data=self.df)\n        p = cat._BarPlotter(**kws)\n\n        f, ax = plt.subplots()\n        p.draw_bars(ax, {})\n\n        assert len(ax.patches) == len(p.plot_data)\n        assert len(ax.lines) == len(p.plot_data)\n\n        for bar, color in zip(ax.patches, p.colors):\n            assert bar.get_facecolor()[:-1] == color\n\n        positions = np.arange(len(p.plot_data)) - p.width / 2\n        for bar, pos, stat in zip(ax.patches, positions, p.statistic):\n            assert bar.get_x() == pos\n            assert bar.get_width() == p.width\n            assert bar.get_y() == 0\n            assert bar.get_height() == stat", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_draw_horizontal_bars_TestBarPlotter.test_draw_horizontal_bars.for_bar_pos_stat_in_zip.assert_bar_get_width_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_draw_horizontal_bars_TestBarPlotter.test_draw_horizontal_bars.for_bar_pos_stat_in_zip.assert_bar_get_width_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2249, "end_line": 2269, "span_ids": ["TestBarPlotter.test_draw_horizontal_bars"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBarPlotter(CategoricalFixture):\n\n    def test_draw_horizontal_bars(self):\n\n        kws = self.default_kws.copy()\n        kws.update(x=\"y\", y=\"g\", orient=\"h\", data=self.df)\n        p = cat._BarPlotter(**kws)\n\n        f, ax = plt.subplots()\n        p.draw_bars(ax, {})\n\n        assert len(ax.patches) == len(p.plot_data)\n        assert len(ax.lines) == len(p.plot_data)\n\n        for bar, color in zip(ax.patches, p.colors):\n            assert bar.get_facecolor()[:-1] == color\n\n        positions = np.arange(len(p.plot_data)) - p.width / 2\n        for bar, pos, stat in zip(ax.patches, positions, p.statistic):\n            assert bar.get_y() == pos\n            assert bar.get_height() == p.width\n            assert bar.get_x() == 0\n            assert bar.get_width() == stat", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_draw_nested_vertical_bars_TestBarPlotter.test_draw_nested_vertical_bars.for_bar_stat_in_zip_ax_p.assert_bar_get_height_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_draw_nested_vertical_bars_TestBarPlotter.test_draw_nested_vertical_bars.for_bar_stat_in_zip_ax_p.assert_bar_get_height_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2271, "end_line": 2296, "span_ids": ["TestBarPlotter.test_draw_nested_vertical_bars"], "tokens": 272}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBarPlotter(CategoricalFixture):\n\n    def test_draw_nested_vertical_bars(self):\n\n        kws = self.default_kws.copy()\n        kws.update(x=\"g\", y=\"y\", hue=\"h\", data=self.df)\n        p = cat._BarPlotter(**kws)\n\n        f, ax = plt.subplots()\n        p.draw_bars(ax, {})\n\n        n_groups, n_hues = len(p.plot_data), len(p.hue_names)\n        assert len(ax.patches) == n_groups * n_hues\n        assert len(ax.lines) == n_groups * n_hues\n\n        for bar in ax.patches[:n_groups]:\n            assert bar.get_facecolor()[:-1] == p.colors[0]\n        for bar in ax.patches[n_groups:]:\n            assert bar.get_facecolor()[:-1] == p.colors[1]\n\n        positions = np.arange(len(p.plot_data))\n        for bar, pos in zip(ax.patches[:n_groups], positions):\n            assert bar.get_x() == approx(pos - p.width / 2)\n            assert bar.get_width() == approx(p.nested_width)\n\n        for bar, stat in zip(ax.patches, p.statistic.T.flat):\n            assert bar.get_y() == approx(0)\n            assert bar.get_height() == approx(stat)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_draw_nested_horizontal_bars_TestBarPlotter.test_draw_nested_horizontal_bars.for_bar_stat_in_zip_ax_p.assert_bar_get_width_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_draw_nested_horizontal_bars_TestBarPlotter.test_draw_nested_horizontal_bars.for_bar_stat_in_zip_ax_p.assert_bar_get_width_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2298, "end_line": 2323, "span_ids": ["TestBarPlotter.test_draw_nested_horizontal_bars"], "tokens": 276}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBarPlotter(CategoricalFixture):\n\n    def test_draw_nested_horizontal_bars(self):\n\n        kws = self.default_kws.copy()\n        kws.update(x=\"y\", y=\"g\", hue=\"h\", orient=\"h\", data=self.df)\n        p = cat._BarPlotter(**kws)\n\n        f, ax = plt.subplots()\n        p.draw_bars(ax, {})\n\n        n_groups, n_hues = len(p.plot_data), len(p.hue_names)\n        assert len(ax.patches) == n_groups * n_hues\n        assert len(ax.lines) == n_groups * n_hues\n\n        for bar in ax.patches[:n_groups]:\n            assert bar.get_facecolor()[:-1] == p.colors[0]\n        for bar in ax.patches[n_groups:]:\n            assert bar.get_facecolor()[:-1] == p.colors[1]\n\n        positions = np.arange(len(p.plot_data))\n        for bar, pos in zip(ax.patches[:n_groups], positions):\n            assert bar.get_y() == approx(pos - p.width / 2)\n            assert bar.get_height() == approx(p.nested_width)\n\n        for bar, stat in zip(ax.patches, p.statistic.T.flat):\n            assert bar.get_x() == approx(0)\n            assert bar.get_width() == approx(stat)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_draw_missing_bars_TestBarPlotter.test_draw_missing_bars.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_draw_missing_bars_TestBarPlotter.test_draw_missing_bars.None_5", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2325, "end_line": 2351, "span_ids": ["TestBarPlotter.test_draw_missing_bars"], "tokens": 218}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBarPlotter(CategoricalFixture):\n\n    def test_draw_missing_bars(self):\n\n        kws = self.default_kws.copy()\n\n        order = list(\"abcd\")\n        kws.update(x=\"g\", y=\"y\", order=order, data=self.df)\n        p = cat._BarPlotter(**kws)\n\n        f, ax = plt.subplots()\n        p.draw_bars(ax, {})\n\n        assert len(ax.patches) == len(order)\n        assert len(ax.lines) == len(order)\n\n        plt.close(\"all\")\n\n        hue_order = list(\"mno\")\n        kws.update(x=\"g\", y=\"y\", hue=\"h\", hue_order=hue_order, data=self.df)\n        p = cat._BarPlotter(**kws)\n\n        f, ax = plt.subplots()\n        p.draw_bars(ax, {})\n\n        assert len(ax.patches) == len(p.plot_data) * len(hue_order)\n        assert len(ax.lines) == len(p.plot_data) * len(hue_order)\n\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_unaligned_index_TestBarPlotter.test_unaligned_index.None_3.assert_approx_p1_get_widt": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_unaligned_index_TestBarPlotter.test_unaligned_index.None_3.assert_approx_p1_get_widt", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2355, "end_line": 2378, "span_ids": ["TestBarPlotter.test_unaligned_index"], "tokens": 353}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBarPlotter(CategoricalFixture):\n\n    def test_unaligned_index(self):\n\n        f, (ax1, ax2) = plt.subplots(2)\n        cat.barplot(x=self.g, y=self.y, errorbar=\"sd\", ax=ax1)\n        cat.barplot(x=self.g, y=self.y_perm, errorbar=\"sd\", ax=ax2)\n        for l1, l2 in zip(ax1.lines, ax2.lines):\n            assert approx(l1.get_xydata()) == l2.get_xydata()\n        for p1, p2 in zip(ax1.patches, ax2.patches):\n            assert approx(p1.get_xy()) == p2.get_xy()\n            assert approx(p1.get_height()) == p2.get_height()\n            assert approx(p1.get_width()) == p2.get_width()\n\n        f, (ax1, ax2) = plt.subplots(2)\n        hue_order = self.h.unique()\n        cat.barplot(x=self.g, y=self.y, hue=self.h,\n                    hue_order=hue_order, errorbar=\"sd\", ax=ax1)\n        cat.barplot(x=self.g, y=self.y_perm, hue=self.h,\n                    hue_order=hue_order, errorbar=\"sd\", ax=ax2)\n        for l1, l2 in zip(ax1.lines, ax2.lines):\n            assert approx(l1.get_xydata()) == l2.get_xydata()\n        for p1, p2 in zip(ax1.patches, ax2.patches):\n            assert approx(p1.get_xy()) == p2.get_xy()\n            assert approx(p1.get_height()) == p2.get_height()\n            assert approx(p1.get_width()) == p2.get_width()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_barplot_colors_TestBarPlotter.test_barplot_colors.None_8": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_barplot_colors_TestBarPlotter.test_barplot_colors.None_8", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2378, "end_line": 2425, "span_ids": ["TestBarPlotter.test_barplot_colors"], "tokens": 403}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBarPlotter(CategoricalFixture):\n\n    def test_barplot_colors(self):\n\n        # Test unnested palette colors\n        kws = self.default_kws.copy()\n        kws.update(x=\"g\", y=\"y\", data=self.df,\n                   saturation=1, palette=\"muted\")\n        p = cat._BarPlotter(**kws)\n\n        f, ax = plt.subplots()\n        p.draw_bars(ax, {})\n\n        palette = palettes.color_palette(\"muted\", len(self.g.unique()))\n        for patch, pal_color in zip(ax.patches, palette):\n            assert patch.get_facecolor()[:-1] == pal_color\n\n        plt.close(\"all\")\n\n        # Test single color\n        color = (.2, .2, .3, 1)\n        kws = self.default_kws.copy()\n        kws.update(x=\"g\", y=\"y\", data=self.df,\n                   saturation=1, color=color)\n        p = cat._BarPlotter(**kws)\n\n        f, ax = plt.subplots()\n        p.draw_bars(ax, {})\n\n        for patch in ax.patches:\n            assert patch.get_facecolor() == color\n\n        plt.close(\"all\")\n\n        # Test nested palette colors\n        kws = self.default_kws.copy()\n        kws.update(x=\"g\", y=\"y\", hue=\"h\", data=self.df,\n                   saturation=1, palette=\"Set2\")\n        p = cat._BarPlotter(**kws)\n\n        f, ax = plt.subplots()\n        p.draw_bars(ax, {})\n\n        palette = palettes.color_palette(\"Set2\", len(self.h.unique()))\n        for patch in ax.patches[:len(self.g.unique())]:\n            assert patch.get_facecolor()[:-1] == palette[0]\n        for patch in ax.patches[len(self.g.unique()):]:\n            assert patch.get_facecolor()[:-1] == palette[1]\n\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_simple_barplots_TestBarPlotter.test_simple_barplots.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_simple_barplots_TestBarPlotter.test_simple_barplots.None_3", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2427, "end_line": 2451, "span_ids": ["TestBarPlotter.test_simple_barplots"], "tokens": 273}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBarPlotter(CategoricalFixture):\n\n    def test_simple_barplots(self):\n\n        ax = cat.barplot(x=\"g\", y=\"y\", data=self.df)\n        assert len(ax.patches) == len(self.g.unique())\n        assert ax.get_xlabel() == \"g\"\n        assert ax.get_ylabel() == \"y\"\n        plt.close(\"all\")\n\n        ax = cat.barplot(x=\"y\", y=\"g\", orient=\"h\", data=self.df)\n        assert len(ax.patches) == len(self.g.unique())\n        assert ax.get_xlabel() == \"y\"\n        assert ax.get_ylabel() == \"g\"\n        plt.close(\"all\")\n\n        ax = cat.barplot(x=\"g\", y=\"y\", hue=\"h\", data=self.df)\n        assert len(ax.patches) == len(self.g.unique()) * len(self.h.unique())\n        assert ax.get_xlabel() == \"g\"\n        assert ax.get_ylabel() == \"y\"\n        plt.close(\"all\")\n\n        ax = cat.barplot(x=\"y\", y=\"g\", hue=\"h\", orient=\"h\", data=self.df)\n        assert len(ax.patches) == len(self.g.unique()) * len(self.h.unique())\n        assert ax.get_xlabel() == \"y\"\n        assert ax.get_ylabel() == \"g\"\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter_TestPointPlotter.test_different_defualt_colors.npt_assert_array_equal_p_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter_TestPointPlotter.test_different_defualt_colors.npt_assert_array_equal_p_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2468, "end_line": 2486, "span_ids": ["TestPointPlotter", "TestPointPlotter.test_different_defualt_colors"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPointPlotter(CategoricalFixture):\n\n    default_kws = dict(\n        x=None, y=None, hue=None, data=None,\n        estimator=\"mean\", errorbar=(\"ci\", 95),\n        n_boot=100, units=None, seed=None,\n        order=None, hue_order=None,\n        markers=\"o\", linestyles=\"-\", dodge=0,\n        join=True, scale=1,\n        orient=None, color=None, palette=None,\n    )\n\n    def test_different_defualt_colors(self):\n\n        kws = self.default_kws.copy()\n        kws.update(dict(x=\"g\", y=\"y\", data=self.df))\n        p = cat._PointPlotter(**kws)\n        color = palettes.color_palette()[0]\n        npt.assert_array_equal(p.colors, [color, color, color])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_hue_offsets_TestPointPlotter.test_hue_offsets.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_hue_offsets_TestPointPlotter.test_hue_offsets.None_7", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2473, "end_line": 2494, "span_ids": ["TestPointPlotter.test_hue_offsets"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPointPlotter(CategoricalFixture):\n\n    def test_hue_offsets(self):\n\n        kws = self.default_kws.copy()\n        kws.update(dict(x=\"g\", y=\"y\", hue=\"h\", data=self.df))\n\n        p = cat._PointPlotter(**kws)\n        npt.assert_array_equal(p.hue_offsets, [0, 0])\n\n        kws.update(dict(dodge=.5))\n\n        p = cat._PointPlotter(**kws)\n        npt.assert_array_equal(p.hue_offsets, [-.25, .25])\n\n        kws.update(dict(x=\"h\", hue=\"g\", dodge=0))\n\n        p = cat._PointPlotter(**kws)\n        npt.assert_array_equal(p.hue_offsets, [0, 0, 0])\n\n        kws.update(dict(dodge=.3))\n\n        p = cat._PointPlotter(**kws)\n        npt.assert_array_equal(p.hue_offsets, [-.15, 0, .15])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_draw_vertical_points_TestPointPlotter.test_draw_vertical_points.for_got_color_want_color.npt_assert_array_equal_go": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_draw_vertical_points_TestPointPlotter.test_draw_vertical_points.for_got_color_want_color.npt_assert_array_equal_go", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2496, "end_line": 2516, "span_ids": ["TestPointPlotter.test_draw_vertical_points"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPointPlotter(CategoricalFixture):\n\n    def test_draw_vertical_points(self):\n\n        kws = self.default_kws.copy()\n        kws.update(x=\"g\", y=\"y\", data=self.df)\n        p = cat._PointPlotter(**kws)\n\n        f, ax = plt.subplots()\n        p.draw_points(ax)\n\n        assert len(ax.collections) == 1\n        assert len(ax.lines) == len(p.plot_data) + 1\n        points = ax.collections[0]\n        assert len(points.get_offsets()) == len(p.plot_data)\n\n        x, y = points.get_offsets().T\n        npt.assert_array_equal(x, np.arange(len(p.plot_data)))\n        npt.assert_array_equal(y, p.statistic)\n\n        for got_color, want_color in zip(points.get_facecolors(),\n                                         p.colors):\n            npt.assert_array_equal(got_color[:-1], want_color)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_draw_horizontal_points_TestPointPlotter.test_draw_horizontal_points.for_got_color_want_color.npt_assert_array_equal_go": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_draw_horizontal_points_TestPointPlotter.test_draw_horizontal_points.for_got_color_want_color.npt_assert_array_equal_go", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2518, "end_line": 2538, "span_ids": ["TestPointPlotter.test_draw_horizontal_points"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPointPlotter(CategoricalFixture):\n\n    def test_draw_horizontal_points(self):\n\n        kws = self.default_kws.copy()\n        kws.update(x=\"y\", y=\"g\", orient=\"h\", data=self.df)\n        p = cat._PointPlotter(**kws)\n\n        f, ax = plt.subplots()\n        p.draw_points(ax)\n\n        assert len(ax.collections) == 1\n        assert len(ax.lines) == len(p.plot_data) + 1\n        points = ax.collections[0]\n        assert len(points.get_offsets()) == len(p.plot_data)\n\n        x, y = points.get_offsets().T\n        npt.assert_array_equal(x, p.statistic)\n        npt.assert_array_equal(y, np.arange(len(p.plot_data)))\n\n        for got_color, want_color in zip(points.get_facecolors(),\n                                         p.colors):\n            npt.assert_array_equal(got_color[:-1], want_color)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_draw_vertical_nested_points_TestPointPlotter.test_draw_vertical_nested_points.for_points_numbers_colo.for_got_color_in_points_g.npt_assert_array_equal_go": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_draw_vertical_nested_points_TestPointPlotter.test_draw_vertical_nested_points.for_points_numbers_colo.for_got_color_in_points_g.npt_assert_array_equal_go", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2540, "end_line": 2563, "span_ids": ["TestPointPlotter.test_draw_vertical_nested_points"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPointPlotter(CategoricalFixture):\n\n    def test_draw_vertical_nested_points(self):\n\n        kws = self.default_kws.copy()\n        kws.update(x=\"g\", y=\"y\", hue=\"h\", data=self.df)\n        p = cat._PointPlotter(**kws)\n\n        f, ax = plt.subplots()\n        p.draw_points(ax)\n\n        assert len(ax.collections) == 2\n        assert len(ax.lines) == len(p.plot_data) * len(p.hue_names) + len(p.hue_names)\n\n        for points, numbers, color in zip(ax.collections,\n                                          p.statistic.T,\n                                          p.colors):\n\n            assert len(points.get_offsets()) == len(p.plot_data)\n\n            x, y = points.get_offsets().T\n            npt.assert_array_equal(x, np.arange(len(p.plot_data)))\n            npt.assert_array_equal(y, numbers)\n\n            for got_color in points.get_facecolors():\n                npt.assert_array_equal(got_color[:-1], color)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_draw_horizontal_nested_points_TestPointPlotter.test_draw_horizontal_nested_points.for_points_numbers_colo.for_got_color_in_points_g.npt_assert_array_equal_go": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_draw_horizontal_nested_points_TestPointPlotter.test_draw_horizontal_nested_points.for_points_numbers_colo.for_got_color_in_points_g.npt_assert_array_equal_go", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2565, "end_line": 2588, "span_ids": ["TestPointPlotter.test_draw_horizontal_nested_points"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPointPlotter(CategoricalFixture):\n\n    def test_draw_horizontal_nested_points(self):\n\n        kws = self.default_kws.copy()\n        kws.update(x=\"y\", y=\"g\", hue=\"h\", orient=\"h\", data=self.df)\n        p = cat._PointPlotter(**kws)\n\n        f, ax = plt.subplots()\n        p.draw_points(ax)\n\n        assert len(ax.collections) == 2\n        assert len(ax.lines) == len(p.plot_data) * len(p.hue_names) + len(p.hue_names)\n\n        for points, numbers, color in zip(ax.collections,\n                                          p.statistic.T,\n                                          p.colors):\n\n            assert len(points.get_offsets()) == len(p.plot_data)\n\n            x, y = points.get_offsets().T\n            npt.assert_array_equal(x, numbers)\n            npt.assert_array_equal(y, np.arange(len(p.plot_data)))\n\n            for got_color in points.get_facecolors():\n                npt.assert_array_equal(got_color[:-1], color)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_draw_missing_points_TestPointPlotter.test_draw_missing_points.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_draw_missing_points_TestPointPlotter.test_draw_missing_points.None_3", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2590, "end_line": 2604, "span_ids": ["TestPointPlotter.test_draw_missing_points"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPointPlotter(CategoricalFixture):\n\n    def test_draw_missing_points(self):\n\n        kws = self.default_kws.copy()\n        df = self.df.copy()\n\n        kws.update(x=\"g\", y=\"y\", hue=\"h\", hue_order=[\"x\", \"y\"], data=df)\n        p = cat._PointPlotter(**kws)\n        f, ax = plt.subplots()\n        p.draw_points(ax)\n\n        df.loc[df[\"h\"] == \"m\", \"y\"] = np.nan\n        kws.update(x=\"g\", y=\"y\", hue=\"h\", data=df)\n        p = cat._PointPlotter(**kws)\n        f, ax = plt.subplots()\n        p.draw_points(ax)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_unaligned_index_TestPointPlotter.test_unaligned_index.None_3.assert_approx_p1_get_offs": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_unaligned_index_TestPointPlotter.test_unaligned_index.None_3.assert_approx_p1_get_offs", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2621, "end_line": 2640, "span_ids": ["TestPointPlotter.test_unaligned_index"], "tokens": 293}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPointPlotter(CategoricalFixture):\n\n    def test_unaligned_index(self):\n\n        f, (ax1, ax2) = plt.subplots(2)\n        cat.pointplot(x=self.g, y=self.y, errorbar=\"sd\", ax=ax1)\n        cat.pointplot(x=self.g, y=self.y_perm, errorbar=\"sd\", ax=ax2)\n        for l1, l2 in zip(ax1.lines, ax2.lines):\n            assert approx(l1.get_xydata()) == l2.get_xydata()\n        for p1, p2 in zip(ax1.collections, ax2.collections):\n            assert approx(p1.get_offsets()) == p2.get_offsets()\n\n        f, (ax1, ax2) = plt.subplots(2)\n        hue_order = self.h.unique()\n        cat.pointplot(x=self.g, y=self.y, hue=self.h,\n                      hue_order=hue_order, errorbar=\"sd\", ax=ax1)\n        cat.pointplot(x=self.g, y=self.y_perm, hue=self.h,\n                      hue_order=hue_order, errorbar=\"sd\", ax=ax2)\n        for l1, l2 in zip(ax1.lines, ax2.lines):\n            assert approx(l1.get_xydata()) == l2.get_xydata()\n        for p1, p2 in zip(ax1.collections, ax2.collections):\n            assert approx(p1.get_offsets()) == p2.get_offsets()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_pointplot_colors_TestPointPlotter.test_pointplot_colors.None_8": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_pointplot_colors_TestPointPlotter.test_pointplot_colors.None_8", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2627, "end_line": 2682, "span_ids": ["TestPointPlotter.test_pointplot_colors"], "tokens": 475}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPointPlotter(CategoricalFixture):\n\n    def test_pointplot_colors(self):\n\n        # Test a single-color unnested plot\n        color = (.2, .2, .3, 1)\n        kws = self.default_kws.copy()\n        kws.update(x=\"g\", y=\"y\", data=self.df, color=color)\n        p = cat._PointPlotter(**kws)\n\n        f, ax = plt.subplots()\n        p.draw_points(ax)\n\n        for line in ax.lines:\n            assert line.get_color() == color[:-1]\n\n        for got_color in ax.collections[0].get_facecolors():\n            npt.assert_array_equal(rgb2hex(got_color), rgb2hex(color))\n\n        plt.close(\"all\")\n\n        # Test a multi-color unnested plot\n        palette = palettes.color_palette(\"Set1\", 3)\n        kws.update(x=\"g\", y=\"y\", data=self.df, palette=\"Set1\")\n        p = cat._PointPlotter(**kws)\n\n        assert not p.join\n\n        f, ax = plt.subplots()\n        p.draw_points(ax)\n\n        for line, pal_color in zip(ax.lines, palette):\n            npt.assert_array_equal(line.get_color(), pal_color)\n\n        for point_color, pal_color in zip(ax.collections[0].get_facecolors(),\n                                          palette):\n            npt.assert_array_equal(rgb2hex(point_color), rgb2hex(pal_color))\n\n        plt.close(\"all\")\n\n        # Test a multi-colored nested plot\n        palette = palettes.color_palette(\"dark\", 2)\n        kws.update(x=\"g\", y=\"y\", hue=\"h\", data=self.df, palette=\"dark\")\n        p = cat._PointPlotter(**kws)\n\n        f, ax = plt.subplots()\n        p.draw_points(ax)\n\n        for line in ax.lines[:(len(p.plot_data) + 1)]:\n            assert line.get_color() == palette[0]\n        for line in ax.lines[(len(p.plot_data) + 1):]:\n            assert line.get_color() == palette[1]\n\n        for i, pal_color in enumerate(palette):\n            for point_color in ax.collections[i].get_facecolors():\n                npt.assert_array_equal(point_color[:-1], pal_color)\n\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_simple_pointplots_TestPointPlotter.test_simple_pointplots.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_simple_pointplots_TestPointPlotter.test_simple_pointplots.None_3", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2684, "end_line": 2716, "span_ids": ["TestPointPlotter.test_simple_pointplots"], "tokens": 341}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPointPlotter(CategoricalFixture):\n\n    def test_simple_pointplots(self):\n\n        ax = cat.pointplot(x=\"g\", y=\"y\", data=self.df)\n        assert len(ax.collections) == 1\n        assert len(ax.lines) == len(self.g.unique()) + 1\n        assert ax.get_xlabel() == \"g\"\n        assert ax.get_ylabel() == \"y\"\n        plt.close(\"all\")\n\n        ax = cat.pointplot(x=\"y\", y=\"g\", orient=\"h\", data=self.df)\n        assert len(ax.collections) == 1\n        assert len(ax.lines) == len(self.g.unique()) + 1\n        assert ax.get_xlabel() == \"y\"\n        assert ax.get_ylabel() == \"g\"\n        plt.close(\"all\")\n\n        ax = cat.pointplot(x=\"g\", y=\"y\", hue=\"h\", data=self.df)\n        assert len(ax.collections) == len(self.h.unique())\n        assert len(ax.lines) == (\n            len(self.g.unique()) * len(self.h.unique()) + len(self.h.unique())\n        )\n        assert ax.get_xlabel() == \"g\"\n        assert ax.get_ylabel() == \"y\"\n        plt.close(\"all\")\n\n        ax = cat.pointplot(x=\"y\", y=\"g\", hue=\"h\", orient=\"h\", data=self.df)\n        assert len(ax.collections) == len(self.h.unique())\n        assert len(ax.lines) == (\n            len(self.g.unique()) * len(self.h.unique()) + len(self.h.unique())\n        )\n        assert ax.get_xlabel() == \"y\"\n        assert ax.get_ylabel() == \"g\"\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCountPlot_TestCountPlot.test_input_error.with_pytest_raises_ValueE.cat_countplot_x_g_y_h": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCountPlot_TestCountPlot.test_input_error.with_pytest_raises_ValueE.cat_countplot_x_g_y_h", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2719, "end_line": 2748, "span_ids": ["TestCountPlot.test_input_error", "TestCountPlot", "TestCountPlot.test_plot_elements"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCountPlot(CategoricalFixture):\n\n    def test_plot_elements(self):\n\n        ax = cat.countplot(x=\"g\", data=self.df)\n        assert len(ax.patches) == self.g.unique().size\n        for p in ax.patches:\n            assert p.get_y() == 0\n            assert p.get_height() == self.g.size / self.g.unique().size\n        plt.close(\"all\")\n\n        ax = cat.countplot(y=\"g\", data=self.df)\n        assert len(ax.patches) == self.g.unique().size\n        for p in ax.patches:\n            assert p.get_x() == 0\n            assert p.get_width() == self.g.size / self.g.unique().size\n        plt.close(\"all\")\n\n        ax = cat.countplot(x=\"g\", hue=\"h\", data=self.df)\n        assert len(ax.patches) == self.g.unique().size * self.h.unique().size\n        plt.close(\"all\")\n\n        ax = cat.countplot(y=\"g\", hue=\"h\", data=self.df)\n        assert len(ax.patches) == self.g.unique().size * self.h.unique().size\n        plt.close(\"all\")\n\n    def test_input_error(self):\n\n        with pytest.raises(ValueError):\n            cat.countplot(x=\"g\", y=\"h\", data=self.df)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCatPlot_TestCatPlot.test_facet_organization.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCatPlot_TestCatPlot.test_facet_organization.None_3", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2751, "end_line": 2765, "span_ids": ["TestCatPlot", "TestCatPlot.test_facet_organization"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCatPlot(CategoricalFixture):\n\n    def test_facet_organization(self):\n\n        g = cat.catplot(x=\"g\", y=\"y\", data=self.df)\n        assert g.axes.shape == (1, 1)\n\n        g = cat.catplot(x=\"g\", y=\"y\", col=\"h\", data=self.df)\n        assert g.axes.shape == (1, 2)\n\n        g = cat.catplot(x=\"g\", y=\"y\", row=\"h\", data=self.df)\n        assert g.axes.shape == (2, 1)\n\n        g = cat.catplot(x=\"g\", y=\"y\", col=\"u\", row=\"h\", data=self.df)\n        assert g.axes.shape == (2, 3)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCatPlot.test_plot_elements_TestCatPlot.test_plot_elements.None_18": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCatPlot.test_plot_elements_TestCatPlot.test_plot_elements.None_18", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2767, "end_line": 2830, "span_ids": ["TestCatPlot.test_plot_elements"], "tokens": 755}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCatPlot(CategoricalFixture):\n\n    def test_plot_elements(self):\n\n        g = cat.catplot(x=\"g\", y=\"y\", data=self.df, kind=\"point\")\n        assert len(g.ax.collections) == 1\n        want_lines = self.g.unique().size + 1\n        assert len(g.ax.lines) == want_lines\n\n        g = cat.catplot(x=\"g\", y=\"y\", hue=\"h\", data=self.df, kind=\"point\")\n        want_collections = self.h.unique().size\n        assert len(g.ax.collections) == want_collections\n        want_lines = (self.g.unique().size + 1) * self.h.unique().size\n        assert len(g.ax.lines) == want_lines\n\n        g = cat.catplot(x=\"g\", y=\"y\", data=self.df, kind=\"bar\")\n        want_elements = self.g.unique().size\n        assert len(g.ax.patches) == want_elements\n        assert len(g.ax.lines) == want_elements\n\n        g = cat.catplot(x=\"g\", y=\"y\", hue=\"h\", data=self.df, kind=\"bar\")\n        want_elements = self.g.unique().size * self.h.unique().size\n        assert len(g.ax.patches) == want_elements\n        assert len(g.ax.lines) == want_elements\n\n        g = cat.catplot(x=\"g\", data=self.df, kind=\"count\")\n        want_elements = self.g.unique().size\n        assert len(g.ax.patches) == want_elements\n        assert len(g.ax.lines) == 0\n\n        g = cat.catplot(x=\"g\", hue=\"h\", data=self.df, kind=\"count\")\n        want_elements = self.g.unique().size * self.h.unique().size\n        assert len(g.ax.patches) == want_elements\n        assert len(g.ax.lines) == 0\n\n        g = cat.catplot(y=\"y\", data=self.df, kind=\"box\")\n        want_artists = 1\n        assert len(self.get_box_artists(g.ax)) == want_artists\n\n        g = cat.catplot(x=\"g\", y=\"y\", data=self.df, kind=\"box\")\n        want_artists = self.g.unique().size\n        assert len(self.get_box_artists(g.ax)) == want_artists\n\n        g = cat.catplot(x=\"g\", y=\"y\", hue=\"h\", data=self.df, kind=\"box\")\n        want_artists = self.g.unique().size * self.h.unique().size\n        assert len(self.get_box_artists(g.ax)) == want_artists\n\n        g = cat.catplot(x=\"g\", y=\"y\", data=self.df,\n                        kind=\"violin\", inner=None)\n        want_elements = self.g.unique().size\n        assert len(g.ax.collections) == want_elements\n\n        g = cat.catplot(x=\"g\", y=\"y\", hue=\"h\", data=self.df,\n                        kind=\"violin\", inner=None)\n        want_elements = self.g.unique().size * self.h.unique().size\n        assert len(g.ax.collections) == want_elements\n\n        g = cat.catplot(x=\"g\", y=\"y\", data=self.df, kind=\"strip\")\n        want_elements = self.g.unique().size\n        assert len(g.ax.collections) == want_elements\n        for strip in g.ax.collections:\n            assert same_color(strip.get_facecolors(), \"C0\")\n\n        g = cat.catplot(x=\"g\", y=\"y\", hue=\"h\", data=self.df, kind=\"strip\")\n        want_elements = self.g.unique().size + self.h.unique().size\n        assert len(g.ax.collections) == want_elements", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCatPlot.test_bad_plot_kind_error_TestCatPlot.test_plot_colors.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCatPlot.test_bad_plot_kind_error_TestCatPlot.test_plot_colors.None_5", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2861, "end_line": 2909, "span_ids": ["TestCatPlot.test_plot_colors", "TestCatPlot.test_count_x_and_y", "TestCatPlot.test_bad_plot_kind_error"], "tokens": 591}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCatPlot(CategoricalFixture):\n\n    def test_bad_plot_kind_error(self):\n\n        with pytest.raises(ValueError):\n            cat.catplot(x=\"g\", y=\"y\", data=self.df, kind=\"not_a_kind\")\n\n    def test_count_x_and_y(self):\n\n        with pytest.raises(ValueError):\n            cat.catplot(x=\"g\", y=\"y\", data=self.df, kind=\"count\")\n\n    def test_plot_colors(self):\n\n        ax = cat.barplot(x=\"g\", y=\"y\", data=self.df)\n        g = cat.catplot(x=\"g\", y=\"y\", data=self.df, kind=\"bar\")\n        for p1, p2 in zip(ax.patches, g.ax.patches):\n            assert p1.get_facecolor() == p2.get_facecolor()\n        plt.close(\"all\")\n\n        ax = cat.barplot(x=\"g\", y=\"y\", data=self.df, color=\"purple\")\n        g = cat.catplot(x=\"g\", y=\"y\", data=self.df,\n                        kind=\"bar\", color=\"purple\")\n        for p1, p2 in zip(ax.patches, g.ax.patches):\n            assert p1.get_facecolor() == p2.get_facecolor()\n        plt.close(\"all\")\n\n        ax = cat.barplot(x=\"g\", y=\"y\", data=self.df, palette=\"Set2\", hue=\"h\")\n        g = cat.catplot(x=\"g\", y=\"y\", data=self.df,\n                        kind=\"bar\", palette=\"Set2\", hue=\"h\")\n        for p1, p2 in zip(ax.patches, g.ax.patches):\n            assert p1.get_facecolor() == p2.get_facecolor()\n        plt.close(\"all\")\n\n        ax = cat.pointplot(x=\"g\", y=\"y\", data=self.df)\n        g = cat.catplot(x=\"g\", y=\"y\", data=self.df)\n        for l1, l2 in zip(ax.lines, g.ax.lines):\n            assert l1.get_color() == l2.get_color()\n        plt.close(\"all\")\n\n        ax = cat.pointplot(x=\"g\", y=\"y\", data=self.df, color=\"purple\")\n        g = cat.catplot(x=\"g\", y=\"y\", data=self.df, color=\"purple\")\n        for l1, l2 in zip(ax.lines, g.ax.lines):\n            assert l1.get_color() == l2.get_color()\n        plt.close(\"all\")\n\n        ax = cat.pointplot(x=\"g\", y=\"y\", data=self.df, palette=\"Set2\", hue=\"h\")\n        g = cat.catplot(x=\"g\", y=\"y\", data=self.df, palette=\"Set2\", hue=\"h\")\n        for l1, l2 in zip(ax.lines, g.ax.lines):\n            assert l1.get_color() == l2.get_color()\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCatPlot.test_array_faceter_TestCatPlot.test_array_faceter.for_ax1_ax2_in_zip_g1_ax.assert_plots_equal_ax1_a": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCatPlot.test_array_faceter_TestCatPlot.test_array_faceter.for_ax1_ax2_in_zip_g1_ax.assert_plots_equal_ax1_a", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2952, "end_line": 2959, "span_ids": ["TestCatPlot.test_array_faceter"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCatPlot(CategoricalFixture):\n\n    @pytest.mark.parametrize(\"var\", [\"col\", \"row\"])\n    def test_array_faceter(self, long_df, var):\n\n        g1 = catplot(data=long_df, x=\"y\", **{var: \"a\"})\n        g2 = catplot(data=long_df, x=\"y\", **{var: long_df[\"a\"].to_numpy()})\n\n        for ax1, ax2 in zip(g1.axes.flat, g2.axes.flat):\n            assert_plots_equal(ax1, ax2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter_TestBoxenPlotter.edge_calc.return.np_percentile_data_q_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter_TestBoxenPlotter.edge_calc.return.np_percentile_data_q_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2962, "end_line": 2984, "span_ids": ["TestBoxenPlotter.ispatch", "TestBoxenPlotter.edge_calc", "TestBoxenPlotter", "TestBoxenPlotter.ispath"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxenPlotter(CategoricalFixture):\n\n    default_kws = dict(x=None, y=None, hue=None, data=None,\n                       order=None, hue_order=None,\n                       orient=None, color=None, palette=None,\n                       saturation=.75, width=.8, dodge=True,\n                       k_depth='tukey', linewidth=None,\n                       scale='exponential', outlier_prop=0.007,\n                       trust_alpha=0.05, showfliers=True)\n\n    def ispatch(self, c):\n\n        return isinstance(c, mpl.collections.PatchCollection)\n\n    def ispath(self, c):\n\n        return isinstance(c, mpl.collections.PathCollection)\n\n    def edge_calc(self, n, data):\n\n        q = np.asanyarray([0.5 ** n, 1 - 0.5 ** n]) * 100\n        q = list(np.unique(q))\n        return np.percentile(data, q)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_box_ends_finite_TestBoxenPlotter.test_box_ends_finite.assert_np_sum_list_k_f_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_box_ends_finite_TestBoxenPlotter.test_box_ends_finite.assert_np_sum_list_k_f_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2986, "end_line": 3011, "span_ids": ["TestBoxenPlotter.test_box_ends_finite"], "tokens": 244}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxenPlotter(CategoricalFixture):\n\n    def test_box_ends_finite(self):\n\n        p = cat._LVPlotter(**self.default_kws)\n        p.establish_variables(\"g\", \"y\", data=self.df)\n        box_ends = []\n        k_vals = []\n        for s in p.plot_data:\n            b, k = p._lv_box_ends(s)\n            box_ends.append(b)\n            k_vals.append(k)\n\n        # Check that all the box ends are finite and are within\n        # the bounds of the data\n        b_e = map(lambda a: np.all(np.isfinite(a)), box_ends)\n        assert np.sum(list(b_e)) == len(box_ends)\n\n        def within(t):\n            a, d = t\n            return ((np.ravel(a) <= d.max())\n                    & (np.ravel(a) >= d.min())).all()\n\n        b_w = map(within, zip(box_ends, p.plot_data))\n        assert np.sum(list(b_w)) == len(box_ends)\n\n        k_f = map(lambda k: (k > 0.) & np.isfinite(k), k_vals)\n        assert np.sum(list(k_f)) == len(k_vals)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_box_ends_correct_tukey_TestBoxenPlotter.test_box_ends_correct_tukey.assert_expected_k_calc": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_box_ends_correct_tukey_TestBoxenPlotter.test_box_ends_correct_tukey.assert_expected_k_calc", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 3013, "end_line": 3025, "span_ids": ["TestBoxenPlotter.test_box_ends_correct_tukey"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxenPlotter(CategoricalFixture):\n\n    def test_box_ends_correct_tukey(self):\n\n        n = 100\n        linear_data = np.arange(n)\n        expected_k = max(int(np.log2(n)) - 3, 1)\n        expected_edges = [self.edge_calc(i, linear_data)\n                          for i in range(expected_k + 1, 1, -1)]\n\n        p = cat._LVPlotter(**self.default_kws)\n        calc_edges, calc_k = p._lv_box_ends(linear_data)\n\n        npt.assert_array_equal(expected_edges, calc_edges)\n        assert expected_k == calc_k", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_box_ends_correct_proportion_TestBoxenPlotter.test_box_ends_correct_proportion.assert_expected_k_calc": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_box_ends_correct_proportion_TestBoxenPlotter.test_box_ends_correct_proportion.assert_expected_k_calc", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 3027, "end_line": 3041, "span_ids": ["TestBoxenPlotter.test_box_ends_correct_proportion"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxenPlotter(CategoricalFixture):\n\n    def test_box_ends_correct_proportion(self):\n\n        n = 100\n        linear_data = np.arange(n)\n        expected_k = int(np.log2(n)) - int(np.log2(n * 0.007)) + 1\n        expected_edges = [self.edge_calc(i, linear_data)\n                          for i in range(expected_k + 1, 1, -1)]\n\n        kws = self.default_kws.copy()\n        kws[\"k_depth\"] = \"proportion\"\n        p = cat._LVPlotter(**kws)\n        calc_edges, calc_k = p._lv_box_ends(linear_data)\n\n        npt.assert_array_equal(expected_edges, calc_edges)\n        assert expected_k == calc_k", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_box_ends_correct_trustworthy_TestBoxenPlotter.test_box_ends_correct_trustworthy.assert_exp_k_calc_k": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_box_ends_correct_trustworthy_TestBoxenPlotter.test_box_ends_correct_trustworthy.assert_exp_k_calc_k", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 3043, "end_line": 3055, "span_ids": ["TestBoxenPlotter.test_box_ends_correct_trustworthy"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxenPlotter(CategoricalFixture):\n\n    @pytest.mark.parametrize(\n        \"n,exp_k\",\n        [(491, 6), (492, 7), (983, 7), (984, 8), (1966, 8), (1967, 9)],\n    )\n    def test_box_ends_correct_trustworthy(self, n, exp_k):\n\n        linear_data = np.arange(n)\n        kws = self.default_kws.copy()\n        kws[\"k_depth\"] = \"trustworthy\"\n        p = cat._LVPlotter(**kws)\n        _, calc_k = p._lv_box_ends(linear_data)\n\n        assert exp_k == calc_k", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_outliers_TestBoxenPlotter.test_outliers.npt_assert_equal_out_calc": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_outliers_TestBoxenPlotter.test_outliers.npt_assert_equal_out_calc", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 3057, "end_line": 3074, "span_ids": ["TestBoxenPlotter.test_outliers"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxenPlotter(CategoricalFixture):\n\n    def test_outliers(self):\n\n        n = 100\n        outlier_data = np.append(np.arange(n - 1), 2 * n)\n        expected_k = max(int(np.log2(n)) - 3, 1)\n        expected_edges = [self.edge_calc(i, outlier_data)\n                          for i in range(expected_k + 1, 1, -1)]\n\n        p = cat._LVPlotter(**self.default_kws)\n        calc_edges, calc_k = p._lv_box_ends(outlier_data)\n\n        npt.assert_array_equal(calc_edges, expected_edges)\n        assert calc_k == expected_k\n\n        out_calc = p._lv_outliers(outlier_data, calc_k)\n        out_exp = p._lv_outliers(outlier_data, expected_k)\n\n        npt.assert_equal(out_calc, out_exp)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_showfliers_TestBoxenPlotter.test_showfliers.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_showfliers_TestBoxenPlotter.test_showfliers.None_1", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 3076, "end_line": 3093, "span_ids": ["TestBoxenPlotter.test_showfliers"], "tokens": 176}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxenPlotter(CategoricalFixture):\n\n    def test_showfliers(self):\n\n        ax = cat.boxenplot(x=\"g\", y=\"y\", data=self.df, k_depth=\"proportion\",\n                           showfliers=True)\n        ax_collections = list(filter(self.ispath, ax.collections))\n        for c in ax_collections:\n            assert len(c.get_offsets()) == 2\n\n        # Test that all data points are in the plot\n        assert ax.get_ylim()[0] < self.df[\"y\"].min()\n        assert ax.get_ylim()[1] > self.df[\"y\"].max()\n\n        plt.close(\"all\")\n\n        ax = cat.boxenplot(x=\"g\", y=\"y\", data=self.df, showfliers=False)\n        assert len(list(filter(self.ispath, ax.collections))) == 0\n\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_invalid_depths_TestBoxenPlotter.test_invalid_depths.for_alpha_in_13_37_.with_pytest_raises_ValueE.cat__LVPlotter_kws_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_invalid_depths_TestBoxenPlotter.test_invalid_depths.for_alpha_in_13_37_.with_pytest_raises_ValueE.cat__LVPlotter_kws_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 3095, "end_line": 3115, "span_ids": ["TestBoxenPlotter.test_invalid_depths"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxenPlotter(CategoricalFixture):\n\n    def test_invalid_depths(self):\n\n        kws = self.default_kws.copy()\n\n        # Make sure illegal depth raises\n        kws[\"k_depth\"] = \"nosuchdepth\"\n        with pytest.raises(ValueError):\n            cat._LVPlotter(**kws)\n\n        # Make sure illegal outlier_prop raises\n        kws[\"k_depth\"] = \"proportion\"\n        for p in (-13, 37):\n            kws[\"outlier_prop\"] = p\n            with pytest.raises(ValueError):\n                cat._LVPlotter(**kws)\n\n        kws[\"k_depth\"] = \"trustworthy\"\n        for alpha in (-13, 37):\n            kws[\"trust_alpha\"] = alpha\n            with pytest.raises(ValueError):\n                cat._LVPlotter(**kws)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_valid_depths_TestBoxenPlotter.test_valid_scales.for_scale_in_valid_scales.if_scale_not_in_valid_sca.else_.cat__LVPlotter_kws_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_valid_depths_TestBoxenPlotter.test_valid_scales.for_scale_in_valid_scales.if_scale_not_in_valid_sca.else_.cat__LVPlotter_kws_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 3117, "end_line": 3143, "span_ids": ["TestBoxenPlotter.test_valid_scales", "TestBoxenPlotter.test_valid_depths"], "tokens": 246}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxenPlotter(CategoricalFixture):\n\n    @pytest.mark.parametrize(\"power\", [1, 3, 7, 11, 13, 17])\n    def test_valid_depths(self, power):\n\n        x = np.random.standard_t(10, 2 ** power)\n\n        valid_depths = [\"proportion\", \"tukey\", \"trustworthy\", \"full\"]\n        kws = self.default_kws.copy()\n\n        for depth in valid_depths + [4]:\n            kws[\"k_depth\"] = depth\n            box_ends, k = cat._LVPlotter(**kws)._lv_box_ends(x)\n\n            if depth == \"full\":\n                assert k == int(np.log2(len(x))) + 1\n\n    def test_valid_scales(self):\n\n        valid_scales = [\"linear\", \"exponential\", \"area\"]\n        kws = self.default_kws.copy()\n\n        for scale in valid_scales + [\"unknown_scale\"]:\n            kws[\"scale\"] = scale\n            if scale not in valid_scales:\n                with pytest.raises(ValueError):\n                    cat._LVPlotter(**kws)\n            else:\n                cat._LVPlotter(**kws)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_hue_offsets_TestBoxenPlotter.test_hue_offsets.npt_assert_array_almost_e": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_hue_offsets_TestBoxenPlotter.test_hue_offsets.npt_assert_array_almost_e", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 3145, "end_line": 3159, "span_ids": ["TestBoxenPlotter.test_hue_offsets"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxenPlotter(CategoricalFixture):\n\n    def test_hue_offsets(self):\n\n        p = cat._LVPlotter(**self.default_kws)\n        p.establish_variables(\"g\", \"y\", hue=\"h\", data=self.df)\n        npt.assert_array_equal(p.hue_offsets, [-.2, .2])\n\n        kws = self.default_kws.copy()\n        kws[\"width\"] = .6\n        p = cat._LVPlotter(**kws)\n        p.establish_variables(\"g\", \"y\", hue=\"h\", data=self.df)\n        npt.assert_array_equal(p.hue_offsets, [-.15, .15])\n\n        p = cat._LVPlotter(**kws)\n        p.establish_variables(\"h\", \"y\", \"g\", data=self.df)\n        npt.assert_array_almost_equal(p.hue_offsets, [-.2, 0, .2])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_draw_missing_boxes_TestBoxenPlotter.test_unaligned_index.None_1.assert_np_array_equal_l1_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_draw_missing_boxes_TestBoxenPlotter.test_unaligned_index.None_1.assert_np_array_equal_l1_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 3193, "end_line": 3217, "span_ids": ["TestBoxenPlotter.test_draw_missing_boxes", "TestBoxenPlotter.test_unaligned_index"], "tokens": 287}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxenPlotter(CategoricalFixture):\n\n    def test_draw_missing_boxes(self):\n\n        ax = cat.boxenplot(x=\"g\", y=\"y\", data=self.df,\n                           order=[\"a\", \"b\", \"c\", \"d\"])\n\n        patches = filter(self.ispatch, ax.collections)\n        assert len(list(patches)) == 3\n        plt.close(\"all\")\n\n    def test_unaligned_index(self):\n\n        f, (ax1, ax2) = plt.subplots(2)\n        cat.boxenplot(x=self.g, y=self.y, ax=ax1)\n        cat.boxenplot(x=self.g, y=self.y_perm, ax=ax2)\n        for l1, l2 in zip(ax1.lines, ax2.lines):\n            assert np.array_equal(l1.get_xydata(), l2.get_xydata())\n\n        f, (ax1, ax2) = plt.subplots(2)\n        hue_order = self.h.unique()\n        cat.boxenplot(x=self.g, y=self.y, hue=self.h,\n                      hue_order=hue_order, ax=ax1)\n        cat.boxenplot(x=self.g, y=self.y_perm, hue=self.h,\n                      hue_order=hue_order, ax=ax2)\n        for l1, l2 in zip(ax1.lines, ax2.lines):\n            assert np.array_equal(l1.get_xydata(), l2.get_xydata())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_missing_data_TestBoxenPlotter.test_missing_data.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_missing_data_TestBoxenPlotter.test_missing_data.None_1", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 3219, "end_line": 3235, "span_ids": ["TestBoxenPlotter.test_missing_data"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxenPlotter(CategoricalFixture):\n\n    def test_missing_data(self):\n\n        x = [\"a\", \"a\", \"b\", \"b\", \"c\", \"c\", \"d\", \"d\"]\n        h = [\"x\", \"y\", \"x\", \"y\", \"x\", \"y\", \"x\", \"y\"]\n        y = self.rs.randn(8)\n        y[-2:] = np.nan\n\n        ax = cat.boxenplot(x=x, y=y)\n        assert len(ax.lines) == 3\n\n        plt.close(\"all\")\n\n        y[-1] = 0\n        ax = cat.boxenplot(x=x, y=y, hue=h)\n        assert len(ax.lines) == 7\n\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_boxenplots_TestBoxenPlotter.test_boxenplots.None_19": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_boxenplots_TestBoxenPlotter.test_boxenplots.None_19", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 3237, "end_line": 3281, "span_ids": ["TestBoxenPlotter.test_boxenplots"], "tokens": 421}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxenPlotter(CategoricalFixture):\n\n    def test_boxenplots(self):\n\n        # Smoke test the high level boxenplot options\n\n        cat.boxenplot(x=\"y\", data=self.df)\n        plt.close(\"all\")\n\n        cat.boxenplot(y=\"y\", data=self.df)\n        plt.close(\"all\")\n\n        cat.boxenplot(x=\"g\", y=\"y\", data=self.df)\n        plt.close(\"all\")\n\n        cat.boxenplot(x=\"y\", y=\"g\", data=self.df, orient=\"h\")\n        plt.close(\"all\")\n\n        cat.boxenplot(x=\"g\", y=\"y\", hue=\"h\", data=self.df)\n        plt.close(\"all\")\n\n        for scale in (\"linear\", \"area\", \"exponential\"):\n            cat.boxenplot(x=\"g\", y=\"y\", hue=\"h\", scale=scale, data=self.df)\n            plt.close(\"all\")\n\n        for depth in (\"proportion\", \"tukey\", \"trustworthy\"):\n            cat.boxenplot(x=\"g\", y=\"y\", hue=\"h\", k_depth=depth, data=self.df)\n            plt.close(\"all\")\n\n        order = list(\"nabc\")\n        cat.boxenplot(x=\"g\", y=\"y\", hue=\"h\", order=order, data=self.df)\n        plt.close(\"all\")\n\n        order = list(\"omn\")\n        cat.boxenplot(x=\"g\", y=\"y\", hue=\"h\", hue_order=order, data=self.df)\n        plt.close(\"all\")\n\n        cat.boxenplot(x=\"y\", y=\"g\", hue=\"h\", data=self.df, orient=\"h\")\n        plt.close(\"all\")\n\n        cat.boxenplot(x=\"y\", y=\"g\", hue=\"h\", data=self.df, orient=\"h\",\n                      palette=\"Set2\")\n        plt.close(\"all\")\n\n        cat.boxenplot(x=\"y\", y=\"g\", hue=\"h\", data=self.df,\n                      orient=\"h\", color=\"b\")\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_axes_annotation_TestBoxenPlotter.test_axes_annotation.None_9": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_axes_annotation_TestBoxenPlotter.test_axes_annotation.None_9", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 3283, "end_line": 3314, "span_ids": ["TestBoxenPlotter.test_axes_annotation"], "tokens": 368}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxenPlotter(CategoricalFixture):\n\n    def test_axes_annotation(self):\n\n        ax = cat.boxenplot(x=\"g\", y=\"y\", data=self.df)\n        assert ax.get_xlabel() == \"g\"\n        assert ax.get_ylabel() == \"y\"\n        assert ax.get_xlim() == (-.5, 2.5)\n        npt.assert_array_equal(ax.get_xticks(), [0, 1, 2])\n        npt.assert_array_equal([l.get_text() for l in ax.get_xticklabels()],\n                               [\"a\", \"b\", \"c\"])\n\n        plt.close(\"all\")\n\n        ax = cat.boxenplot(x=\"g\", y=\"y\", hue=\"h\", data=self.df)\n        assert ax.get_xlabel() == \"g\"\n        assert ax.get_ylabel() == \"y\"\n        npt.assert_array_equal(ax.get_xticks(), [0, 1, 2])\n        npt.assert_array_equal([l.get_text() for l in ax.get_xticklabels()],\n                               [\"a\", \"b\", \"c\"])\n        npt.assert_array_equal([l.get_text() for l in ax.legend_.get_texts()],\n                               [\"m\", \"n\"])\n\n        plt.close(\"all\")\n\n        ax = cat.boxenplot(x=\"y\", y=\"g\", data=self.df, orient=\"h\")\n        assert ax.get_xlabel() == \"y\"\n        assert ax.get_ylabel() == \"g\"\n        assert ax.get_ylim() == (2.5, -.5)\n        npt.assert_array_equal(ax.get_yticks(), [0, 1, 2])\n        npt.assert_array_equal([l.get_text() for l in ax.get_yticklabels()],\n                               [\"a\", \"b\", \"c\"])\n\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_legend_titlesize_TestBoxenPlotter.test_legend_titlesize.plt_close_all_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_legend_titlesize_TestBoxenPlotter.test_legend_titlesize.plt_close_all_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 3316, "end_line": 3327, "span_ids": ["TestBoxenPlotter.test_legend_titlesize"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxenPlotter(CategoricalFixture):\n\n    @pytest.mark.parametrize(\"size\", [\"large\", \"medium\", \"small\", 22, 12])\n    def test_legend_titlesize(self, size):\n\n        rc_ctx = {\"legend.title_fontsize\": size}\n        exp = mpl.font_manager.FontProperties(size=size).get_size()\n\n        with plt.rc_context(rc=rc_ctx):\n            ax = cat.boxenplot(x=\"g\", y=\"y\", hue=\"h\", data=self.df)\n            obs = ax.get_legend().get_title().get_fontproperties().get_size()\n            assert obs == exp\n\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_Float64_input_TestBoxenPlotter.test_Float64_input.plt_close_all_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_Float64_input_TestBoxenPlotter.test_Float64_input.plt_close_all_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 3329, "end_line": 3339, "span_ids": ["TestBoxenPlotter.test_Float64_input"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxenPlotter(CategoricalFixture):\n\n    @pytest.mark.skipif(\n        Version(pd.__version__) < Version(\"1.2\"),\n        reason=\"Test requires pandas>=1.2\")\n    def test_Float64_input(self):\n        data = pd.DataFrame(\n            {\"x\": np.random.choice([\"a\", \"b\"], 20), \"y\": np.random.random(20)}\n        )\n        data['y'] = data['y'].astype(pd.Float64Dtype())\n        _ = cat.boxenplot(x=\"x\", y=\"y\", data=data)\n\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBeeswarm_TestBeeswarm.test_position_candidates.assert_array_equal_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBeeswarm_TestBeeswarm.test_position_candidates.assert_array_equal_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 3342, "end_line": 3366, "span_ids": ["TestBeeswarm.test_position_candidates", "TestBeeswarm.test_could_overlap", "TestBeeswarm"], "tokens": 239}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBeeswarm:\n\n    def test_could_overlap(self):\n\n        p = Beeswarm()\n        neighbors = p.could_overlap(\n            (1, 1, .5),\n            [(0, 0, .5),\n             (1, .1, .2),\n             (.5, .5, .5)]\n        )\n        assert_array_equal(neighbors, [(.5, .5, .5)])\n\n    def test_position_candidates(self):\n\n        p = Beeswarm()\n        xy_i = (0, 1, .5)\n        neighbors = [(0, 1, .5), (0, 1.5, .5)]\n        candidates = p.position_candidates(xy_i, neighbors)\n        dx1 = 1.05\n        dx2 = np.sqrt(1 - .5 ** 2) * 1.05\n        assert_array_equal(\n            candidates,\n            [(0, 1, .5), (-dx1, 1, .5), (dx1, 1, .5), (dx2, 1, .5), (-dx2, 1, .5)]\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBeeswarm.test_find_first_non_overlapping_candidate_TestBeeswarm.test_beeswarm.assert_array_equal_y_swa": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBeeswarm.test_find_first_non_overlapping_candidate_TestBeeswarm.test_beeswarm.assert_array_equal_y_swa", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 3368, "end_line": 3390, "span_ids": ["TestBeeswarm.test_find_first_non_overlapping_candidate", "TestBeeswarm.test_beeswarm"], "tokens": 254}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBeeswarm:\n\n    def test_find_first_non_overlapping_candidate(self):\n\n        p = Beeswarm()\n        candidates = [(.5, 1, .5), (1, 1, .5), (1.5, 1, .5)]\n        neighbors = np.array([(0, 1, .5)])\n\n        first = p.first_non_overlapping_candidate(candidates, neighbors)\n        assert_array_equal(first, (1, 1, .5))\n\n    def test_beeswarm(self, long_df):\n\n        p = Beeswarm()\n        data = long_df[\"y\"]\n        d = data.diff().mean() * 1.5\n        x = np.zeros(data.size)\n        y = np.sort(data)\n        r = np.full_like(y, d)\n        orig_xyr = np.c_[x, y, r]\n        swarm = p.beeswarm(orig_xyr)[:, :2]\n        dmat = np.sqrt(np.sum(np.square(swarm[:, np.newaxis] - swarm), axis=-1))\n        triu = dmat[np.triu_indices_from(dmat, 1)]\n        assert_array_less(d, triu)\n        assert_array_equal(y, swarm[:, 1])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBeeswarm.test_add_gutters_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBeeswarm.test_add_gutters_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 3392, "end_line": 3404, "span_ids": ["TestBeeswarm.test_add_gutters"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBeeswarm:\n\n    def test_add_gutters(self):\n\n        p = Beeswarm(width=1)\n\n        points = np.zeros(10)\n        assert_array_equal(points, p.add_gutters(points, 0))\n\n        points = np.array([0, -1, .4, .8])\n        msg = r\"50.0% of the points cannot be placed.+$\"\n        with pytest.warns(UserWarning, match=msg):\n            new_points = p.add_gutters(points, 0)\n        assert_array_equal(new_points, np.array([0, -.5, .4, .5]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_itertools_try_.except_ImportError_.PD_NA.None": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_itertools_try_.except_ImportError_.PD_NA.None", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 32, "span_ids": ["impl:2", "impl", "imports", "imports:13"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import itertools\nimport numpy as np\nimport pandas as pd\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\n\nimport pytest\nfrom numpy.testing import assert_array_equal\nfrom pandas.testing import assert_frame_equal\n\nfrom seaborn.axisgrid import FacetGrid\nfrom seaborn._compat import get_colormap\nfrom seaborn._oldcore import (\n    SemanticMapping,\n    HueMapping,\n    SizeMapping,\n    StyleMapping,\n    VectorPlotter,\n    variable_type,\n    infer_orient,\n    unique_dashes,\n    unique_markers,\n    categorical_order,\n)\n\nfrom seaborn.palettes import color_palette\n\n\ntry:\n    from pandas import NA as PD_NA\nexcept ImportError:\n    PD_NA = None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_long_variables_TestSemanticMapping.test_call_lookup.for_key_val_in_lookup_ta.assert_m_key_val": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_long_variables_TestSemanticMapping.test_call_lookup.for_key_val_in_lookup_ta.assert_m_key_val", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 34, "end_line": 60, "span_ids": ["TestSemanticMapping.test_call_lookup", "TestSemanticMapping", "long_variables"], "tokens": 247}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture(params=[\n    dict(x=\"x\", y=\"y\"),\n    dict(x=\"t\", y=\"y\"),\n    dict(x=\"a\", y=\"y\"),\n    dict(x=\"x\", y=\"y\", hue=\"y\"),\n    dict(x=\"x\", y=\"y\", hue=\"a\"),\n    dict(x=\"x\", y=\"y\", size=\"a\"),\n    dict(x=\"x\", y=\"y\", style=\"a\"),\n    dict(x=\"x\", y=\"y\", hue=\"s\"),\n    dict(x=\"x\", y=\"y\", size=\"s\"),\n    dict(x=\"x\", y=\"y\", style=\"s\"),\n    dict(x=\"x\", y=\"y\", hue=\"a\", style=\"a\"),\n    dict(x=\"x\", y=\"y\", hue=\"a\", size=\"b\", style=\"b\"),\n])\ndef long_variables(request):\n    return request.param\n\n\nclass TestSemanticMapping:\n\n    def test_call_lookup(self):\n\n        m = SemanticMapping(VectorPlotter())\n        lookup_table = dict(zip(\"abc\", (1, 2, 3)))\n        m.lookup_table = lookup_table\n        for key, val in lookup_table.items():\n            assert m(key) == val", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestHueMapping_TestHueMapping.test_plotter_default_init.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestHueMapping_TestHueMapping.test_plotter_default_init.None_3", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 63, "end_line": 91, "span_ids": ["TestHueMapping.test_plotter_default_init", "TestHueMapping.test_init_from_map", "TestHueMapping"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHueMapping:\n\n    def test_init_from_map(self, long_df):\n\n        p_orig = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\")\n        )\n        palette = \"Set2\"\n        p = HueMapping.map(p_orig, palette=palette)\n        assert p is p_orig\n        assert isinstance(p._hue_map, HueMapping)\n        assert p._hue_map.palette == palette\n\n    def test_plotter_default_init(self, long_df):\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\"),\n        )\n        assert isinstance(p._hue_map, HueMapping)\n        assert p._hue_map.map_type is None\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\"),\n        )\n        assert isinstance(p._hue_map, HueMapping)\n        assert p._hue_map.map_type == p.var_types[\"hue\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestHueMapping.test_plotter_reinit_TestHueMapping.test_hue_map_null.assert_m_lookup_table_is_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestHueMapping.test_plotter_reinit_TestHueMapping.test_hue_map_null.assert_m_lookup_table_is_", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 93, "end_line": 115, "span_ids": ["TestHueMapping.test_plotter_reinit", "TestHueMapping.test_hue_map_null"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHueMapping:\n\n    def test_plotter_reinit(self, long_df):\n\n        p_orig = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\"),\n        )\n        palette = \"muted\"\n        hue_order = [\"b\", \"a\", \"c\"]\n        p = p_orig.map_hue(palette=palette, order=hue_order)\n        assert p is p_orig\n        assert p._hue_map.palette == palette\n        assert p._hue_map.levels == hue_order\n\n    def test_hue_map_null(self, flat_series, null_series):\n\n        p = VectorPlotter(variables=dict(x=flat_series, hue=null_series))\n        m = HueMapping(p)\n        assert m.levels is None\n        assert m.map_type is None\n        assert m.palette is None\n        assert m.cmap is None\n        assert m.norm is None\n        assert m.lookup_table is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestHueMapping.test_hue_map_categorical_TestHueMapping.test_hue_map_categorical._Test_explicit_categorie": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestHueMapping.test_hue_map_categorical_TestHueMapping.test_hue_map_categorical._Test_explicit_categorie", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 118, "end_line": 211, "span_ids": ["TestHueMapping.test_hue_map_categorical"], "tokens": 834}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHueMapping:\n\n    def test_hue_map_categorical(self, wide_df, long_df):\n\n        p = VectorPlotter(data=wide_df)\n        m = HueMapping(p)\n        assert m.levels == wide_df.columns.to_list()\n        assert m.map_type == \"categorical\"\n        assert m.cmap is None\n\n        # Test named palette\n        palette = \"Blues\"\n        expected_colors = color_palette(palette, wide_df.shape[1])\n        expected_lookup_table = dict(zip(wide_df.columns, expected_colors))\n        m = HueMapping(p, palette=palette)\n        assert m.palette == \"Blues\"\n        assert m.lookup_table == expected_lookup_table\n\n        # Test list palette\n        palette = color_palette(\"Reds\", wide_df.shape[1])\n        expected_lookup_table = dict(zip(wide_df.columns, palette))\n        m = HueMapping(p, palette=palette)\n        assert m.palette == palette\n        assert m.lookup_table == expected_lookup_table\n\n        # Test dict palette\n        colors = color_palette(\"Set1\", 8)\n        palette = dict(zip(wide_df.columns, colors))\n        m = HueMapping(p, palette=palette)\n        assert m.palette == palette\n        assert m.lookup_table == palette\n\n        # Test dict with missing keys\n        palette = dict(zip(wide_df.columns[:-1], colors))\n        with pytest.raises(ValueError):\n            HueMapping(p, palette=palette)\n\n        # Test list with wrong number of colors\n        palette = colors[:-1]\n        with pytest.warns(UserWarning):\n            HueMapping(p, palette=palette)\n\n        # Test hue order\n        hue_order = [\"a\", \"c\", \"d\"]\n        m = HueMapping(p, order=hue_order)\n        assert m.levels == hue_order\n\n        # Test long data\n        p = VectorPlotter(data=long_df, variables=dict(x=\"x\", y=\"y\", hue=\"a\"))\n        m = HueMapping(p)\n        assert m.levels == categorical_order(long_df[\"a\"])\n        assert m.map_type == \"categorical\"\n        assert m.cmap is None\n\n        # Test default palette\n        m = HueMapping(p)\n        hue_levels = categorical_order(long_df[\"a\"])\n        expected_colors = color_palette(n_colors=len(hue_levels))\n        expected_lookup_table = dict(zip(hue_levels, expected_colors))\n        assert m.lookup_table == expected_lookup_table\n\n        # Test missing data\n        m = HueMapping(p)\n        assert m(np.nan) == (0, 0, 0, 0)\n\n        # Test default palette with many levels\n        x = y = np.arange(26)\n        hue = pd.Series(list(\"abcdefghijklmnopqrstuvwxyz\"))\n        p = VectorPlotter(variables=dict(x=x, y=y, hue=hue))\n        m = HueMapping(p)\n        expected_colors = color_palette(\"husl\", n_colors=len(hue))\n        expected_lookup_table = dict(zip(hue, expected_colors))\n        assert m.lookup_table == expected_lookup_table\n\n        # Test binary data\n        p = VectorPlotter(data=long_df, variables=dict(x=\"x\", y=\"y\", hue=\"c\"))\n        m = HueMapping(p)\n        assert m.levels == [0, 1]\n        assert m.map_type == \"categorical\"\n\n        for val in [0, 1]:\n            p = VectorPlotter(\n                data=long_df[long_df[\"c\"] == val],\n                variables=dict(x=\"x\", y=\"y\", hue=\"c\"),\n            )\n            m = HueMapping(p)\n            assert m.levels == [val]\n            assert m.map_type == \"categorical\"\n\n        # Test Timestamp data\n        p = VectorPlotter(data=long_df, variables=dict(x=\"x\", y=\"y\", hue=\"t\"))\n        m = HueMapping(p)\n        assert m.levels == [pd.Timestamp(t) for t in long_df[\"t\"].unique()]\n        assert m.map_type == \"datetime\"\n\n        # Test explicit categories\n        # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestHueMapping.test_hue_map_categorical.p_33_TestHueMapping.test_hue_map_categorical.None_26": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestHueMapping.test_hue_map_categorical.p_33_TestHueMapping.test_hue_map_categorical.None_26", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 211, "end_line": 237, "span_ids": ["TestHueMapping.test_hue_map_categorical"], "tokens": 273}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHueMapping:\n\n    def test_hue_map_categorical(self, wide_df, long_df):\n        # ... other code\n        p = VectorPlotter(data=long_df, variables=dict(x=\"x\", hue=\"a_cat\"))\n        m = HueMapping(p)\n        assert m.levels == long_df[\"a_cat\"].cat.categories.to_list()\n        assert m.map_type == \"categorical\"\n\n        # Test numeric data with category type\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"s_cat\")\n        )\n        m = HueMapping(p)\n        assert m.levels == categorical_order(long_df[\"s_cat\"])\n        assert m.map_type == \"categorical\"\n        assert m.cmap is None\n\n        # Test categorical palette specified for numeric data\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"s\")\n        )\n        palette = \"deep\"\n        levels = categorical_order(long_df[\"s\"])\n        expected_colors = color_palette(palette, n_colors=len(levels))\n        expected_lookup_table = dict(zip(levels, expected_colors))\n        m = HueMapping(p, palette=palette)\n        assert m.lookup_table == expected_lookup_table\n        assert m.map_type == \"categorical\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestHueMapping.test_hue_map_numeric_TestHueMapping.test_hue_map_without_hue_dataa.with_pytest_warns_UserWar.HueMapping_p_palette_vi": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestHueMapping.test_hue_map_numeric_TestHueMapping.test_hue_map_without_hue_dataa.with_pytest_warns_UserWar.HueMapping_p_palette_vi", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 240, "end_line": 326, "span_ids": ["TestHueMapping.test_hue_map_numeric", "TestHueMapping.test_hue_map_without_hue_dataa"], "tokens": 820}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHueMapping:\n\n    def test_hue_map_numeric(self, long_df):\n\n        vals = np.concatenate([np.linspace(0, 1, 256), [-.1, 1.1, np.nan]])\n\n        # Test default colormap\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"s\")\n        )\n        hue_levels = list(np.sort(long_df[\"s\"].unique()))\n        m = HueMapping(p)\n        assert m.levels == hue_levels\n        assert m.map_type == \"numeric\"\n        assert m.cmap.name == \"seaborn_cubehelix\"\n\n        # Test named colormap\n        palette = \"Purples\"\n        m = HueMapping(p, palette=palette)\n        assert_array_equal(m.cmap(vals), get_colormap(palette)(vals))\n\n        # Test colormap object\n        palette = get_colormap(\"Greens\")\n        m = HueMapping(p, palette=palette)\n        assert_array_equal(m.cmap(vals), palette(vals))\n\n        # Test cubehelix shorthand\n        palette = \"ch:2,0,light=.2\"\n        m = HueMapping(p, palette=palette)\n        assert isinstance(m.cmap, mpl.colors.ListedColormap)\n\n        # Test specified hue limits\n        hue_norm = 1, 4\n        m = HueMapping(p, norm=hue_norm)\n        assert isinstance(m.norm, mpl.colors.Normalize)\n        assert m.norm.vmin == hue_norm[0]\n        assert m.norm.vmax == hue_norm[1]\n\n        # Test Normalize object\n        hue_norm = mpl.colors.PowerNorm(2, vmin=1, vmax=10)\n        m = HueMapping(p, norm=hue_norm)\n        assert m.norm is hue_norm\n\n        # Test default colormap values\n        hmin, hmax = p.plot_data[\"hue\"].min(), p.plot_data[\"hue\"].max()\n        m = HueMapping(p)\n        assert m.lookup_table[hmin] == pytest.approx(m.cmap(0.0))\n        assert m.lookup_table[hmax] == pytest.approx(m.cmap(1.0))\n\n        # Test specified colormap values\n        hue_norm = hmin - 1, hmax - 1\n        m = HueMapping(p, norm=hue_norm)\n        norm_min = (hmin - hue_norm[0]) / (hue_norm[1] - hue_norm[0])\n        assert m.lookup_table[hmin] == pytest.approx(m.cmap(norm_min))\n        assert m.lookup_table[hmax] == pytest.approx(m.cmap(1.0))\n\n        # Test list of colors\n        hue_levels = list(np.sort(long_df[\"s\"].unique()))\n        palette = color_palette(\"Blues\", len(hue_levels))\n        m = HueMapping(p, palette=palette)\n        assert m.lookup_table == dict(zip(hue_levels, palette))\n\n        palette = color_palette(\"Blues\", len(hue_levels) + 1)\n        with pytest.warns(UserWarning):\n            HueMapping(p, palette=palette)\n\n        # Test dictionary of colors\n        palette = dict(zip(hue_levels, color_palette(\"Reds\")))\n        m = HueMapping(p, palette=palette)\n        assert m.lookup_table == palette\n\n        palette.pop(hue_levels[0])\n        with pytest.raises(ValueError):\n            HueMapping(p, palette=palette)\n\n        # Test invalid palette\n        with pytest.raises(ValueError):\n            HueMapping(p, palette=\"not a valid palette\")\n\n        # Test bad norm argument\n        with pytest.raises(ValueError):\n            HueMapping(p, norm=\"not a norm\")\n\n    def test_hue_map_without_hue_dataa(self, long_df):\n\n        p = VectorPlotter(data=long_df, variables=dict(x=\"x\", y=\"y\"))\n        with pytest.warns(UserWarning, match=\"Ignoring `palette`\"):\n            HueMapping(p, palette=\"viridis\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestSizeMapping_TestSizeMapping.test_init_from_map.assert_max_p__size_map_lo": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestSizeMapping_TestSizeMapping.test_init_from_map.assert_max_p__size_map_lo", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 326, "end_line": 339, "span_ids": ["TestSizeMapping.test_init_from_map", "TestSizeMapping"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSizeMapping:\n\n    def test_init_from_map(self, long_df):\n\n        p_orig = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", size=\"a\")\n        )\n        sizes = 1, 6\n        p = SizeMapping.map(p_orig, sizes=sizes)\n        assert p is p_orig\n        assert isinstance(p._size_map, SizeMapping)\n        assert min(p._size_map.lookup_table.values()) == sizes[0]\n        assert max(p._size_map.lookup_table.values()) == sizes[1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestSizeMapping.test_plotter_default_init_TestSizeMapping.test_plotter_default_init.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestSizeMapping.test_plotter_default_init_TestSizeMapping.test_plotter_default_init.None_3", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 341, "end_line": 355, "span_ids": ["TestSizeMapping.test_plotter_default_init"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSizeMapping:\n\n    def test_plotter_default_init(self, long_df):\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\"),\n        )\n        assert isinstance(p._size_map, SizeMapping)\n        assert p._size_map.map_type is None\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", size=\"a\"),\n        )\n        assert isinstance(p._size_map, SizeMapping)\n        assert p._size_map.map_type == p.var_types[\"size\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestSizeMapping.test_plotter_reinit_TestSizeMapping.test_size_map_null.assert_m_lookup_table_is_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestSizeMapping.test_plotter_reinit_TestSizeMapping.test_size_map_null.assert_m_lookup_table_is_", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 357, "end_line": 377, "span_ids": ["TestSizeMapping.test_size_map_null", "TestSizeMapping.test_plotter_reinit"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSizeMapping:\n\n    def test_plotter_reinit(self, long_df):\n\n        p_orig = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", size=\"a\"),\n        )\n        sizes = [1, 4, 2]\n        size_order = [\"b\", \"a\", \"c\"]\n        p = p_orig.map_size(sizes=sizes, order=size_order)\n        assert p is p_orig\n        assert p._size_map.lookup_table == dict(zip(size_order, sizes))\n        assert p._size_map.levels == size_order\n\n    def test_size_map_null(self, flat_series, null_series):\n\n        p = VectorPlotter(variables=dict(x=flat_series, size=null_series))\n        m = HueMapping(p)\n        assert m.levels is None\n        assert m.map_type is None\n        assert m.norm is None\n        assert m.lookup_table is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestSizeMapping.test_map_size_numeric_TestSizeMapping.test_map_size_numeric.None_4.SizeMapping_p_norm_bad_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestSizeMapping.test_map_size_numeric_TestSizeMapping.test_map_size_numeric.None_4.SizeMapping_p_norm_bad_", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 379, "end_line": 422, "span_ids": ["TestSizeMapping.test_map_size_numeric"], "tokens": 382}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSizeMapping:\n\n    def test_map_size_numeric(self, long_df):\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", size=\"s\"),\n        )\n\n        # Test default range of keys in the lookup table values\n        m = SizeMapping(p)\n        size_values = m.lookup_table.values()\n        value_range = min(size_values), max(size_values)\n        assert value_range == p._default_size_range\n\n        # Test specified range of size values\n        sizes = 1, 5\n        m = SizeMapping(p, sizes=sizes)\n        size_values = m.lookup_table.values()\n        assert min(size_values), max(size_values) == sizes\n\n        # Test size values with normalization range\n        norm = 1, 10\n        m = SizeMapping(p, sizes=sizes, norm=norm)\n        normalize = mpl.colors.Normalize(*norm, clip=True)\n        for key, val in m.lookup_table.items():\n            assert val == sizes[0] + (sizes[1] - sizes[0]) * normalize(key)\n\n        # Test size values with normalization object\n        norm = mpl.colors.LogNorm(1, 10, clip=False)\n        m = SizeMapping(p, sizes=sizes, norm=norm)\n        assert m.norm.clip\n        for key, val in m.lookup_table.items():\n            assert val == sizes[0] + (sizes[1] - sizes[0]) * norm(key)\n\n        # Test bad sizes argument\n        with pytest.raises(ValueError):\n            SizeMapping(p, sizes=\"bad_sizes\")\n\n        # Test bad sizes argument\n        with pytest.raises(ValueError):\n            SizeMapping(p, sizes=(1, 2, 3))\n\n        # Test bad norm argument\n        with pytest.raises(ValueError):\n            SizeMapping(p, norm=\"bad_norm\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestSizeMapping.test_map_size_categorical_TestSizeMapping.test_map_size_categorical.None_2.SizeMapping_p_sizes_bad": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestSizeMapping.test_map_size_categorical_TestSizeMapping.test_map_size_categorical.None_2.SizeMapping_p_sizes_bad", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 427, "end_line": 476, "span_ids": ["TestSizeMapping.test_map_size_categorical"], "tokens": 429}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSizeMapping:\n\n    def test_map_size_categorical(self, long_df):\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", size=\"a\"),\n        )\n\n        # Test specified size order\n        levels = p.plot_data[\"size\"].unique()\n        sizes = [1, 4, 6]\n        order = [levels[1], levels[2], levels[0]]\n        m = SizeMapping(p, sizes=sizes, order=order)\n        assert m.lookup_table == dict(zip(order, sizes))\n\n        # Test list of sizes\n        order = categorical_order(p.plot_data[\"size\"])\n        sizes = list(np.random.rand(len(levels)))\n        m = SizeMapping(p, sizes=sizes)\n        assert m.lookup_table == dict(zip(order, sizes))\n\n        # Test dict of sizes\n        sizes = dict(zip(levels, np.random.rand(len(levels))))\n        m = SizeMapping(p, sizes=sizes)\n        assert m.lookup_table == sizes\n\n        # Test specified size range\n        sizes = (2, 5)\n        m = SizeMapping(p, sizes=sizes)\n        values = np.linspace(*sizes, len(m.levels))[::-1]\n        assert m.lookup_table == dict(zip(m.levels, values))\n\n        # Test explicit categories\n        p = VectorPlotter(data=long_df, variables=dict(x=\"x\", size=\"a_cat\"))\n        m = SizeMapping(p)\n        assert m.levels == long_df[\"a_cat\"].cat.categories.to_list()\n        assert m.map_type == \"categorical\"\n\n        # Test sizes list with wrong length\n        sizes = list(np.random.rand(len(levels) + 1))\n        with pytest.warns(UserWarning):\n            SizeMapping(p, sizes=sizes)\n\n        # Test sizes dict with missing levels\n        sizes = dict(zip(levels, np.random.rand(len(levels) - 1)))\n        with pytest.raises(ValueError):\n            SizeMapping(p, sizes=sizes)\n\n        # Test bad sizes argument\n        with pytest.raises(ValueError):\n            SizeMapping(p, sizes=\"bad_size\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestStyleMapping_TestStyleMapping.test_plotter_default_init.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestStyleMapping_TestStyleMapping.test_plotter_default_init.None_1", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 476, "end_line": 502, "span_ids": ["TestStyleMapping.test_plotter_default_init", "TestStyleMapping", "TestStyleMapping.test_init_from_map"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestStyleMapping:\n\n    def test_init_from_map(self, long_df):\n\n        p_orig = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", style=\"a\")\n        )\n        markers = [\"s\", \"p\", \"h\"]\n        p = StyleMapping.map(p_orig, markers=markers)\n        assert p is p_orig\n        assert isinstance(p._style_map, StyleMapping)\n        assert p._style_map(p._style_map.levels, \"marker\") == markers\n\n    def test_plotter_default_init(self, long_df):\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\"),\n        )\n        assert isinstance(p._style_map, StyleMapping)\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", style=\"a\"),\n        )\n        assert isinstance(p._style_map, StyleMapping)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestStyleMapping.test_plotter_reinit_TestStyleMapping.test_style_map_null.assert_m_lookup_table_is_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestStyleMapping.test_plotter_reinit_TestStyleMapping.test_style_map_null.assert_m_lookup_table_is_", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 504, "end_line": 523, "span_ids": ["TestStyleMapping.test_style_map_null", "TestStyleMapping.test_plotter_reinit"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestStyleMapping:\n\n    def test_plotter_reinit(self, long_df):\n\n        p_orig = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", style=\"a\"),\n        )\n        markers = [\"s\", \"p\", \"h\"]\n        style_order = [\"b\", \"a\", \"c\"]\n        p = p_orig.map_style(markers=markers, order=style_order)\n        assert p is p_orig\n        assert p._style_map.levels == style_order\n        assert p._style_map(style_order, \"marker\") == markers\n\n    def test_style_map_null(self, flat_series, null_series):\n\n        p = VectorPlotter(variables=dict(x=flat_series, style=null_series))\n        m = HueMapping(p)\n        assert m.levels is None\n        assert m.map_type is None\n        assert m.lookup_table is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestStyleMapping.test_map_style_TestStyleMapping.test_map_style.None_8.StyleMapping_p_markers_m": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestStyleMapping.test_map_style_TestStyleMapping.test_map_style.None_8.StyleMapping_p_markers_m", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 528, "end_line": 602, "span_ids": ["TestStyleMapping.test_map_style"], "tokens": 730}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestStyleMapping:\n\n    def test_map_style(self, long_df):\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", style=\"a\"),\n        )\n\n        # Test defaults\n        m = StyleMapping(p, markers=True, dashes=True)\n\n        n = len(m.levels)\n        for key, dashes in zip(m.levels, unique_dashes(n)):\n            assert m(key, \"dashes\") == dashes\n\n        actual_marker_paths = {\n            k: mpl.markers.MarkerStyle(m(k, \"marker\")).get_path()\n            for k in m.levels\n        }\n        expected_marker_paths = {\n            k: mpl.markers.MarkerStyle(m).get_path()\n            for k, m in zip(m.levels, unique_markers(n))\n        }\n        assert actual_marker_paths == expected_marker_paths\n\n        # Test lists\n        markers, dashes = [\"o\", \"s\", \"d\"], [(1, 0), (1, 1), (2, 1, 3, 1)]\n        m = StyleMapping(p, markers=markers, dashes=dashes)\n        for key, mark, dash in zip(m.levels, markers, dashes):\n            assert m(key, \"marker\") == mark\n            assert m(key, \"dashes\") == dash\n\n        # Test dicts\n        markers = dict(zip(p.plot_data[\"style\"].unique(), markers))\n        dashes = dict(zip(p.plot_data[\"style\"].unique(), dashes))\n        m = StyleMapping(p, markers=markers, dashes=dashes)\n        for key in m.levels:\n            assert m(key, \"marker\") == markers[key]\n            assert m(key, \"dashes\") == dashes[key]\n\n        # Test explicit categories\n        p = VectorPlotter(data=long_df, variables=dict(x=\"x\", style=\"a_cat\"))\n        m = StyleMapping(p)\n        assert m.levels == long_df[\"a_cat\"].cat.categories.to_list()\n\n        # Test style order with defaults\n        order = p.plot_data[\"style\"].unique()[[1, 2, 0]]\n        m = StyleMapping(p, markers=True, dashes=True, order=order)\n        n = len(order)\n        for key, mark, dash in zip(order, unique_markers(n), unique_dashes(n)):\n            assert m(key, \"dashes\") == dash\n            assert m(key, \"marker\") == mark\n            obj = mpl.markers.MarkerStyle(mark)\n            path = obj.get_path().transformed(obj.get_transform())\n            assert_array_equal(m(key, \"path\").vertices, path.vertices)\n\n        # Test too many levels with style lists\n        with pytest.warns(UserWarning):\n            StyleMapping(p, markers=[\"o\", \"s\"], dashes=False)\n\n        with pytest.warns(UserWarning):\n            StyleMapping(p, markers=False, dashes=[(2, 1)])\n\n        # Test missing keys with style dicts\n        markers, dashes = {\"a\": \"o\", \"b\": \"s\"}, False\n        with pytest.raises(ValueError):\n            StyleMapping(p, markers=markers, dashes=dashes)\n\n        markers, dashes = False, {\"a\": (1, 0), \"b\": (2, 1)}\n        with pytest.raises(ValueError):\n            StyleMapping(p, markers=markers, dashes=dashes)\n\n        # Test mixture of filled and unfilled markers\n        markers, dashes = [\"o\", \"x\", \"s\"], None\n        with pytest.raises(ValueError):\n            StyleMapping(p, markers=markers, dashes=dashes)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter_TestVectorPlotter.test_flat_variables.assert_p_variables_y_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter_TestVectorPlotter.test_flat_variables.assert_p_variables_y_", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 602, "end_line": 629, "span_ids": ["TestVectorPlotter", "TestVectorPlotter.test_flat_variables"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestVectorPlotter:\n\n    def test_flat_variables(self, flat_data):\n\n        p = VectorPlotter()\n        p.assign_variables(data=flat_data)\n        assert p.input_format == \"wide\"\n        assert list(p.variables) == [\"x\", \"y\"]\n        assert len(p.plot_data) == len(flat_data)\n\n        try:\n            expected_x = flat_data.index\n            expected_x_name = flat_data.index.name\n        except AttributeError:\n            expected_x = np.arange(len(flat_data))\n            expected_x_name = None\n\n        x = p.plot_data[\"x\"]\n        assert_array_equal(x, expected_x)\n\n        expected_y = flat_data\n        expected_y_name = getattr(flat_data, \"name\", None)\n\n        y = p.plot_data[\"y\"]\n        assert_array_equal(y, expected_y)\n\n        assert p.variables[\"x\"] == expected_x_name\n        assert p.variables[\"y\"] == expected_y_name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_long_df_TestVectorPlotter.test_long_dict.for_key_val_in_long_vari.assert_array_equal_p_plot": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_long_df_TestVectorPlotter.test_long_dict.for_key_val_in_long_vari.assert_array_equal_p_plot", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 631, "end_line": 678, "span_ids": ["TestVectorPlotter.test_long_dict", "TestVectorPlotter.test_long_df", "TestVectorPlotter.test_long_df_with_index", "TestVectorPlotter.test_long_df_with_multiindex"], "tokens": 335}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestVectorPlotter:\n\n    def test_long_df(self, long_df, long_variables):\n\n        p = VectorPlotter()\n        p.assign_variables(data=long_df, variables=long_variables)\n        assert p.input_format == \"long\"\n        assert p.variables == long_variables\n\n        for key, val in long_variables.items():\n            assert_array_equal(p.plot_data[key], long_df[val])\n\n    def test_long_df_with_index(self, long_df, long_variables):\n\n        p = VectorPlotter()\n        p.assign_variables(\n            data=long_df.set_index(\"a\"),\n            variables=long_variables,\n        )\n        assert p.input_format == \"long\"\n        assert p.variables == long_variables\n\n        for key, val in long_variables.items():\n            assert_array_equal(p.plot_data[key], long_df[val])\n\n    def test_long_df_with_multiindex(self, long_df, long_variables):\n\n        p = VectorPlotter()\n        p.assign_variables(\n            data=long_df.set_index([\"a\", \"x\"]),\n            variables=long_variables,\n        )\n        assert p.input_format == \"long\"\n        assert p.variables == long_variables\n\n        for key, val in long_variables.items():\n            assert_array_equal(p.plot_data[key], long_df[val])\n\n    def test_long_dict(self, long_dict, long_variables):\n\n        p = VectorPlotter()\n        p.assign_variables(\n            data=long_dict,\n            variables=long_variables,\n        )\n        assert p.input_format == \"long\"\n        assert p.variables == long_variables\n\n        for key, val in long_variables.items():\n            assert_array_equal(p.plot_data[key], pd.Series(long_dict[val]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_long_vectors_TestVectorPlotter.test_long_vectors.for_key_val_in_long_vari.assert_array_equal_p_plot": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_long_vectors_TestVectorPlotter.test_long_vectors.for_key_val_in_long_vari.assert_array_equal_p_plot", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 680, "end_line": 701, "span_ids": ["TestVectorPlotter.test_long_vectors"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestVectorPlotter:\n\n    @pytest.mark.parametrize(\n        \"vector_type\",\n        [\"series\", \"numpy\", \"list\"],\n    )\n    def test_long_vectors(self, long_df, long_variables, vector_type):\n\n        variables = {key: long_df[val] for key, val in long_variables.items()}\n        if vector_type == \"numpy\":\n            variables = {key: val.to_numpy() for key, val in variables.items()}\n        elif vector_type == \"list\":\n            variables = {key: val.to_list() for key, val in variables.items()}\n\n        p = VectorPlotter()\n        p.assign_variables(variables=variables)\n        assert p.input_format == \"long\"\n\n        assert list(p.variables) == list(long_variables)\n        if vector_type == \"series\":\n            assert p.variables == long_variables\n\n        for key, val in long_variables.items():\n            assert_array_equal(p.plot_data[key], long_df[val])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_long_undefined_variables_TestVectorPlotter.test_long_undefined_variables.None_2.p_assign_variables_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_long_undefined_variables_TestVectorPlotter.test_long_undefined_variables.None_2.p_assign_variables_", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 703, "end_line": 720, "span_ids": ["TestVectorPlotter.test_long_undefined_variables"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestVectorPlotter:\n\n    def test_long_undefined_variables(self, long_df):\n\n        p = VectorPlotter()\n\n        with pytest.raises(ValueError):\n            p.assign_variables(\n                data=long_df, variables=dict(x=\"not_in_df\"),\n            )\n\n        with pytest.raises(ValueError):\n            p.assign_variables(\n                data=long_df, variables=dict(x=\"x\", y=\"not_in_df\"),\n            )\n\n        with pytest.raises(ValueError):\n            p.assign_variables(\n                data=long_df, variables=dict(x=\"x\", y=\"y\", hue=\"not_in_df\"),\n            )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_empty_data_input_TestVectorPlotter.test_wide_categorical_columns.assert_array_equal_p_plot": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_empty_data_input_TestVectorPlotter.test_wide_categorical_columns.assert_array_equal_p_plot", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 722, "end_line": 797, "span_ids": ["TestVectorPlotter.test_long_scalar_and_data", "TestVectorPlotter.test_long_unknown_error", "TestVectorPlotter.test_long_numeric_name", "TestVectorPlotter.test_wide_semantic_error", "TestVectorPlotter.test_long_hierarchical_index", "TestVectorPlotter.test_long_unmatched_size_error", "TestVectorPlotter.test_empty_data_input", "TestVectorPlotter.test_units", "TestVectorPlotter.test_wide_categorical_columns"], "tokens": 656}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestVectorPlotter:\n\n    @pytest.mark.parametrize(\n        \"arg\", [[], np.array([]), pd.DataFrame()],\n    )\n    def test_empty_data_input(self, arg):\n\n        p = VectorPlotter()\n        p.assign_variables(data=arg)\n        assert not p.variables\n\n        if not isinstance(arg, pd.DataFrame):\n            p = VectorPlotter()\n            p.assign_variables(variables=dict(x=arg, y=arg))\n            assert not p.variables\n\n    def test_units(self, repeated_df):\n\n        p = VectorPlotter()\n        p.assign_variables(\n            data=repeated_df,\n            variables=dict(x=\"x\", y=\"y\", units=\"u\"),\n        )\n        assert_array_equal(p.plot_data[\"units\"], repeated_df[\"u\"])\n\n    @pytest.mark.parametrize(\"name\", [3, 4.5])\n    def test_long_numeric_name(self, long_df, name):\n\n        long_df[name] = long_df[\"x\"]\n        p = VectorPlotter()\n        p.assign_variables(data=long_df, variables={\"x\": name})\n        assert_array_equal(p.plot_data[\"x\"], long_df[name])\n        assert p.variables[\"x\"] == name\n\n    def test_long_hierarchical_index(self, rng):\n\n        cols = pd.MultiIndex.from_product([[\"a\"], [\"x\", \"y\"]])\n        data = rng.uniform(size=(50, 2))\n        df = pd.DataFrame(data, columns=cols)\n\n        name = (\"a\", \"y\")\n        var = \"y\"\n\n        p = VectorPlotter()\n        p.assign_variables(data=df, variables={var: name})\n        assert_array_equal(p.plot_data[var], df[name])\n        assert p.variables[var] == name\n\n    def test_long_scalar_and_data(self, long_df):\n\n        val = 22\n        p = VectorPlotter(data=long_df, variables={\"x\": \"x\", \"y\": val})\n        assert (p.plot_data[\"y\"] == val).all()\n        assert p.variables[\"y\"] is None\n\n    def test_wide_semantic_error(self, wide_df):\n\n        err = \"The following variable cannot be assigned with wide-form data: `hue`\"\n        with pytest.raises(ValueError, match=err):\n            VectorPlotter(data=wide_df, variables={\"hue\": \"a\"})\n\n    def test_long_unknown_error(self, long_df):\n\n        err = \"Could not interpret value `what` for parameter `hue`\"\n        with pytest.raises(ValueError, match=err):\n            VectorPlotter(data=long_df, variables={\"x\": \"x\", \"hue\": \"what\"})\n\n    def test_long_unmatched_size_error(self, long_df, flat_array):\n\n        err = \"Length of ndarray vectors must match length of `data`\"\n        with pytest.raises(ValueError, match=err):\n            VectorPlotter(data=long_df, variables={\"x\": \"x\", \"hue\": flat_array})\n\n    def test_wide_categorical_columns(self, wide_df):\n\n        wide_df.columns = pd.CategoricalIndex(wide_df.columns)\n        p = VectorPlotter(data=wide_df)\n        assert_array_equal(p.plot_data[\"hue\"].unique(), [\"a\", \"b\", \"c\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_iter_data_quantitites_TestVectorPlotter.test_iter_data_quantitites.None_8": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_iter_data_quantitites_TestVectorPlotter.test_iter_data_quantitites.None_8", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 799, "end_line": 876, "span_ids": ["TestVectorPlotter.test_iter_data_quantitites"], "tokens": 588}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestVectorPlotter:\n\n    def test_iter_data_quantitites(self, long_df):\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\"),\n        )\n        out = p.iter_data(\"hue\")\n        assert len(list(out)) == 1\n\n        var = \"a\"\n        n_subsets = len(long_df[var].unique())\n\n        semantics = [\"hue\", \"size\", \"style\"]\n        for semantic in semantics:\n\n            p = VectorPlotter(\n                data=long_df,\n                variables={\"x\": \"x\", \"y\": \"y\", semantic: var},\n            )\n            out = p.iter_data(semantics)\n            assert len(list(out)) == n_subsets\n\n        var = \"a\"\n        n_subsets = len(long_df[var].unique())\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=var, style=var),\n        )\n        out = p.iter_data(semantics)\n        assert len(list(out)) == n_subsets\n\n        # --\n\n        out = p.iter_data(semantics, reverse=True)\n        assert len(list(out)) == n_subsets\n\n        # --\n\n        var1, var2 = \"a\", \"s\"\n\n        n_subsets = len(long_df[var1].unique())\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=var1, style=var2),\n        )\n        out = p.iter_data([\"hue\"])\n        assert len(list(out)) == n_subsets\n\n        n_subsets = len(set(list(map(tuple, long_df[[var1, var2]].values))))\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=var1, style=var2),\n        )\n        out = p.iter_data(semantics)\n        assert len(list(out)) == n_subsets\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=var1, size=var2, style=var1),\n        )\n        out = p.iter_data(semantics)\n        assert len(list(out)) == n_subsets\n\n        # --\n\n        var1, var2, var3 = \"a\", \"s\", \"b\"\n        cols = [var1, var2, var3]\n        n_subsets = len(set(list(map(tuple, long_df[cols].values))))\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=var1, size=var2, style=var3),\n        )\n        out = p.iter_data(semantics)\n        assert len(list(out)) == n_subsets", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_iter_data_keys_TestVectorPlotter.test_iter_data_keys.None_5.assert_sub_vars_col_in": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_iter_data_keys_TestVectorPlotter.test_iter_data_keys.None_5.assert_sub_vars_col_in", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 878, "end_line": 938, "span_ids": ["TestVectorPlotter.test_iter_data_keys"], "tokens": 526}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestVectorPlotter:\n\n    def test_iter_data_keys(self, long_df):\n\n        semantics = [\"hue\", \"size\", \"style\"]\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\"),\n        )\n        for sub_vars, _ in p.iter_data(\"hue\"):\n            assert sub_vars == {}\n\n        # --\n\n        var = \"a\"\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=var),\n        )\n        for sub_vars, _ in p.iter_data(\"hue\"):\n            assert list(sub_vars) == [\"hue\"]\n            assert sub_vars[\"hue\"] in long_df[var].values\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", size=var),\n        )\n        for sub_vars, _ in p.iter_data(\"size\"):\n            assert list(sub_vars) == [\"size\"]\n            assert sub_vars[\"size\"] in long_df[var].values\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=var, style=var),\n        )\n        for sub_vars, _ in p.iter_data(semantics):\n            assert list(sub_vars) == [\"hue\", \"style\"]\n            assert sub_vars[\"hue\"] in long_df[var].values\n            assert sub_vars[\"style\"] in long_df[var].values\n            assert sub_vars[\"hue\"] == sub_vars[\"style\"]\n\n        var1, var2 = \"a\", \"s\"\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=var1, size=var2),\n        )\n        for sub_vars, _ in p.iter_data(semantics):\n            assert list(sub_vars) == [\"hue\", \"size\"]\n            assert sub_vars[\"hue\"] in long_df[var1].values\n            assert sub_vars[\"size\"] in long_df[var2].values\n\n        semantics = [\"hue\", \"col\", \"row\"]\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=var1, col=var2),\n        )\n        for sub_vars, _ in p.iter_data(\"hue\"):\n            assert list(sub_vars) == [\"hue\", \"col\"]\n            assert sub_vars[\"hue\"] in long_df[var1].values\n            assert sub_vars[\"col\"] in long_df[var2].values", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_iter_data_values_TestVectorPlotter.test_iter_data_values.None_1.assert_frame_equal_sub_da": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_iter_data_values_TestVectorPlotter.test_iter_data_values.None_1.assert_frame_equal_sub_da", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 940, "end_line": 967, "span_ids": ["TestVectorPlotter.test_iter_data_values"], "tokens": 239}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestVectorPlotter:\n\n    def test_iter_data_values(self, long_df):\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\"),\n        )\n\n        p.sort = True\n        _, sub_data = next(p.iter_data(\"hue\"))\n        assert_frame_equal(sub_data, p.plot_data)\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\"),\n        )\n\n        for sub_vars, sub_data in p.iter_data(\"hue\"):\n            rows = p.plot_data[\"hue\"] == sub_vars[\"hue\"]\n            assert_frame_equal(sub_data, p.plot_data[rows])\n\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\", size=\"s\"),\n        )\n        for sub_vars, sub_data in p.iter_data([\"hue\", \"size\"]):\n            rows = p.plot_data[\"hue\"] == sub_vars[\"hue\"]\n            rows &= p.plot_data[\"size\"] == sub_vars[\"size\"]\n            assert_frame_equal(sub_data, p.plot_data[rows])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_iter_data_reverse_TestVectorPlotter.test_iter_data_dropna.assert_some_missing": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_iter_data_reverse_TestVectorPlotter.test_iter_data_dropna.assert_some_missing", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 969, "end_line": 992, "span_ids": ["TestVectorPlotter.test_iter_data_dropna", "TestVectorPlotter.test_iter_data_reverse"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestVectorPlotter:\n\n    def test_iter_data_reverse(self, long_df):\n\n        reversed_order = categorical_order(long_df[\"a\"])[::-1]\n        p = VectorPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\")\n        )\n        iterator = p.iter_data(\"hue\", reverse=True)\n        for i, (sub_vars, _) in enumerate(iterator):\n            assert sub_vars[\"hue\"] == reversed_order[i]\n\n    def test_iter_data_dropna(self, missing_df):\n\n        p = VectorPlotter(\n            data=missing_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\")\n        )\n        for _, sub_df in p.iter_data(\"hue\"):\n            assert not sub_df.isna().any().any()\n\n        some_missing = False\n        for _, sub_df in p.iter_data(\"hue\", dropna=False):\n            some_missing |= sub_df.isna().any().any()\n        assert some_missing", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_axis_labels_TestVectorPlotter.test_axis_labels.assert_not_ax2_yaxis_labe": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_axis_labels_TestVectorPlotter.test_axis_labels.assert_not_ax2_yaxis_labe", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 994, "end_line": 1042, "span_ids": ["TestVectorPlotter.test_axis_labels"], "tokens": 421}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestVectorPlotter:\n\n    def test_axis_labels(self, long_df):\n\n        f, ax = plt.subplots()\n\n        p = VectorPlotter(data=long_df, variables=dict(x=\"a\"))\n\n        p._add_axis_labels(ax)\n        assert ax.get_xlabel() == \"a\"\n        assert ax.get_ylabel() == \"\"\n        ax.clear()\n\n        p = VectorPlotter(data=long_df, variables=dict(y=\"a\"))\n        p._add_axis_labels(ax)\n        assert ax.get_xlabel() == \"\"\n        assert ax.get_ylabel() == \"a\"\n        ax.clear()\n\n        p = VectorPlotter(data=long_df, variables=dict(x=\"a\"))\n\n        p._add_axis_labels(ax, default_y=\"default\")\n        assert ax.get_xlabel() == \"a\"\n        assert ax.get_ylabel() == \"default\"\n        ax.clear()\n\n        p = VectorPlotter(data=long_df, variables=dict(y=\"a\"))\n        p._add_axis_labels(ax, default_x=\"default\", default_y=\"default\")\n        assert ax.get_xlabel() == \"default\"\n        assert ax.get_ylabel() == \"a\"\n        ax.clear()\n\n        p = VectorPlotter(data=long_df, variables=dict(x=\"x\", y=\"a\"))\n        ax.set(xlabel=\"existing\", ylabel=\"also existing\")\n        p._add_axis_labels(ax)\n        assert ax.get_xlabel() == \"existing\"\n        assert ax.get_ylabel() == \"also existing\"\n\n        f, (ax1, ax2) = plt.subplots(1, 2, sharey=True)\n        p = VectorPlotter(data=long_df, variables=dict(x=\"x\", y=\"y\"))\n\n        p._add_axis_labels(ax1)\n        p._add_axis_labels(ax2)\n\n        assert ax1.get_xlabel() == \"x\"\n        assert ax1.get_ylabel() == \"y\"\n        assert ax1.yaxis.label.get_visible()\n\n        assert ax2.get_xlabel() == \"x\"\n        assert ax2.get_ylabel() == \"y\"\n        assert not ax2.yaxis.label.get_visible()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_attach_basics_TestVectorPlotter.test_attach_disallowed.None_3.p__attach_ax_allowed_typ": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_attach_basics_TestVectorPlotter.test_attach_disallowed.None_3.p__attach_ax_allowed_typ", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1044, "end_line": 1082, "span_ids": ["TestVectorPlotter.test_attach_basics", "TestVectorPlotter.test_attach_disallowed"], "tokens": 283}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestVectorPlotter:\n\n    @pytest.mark.parametrize(\n        \"variables\",\n        [\n            dict(x=\"x\", y=\"y\"),\n            dict(x=\"x\"),\n            dict(y=\"y\"),\n            dict(x=\"t\", y=\"y\"),\n            dict(x=\"x\", y=\"a\"),\n        ]\n    )\n    def test_attach_basics(self, long_df, variables):\n\n        _, ax = plt.subplots()\n        p = VectorPlotter(data=long_df, variables=variables)\n        p._attach(ax)\n        assert p.ax is ax\n\n    def test_attach_disallowed(self, long_df):\n\n        _, ax = plt.subplots()\n        p = VectorPlotter(data=long_df, variables={\"x\": \"a\"})\n\n        with pytest.raises(TypeError):\n            p._attach(ax, allowed_types=\"numeric\")\n\n        with pytest.raises(TypeError):\n            p._attach(ax, allowed_types=[\"datetime\", \"numeric\"])\n\n        _, ax = plt.subplots()\n        p = VectorPlotter(data=long_df, variables={\"x\": \"x\"})\n\n        with pytest.raises(TypeError):\n            p._attach(ax, allowed_types=\"categorical\")\n\n        _, ax = plt.subplots()\n        p = VectorPlotter(data=long_df, variables={\"x\": \"x\", \"y\": \"t\"})\n\n        with pytest.raises(TypeError):\n            p._attach(ax, allowed_types=[\"numeric\", \"categorical\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_attach_log_scale_TestVectorPlotter.test_attach_log_scale.None_29": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_attach_log_scale_TestVectorPlotter.test_attach_log_scale.None_29", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1084, "end_line": 1132, "span_ids": ["TestVectorPlotter.test_attach_log_scale"], "tokens": 504}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestVectorPlotter:\n\n    def test_attach_log_scale(self, long_df):\n\n        _, ax = plt.subplots()\n        p = VectorPlotter(data=long_df, variables={\"x\": \"x\"})\n        p._attach(ax, log_scale=True)\n        assert ax.xaxis.get_scale() == \"log\"\n        assert ax.yaxis.get_scale() == \"linear\"\n        assert p._log_scaled(\"x\")\n        assert not p._log_scaled(\"y\")\n\n        _, ax = plt.subplots()\n        p = VectorPlotter(data=long_df, variables={\"x\": \"x\"})\n        p._attach(ax, log_scale=2)\n        assert ax.xaxis.get_scale() == \"log\"\n        assert ax.yaxis.get_scale() == \"linear\"\n        assert p._log_scaled(\"x\")\n        assert not p._log_scaled(\"y\")\n\n        _, ax = plt.subplots()\n        p = VectorPlotter(data=long_df, variables={\"y\": \"y\"})\n        p._attach(ax, log_scale=True)\n        assert ax.xaxis.get_scale() == \"linear\"\n        assert ax.yaxis.get_scale() == \"log\"\n        assert not p._log_scaled(\"x\")\n        assert p._log_scaled(\"y\")\n\n        _, ax = plt.subplots()\n        p = VectorPlotter(data=long_df, variables={\"x\": \"x\", \"y\": \"y\"})\n        p._attach(ax, log_scale=True)\n        assert ax.xaxis.get_scale() == \"log\"\n        assert ax.yaxis.get_scale() == \"log\"\n        assert p._log_scaled(\"x\")\n        assert p._log_scaled(\"y\")\n\n        _, ax = plt.subplots()\n        p = VectorPlotter(data=long_df, variables={\"x\": \"x\", \"y\": \"y\"})\n        p._attach(ax, log_scale=(True, False))\n        assert ax.xaxis.get_scale() == \"log\"\n        assert ax.yaxis.get_scale() == \"linear\"\n        assert p._log_scaled(\"x\")\n        assert not p._log_scaled(\"y\")\n\n        _, ax = plt.subplots()\n        p = VectorPlotter(data=long_df, variables={\"x\": \"x\", \"y\": \"y\"})\n        p._attach(ax, log_scale=(False, 2))\n        assert ax.xaxis.get_scale() == \"linear\"\n        assert ax.yaxis.get_scale() == \"log\"\n        assert not p._log_scaled(\"x\")\n        assert p._log_scaled(\"y\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_attach_converters_TestVectorPlotter.test_attach_facets.assert_p_facets_g": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_attach_converters_TestVectorPlotter.test_attach_facets.assert_p_facets_g", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1134, "end_line": 1154, "span_ids": ["TestVectorPlotter.test_attach_facets", "TestVectorPlotter.test_attach_converters"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestVectorPlotter:\n\n    def test_attach_converters(self, long_df):\n\n        _, ax = plt.subplots()\n        p = VectorPlotter(data=long_df, variables={\"x\": \"x\", \"y\": \"t\"})\n        p._attach(ax)\n        assert ax.xaxis.converter is None\n        assert isinstance(ax.yaxis.converter, mpl.dates.DateConverter)\n\n        _, ax = plt.subplots()\n        p = VectorPlotter(data=long_df, variables={\"x\": \"a\", \"y\": \"y\"})\n        p._attach(ax)\n        assert isinstance(ax.xaxis.converter, mpl.category.StrCategoryConverter)\n        assert ax.yaxis.converter is None\n\n    def test_attach_facets(self, long_df):\n\n        g = FacetGrid(long_df, col=\"a\")\n        p = VectorPlotter(data=long_df, variables={\"x\": \"x\", \"col\": \"a\"})\n        p._attach(g)\n        assert p.ax is None\n        assert p.facets == g", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_attach_shared_axes_TestVectorPlotter.test_attach_shared_axes.None_18": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_attach_shared_axes_TestVectorPlotter.test_attach_shared_axes.None_18", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1156, "end_line": 1215, "span_ids": ["TestVectorPlotter.test_attach_shared_axes"], "tokens": 832}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestVectorPlotter:\n\n    def test_attach_shared_axes(self, long_df):\n\n        g = FacetGrid(long_df)\n        p = VectorPlotter(data=long_df, variables={\"x\": \"x\", \"y\": \"y\"})\n        p._attach(g)\n        assert p.converters[\"x\"].nunique() == 1\n\n        g = FacetGrid(long_df, col=\"a\")\n        p = VectorPlotter(data=long_df, variables={\"x\": \"x\", \"y\": \"y\", \"col\": \"a\"})\n        p._attach(g)\n        assert p.converters[\"x\"].nunique() == 1\n        assert p.converters[\"y\"].nunique() == 1\n\n        g = FacetGrid(long_df, col=\"a\", sharex=False)\n        p = VectorPlotter(data=long_df, variables={\"x\": \"x\", \"y\": \"y\", \"col\": \"a\"})\n        p._attach(g)\n        assert p.converters[\"x\"].nunique() == p.plot_data[\"col\"].nunique()\n        assert p.converters[\"x\"].groupby(p.plot_data[\"col\"]).nunique().max() == 1\n        assert p.converters[\"y\"].nunique() == 1\n\n        g = FacetGrid(long_df, col=\"a\", sharex=False, col_wrap=2)\n        p = VectorPlotter(data=long_df, variables={\"x\": \"x\", \"y\": \"y\", \"col\": \"a\"})\n        p._attach(g)\n        assert p.converters[\"x\"].nunique() == p.plot_data[\"col\"].nunique()\n        assert p.converters[\"x\"].groupby(p.plot_data[\"col\"]).nunique().max() == 1\n        assert p.converters[\"y\"].nunique() == 1\n\n        g = FacetGrid(long_df, col=\"a\", row=\"b\")\n        p = VectorPlotter(\n            data=long_df, variables={\"x\": \"x\", \"y\": \"y\", \"col\": \"a\", \"row\": \"b\"},\n        )\n        p._attach(g)\n        assert p.converters[\"x\"].nunique() == 1\n        assert p.converters[\"y\"].nunique() == 1\n\n        g = FacetGrid(long_df, col=\"a\", row=\"b\", sharex=False)\n        p = VectorPlotter(\n            data=long_df, variables={\"x\": \"x\", \"y\": \"y\", \"col\": \"a\", \"row\": \"b\"},\n        )\n        p._attach(g)\n        assert p.converters[\"x\"].nunique() == len(g.axes.flat)\n        assert p.converters[\"y\"].nunique() == 1\n\n        g = FacetGrid(long_df, col=\"a\", row=\"b\", sharex=\"col\")\n        p = VectorPlotter(\n            data=long_df, variables={\"x\": \"x\", \"y\": \"y\", \"col\": \"a\", \"row\": \"b\"},\n        )\n        p._attach(g)\n        assert p.converters[\"x\"].nunique() == p.plot_data[\"col\"].nunique()\n        assert p.converters[\"x\"].groupby(p.plot_data[\"col\"]).nunique().max() == 1\n        assert p.converters[\"y\"].nunique() == 1\n\n        g = FacetGrid(long_df, col=\"a\", row=\"b\", sharey=\"row\")\n        p = VectorPlotter(\n            data=long_df, variables={\"x\": \"x\", \"y\": \"y\", \"col\": \"a\", \"row\": \"b\"},\n        )\n        p._attach(g)\n        assert p.converters[\"x\"].nunique() == 1\n        assert p.converters[\"y\"].nunique() == p.plot_data[\"row\"].nunique()\n        assert p.converters[\"y\"].groupby(p.plot_data[\"row\"]).nunique().max() == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_get_axes_single_TestVectorPlotter.test_get_axes_facets.assert_p__get_axes_row_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_get_axes_single_TestVectorPlotter.test_get_axes_facets.assert_p__get_axes_row_", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1217, "end_line": 1236, "span_ids": ["TestVectorPlotter.test_get_axes_single", "TestVectorPlotter.test_get_axes_facets"], "tokens": 230}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestVectorPlotter:\n\n    def test_get_axes_single(self, long_df):\n\n        ax = plt.figure().subplots()\n        p = VectorPlotter(data=long_df, variables={\"x\": \"x\", \"hue\": \"a\"})\n        p._attach(ax)\n        assert p._get_axes({\"hue\": \"a\"}) is ax\n\n    def test_get_axes_facets(self, long_df):\n\n        g = FacetGrid(long_df, col=\"a\")\n        p = VectorPlotter(data=long_df, variables={\"x\": \"x\", \"col\": \"a\"})\n        p._attach(g)\n        assert p._get_axes({\"col\": \"b\"}) is g.axes_dict[\"b\"]\n\n        g = FacetGrid(long_df, col=\"a\", row=\"c\")\n        p = VectorPlotter(\n            data=long_df, variables={\"x\": \"x\", \"col\": \"a\", \"row\": \"c\"}\n        )\n        p._attach(g)\n        assert p._get_axes({\"row\": 1, \"col\": \"b\"}) is g.axes_dict[(1, \"b\")]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_comp_data_TestVectorPlotter.test_comp_data.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_comp_data_TestVectorPlotter.test_comp_data.None_4", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1238, "end_line": 1262, "span_ids": ["TestVectorPlotter.test_comp_data"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestVectorPlotter:\n\n    def test_comp_data(self, long_df):\n\n        p = VectorPlotter(data=long_df, variables={\"x\": \"x\", \"y\": \"t\"})\n\n        # We have disabled this check for now, while it remains part of\n        # the internal API, because it will require updating a number of tests\n        # with pytest.raises(AttributeError):\n        #     p.comp_data\n\n        _, ax = plt.subplots()\n        p._attach(ax)\n\n        assert_array_equal(p.comp_data[\"x\"], p.plot_data[\"x\"])\n        assert_array_equal(\n            p.comp_data[\"y\"], ax.yaxis.convert_units(p.plot_data[\"y\"])\n        )\n\n        p = VectorPlotter(data=long_df, variables={\"x\": \"a\"})\n\n        _, ax = plt.subplots()\n        p._attach(ax)\n\n        assert_array_equal(\n            p.comp_data[\"x\"], ax.xaxis.convert_units(p.plot_data[\"x\"])\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_comp_data_log_TestVectorPlotter.test_comp_data_category_order.assert_array_equal_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_comp_data_log_TestVectorPlotter.test_comp_data_category_order.assert_array_equal_", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1264, "end_line": 1286, "span_ids": ["TestVectorPlotter.test_comp_data_log", "TestVectorPlotter.test_comp_data_category_order"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestVectorPlotter:\n\n    def test_comp_data_log(self, long_df):\n\n        p = VectorPlotter(data=long_df, variables={\"x\": \"z\", \"y\": \"y\"})\n        _, ax = plt.subplots()\n        p._attach(ax, log_scale=(True, False))\n\n        assert_array_equal(\n            p.comp_data[\"x\"], np.log10(p.plot_data[\"x\"])\n        )\n        assert_array_equal(p.comp_data[\"y\"], p.plot_data[\"y\"])\n\n    def test_comp_data_category_order(self):\n\n        s = (pd.Series([\"a\", \"b\", \"c\", \"a\"], dtype=\"category\")\n             .cat.set_categories([\"b\", \"c\", \"a\"], ordered=True))\n\n        p = VectorPlotter(variables={\"x\": s})\n        _, ax = plt.subplots()\n        p._attach(ax)\n        assert_array_equal(\n            p.comp_data[\"x\"],\n            [2, 0, 1, 2],\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.comp_data_missing_fixture_TestVectorPlotter.comp_data_missing_fixture.return.orig_data_comp_data": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.comp_data_missing_fixture_TestVectorPlotter.comp_data_missing_fixture.return.orig_data_comp_data", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1288, "end_line": 1322, "span_ids": ["TestVectorPlotter.comp_data_missing_fixture"], "tokens": 308}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestVectorPlotter:\n\n    @pytest.fixture(\n        params=itertools.product(\n            [None, np.nan, PD_NA],\n            [\"numeric\", \"category\", \"datetime\"]\n        )\n    )\n    @pytest.mark.parametrize(\n        \"NA,var_type\",\n    )\n    def comp_data_missing_fixture(self, request):\n\n        # This fixture holds the logic for parameterizing\n        # the following test (test_comp_data_missing)\n\n        NA, var_type = request.param\n\n        if NA is None:\n            pytest.skip(\"No pandas.NA available\")\n\n        comp_data = [0, 1, np.nan, 2, np.nan, 1]\n        if var_type == \"numeric\":\n            orig_data = [0, 1, NA, 2, np.inf, 1]\n        elif var_type == \"category\":\n            orig_data = [\"a\", \"b\", NA, \"c\", NA, \"b\"]\n        elif var_type == \"datetime\":\n            # Use 1-based numbers to avoid issue on matplotlib<3.2\n            # Could simplify the test a bit when we roll off that version\n            comp_data = [1, 2, np.nan, 3, np.nan, 2]\n            numbers = [1, 2, 3, 2]\n\n            orig_data = mpl.dates.num2date(numbers)\n            orig_data.insert(2, NA)\n            orig_data.insert(4, np.inf)\n\n        return orig_data, comp_data", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_comp_data_missing_TestVectorPlotter.test_scale_datetime.with_pytest_raises_NotImp.p_scale_datetime_x_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_comp_data_missing_TestVectorPlotter.test_scale_datetime.with_pytest_raises_NotImp.p_scale_datetime_x_", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1324, "end_line": 1367, "span_ids": ["TestVectorPlotter.test_scale_datetime", "TestVectorPlotter.test_scale_numeric", "TestVectorPlotter.test_comp_data_missing", "TestVectorPlotter.test_scale_native", "TestVectorPlotter.test_var_order", "TestVectorPlotter.test_comp_data_duplicate_index"], "tokens": 376}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestVectorPlotter:\n\n    def test_comp_data_missing(self, comp_data_missing_fixture):\n\n        orig_data, comp_data = comp_data_missing_fixture\n        p = VectorPlotter(variables={\"x\": orig_data})\n        ax = plt.figure().subplots()\n        p._attach(ax)\n        assert_array_equal(p.comp_data[\"x\"], comp_data)\n\n    def test_comp_data_duplicate_index(self):\n\n        x = pd.Series([1, 2, 3, 4, 5], [1, 1, 1, 2, 2])\n        p = VectorPlotter(variables={\"x\": x})\n        ax = plt.figure().subplots()\n        p._attach(ax)\n        assert_array_equal(p.comp_data[\"x\"], x)\n\n    def test_var_order(self, long_df):\n\n        order = [\"c\", \"b\", \"a\"]\n        for var in [\"hue\", \"size\", \"style\"]:\n            p = VectorPlotter(data=long_df, variables={\"x\": \"x\", var: \"a\"})\n\n            mapper = getattr(p, f\"map_{var}\")\n            mapper(order=order)\n\n            assert p.var_levels[var] == order\n\n    def test_scale_native(self, long_df):\n\n        p = VectorPlotter(data=long_df, variables={\"x\": \"x\"})\n        with pytest.raises(NotImplementedError):\n            p.scale_native(\"x\")\n\n    def test_scale_numeric(self, long_df):\n\n        p = VectorPlotter(data=long_df, variables={\"y\": \"y\"})\n        with pytest.raises(NotImplementedError):\n            p.scale_numeric(\"y\")\n\n    def test_scale_datetime(self, long_df):\n\n        p = VectorPlotter(data=long_df, variables={\"x\": \"t\"})\n        with pytest.raises(NotImplementedError):\n            p.scale_datetime(\"x\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_scale_categorical_TestVectorPlotter.test_scale_categorical.assert_all_s_endswith_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestVectorPlotter.test_scale_categorical_TestVectorPlotter.test_scale_categorical.assert_all_s_endswith_", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1369, "end_line": 1404, "span_ids": ["TestVectorPlotter.test_scale_categorical"], "tokens": 406}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestVectorPlotter:\n\n    def test_scale_categorical(self, long_df):\n\n        p = VectorPlotter(data=long_df, variables={\"x\": \"x\"})\n        p.scale_categorical(\"y\")\n        assert p.variables[\"y\"] is None\n        assert p.var_types[\"y\"] == \"categorical\"\n        assert (p.plot_data[\"y\"] == \"\").all()\n\n        p = VectorPlotter(data=long_df, variables={\"x\": \"s\"})\n        p.scale_categorical(\"x\")\n        assert p.var_types[\"x\"] == \"categorical\"\n        assert hasattr(p.plot_data[\"x\"], \"str\")\n        assert not p._var_ordered[\"x\"]\n        assert p.plot_data[\"x\"].is_monotonic_increasing\n        assert_array_equal(p.var_levels[\"x\"], p.plot_data[\"x\"].unique())\n\n        p = VectorPlotter(data=long_df, variables={\"x\": \"a\"})\n        p.scale_categorical(\"x\")\n        assert not p._var_ordered[\"x\"]\n        assert_array_equal(p.var_levels[\"x\"], categorical_order(long_df[\"a\"]))\n\n        p = VectorPlotter(data=long_df, variables={\"x\": \"a_cat\"})\n        p.scale_categorical(\"x\")\n        assert p._var_ordered[\"x\"]\n        assert_array_equal(p.var_levels[\"x\"], categorical_order(long_df[\"a_cat\"]))\n\n        p = VectorPlotter(data=long_df, variables={\"x\": \"a\"})\n        order = np.roll(long_df[\"a\"].unique(), 1)\n        p.scale_categorical(\"x\", order=order)\n        assert p._var_ordered[\"x\"]\n        assert_array_equal(p.var_levels[\"x\"], order)\n\n        p = VectorPlotter(data=long_df, variables={\"x\": \"s\"})\n        p.scale_categorical(\"x\", formatter=lambda x: f\"{x:%}\")\n        assert p.plot_data[\"x\"].str.endswith(\"%\").all()\n        assert all(s.endswith(\"%\") for s in p.var_levels[\"x\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestCoreFunc_TestCoreFunc.test_unique_markers.for_m_in_markers_.assert_mpl_markers_Marker": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestCoreFunc_TestCoreFunc.test_unique_markers.for_m_in_markers_.assert_mpl_markers_Marker", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1407, "end_line": 1429, "span_ids": ["TestCoreFunc.test_unique_markers", "TestCoreFunc", "TestCoreFunc.test_unique_dashes"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCoreFunc:\n\n    def test_unique_dashes(self):\n\n        n = 24\n        dashes = unique_dashes(n)\n\n        assert len(dashes) == n\n        assert len(set(dashes)) == n\n        assert dashes[0] == \"\"\n        for spec in dashes[1:]:\n            assert isinstance(spec, tuple)\n            assert not len(spec) % 2\n\n    def test_unique_markers(self):\n\n        n = 24\n        markers = unique_markers(n)\n\n        assert len(markers) == n\n        assert len(set(markers)) == n\n        for m in markers:\n            assert mpl.markers.MarkerStyle(m).is_filled()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestCoreFunc.test_variable_type_TestCoreFunc.test_variable_type.None_17": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestCoreFunc.test_variable_type_TestCoreFunc.test_variable_type.None_17", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1431, "end_line": 1463, "span_ids": ["TestCoreFunc.test_variable_type"], "tokens": 349}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCoreFunc:\n\n    def test_variable_type(self):\n\n        s = pd.Series([1., 2., 3.])\n        assert variable_type(s) == \"numeric\"\n        assert variable_type(s.astype(int)) == \"numeric\"\n        assert variable_type(s.astype(object)) == \"numeric\"\n        assert variable_type(s.to_numpy()) == \"numeric\"\n        assert variable_type(s.to_list()) == \"numeric\"\n\n        s = pd.Series([1, 2, 3, np.nan], dtype=object)\n        assert variable_type(s) == \"numeric\"\n\n        s = pd.Series([np.nan, np.nan])\n        # s = pd.Series([pd.NA, pd.NA])\n        assert variable_type(s) == \"numeric\"\n\n        s = pd.Series([\"1\", \"2\", \"3\"])\n        assert variable_type(s) == \"categorical\"\n        assert variable_type(s.to_numpy()) == \"categorical\"\n        assert variable_type(s.to_list()) == \"categorical\"\n\n        s = pd.Series([True, False, False])\n        assert variable_type(s) == \"numeric\"\n        assert variable_type(s, boolean_type=\"categorical\") == \"categorical\"\n        s_cat = s.astype(\"category\")\n        assert variable_type(s_cat, boolean_type=\"categorical\") == \"categorical\"\n        assert variable_type(s_cat, boolean_type=\"numeric\") == \"categorical\"\n\n        s = pd.Series([pd.Timestamp(1), pd.Timestamp(2)])\n        assert variable_type(s) == \"datetime\"\n        assert variable_type(s.astype(object)) == \"datetime\"\n        assert variable_type(s.to_numpy()) == \"datetime\"\n        assert variable_type(s.to_list()) == \"datetime\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestCoreFunc.test_infer_orient_TestCoreFunc.test_infer_orient.with_pytest_raises_ValueE.infer_orient_cats_nums_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestCoreFunc.test_infer_orient_TestCoreFunc.test_infer_orient.with_pytest_raises_ValueE.infer_orient_cats_nums_", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1465, "end_line": 1508, "span_ids": ["TestCoreFunc.test_infer_orient"], "tokens": 473}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCoreFunc:\n\n    def test_infer_orient(self):\n\n        nums = pd.Series(np.arange(6))\n        cats = pd.Series([\"a\", \"b\"] * 3)\n        dates = pd.date_range(\"1999-09-22\", \"2006-05-14\", 6)\n\n        assert infer_orient(cats, nums) == \"v\"\n        assert infer_orient(nums, cats) == \"h\"\n\n        assert infer_orient(cats, dates, require_numeric=False) == \"v\"\n        assert infer_orient(dates, cats, require_numeric=False) == \"h\"\n\n        assert infer_orient(nums, None) == \"h\"\n        with pytest.warns(UserWarning, match=\"Vertical .+ `x`\"):\n            assert infer_orient(nums, None, \"v\") == \"h\"\n\n        assert infer_orient(None, nums) == \"v\"\n        with pytest.warns(UserWarning, match=\"Horizontal .+ `y`\"):\n            assert infer_orient(None, nums, \"h\") == \"v\"\n\n        infer_orient(cats, None, require_numeric=False) == \"h\"\n        with pytest.raises(TypeError, match=\"Horizontal .+ `x`\"):\n            infer_orient(cats, None)\n\n        infer_orient(cats, None, require_numeric=False) == \"v\"\n        with pytest.raises(TypeError, match=\"Vertical .+ `y`\"):\n            infer_orient(None, cats)\n\n        assert infer_orient(nums, nums, \"vert\") == \"v\"\n        assert infer_orient(nums, nums, \"hori\") == \"h\"\n\n        assert infer_orient(cats, cats, \"h\", require_numeric=False) == \"h\"\n        assert infer_orient(cats, cats, \"v\", require_numeric=False) == \"v\"\n        assert infer_orient(cats, cats, require_numeric=False) == \"v\"\n\n        with pytest.raises(TypeError, match=\"Vertical .+ `y`\"):\n            infer_orient(cats, cats, \"v\")\n        with pytest.raises(TypeError, match=\"Horizontal .+ `x`\"):\n            infer_orient(cats, cats, \"h\")\n        with pytest.raises(TypeError, match=\"Neither\"):\n            infer_orient(cats, cats)\n\n        with pytest.raises(ValueError, match=\"`orient` must start with\"):\n            infer_orient(cats, nums, orient=\"bad value\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestCoreFunc.test_categorical_order_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_core.py_TestCoreFunc.test_categorical_order_", "embedding": null, "metadata": {"file_path": "tests/test_core.py", "file_name": "test_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1510, "end_line": 1554, "span_ids": ["TestCoreFunc.test_categorical_order"], "tokens": 377}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCoreFunc:\n\n    def test_categorical_order(self):\n\n        x = [\"a\", \"c\", \"c\", \"b\", \"a\", \"d\"]\n        y = [3, 2, 5, 1, 4]\n        order = [\"a\", \"b\", \"c\", \"d\"]\n\n        out = categorical_order(x)\n        assert out == [\"a\", \"c\", \"b\", \"d\"]\n\n        out = categorical_order(x, order)\n        assert out == order\n\n        out = categorical_order(x, [\"b\", \"a\"])\n        assert out == [\"b\", \"a\"]\n\n        out = categorical_order(np.array(x))\n        assert out == [\"a\", \"c\", \"b\", \"d\"]\n\n        out = categorical_order(pd.Series(x))\n        assert out == [\"a\", \"c\", \"b\", \"d\"]\n\n        out = categorical_order(y)\n        assert out == [1, 2, 3, 4, 5]\n\n        out = categorical_order(np.array(y))\n        assert out == [1, 2, 3, 4, 5]\n\n        out = categorical_order(pd.Series(y))\n        assert out == [1, 2, 3, 4, 5]\n\n        x = pd.Categorical(x, order)\n        out = categorical_order(x)\n        assert out == list(x.categories)\n\n        x = pd.Series(x)\n        out = categorical_order(x)\n        assert out == list(x.cat.categories)\n\n        out = categorical_order(x, [\"b\", \"a\"])\n        assert out == [\"b\", \"a\"]\n\n        x = [\"a\", np.nan, \"c\", \"c\", \"b\", \"a\", \"d\"]\n        out = categorical_order(x)\n        assert out == [\"a\", \"c\", \"b\", \"d\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_decorators.py_inspect_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_decorators.py_inspect_", "embedding": null, "metadata": {"file_path": "tests/test_decorators.py", "file_name": "test_decorators.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 26, "span_ids": ["test_share_init_params_with_map.Thingie.map", "test_share_init_params_with_map.Thingie", "imports", "test_share_init_params_with_map"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import inspect\nfrom seaborn._decorators import share_init_params_with_map\n\n\ndef test_share_init_params_with_map():\n\n    @share_init_params_with_map\n    class Thingie:\n\n        def map(cls, *args, **kwargs):\n            return cls(*args, **kwargs)\n\n        def __init__(self, a, b=1):\n            \"\"\"Make a new thingie.\"\"\"\n            self.a = a\n            self.b = b\n\n    thingie = Thingie.map(1, b=2)\n    assert thingie.a == 1\n    assert thingie.b == 2\n\n    assert \"a\" in inspect.signature(Thingie.map).parameters\n    assert \"b\" in inspect.signature(Thingie.map).parameters\n\n    assert Thingie.map.__doc__ == Thingie.__init__.__doc__", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_itertools_get_contour_color.if_isinstance_c_mpl_coll.elif_isinstance_c_mpl_co.if_c_get_facecolor_size.else_.return.c_get_edgecolor_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_itertools_get_contour_color.if_isinstance_c_mpl_coll.elif_isinstance_c_mpl_co.if_c_get_facecolor_size.else_.return.c_get_edgecolor_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 61, "span_ids": ["get_contour_color", "get_contour_coords", "imports"], "tokens": 362}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import itertools\nimport warnings\n\nimport numpy as np\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nfrom matplotlib.colors import to_rgb, to_rgba\n\nimport pytest\nfrom numpy.testing import assert_array_equal, assert_array_almost_equal\n\nfrom seaborn import distributions as dist\nfrom seaborn.palettes import (\n    color_palette,\n    light_palette,\n)\nfrom seaborn._oldcore import (\n    categorical_order,\n)\nfrom seaborn._statistics import (\n    KDE,\n    Histogram,\n    _no_scipy,\n)\nfrom seaborn.distributions import (\n    _DistributionPlotter,\n    displot,\n    distplot,\n    histplot,\n    ecdfplot,\n    kdeplot,\n    rugplot,\n)\nfrom seaborn.external.version import Version\nfrom seaborn.axisgrid import FacetGrid\nfrom seaborn._testing import (\n    assert_plots_equal,\n    assert_legends_equal,\n    assert_colors_equal,\n)\n\n\ndef get_contour_coords(c):\n    \"\"\"Provide compatability for change in contour artist type in mpl3.5.\"\"\"\n    # See https://github.com/matplotlib/matplotlib/issues/20906\n    if isinstance(c, mpl.collections.LineCollection):\n        return c.get_segments()\n    elif isinstance(c, mpl.collections.PathCollection):\n        return [p.vertices[:np.argmax(p.codes) + 1] for p in c.get_paths()]\n\n\ndef get_contour_color(c):\n    \"\"\"Provide compatability for change in contour artist type in mpl3.5.\"\"\"\n    # See https://github.com/matplotlib/matplotlib/issues/20906\n    if isinstance(c, mpl.collections.LineCollection):\n        return c.get_color()\n    elif isinstance(c, mpl.collections.PathCollection):\n        if c.get_facecolor().size:\n            return c.get_facecolor()\n        else:\n            return c.get_edgecolor()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDistPlot_TestDistPlot.test_hist_bins.for_edge_bar_in_zip_n_ed.assert_pytest_approx_edge": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDistPlot_TestDistPlot.test_hist_bins.for_edge_bar_in_zip_n_ed.assert_pytest_approx_edge", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 63, "end_line": 82, "span_ids": ["TestDistPlot.test_hist_bins", "TestDistPlot"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDistPlot:\n\n    rs = np.random.RandomState(0)\n    x = rs.randn(100)\n\n    def test_hist_bins(self):\n\n        fd_edges = np.histogram_bin_edges(self.x, \"fd\")\n        with pytest.warns(UserWarning):\n            ax = distplot(self.x)\n        for edge, bar in zip(fd_edges, ax.patches):\n            assert pytest.approx(edge) == bar.get_x()\n\n        plt.close(ax.figure)\n        n = 25\n        n_edges = np.histogram_bin_edges(self.x, n)\n        with pytest.warns(UserWarning):\n            ax = distplot(self.x, bins=n)\n        for edge, bar in zip(n_edges, ax.patches):\n            assert pytest.approx(edge) == bar.get_x()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDistPlot.test_elements_TestDistPlot.test_elements.with_pytest_warns_UserWar.None_11": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDistPlot.test_elements_TestDistPlot.test_elements.with_pytest_warns_UserWar.None_11", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 84, "end_line": 122, "span_ids": ["TestDistPlot.test_elements", "TestDistPlot.test_elements.with_pytest_warns_UserWar.Norm:2", "TestDistPlot.test_elements.with_pytest_warns_UserWar.Norm"], "tokens": 301}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDistPlot:\n\n    def test_elements(self):\n\n        with pytest.warns(UserWarning):\n\n            n = 10\n            ax = distplot(self.x, bins=n,\n                          hist=True, kde=False, rug=False, fit=None)\n            assert len(ax.patches) == 10\n            assert len(ax.lines) == 0\n            assert len(ax.collections) == 0\n\n            plt.close(ax.figure)\n            ax = distplot(self.x,\n                          hist=False, kde=True, rug=False, fit=None)\n            assert len(ax.patches) == 0\n            assert len(ax.lines) == 1\n            assert len(ax.collections) == 0\n\n            plt.close(ax.figure)\n            ax = distplot(self.x,\n                          hist=False, kde=False, rug=True, fit=None)\n            assert len(ax.patches) == 0\n            assert len(ax.lines) == 0\n            assert len(ax.collections) == 1\n\n            class Norm:\n                \"\"\"Dummy object that looks like a scipy RV\"\"\"\n                def fit(self, x):\n                    return ()\n\n                def pdf(self, x, *params):\n                    return np.zeros_like(x)\n\n            plt.close(ax.figure)\n            ax = distplot(\n                self.x, hist=False, kde=False, rug=False, fit=Norm())\n            assert len(ax.patches) == 0\n            assert len(ax.lines) == 1\n            assert len(ax.collections) == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDistPlot.test_distplot_with_nans_TestDistPlot.test_distplot_with_nans.for_bar1_bar2_in_zip_ax1.assert_bar1_get_height_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDistPlot.test_distplot_with_nans_TestDistPlot.test_distplot_with_nans.for_bar1_bar2_in_zip_ax1.assert_bar1_get_height_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 124, "end_line": 139, "span_ids": ["TestDistPlot.test_distplot_with_nans"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDistPlot:\n\n    def test_distplot_with_nans(self):\n\n        f, (ax1, ax2) = plt.subplots(2)\n        x_null = np.append(self.x, [np.nan])\n\n        with pytest.warns(UserWarning):\n            distplot(self.x, ax=ax1)\n            distplot(x_null, ax=ax2)\n\n        line1 = ax1.lines[0]\n        line2 = ax2.lines[0]\n        assert np.array_equal(line1.get_xydata(), line2.get_xydata())\n\n        for bar1, bar2 in zip(ax1.patches, ax2.patches):\n            assert bar1.get_xy() == bar2.get_xy()\n            assert bar1.get_height() == bar2.get_height()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_SharedAxesLevelTests_SharedAxesLevelTests.test_color.None_6": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_SharedAxesLevelTests_SharedAxesLevelTests.test_color.None_6", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 142, "end_line": 157, "span_ids": ["SharedAxesLevelTests.test_color", "SharedAxesLevelTests"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SharedAxesLevelTests:\n\n    def test_color(self, long_df, **kwargs):\n\n        ax = plt.figure().subplots()\n        self.func(data=long_df, x=\"y\", ax=ax, **kwargs)\n        assert_colors_equal(self.get_last_color(ax, **kwargs), \"C0\", check_alpha=False)\n\n        ax = plt.figure().subplots()\n        self.func(data=long_df, x=\"y\", ax=ax, **kwargs)\n        self.func(data=long_df, x=\"y\", ax=ax, **kwargs)\n        assert_colors_equal(self.get_last_color(ax, **kwargs), \"C1\", check_alpha=False)\n\n        ax = plt.figure().subplots()\n        self.func(data=long_df, x=\"y\", color=\"C2\", ax=ax, **kwargs)\n        assert_colors_equal(self.get_last_color(ax, **kwargs), \"C2\", check_alpha=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestRugPlot_TestRugPlot.test_long_data.for_a_b_in_itertools_pro.self_assert_rug_equal_a_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestRugPlot_TestRugPlot.test_long_data.for_a_b_in_itertools_pro.self_assert_rug_equal_a_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 160, "end_line": 185, "span_ids": ["TestRugPlot.assert_rug_equal", "TestRugPlot.test_long_data", "TestRugPlot.get_last_color", "TestRugPlot"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRugPlot(SharedAxesLevelTests):\n\n    func = staticmethod(rugplot)\n\n    def get_last_color(self, ax, **kwargs):\n\n        return ax.collections[-1].get_color()\n\n    def assert_rug_equal(self, a, b):\n\n        assert_array_equal(a.get_segments(), b.get_segments())\n\n    @pytest.mark.parametrize(\"variable\", [\"x\", \"y\"])\n    def test_long_data(self, long_df, variable):\n\n        vector = long_df[variable]\n        vectors = [\n            variable, vector, np.asarray(vector), vector.to_list(),\n        ]\n\n        f, ax = plt.subplots()\n        for vector in vectors:\n            rugplot(data=long_df, **{variable: vector})\n\n        for a, b in itertools.product(ax.collections, ax.collections):\n            self.assert_rug_equal(a, b)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestRugPlot.test_bivariate_data_TestRugPlot.test_bivariate_data.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestRugPlot.test_bivariate_data_TestRugPlot.test_bivariate_data.None_4", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 187, "end_line": 196, "span_ids": ["TestRugPlot.test_bivariate_data"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRugPlot(SharedAxesLevelTests):\n\n    def test_bivariate_data(self, long_df):\n\n        f, (ax1, ax2) = plt.subplots(ncols=2)\n\n        rugplot(data=long_df, x=\"x\", y=\"y\", ax=ax1)\n        rugplot(data=long_df, x=\"x\", ax=ax2)\n        rugplot(data=long_df, y=\"y\", ax=ax2)\n\n        self.assert_rug_equal(ax1.collections[0], ax2.collections[0])\n        self.assert_rug_equal(ax1.collections[1], ax2.collections[1])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestRugPlot.test_wide_vs_long_data_TestRugPlot.test_wide_vs_long_data.assert_array_equal_wide_s": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestRugPlot.test_wide_vs_long_data_TestRugPlot.test_wide_vs_long_data.assert_array_equal_wide_s", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 198, "end_line": 212, "span_ids": ["TestRugPlot.test_wide_vs_long_data"], "tokens": 133}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRugPlot(SharedAxesLevelTests):\n\n    def test_wide_vs_long_data(self, wide_df):\n\n        f, (ax1, ax2) = plt.subplots(ncols=2)\n        rugplot(data=wide_df, ax=ax1)\n        for col in wide_df:\n            rugplot(data=wide_df, x=col, ax=ax2)\n\n        wide_segments = np.sort(\n            np.array(ax1.collections[0].get_segments())\n        )\n        long_segments = np.sort(\n            np.concatenate([c.get_segments() for c in ax2.collections])\n        )\n\n        assert_array_equal(wide_segments, long_segments)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestRugPlot.test_flat_vector_TestRugPlot.test_rug_colors.assert_array_equal_ax_col": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestRugPlot.test_flat_vector_TestRugPlot.test_rug_colors.assert_array_equal_ax_col", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 214, "end_line": 285, "span_ids": ["TestRugPlot.test_axis_deprecation", "TestRugPlot.test_datetime_data", "TestRugPlot.test_a_deprecation", "TestRugPlot.test_empty_data", "TestRugPlot.test_vertical_deprecation", "TestRugPlot.test_rug_data", "TestRugPlot.test_flat_vector", "TestRugPlot.test_rug_colors"], "tokens": 527}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRugPlot(SharedAxesLevelTests):\n\n    def test_flat_vector(self, long_df):\n\n        f, ax = plt.subplots()\n        rugplot(data=long_df[\"x\"])\n        rugplot(x=long_df[\"x\"])\n        self.assert_rug_equal(*ax.collections)\n\n    def test_datetime_data(self, long_df):\n\n        ax = rugplot(data=long_df[\"t\"])\n        vals = np.stack(ax.collections[0].get_segments())[:, 0, 0]\n        assert_array_equal(vals, mpl.dates.date2num(long_df[\"t\"]))\n\n    def test_empty_data(self):\n\n        ax = rugplot(x=[])\n        assert not ax.collections\n\n    def test_a_deprecation(self, flat_series):\n\n        f, ax = plt.subplots()\n\n        with pytest.warns(UserWarning):\n            rugplot(a=flat_series)\n        rugplot(x=flat_series)\n\n        self.assert_rug_equal(*ax.collections)\n\n    @pytest.mark.parametrize(\"variable\", [\"x\", \"y\"])\n    def test_axis_deprecation(self, flat_series, variable):\n\n        f, ax = plt.subplots()\n\n        with pytest.warns(UserWarning):\n            rugplot(flat_series, axis=variable)\n        rugplot(**{variable: flat_series})\n\n        self.assert_rug_equal(*ax.collections)\n\n    def test_vertical_deprecation(self, flat_series):\n\n        f, ax = plt.subplots()\n\n        with pytest.warns(UserWarning):\n            rugplot(flat_series, vertical=True)\n        rugplot(y=flat_series)\n\n        self.assert_rug_equal(*ax.collections)\n\n    def test_rug_data(self, flat_array):\n\n        height = .05\n        ax = rugplot(x=flat_array, height=height)\n        segments = np.stack(ax.collections[0].get_segments())\n\n        n = flat_array.size\n        assert_array_equal(segments[:, 0, 1], np.zeros(n))\n        assert_array_equal(segments[:, 1, 1], np.full(n, height))\n        assert_array_equal(segments[:, 1, 0], flat_array)\n\n    def test_rug_colors(self, long_df):\n\n        ax = rugplot(data=long_df, x=\"x\", hue=\"a\")\n\n        order = categorical_order(long_df[\"a\"])\n        palette = color_palette()\n\n        expected_colors = np.ones((len(long_df), 4))\n        for i, val in enumerate(long_df[\"a\"]):\n            expected_colors[i, :3] = palette[order.index(val)]\n\n        assert_array_equal(ax.collections[0].get_color(), expected_colors)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestRugPlot.test_expand_margins_TestRugPlot.test_expand_margins.assert_y1_height_2_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestRugPlot.test_expand_margins_TestRugPlot.test_expand_margins.assert_y1_height_2_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 287, "end_line": 302, "span_ids": ["TestRugPlot.test_expand_margins"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRugPlot(SharedAxesLevelTests):\n\n    def test_expand_margins(self, flat_array):\n\n        f, ax = plt.subplots()\n        x1, y1 = ax.margins()\n        rugplot(x=flat_array, expand_margins=False)\n        x2, y2 = ax.margins()\n        assert x1 == x2\n        assert y1 == y2\n\n        f, ax = plt.subplots()\n        x1, y1 = ax.margins()\n        height = .05\n        rugplot(x=flat_array, height=height)\n        x2, y2 = ax.margins()\n        assert x1 == x2\n        assert y1 + height * 2 == pytest.approx(y2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate_TestKDEPlotUnivariate.test_color.if_fill_.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate_TestKDEPlotUnivariate.test_color.if_fill_.None_3", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 334, "end_line": 358, "span_ids": ["TestKDEPlotUnivariate.get_last_color", "TestKDEPlotUnivariate.test_color", "TestKDEPlotUnivariate"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    func = staticmethod(kdeplot)\n\n    def get_last_color(self, ax, fill=True):\n\n        if fill:\n            return ax.collections[-1].get_facecolor()\n        else:\n            return ax.lines[-1].get_color()\n\n    @pytest.mark.parametrize(\"fill\", [True, False])\n    def test_color(self, long_df, fill):\n\n        super().test_color(long_df, fill=fill)\n\n        if fill:\n\n            ax = plt.figure().subplots()\n            self.func(data=long_df, x=\"y\", facecolor=\"C3\", fill=True, ax=ax)\n            assert_colors_equal(self.get_last_color(ax), \"C3\", check_alpha=False)\n\n            ax = plt.figure().subplots()\n            self.func(data=long_df, x=\"y\", fc=\"C4\", fill=True, ax=ax)\n            assert_colors_equal(self.get_last_color(ax), \"C4\", check_alpha=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_long_vectors_TestKDEPlotUnivariate.test_long_vectors.None_2.assert_array_equal_a_b_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_long_vectors_TestKDEPlotUnivariate.test_long_vectors.None_2.assert_array_equal_a_b_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 360, "end_line": 380, "span_ids": ["TestKDEPlotUnivariate.test_long_vectors"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    @pytest.mark.parametrize(\n        \"variable\", [\"x\", \"y\"],\n    )\n    def test_long_vectors(self, long_df, variable):\n\n        vector = long_df[variable]\n        vectors = [\n            variable, vector, vector.to_numpy(), vector.to_list(),\n        ]\n\n        f, ax = plt.subplots()\n        for vector in vectors:\n            kdeplot(data=long_df, **{variable: vector})\n\n        xdata = [l.get_xdata() for l in ax.lines]\n        for a, b in itertools.product(xdata, xdata):\n            assert_array_equal(a, b)\n\n        ydata = [l.get_ydata() for l in ax.lines]\n        for a, b in itertools.product(ydata, ydata):\n            assert_array_equal(a, b)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_hue_colors_TestKDEPlotUnivariate.test_hue_colors.for_line_fill_color_in_.assert_colors_equal_fill_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_hue_colors_TestKDEPlotUnivariate.test_hue_colors.for_line_fill_color_in_.assert_colors_equal_fill_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 470, "end_line": 487, "span_ids": ["TestKDEPlotUnivariate.test_hue_colors"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    @pytest.mark.parametrize(\"multiple\", [\"layer\", \"stack\", \"fill\"])\n    def test_hue_colors(self, long_df, multiple):\n\n        ax = kdeplot(\n            data=long_df, x=\"x\", hue=\"a\",\n            multiple=multiple,\n            fill=True, legend=False\n        )\n\n        # Note that hue order is reversed in the plot\n        lines = ax.lines[::-1]\n        fills = ax.collections[::-1]\n\n        palette = color_palette()\n\n        for line, fill, color in zip(lines, fills, palette):\n            assert_colors_equal(line.get_color(), color)\n            assert_colors_equal(fill.get_facecolor(), to_rgba(color, .25))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_hue_stacking_TestKDEPlotUnivariate.test_hue_stacking.assert_array_equal_layere": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_hue_stacking_TestKDEPlotUnivariate.test_hue_stacking.assert_array_equal_layere", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 489, "end_line": 511, "span_ids": ["TestKDEPlotUnivariate.test_hue_stacking"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    def test_hue_stacking(self, long_df):\n\n        f, (ax1, ax2) = plt.subplots(ncols=2)\n\n        kdeplot(\n            data=long_df, x=\"x\", hue=\"a\",\n            multiple=\"layer\", common_grid=True,\n            legend=False, ax=ax1,\n        )\n        kdeplot(\n            data=long_df, x=\"x\", hue=\"a\",\n            multiple=\"stack\", fill=False,\n            legend=False, ax=ax2,\n        )\n\n        layered_densities = np.stack([\n            l.get_ydata() for l in ax1.lines\n        ])\n        stacked_densities = np.stack([\n            l.get_ydata() for l in ax2.lines\n        ])\n\n        assert_array_equal(layered_densities.cumsum(axis=0), stacked_densities)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_hue_filling_TestKDEPlotUnivariate.test_hue_filling.assert_array_almost_equal": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_hue_filling_TestKDEPlotUnivariate.test_hue_filling.assert_array_almost_equal", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 513, "end_line": 534, "span_ids": ["TestKDEPlotUnivariate.test_hue_filling"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    def test_hue_filling(self, long_df):\n\n        f, (ax1, ax2) = plt.subplots(ncols=2)\n\n        kdeplot(\n            data=long_df, x=\"x\", hue=\"a\",\n            multiple=\"layer\", common_grid=True,\n            legend=False, ax=ax1,\n        )\n        kdeplot(\n            data=long_df, x=\"x\", hue=\"a\",\n            multiple=\"fill\", fill=False,\n            legend=False, ax=ax2,\n        )\n\n        layered = np.stack([l.get_ydata() for l in ax1.lines])\n        filled = np.stack([l.get_ydata() for l in ax2.lines])\n\n        assert_array_almost_equal(\n            (layered / layered.sum(axis=0)).cumsum(axis=0),\n            filled,\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_fill_default_TestKDEPlotUnivariate.test_fill_nondefault.assert_len_ax2_collection": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_fill_default_TestKDEPlotUnivariate.test_fill_nondefault.assert_len_ax2_collection", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 536, "end_line": 555, "span_ids": ["TestKDEPlotUnivariate.test_fill_default", "TestKDEPlotUnivariate.test_fill_nondefault"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    @pytest.mark.parametrize(\"multiple\", [\"stack\", \"fill\"])\n    def test_fill_default(self, long_df, multiple):\n\n        ax = kdeplot(\n            data=long_df, x=\"x\", hue=\"a\", multiple=multiple, fill=None\n        )\n\n        assert len(ax.collections) > 0\n\n    @pytest.mark.parametrize(\"multiple\", [\"layer\", \"stack\", \"fill\"])\n    def test_fill_nondefault(self, long_df, multiple):\n\n        f, (ax1, ax2) = plt.subplots(ncols=2)\n\n        kws = dict(data=long_df, x=\"x\", hue=\"a\")\n        kdeplot(**kws, multiple=multiple, fill=False, ax=ax1)\n        kdeplot(**kws, multiple=multiple, fill=True, ax=ax2)\n\n        assert len(ax1.collections) == 0\n        assert len(ax2.collections) > 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_color_cycle_interaction_TestKDEPlotUnivariate.test_color_cycle_interaction.None_14": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_color_cycle_interaction_TestKDEPlotUnivariate.test_color_cycle_interaction.None_14", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 557, "end_line": 580, "span_ids": ["TestKDEPlotUnivariate.test_color_cycle_interaction"], "tokens": 238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    def test_color_cycle_interaction(self, flat_series):\n\n        color = (.2, 1, .6)\n\n        f, ax = plt.subplots()\n        kdeplot(flat_series)\n        kdeplot(flat_series)\n        assert_colors_equal(ax.lines[0].get_color(), \"C0\")\n        assert_colors_equal(ax.lines[1].get_color(), \"C1\")\n        plt.close(f)\n\n        f, ax = plt.subplots()\n        kdeplot(flat_series, color=color)\n        kdeplot(flat_series)\n        assert_colors_equal(ax.lines[0].get_color(), color)\n        assert_colors_equal(ax.lines[1].get_color(), \"C0\")\n        plt.close(f)\n\n        f, ax = plt.subplots()\n        kdeplot(flat_series, fill=True)\n        kdeplot(flat_series, fill=True)\n        assert_colors_equal(ax.collections[0].get_facecolor(), to_rgba(\"C0\", .25))\n        assert_colors_equal(ax.collections[1].get_facecolor(), to_rgba(\"C1\", .25))\n        plt.close(f)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_artist_color_TestKDEPlotUnivariate.test_artist_color.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_artist_color_TestKDEPlotUnivariate.test_artist_color.None_3", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 582, "end_line": 603, "span_ids": ["TestKDEPlotUnivariate.test_artist_color"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    @pytest.mark.parametrize(\"fill\", [True, False])\n    def test_artist_color(self, long_df, fill):\n\n        color = (.2, 1, .6)\n        alpha = .5\n\n        f, ax = plt.subplots()\n\n        kdeplot(long_df[\"x\"], fill=fill, color=color)\n        if fill:\n            artist_color = ax.collections[-1].get_facecolor().squeeze()\n        else:\n            artist_color = ax.lines[-1].get_color()\n        default_alpha = .25 if fill else 1\n        assert_colors_equal(artist_color, to_rgba(color, default_alpha))\n\n        kdeplot(long_df[\"x\"], fill=fill, color=color, alpha=alpha)\n        if fill:\n            artist_color = ax.collections[-1].get_facecolor().squeeze()\n        else:\n            artist_color = ax.lines[-1].get_color()\n        assert_colors_equal(artist_color, to_rgba(color, alpha))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_datetime_scale_TestKDEPlotUnivariate.test_multiple_argument_check.with_pytest_raises_ValueE.kdeplot_data_long_df_x_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_datetime_scale_TestKDEPlotUnivariate.test_multiple_argument_check.with_pytest_raises_ValueE.kdeplot_data_long_df_x_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 605, "end_line": 615, "span_ids": ["TestKDEPlotUnivariate.test_multiple_argument_check", "TestKDEPlotUnivariate.test_datetime_scale"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    def test_datetime_scale(self, long_df):\n\n        f, (ax1, ax2) = plt.subplots(2)\n        kdeplot(x=long_df[\"t\"], fill=True, ax=ax1)\n        kdeplot(x=long_df[\"t\"], fill=False, ax=ax2)\n        assert ax1.get_xlim() == ax2.get_xlim()\n\n    def test_multiple_argument_check(self, long_df):\n\n        with pytest.raises(ValueError, match=\"`multiple` must be\"):\n            kdeplot(data=long_df, x=\"x\", hue=\"a\", multiple=\"bad_input\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_cut_TestKDEPlotUnivariate.test_cut.assert_len_xdata_0_le": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_cut_TestKDEPlotUnivariate.test_cut.assert_len_xdata_0_le", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 617, "end_line": 634, "span_ids": ["TestKDEPlotUnivariate.test_cut"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    def test_cut(self, rng):\n\n        x = rng.normal(0, 3, 1000)\n\n        f, ax = plt.subplots()\n        kdeplot(x=x, cut=0, legend=False)\n\n        xdata_0 = ax.lines[0].get_xdata()\n        assert xdata_0.min() == x.min()\n        assert xdata_0.max() == x.max()\n\n        kdeplot(x=x, cut=2, legend=False)\n\n        xdata_2 = ax.lines[1].get_xdata()\n        assert xdata_2.min() < xdata_0.min()\n        assert xdata_2.max() > xdata_0.max()\n\n        assert len(xdata_0) == len(xdata_2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_clip_TestKDEPlotUnivariate.test_cumulative_requires_scipy.with_pytest_raises_Runtim.kdeplot_data_long_df_x_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_clip_TestKDEPlotUnivariate.test_cumulative_requires_scipy.with_pytest_raises_Runtim.kdeplot_data_long_df_x_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 636, "end_line": 666, "span_ids": ["TestKDEPlotUnivariate.test_cumulative_requires_scipy", "TestKDEPlotUnivariate.test_cumulative", "TestKDEPlotUnivariate.test_clip", "TestKDEPlotUnivariate.test_line_is_density"], "tokens": 300}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    def test_clip(self, rng):\n\n        x = rng.normal(0, 3, 1000)\n\n        clip = -1, 1\n        ax = kdeplot(x=x, clip=clip)\n\n        xdata = ax.lines[0].get_xdata()\n\n        assert xdata.min() >= clip[0]\n        assert xdata.max() <= clip[1]\n\n    def test_line_is_density(self, long_df):\n\n        ax = kdeplot(data=long_df, x=\"x\", cut=5)\n        x, y = ax.lines[0].get_xydata().T\n        assert integrate(y, x) == pytest.approx(1)\n\n    @pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\n    def test_cumulative(self, long_df):\n\n        ax = kdeplot(data=long_df, x=\"x\", cut=5, cumulative=True)\n        y = ax.lines[0].get_ydata()\n        assert y[0] == pytest.approx(0)\n        assert y[-1] == pytest.approx(1)\n\n    @pytest.mark.skipif(not _no_scipy, reason=\"Test requires scipy's absence\")\n    def test_cumulative_requires_scipy(self, long_df):\n\n        with pytest.raises(RuntimeError):\n            kdeplot(data=long_df, x=\"x\", cut=5, cumulative=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_common_norm_TestKDEPlotUnivariate.test_common_norm.for_line_in_ax2_lines_.assert_integrate_ydata_x": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_common_norm_TestKDEPlotUnivariate.test_common_norm.for_line_in_ax2_lines_.assert_integrate_ydata_x", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 668, "end_line": 687, "span_ids": ["TestKDEPlotUnivariate.test_common_norm"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    def test_common_norm(self, long_df):\n\n        f, (ax1, ax2) = plt.subplots(ncols=2)\n\n        kdeplot(\n            data=long_df, x=\"x\", hue=\"c\", common_norm=True, cut=10, ax=ax1\n        )\n        kdeplot(\n            data=long_df, x=\"x\", hue=\"c\", common_norm=False, cut=10, ax=ax2\n        )\n\n        total_area = 0\n        for line in ax1.lines:\n            xdata, ydata = line.get_xydata().T\n            total_area += integrate(ydata, xdata)\n        assert total_area == pytest.approx(1)\n\n        for line in ax2.lines:\n            xdata, ydata = line.get_xydata().T\n            assert integrate(ydata, xdata) == pytest.approx(1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_common_grid_TestKDEPlotUnivariate.test_common_grid.for_line_in_ax2_lines_.assert_xdata_max_lon": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_common_grid_TestKDEPlotUnivariate.test_common_grid.for_line_in_ax2_lines_.assert_xdata_max_lon", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 689, "end_line": 712, "span_ids": ["TestKDEPlotUnivariate.test_common_grid"], "tokens": 250}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    def test_common_grid(self, long_df):\n\n        f, (ax1, ax2) = plt.subplots(ncols=2)\n\n        order = \"a\", \"b\", \"c\"\n\n        kdeplot(\n            data=long_df, x=\"x\", hue=\"a\", hue_order=order,\n            common_grid=False, cut=0, ax=ax1,\n        )\n        kdeplot(\n            data=long_df, x=\"x\", hue=\"a\", hue_order=order,\n            common_grid=True, cut=0, ax=ax2,\n        )\n\n        for line, level in zip(ax1.lines[::-1], order):\n            xdata = line.get_xdata()\n            assert xdata.min() == long_df.loc[long_df[\"a\"] == level, \"x\"].min()\n            assert xdata.max() == long_df.loc[long_df[\"a\"] == level, \"x\"].max()\n\n        for line in ax2.lines:\n            xdata = line.get_xdata().T\n            assert xdata.min() == long_df[\"x\"].min()\n            assert xdata.max() == long_df[\"x\"].max()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_bw_method_TestKDEPlotUnivariate.test_bw_method.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_bw_method_TestKDEPlotUnivariate.test_bw_method.None_3", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 714, "end_line": 731, "span_ids": ["TestKDEPlotUnivariate.test_bw_method"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    def test_bw_method(self, long_df):\n\n        f, ax = plt.subplots()\n        kdeplot(data=long_df, x=\"x\", bw_method=0.2, legend=False)\n        kdeplot(data=long_df, x=\"x\", bw_method=1.0, legend=False)\n        kdeplot(data=long_df, x=\"x\", bw_method=3.0, legend=False)\n\n        l1, l2, l3 = ax.lines\n\n        assert (\n            np.abs(np.diff(l1.get_ydata())).mean()\n            > np.abs(np.diff(l2.get_ydata())).mean()\n        )\n\n        assert (\n            np.abs(np.diff(l2.get_ydata())).mean()\n            > np.abs(np.diff(l3.get_ydata())).mean()\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_bw_adjust_TestKDEPlotUnivariate.test_bw_adjust.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_bw_adjust_TestKDEPlotUnivariate.test_bw_adjust.None_3", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 733, "end_line": 750, "span_ids": ["TestKDEPlotUnivariate.test_bw_adjust"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    def test_bw_adjust(self, long_df):\n\n        f, ax = plt.subplots()\n        kdeplot(data=long_df, x=\"x\", bw_adjust=0.2, legend=False)\n        kdeplot(data=long_df, x=\"x\", bw_adjust=1.0, legend=False)\n        kdeplot(data=long_df, x=\"x\", bw_adjust=3.0, legend=False)\n\n        l1, l2, l3 = ax.lines\n\n        assert (\n            np.abs(np.diff(l1.get_ydata())).mean()\n            > np.abs(np.diff(l2.get_ydata())).mean()\n        )\n\n        assert (\n            np.abs(np.diff(l2.get_ydata())).mean()\n            > np.abs(np.diff(l3.get_ydata())).mean()\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_log_scale_implicit_TestKDEPlotUnivariate.test_log_scale_implicit.assert_array_equal_ax_lin": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_log_scale_implicit_TestKDEPlotUnivariate.test_log_scale_implicit.assert_array_equal_ax_lin", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 752, "end_line": 770, "span_ids": ["TestKDEPlotUnivariate.test_log_scale_implicit"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    def test_log_scale_implicit(self, rng):\n\n        x = rng.lognormal(0, 1, 100)\n\n        f, (ax1, ax2) = plt.subplots(ncols=2)\n        ax1.set_xscale(\"log\")\n\n        kdeplot(x=x, ax=ax1)\n        kdeplot(x=x, ax=ax1)\n\n        xdata_log = ax1.lines[0].get_xdata()\n        assert (xdata_log > 0).all()\n        assert (np.diff(xdata_log, 2) > 0).all()\n        assert np.allclose(np.diff(np.log(xdata_log), 2), 0)\n\n        f, ax = plt.subplots()\n        ax.set_yscale(\"log\")\n        kdeplot(y=x, ax=ax)\n        assert_array_equal(ax.lines[0].get_xdata(), ax1.lines[0].get_ydata())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_log_scale_explicit_TestKDEPlotUnivariate.test_log_scale_explicit.assert_ax_get_yscale_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_log_scale_explicit_TestKDEPlotUnivariate.test_log_scale_explicit.assert_ax_get_yscale_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 772, "end_line": 796, "span_ids": ["TestKDEPlotUnivariate.test_log_scale_explicit"], "tokens": 244}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    def test_log_scale_explicit(self, rng):\n\n        x = rng.lognormal(0, 1, 100)\n\n        f, (ax1, ax2, ax3) = plt.subplots(ncols=3)\n\n        ax1.set_xscale(\"log\")\n        kdeplot(x=x, ax=ax1)\n        kdeplot(x=x, log_scale=True, ax=ax2)\n        kdeplot(x=x, log_scale=10, ax=ax3)\n\n        for ax in f.axes:\n            assert ax.get_xscale() == \"log\"\n\n        supports = [ax.lines[0].get_xdata() for ax in f.axes]\n        for a, b in itertools.product(supports, supports):\n            assert_array_equal(a, b)\n\n        densities = [ax.lines[0].get_ydata() for ax in f.axes]\n        for a, b in itertools.product(densities, densities):\n            assert_array_equal(a, b)\n\n        f, ax = plt.subplots()\n        kdeplot(y=x, log_scale=True, ax=ax)\n        assert ax.get_yscale() == \"log\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_log_scale_with_hue_TestKDEPlotUnivariate.test_weights.assert_y1_pytest_appro": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_log_scale_with_hue_TestKDEPlotUnivariate.test_weights.assert_y1_pytest_appro", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 798, "end_line": 824, "span_ids": ["TestKDEPlotUnivariate.test_log_scale_with_hue", "TestKDEPlotUnivariate.test_weights", "TestKDEPlotUnivariate.test_log_scale_normalization"], "tokens": 283}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    def test_log_scale_with_hue(self, rng):\n\n        data = rng.lognormal(0, 1, 50), rng.lognormal(0, 2, 100)\n        ax = kdeplot(data=data, log_scale=True, common_grid=True)\n        assert_array_equal(ax.lines[0].get_xdata(), ax.lines[1].get_xdata())\n\n    def test_log_scale_normalization(self, rng):\n\n        x = rng.lognormal(0, 1, 100)\n        ax = kdeplot(x=x, log_scale=True, cut=10)\n        xdata, ydata = ax.lines[0].get_xydata().T\n        integral = integrate(ydata, np.log10(xdata))\n        assert integral == pytest.approx(1)\n\n    def test_weights(self):\n\n        x = [1, 2]\n        weights = [2, 1]\n\n        ax = kdeplot(x=x, weights=weights, bw_method=.1)\n\n        xdata, ydata = ax.lines[0].get_xydata().T\n\n        y1 = ydata[np.abs(xdata - 1).argmin()]\n        y2 = ydata[np.abs(xdata - 2).argmin()]\n\n        assert y1 == pytest.approx(2 * y2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_weight_norm_TestKDEPlotUnivariate.test_weight_norm.assert_integrate_y1_x1_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_weight_norm_TestKDEPlotUnivariate.test_weight_norm.assert_integrate_y1_x1_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 826, "end_line": 837, "span_ids": ["TestKDEPlotUnivariate.test_weight_norm"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    def test_weight_norm(self, rng):\n\n        vals = rng.normal(0, 1, 50)\n        x = np.concatenate([vals, vals])\n        w = np.repeat([1, 2], 50)\n        ax = kdeplot(x=x, weights=w, hue=w, common_norm=True)\n\n        # Recall that artists are added in reverse of hue order\n        x1, y1 = ax.lines[0].get_xydata().T\n        x2, y2 = ax.lines[1].get_xydata().T\n\n        assert integrate(y1, x1) == pytest.approx(2 * integrate(y2, x2))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_sticky_edges_TestKDEPlotUnivariate.test_sticky_edges.assert_ax2_collections_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_sticky_edges_TestKDEPlotUnivariate.test_sticky_edges.assert_ax2_collections_0_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 839, "end_line": 849, "span_ids": ["TestKDEPlotUnivariate.test_sticky_edges"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    def test_sticky_edges(self, long_df):\n\n        f, (ax1, ax2) = plt.subplots(ncols=2)\n\n        kdeplot(data=long_df, x=\"x\", fill=True, ax=ax1)\n        assert ax1.collections[0].sticky_edges.y[:] == [0, np.inf]\n\n        kdeplot(\n            data=long_df, x=\"x\", hue=\"a\", multiple=\"fill\", fill=True, ax=ax2\n        )\n        assert ax2.collections[0].sticky_edges.y[:] == [0, 1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_line_kws_TestKDEPlotUnivariate.test_axis_labels.assert_ax2_get_ylabel_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_line_kws_TestKDEPlotUnivariate.test_axis_labels.assert_ax2_get_ylabel_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 851, "end_line": 876, "span_ids": ["TestKDEPlotUnivariate.test_line_kws", "TestKDEPlotUnivariate.test_axis_labels", "TestKDEPlotUnivariate.test_input_checking"], "tokens": 237}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    def test_line_kws(self, flat_array):\n\n        lw = 3\n        color = (.2, .5, .8)\n        ax = kdeplot(x=flat_array, linewidth=lw, color=color)\n        line, = ax.lines\n        assert line.get_linewidth() == lw\n        assert_colors_equal(line.get_color(), color)\n\n    def test_input_checking(self, long_df):\n\n        err = \"The x variable is categorical,\"\n        with pytest.raises(TypeError, match=err):\n            kdeplot(data=long_df, x=\"a\")\n\n    def test_axis_labels(self, long_df):\n\n        f, (ax1, ax2) = plt.subplots(ncols=2)\n\n        kdeplot(data=long_df, x=\"x\", ax=ax1)\n        assert ax1.get_xlabel() == \"x\"\n        assert ax1.get_ylabel() == \"Density\"\n\n        kdeplot(data=long_df, y=\"y\", ax=ax2)\n        assert ax2.get_xlabel() == \"Density\"\n        assert ax2.get_ylabel() == \"y\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_legend_TestKDEPlotUnivariate.test_legend.assert_ax_legend__is_None": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_legend_TestKDEPlotUnivariate.test_legend.assert_ax_legend__is_None", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 878, "end_line": 901, "span_ids": ["TestKDEPlotUnivariate.test_legend"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    def test_legend(self, long_df):\n\n        ax = kdeplot(data=long_df, x=\"x\", hue=\"a\")\n\n        assert ax.legend_.get_title().get_text() == \"a\"\n\n        legend_labels = ax.legend_.get_texts()\n        order = categorical_order(long_df[\"a\"])\n        for label, level in zip(legend_labels, order):\n            assert label.get_text() == level\n\n        legend_artists = ax.legend_.findobj(mpl.lines.Line2D)\n        if Version(mpl.__version__) < Version(\"3.5.0b0\"):\n            # https://github.com/matplotlib/matplotlib/pull/20699\n            legend_artists = legend_artists[::2]\n        palette = color_palette()\n        for artist, color in zip(legend_artists, palette):\n            assert_colors_equal(artist.get_color(), color)\n\n        ax.clear()\n\n        kdeplot(data=long_df, x=\"x\", hue=\"a\", legend=False)\n\n        assert ax.legend_ is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate_TestKDEPlotBivariate.test_long_vectors.for_x_y_in_zip_x_values_.for_c1_c2_in_zip_ax1_col.assert_array_equal_c1_get": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate_TestKDEPlotBivariate.test_long_vectors.for_x_y_in_zip_x_values_.for_c1_c2_in_zip_ax1_col.assert_array_equal_c1_get", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 904, "end_line": 921, "span_ids": ["TestKDEPlotBivariate.test_long_vectors", "TestKDEPlotBivariate"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotBivariate:\n\n    def test_long_vectors(self, long_df):\n\n        ax1 = kdeplot(data=long_df, x=\"x\", y=\"y\")\n\n        x = long_df[\"x\"]\n        x_values = [x, x.to_numpy(), x.to_list()]\n\n        y = long_df[\"y\"]\n        y_values = [y, y.to_numpy(), y.to_list()]\n\n        for x, y in zip(x_values, y_values):\n            f, ax2 = plt.subplots()\n            kdeplot(x=x, y=y, ax=ax2)\n\n            for c1, c2 in zip(ax1.collections, ax2.collections):\n                assert_array_equal(c1.get_offsets(), c2.get_offsets())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_singular_data_TestKDEPlotBivariate.test_fill_artists.for_fill_in_True_False_.for_c_in_ax_collections_.if_fill_or_Version_mpl___.else_.assert_isinstance_c_mpl_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_singular_data_TestKDEPlotBivariate.test_fill_artists.for_fill_in_True_False_.for_c_in_ax_collections_.if_fill_or_Version_mpl___.else_.assert_isinstance_c_mpl_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 940, "end_line": 968, "span_ids": ["TestKDEPlotBivariate.test_fill_artists", "TestKDEPlotBivariate.test_singular_data"], "tokens": 261}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotBivariate:\n\n    def test_singular_data(self):\n\n        with pytest.warns(UserWarning):\n            ax = dist.kdeplot(x=np.ones(10), y=np.arange(10))\n        assert not ax.lines\n\n        with pytest.warns(UserWarning):\n            ax = dist.kdeplot(x=[5], y=[6])\n        assert not ax.lines\n\n        with pytest.warns(UserWarning):\n            ax = kdeplot(x=[1929245168.06679] * 18, y=np.arange(18))\n        assert not ax.lines\n\n        with warnings.catch_warnings():\n            warnings.simplefilter(\"error\", UserWarning)\n            ax = kdeplot(x=[5], y=[7], warn_singular=False)\n        assert not ax.lines\n\n    def test_fill_artists(self, long_df):\n\n        for fill in [True, False]:\n            f, ax = plt.subplots()\n            kdeplot(data=long_df, x=\"x\", y=\"y\", hue=\"c\", fill=fill)\n            for c in ax.collections:\n                if fill or Version(mpl.__version__) >= Version(\"3.5.0b0\"):\n                    assert isinstance(c, mpl.collections.PathCollection)\n                else:\n                    assert isinstance(c, mpl.collections.LineCollection)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_common_norm_TestKDEPlotBivariate.test_common_norm.assert_n_seg_2_n_seg_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_common_norm_TestKDEPlotBivariate.test_common_norm.assert_n_seg_2_n_seg_1", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 948, "end_line": 961, "span_ids": ["TestKDEPlotBivariate.test_common_norm"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotBivariate:\n\n    def test_common_norm(self, rng):\n\n        hue = np.repeat([\"a\", \"a\", \"a\", \"b\"], 40)\n        x, y = rng.multivariate_normal([0, 0], [(.2, .5), (.5, 2)], len(hue)).T\n        x[hue == \"a\"] -= 2\n        x[hue == \"b\"] += 2\n\n        f, (ax1, ax2) = plt.subplots(ncols=2)\n        kdeplot(x=x, y=y, hue=hue, common_norm=True, ax=ax1)\n        kdeplot(x=x, y=y, hue=hue, common_norm=False, ax=ax2)\n\n        n_seg_1 = sum(len(get_contour_coords(c)) > 0 for c in ax1.collections)\n        n_seg_2 = sum(len(get_contour_coords(c)) > 0 for c in ax2.collections)\n        assert n_seg_2 > n_seg_1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_log_scale_TestKDEPlotBivariate.test_log_scale.for_c1_c2_in_zip_ax1_col.assert_array_equal_get_co": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_log_scale_TestKDEPlotBivariate.test_log_scale.for_c1_c2_in_zip_ax1_col.assert_array_equal_get_co", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 963, "end_line": 987, "span_ids": ["TestKDEPlotBivariate.test_log_scale"], "tokens": 275}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotBivariate:\n\n    def test_log_scale(self, rng):\n\n        x = rng.lognormal(0, 1, 100)\n        y = rng.uniform(0, 1, 100)\n\n        levels = .2, .5, 1\n\n        f, ax = plt.subplots()\n        kdeplot(x=x, y=y, log_scale=True, levels=levels, ax=ax)\n        assert ax.get_xscale() == \"log\"\n        assert ax.get_yscale() == \"log\"\n\n        f, (ax1, ax2) = plt.subplots(ncols=2)\n        kdeplot(x=x, y=y, log_scale=(10, False), levels=levels, ax=ax1)\n        assert ax1.get_xscale() == \"log\"\n        assert ax1.get_yscale() == \"linear\"\n\n        p = _DistributionPlotter()\n        kde = KDE()\n        density, (xx, yy) = kde(np.log10(x), y)\n        levels = p._quantile_to_level(density, levels)\n        ax2.contour(10 ** xx, yy, density, levels=levels)\n\n        for c1, c2 in zip(ax1.collections, ax2.collections):\n            assert_array_equal(get_contour_coords(c1), get_contour_coords(c2))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_bandwidth_TestKDEPlotBivariate.test_bandwidth.for_c1_c2_in_zip_ax1_col.if_seg1_seg2_.assert_np_abs_x2_max_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_bandwidth_TestKDEPlotBivariate.test_bandwidth.for_c1_c2_in_zip_ax1_col.if_seg1_seg2_.assert_np_abs_x2_max_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 989, "end_line": 1004, "span_ids": ["TestKDEPlotBivariate.test_bandwidth"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotBivariate:\n\n    def test_bandwidth(self, rng):\n\n        n = 100\n        x, y = rng.multivariate_normal([0, 0], [(.2, .5), (.5, 2)], n).T\n\n        f, (ax1, ax2) = plt.subplots(ncols=2)\n\n        kdeplot(x=x, y=y, ax=ax1)\n        kdeplot(x=x, y=y, bw_adjust=2, ax=ax2)\n\n        for c1, c2 in zip(ax1.collections, ax2.collections):\n            seg1, seg2 = get_contour_coords(c1), get_contour_coords(c2)\n            if seg1 + seg2:\n                x1 = seg1[0][:, 0]\n                x2 = seg2[0][:, 0]\n                assert np.abs(x2).max() > np.abs(x1).max()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_weights_TestKDEPlotBivariate.test_weights.for_c1_c2_in_zip_ax1_col.if_get_contour_coords_c1_.assert_not_np_array_equal": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_weights_TestKDEPlotBivariate.test_weights.for_c1_c2_in_zip_ax1_col.if_get_contour_coords_c1_.assert_not_np_array_equal", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1006, "end_line": 1024, "span_ids": ["TestKDEPlotBivariate.test_weights"], "tokens": 239}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotBivariate:\n\n    def test_weights(self, rng):\n\n        import warnings\n        warnings.simplefilter(\"error\", np.VisibleDeprecationWarning)\n\n        n = 100\n        x, y = rng.multivariate_normal([1, 3], [(.2, .5), (.5, 2)], n).T\n        hue = np.repeat([0, 1], n // 2)\n        weights = rng.uniform(0, 1, n)\n\n        f, (ax1, ax2) = plt.subplots(ncols=2)\n        kdeplot(x=x, y=y, hue=hue, ax=ax1)\n        kdeplot(x=x, y=y, hue=hue, weights=weights, ax=ax2)\n\n        for c1, c2 in zip(ax1.collections, ax2.collections):\n            if get_contour_coords(c1) and get_contour_coords(c2):\n                seg1 = np.concatenate(get_contour_coords(c1), axis=0)\n                seg2 = np.concatenate(get_contour_coords(c2), axis=0)\n                assert not np.array_equal(seg1, seg2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_hue_ignores_cmap_TestKDEPlotBivariate.test_contour_line_colors.for_c_in_ax_collections_.assert_colors_equal_get_c": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_hue_ignores_cmap_TestKDEPlotBivariate.test_contour_line_colors.for_c_in_ax_collections_.assert_colors_equal_get_c", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1026, "end_line": 1039, "span_ids": ["TestKDEPlotBivariate.test_hue_ignores_cmap", "TestKDEPlotBivariate.test_contour_line_colors"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotBivariate:\n\n    def test_hue_ignores_cmap(self, long_df):\n\n        with pytest.warns(UserWarning, match=\"cmap parameter ignored\"):\n            ax = kdeplot(data=long_df, x=\"x\", y=\"y\", hue=\"c\", cmap=\"viridis\")\n\n        assert_colors_equal(get_contour_color(ax.collections[0]), \"C0\")\n\n    def test_contour_line_colors(self, long_df):\n\n        color = (.2, .9, .8, 1)\n        ax = kdeplot(data=long_df, x=\"x\", y=\"y\", color=color)\n\n        for c in ax.collections:\n            assert_colors_equal(get_contour_color(c), color)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_contour_fill_colors_TestKDEPlotBivariate.test_colorbar.assert_len_ax_figure_axes": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_contour_fill_colors_TestKDEPlotBivariate.test_colorbar.assert_len_ax_figure_axes", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1041, "end_line": 1058, "span_ids": ["TestKDEPlotBivariate.test_colorbar", "TestKDEPlotBivariate.test_contour_fill_colors"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotBivariate:\n\n    def test_contour_fill_colors(self, long_df):\n\n        n = 6\n        color = (.2, .9, .8, 1)\n        ax = kdeplot(\n            data=long_df, x=\"x\", y=\"y\", fill=True, color=color, levels=n,\n        )\n\n        cmap = light_palette(color, reverse=True, as_cmap=True)\n        lut = cmap(np.linspace(0, 1, 256))\n        for c in ax.collections:\n            color = c.get_facecolor().squeeze()\n            assert color in lut\n\n    def test_colorbar(self, long_df):\n\n        ax = kdeplot(data=long_df, x=\"x\", y=\"y\", fill=True, cbar=True)\n        assert len(ax.figure.axes) == 2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_levels_and_thresh_TestKDEPlotBivariate.test_levels_and_thresh.None_3.assert_array_equal_c1_get": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_levels_and_thresh_TestKDEPlotBivariate.test_levels_and_thresh.None_3.assert_array_equal_c1_get", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1060, "end_line": 1085, "span_ids": ["TestKDEPlotBivariate.test_levels_and_thresh"], "tokens": 289}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotBivariate:\n\n    def test_levels_and_thresh(self, long_df):\n\n        f, (ax1, ax2) = plt.subplots(ncols=2)\n\n        n = 8\n        thresh = .1\n        plot_kws = dict(data=long_df, x=\"x\", y=\"y\")\n        kdeplot(**plot_kws, levels=n, thresh=thresh, ax=ax1)\n        kdeplot(**plot_kws, levels=np.linspace(thresh, 1, n), ax=ax2)\n\n        for c1, c2 in zip(ax1.collections, ax2.collections):\n            assert_array_equal(get_contour_coords(c1), get_contour_coords(c2))\n\n        with pytest.raises(ValueError):\n            kdeplot(**plot_kws, levels=[0, 1, 2])\n\n        ax1.clear()\n        ax2.clear()\n\n        kdeplot(**plot_kws, levels=n, thresh=None, ax=ax1)\n        kdeplot(**plot_kws, levels=n, thresh=0, ax=ax2)\n\n        for c1, c2 in zip(ax1.collections, ax2.collections):\n            assert_array_equal(get_contour_coords(c1), get_contour_coords(c2))\n        for c1, c2 in zip(ax1.collections, ax2.collections):\n            assert_array_equal(c1.get_facecolors(), c2.get_facecolors())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_quantile_to_level_TestKDEPlotBivariate.test_input_checking.with_pytest_raises_TypeEr.kdeplot_data_long_df_x_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotBivariate.test_quantile_to_level_TestKDEPlotBivariate.test_input_checking.with_pytest_raises_TypeEr.kdeplot_data_long_df_x_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1087, "end_line": 1099, "span_ids": ["TestKDEPlotBivariate.test_input_checking", "TestKDEPlotBivariate.test_quantile_to_level"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotBivariate:\n\n    def test_quantile_to_level(self, rng):\n\n        x = rng.uniform(0, 1, 100000)\n        isoprop = np.linspace(.1, 1, 6)\n\n        levels = _DistributionPlotter()._quantile_to_level(x, isoprop)\n        for h, p in zip(levels, isoprop):\n            assert (x[x <= h].sum() / x.sum()) == pytest.approx(p, abs=1e-4)\n\n    def test_input_checking(self, long_df):\n\n        with pytest.raises(TypeError, match=\"The x variable is categorical,\"):\n            kdeplot(data=long_df, x=\"a\", y=\"y\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate_TestHistPlotUnivariate.test_color.super_test_color_long_d": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate_TestHistPlotUnivariate.test_color.super_test_color_long_d", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1102, "end_line": 1129, "span_ids": ["TestHistPlotUnivariate.test_color", "TestHistPlotUnivariate", "TestHistPlotUnivariate.get_last_color"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    func = staticmethod(histplot)\n\n    def get_last_color(self, ax, element=\"bars\", fill=True):\n\n        if element == \"bars\":\n            if fill:\n                return ax.patches[-1].get_facecolor()\n            else:\n                return ax.patches[-1].get_edgecolor()\n        else:\n            if fill:\n                artist = ax.collections[-1]\n                facecolor = artist.get_facecolor()\n                edgecolor = artist.get_edgecolor()\n                assert_colors_equal(facecolor, edgecolor, check_alpha=False)\n                return facecolor\n            else:\n                return ax.lines[-1].get_color()\n\n    @pytest.mark.parametrize(\n        \"element,fill\",\n        itertools.product([\"bars\", \"step\", \"poly\"], [True, False]),\n    )\n    def test_color(self, long_df, element, fill):\n\n        super().test_color(long_df, element=element, fill=fill)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_long_vectors_TestHistPlotUnivariate.test_long_vectors.for_a_bars_b_bars_in_ite.for_a_b_in_zip_a_bars_b.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_long_vectors_TestHistPlotUnivariate.test_long_vectors.for_a_bars_b_bars_in_ite.for_a_b_in_zip_a_bars_b.None_1", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1131, "end_line": 1149, "span_ids": ["TestHistPlotUnivariate.test_long_vectors"], "tokens": 176}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    @pytest.mark.parametrize(\n        \"variable\", [\"x\", \"y\"],\n    )\n    def test_long_vectors(self, long_df, variable):\n\n        vector = long_df[variable]\n        vectors = [\n            variable, vector, vector.to_numpy(), vector.to_list(),\n        ]\n\n        f, axs = plt.subplots(3)\n        for vector, ax in zip(vectors, axs):\n            histplot(data=long_df, ax=ax, **{variable: vector})\n\n        bars = [ax.patches for ax in axs]\n        for a_bars, b_bars in itertools.product(bars, bars):\n            for a, b in zip(a_bars, b_bars):\n                assert_array_equal(a.get_height(), b.get_height())\n                assert_array_equal(a.get_xy(), b.get_xy())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_wide_vs_long_data_TestHistPlotUnivariate.test_wide_vs_long_data.for_a_b_in_zip_ax1_patch.assert_a_get_xy_b_ge": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_wide_vs_long_data_TestHistPlotUnivariate.test_wide_vs_long_data.for_a_b_in_zip_ax1_patch.assert_a_get_xy_b_ge", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1151, "end_line": 1162, "span_ids": ["TestHistPlotUnivariate.test_wide_vs_long_data"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_wide_vs_long_data(self, wide_df):\n\n        f, (ax1, ax2) = plt.subplots(2)\n\n        histplot(data=wide_df, ax=ax1, common_bins=False)\n\n        for col in wide_df.columns[::-1]:\n            histplot(data=wide_df, x=col, ax=ax2)\n\n        for a, b in zip(ax1.patches, ax2.patches):\n            assert a.get_height() == b.get_height()\n            assert a.get_xy() == b.get_xy()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_flat_vector_TestHistPlotUnivariate.test_variable_assignment.for_a_b_in_zip_ax1_patch.assert_a_get_height_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_flat_vector_TestHistPlotUnivariate.test_variable_assignment.for_a_b_in_zip_ax1_patch.assert_a_get_height_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1164, "end_line": 1188, "span_ids": ["TestHistPlotUnivariate.test_flat_vector", "TestHistPlotUnivariate.test_variable_assignment", "TestHistPlotUnivariate.test_empty_data"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_flat_vector(self, long_df):\n\n        f, (ax1, ax2) = plt.subplots(2)\n\n        histplot(data=long_df[\"x\"], ax=ax1)\n        histplot(data=long_df, x=\"x\", ax=ax2)\n\n        for a, b in zip(ax1.patches, ax2.patches):\n            assert a.get_height() == b.get_height()\n            assert a.get_xy() == b.get_xy()\n\n    def test_empty_data(self):\n\n        ax = histplot(x=[])\n        assert not ax.patches\n\n    def test_variable_assignment(self, long_df):\n\n        f, (ax1, ax2) = plt.subplots(2)\n\n        histplot(data=long_df, x=\"x\", ax=ax1)\n        histplot(data=long_df, y=\"x\", ax=ax2)\n\n        for a, b in zip(ax1.patches, ax2.patches):\n            assert a.get_height() == b.get_width()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_hue_fill_colors_TestHistPlotUnivariate.test_hue_fill_colors.for_poly_color_in_zip_ax.assert_colors_equal_poly_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_hue_fill_colors_TestHistPlotUnivariate.test_hue_fill_colors.for_poly_color_in_zip_ax.assert_colors_equal_poly_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1190, "end_line": 1214, "span_ids": ["TestHistPlotUnivariate.test_hue_fill_colors"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    @pytest.mark.parametrize(\"element\", [\"bars\", \"step\", \"poly\"])\n    @pytest.mark.parametrize(\"multiple\", [\"layer\", \"dodge\", \"stack\", \"fill\"])\n    def test_hue_fill_colors(self, long_df, multiple, element):\n\n        ax = histplot(\n            data=long_df, x=\"x\", hue=\"a\",\n            multiple=multiple, bins=1,\n            fill=True, element=element, legend=False,\n        )\n\n        palette = color_palette()\n\n        if multiple == \"layer\":\n            if element == \"bars\":\n                a = .5\n            else:\n                a = .25\n        else:\n            a = .75\n\n        for bar, color in zip(ax.patches[::-1], palette):\n            assert_colors_equal(bar.get_facecolor(), to_rgba(color, a))\n\n        for poly, color in zip(ax.collections[::-1], palette):\n            assert_colors_equal(poly.get_facecolor(), to_rgba(color, a))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_hue_stack_TestHistPlotUnivariate.test_hue_stack.assert_array_equal_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_hue_stack_TestHistPlotUnivariate.test_hue_stack.assert_array_equal_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1216, "end_line": 1235, "span_ids": ["TestHistPlotUnivariate.test_hue_stack"], "tokens": 220}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_hue_stack(self, long_df):\n\n        f, (ax1, ax2) = plt.subplots(2)\n\n        n = 10\n\n        kws = dict(data=long_df, x=\"x\", hue=\"a\", bins=n, element=\"bars\")\n\n        histplot(**kws, multiple=\"layer\", ax=ax1)\n        histplot(**kws, multiple=\"stack\", ax=ax2)\n\n        layer_heights = np.reshape([b.get_height() for b in ax1.patches], (-1, n))\n        stack_heights = np.reshape([b.get_height() for b in ax2.patches], (-1, n))\n        assert_array_equal(layer_heights, stack_heights)\n\n        stack_xys = np.reshape([b.get_xy() for b in ax2.patches], (-1, n, 2))\n        assert_array_equal(\n            stack_xys[..., 1] + stack_heights,\n            stack_heights.cumsum(axis=0),\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_hue_fill_TestHistPlotUnivariate.test_hue_fill.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_hue_fill_TestHistPlotUnivariate.test_hue_fill.None_3", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1237, "end_line": 1258, "span_ids": ["TestHistPlotUnivariate.test_hue_fill"], "tokens": 244}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_hue_fill(self, long_df):\n\n        f, (ax1, ax2) = plt.subplots(2)\n\n        n = 10\n\n        kws = dict(data=long_df, x=\"x\", hue=\"a\", bins=n, element=\"bars\")\n\n        histplot(**kws, multiple=\"layer\", ax=ax1)\n        histplot(**kws, multiple=\"fill\", ax=ax2)\n\n        layer_heights = np.reshape([b.get_height() for b in ax1.patches], (-1, n))\n        stack_heights = np.reshape([b.get_height() for b in ax2.patches], (-1, n))\n        assert_array_almost_equal(\n            layer_heights / layer_heights.sum(axis=0), stack_heights\n        )\n\n        stack_xys = np.reshape([b.get_xy() for b in ax2.patches], (-1, n, 2))\n        assert_array_almost_equal(\n            (stack_xys[..., 1] + stack_heights) / stack_heights.sum(axis=0),\n            stack_heights.cumsum(axis=0),\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_hue_dodge_TestHistPlotUnivariate.test_hue_dodge.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_hue_dodge_TestHistPlotUnivariate.test_hue_dodge.None_4", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1260, "end_line": 1278, "span_ids": ["TestHistPlotUnivariate.test_hue_dodge"], "tokens": 238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_hue_dodge(self, long_df):\n\n        f, (ax1, ax2) = plt.subplots(2)\n\n        bw = 2\n\n        kws = dict(data=long_df, x=\"x\", hue=\"c\", binwidth=bw, element=\"bars\")\n\n        histplot(**kws, multiple=\"layer\", ax=ax1)\n        histplot(**kws, multiple=\"dodge\", ax=ax2)\n\n        layer_heights = [b.get_height() for b in ax1.patches]\n        dodge_heights = [b.get_height() for b in ax2.patches]\n        assert_array_equal(layer_heights, dodge_heights)\n\n        layer_xs = np.reshape([b.get_x() for b in ax1.patches], (2, -1))\n        dodge_xs = np.reshape([b.get_x() for b in ax2.patches], (2, -1))\n        assert_array_almost_equal(layer_xs[1], dodge_xs[1])\n        assert_array_almost_equal(layer_xs[0], dodge_xs[0] - bw / 2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_hue_as_numpy_dodged_TestHistPlotUnivariate.test_density_stat_common_norm.assert_np_multiply_bar_he": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_hue_as_numpy_dodged_TestHistPlotUnivariate.test_density_stat_common_norm.assert_np_multiply_bar_he", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1280, "end_line": 1322, "span_ids": ["TestHistPlotUnivariate.test_multiple_input_check", "TestHistPlotUnivariate.test_count_stat", "TestHistPlotUnivariate.test_density_stat_common_norm", "TestHistPlotUnivariate.test_density_stat", "TestHistPlotUnivariate.test_element_input_check", "TestHistPlotUnivariate.test_hue_as_numpy_dodged"], "tokens": 415}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_hue_as_numpy_dodged(self, long_df):\n        # https://github.com/mwaskom/seaborn/issues/2452\n\n        ax = histplot(\n            long_df,\n            x=\"y\", hue=long_df[\"a\"].to_numpy(),\n            multiple=\"dodge\", bins=1,\n        )\n        # Note hue order reversal\n        assert ax.patches[1].get_x() < ax.patches[0].get_x()\n\n    def test_multiple_input_check(self, flat_series):\n\n        with pytest.raises(ValueError, match=\"`multiple` must be\"):\n            histplot(flat_series, multiple=\"invalid\")\n\n    def test_element_input_check(self, flat_series):\n\n        with pytest.raises(ValueError, match=\"`element` must be\"):\n            histplot(flat_series, element=\"invalid\")\n\n    def test_count_stat(self, flat_series):\n\n        ax = histplot(flat_series, stat=\"count\")\n        bar_heights = [b.get_height() for b in ax.patches]\n        assert sum(bar_heights) == len(flat_series)\n\n    def test_density_stat(self, flat_series):\n\n        ax = histplot(flat_series, stat=\"density\")\n        bar_heights = [b.get_height() for b in ax.patches]\n        bar_widths = [b.get_width() for b in ax.patches]\n        assert np.multiply(bar_heights, bar_widths).sum() == pytest.approx(1)\n\n    def test_density_stat_common_norm(self, long_df):\n\n        ax = histplot(\n            data=long_df, x=\"x\", hue=\"a\",\n            stat=\"density\", common_norm=True, element=\"bars\",\n        )\n        bar_heights = [b.get_height() for b in ax.patches]\n        bar_widths = [b.get_width() for b in ax.patches]\n        assert np.multiply(bar_heights, bar_widths).sum() == pytest.approx(1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_density_stat_unique_norm_TestHistPlotUnivariate.test_density_stat_unique_norm.for_bars_in_bar_groups_.assert_bar_areas_sum_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_density_stat_unique_norm_TestHistPlotUnivariate.test_density_stat_unique_norm.for_bars_in_bar_groups_.assert_bar_areas_sum_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1324, "end_line": 1338, "span_ids": ["TestHistPlotUnivariate.test_density_stat_unique_norm"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_density_stat_unique_norm(self, long_df):\n\n        n = 10\n        ax = histplot(\n            data=long_df, x=\"x\", hue=\"a\",\n            stat=\"density\", bins=n, common_norm=False, element=\"bars\",\n        )\n\n        bar_groups = ax.patches[:n], ax.patches[-n:]\n\n        for bars in bar_groups:\n            bar_heights = [b.get_height() for b in bars]\n            bar_widths = [b.get_width() for b in bars]\n            bar_areas = np.multiply(bar_heights, bar_widths)\n            assert bar_areas.sum() == pytest.approx(1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.height_norm_arg_TestHistPlotUnivariate.test_probability_stat_common_norm.assert_sum_bar_heights_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.height_norm_arg_TestHistPlotUnivariate.test_probability_stat_common_norm.assert_sum_bar_heights_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1340, "end_line": 1357, "span_ids": ["TestHistPlotUnivariate.test_probability_stat_common_norm", "TestHistPlotUnivariate.height_norm_arg", "TestHistPlotUnivariate.test_probability_stat"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    @pytest.fixture(params=[\"probability\", \"proportion\"])\n    def height_norm_arg(self, request):\n        return request.param\n\n    def test_probability_stat(self, flat_series, height_norm_arg):\n\n        ax = histplot(flat_series, stat=height_norm_arg)\n        bar_heights = [b.get_height() for b in ax.patches]\n        assert sum(bar_heights) == pytest.approx(1)\n\n    def test_probability_stat_common_norm(self, long_df, height_norm_arg):\n\n        ax = histplot(\n            data=long_df, x=\"x\", hue=\"a\",\n            stat=height_norm_arg, common_norm=True, element=\"bars\",\n        )\n        bar_heights = [b.get_height() for b in ax.patches]\n        assert sum(bar_heights) == pytest.approx(1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_probability_stat_unique_norm_TestHistPlotUnivariate.test_probability_stat_unique_norm.for_bars_in_bar_groups_.assert_sum_bar_heights_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_probability_stat_unique_norm_TestHistPlotUnivariate.test_probability_stat_unique_norm.for_bars_in_bar_groups_.assert_sum_bar_heights_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1359, "end_line": 1371, "span_ids": ["TestHistPlotUnivariate.test_probability_stat_unique_norm"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_probability_stat_unique_norm(self, long_df, height_norm_arg):\n\n        n = 10\n        ax = histplot(\n            data=long_df, x=\"x\", hue=\"a\",\n            stat=height_norm_arg, bins=n, common_norm=False, element=\"bars\",\n        )\n\n        bar_groups = ax.patches[:n], ax.patches[-n:]\n\n        for bars in bar_groups:\n            bar_heights = [b.get_height() for b in bars]\n            assert sum(bar_heights) == pytest.approx(1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_percent_stat_TestHistPlotUnivariate.test_common_bins.assert_array_equal_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_percent_stat_TestHistPlotUnivariate.test_common_bins.assert_array_equal_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1373, "end_line": 1390, "span_ids": ["TestHistPlotUnivariate.test_common_bins", "TestHistPlotUnivariate.test_percent_stat"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_percent_stat(self, flat_series):\n\n        ax = histplot(flat_series, stat=\"percent\")\n        bar_heights = [b.get_height() for b in ax.patches]\n        assert sum(bar_heights) == 100\n\n    def test_common_bins(self, long_df):\n\n        n = 10\n        ax = histplot(\n            long_df, x=\"x\", hue=\"a\", common_bins=True, bins=n, element=\"bars\",\n        )\n\n        bar_groups = ax.patches[:n], ax.patches[-n:]\n        assert_array_equal(\n            [b.get_xy() for b in bar_groups[0]],\n            [b.get_xy() for b in bar_groups[1]]\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_unique_bins_TestHistPlotUnivariate.test_weights_with_missing.assert_sum_bar_heights_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_unique_bins_TestHistPlotUnivariate.test_weights_with_missing.assert_sum_bar_heights_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1392, "end_line": 1411, "span_ids": ["TestHistPlotUnivariate.test_weights_with_missing", "TestHistPlotUnivariate.test_unique_bins"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_unique_bins(self, wide_df):\n\n        ax = histplot(wide_df, common_bins=False, bins=10, element=\"bars\")\n\n        bar_groups = np.split(np.array(ax.patches), len(wide_df.columns))\n\n        for i, col in enumerate(wide_df.columns[::-1]):\n            bars = bar_groups[i]\n            start = bars[0].get_x()\n            stop = bars[-1].get_x() + bars[-1].get_width()\n            assert start == wide_df[col].min()\n            assert stop == wide_df[col].max()\n\n    def test_weights_with_missing(self, missing_df):\n\n        ax = histplot(missing_df, x=\"x\", weights=\"s\", bins=5)\n\n        bar_heights = [bar.get_height() for bar in ax.patches]\n        total_weight = missing_df[[\"x\", \"s\"]].dropna()[\"s\"].sum()\n        assert sum(bar_heights) == pytest.approx(total_weight)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_weight_norm_TestHistPlotUnivariate.test_weight_norm.assert_sum_y1_2_sum": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_weight_norm_TestHistPlotUnivariate.test_weight_norm.assert_sum_y1_2_sum", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1413, "end_line": 1426, "span_ids": ["TestHistPlotUnivariate.test_weight_norm"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_weight_norm(self, rng):\n\n        vals = rng.normal(0, 1, 50)\n        x = np.concatenate([vals, vals])\n        w = np.repeat([1, 2], 50)\n        ax = histplot(\n            x=x, weights=w, hue=w, common_norm=True, stat=\"density\", bins=5\n        )\n\n        # Recall that artists are added in reverse of hue order\n        y1 = [bar.get_height() for bar in ax.patches[:5]]\n        y2 = [bar.get_height() for bar in ax.patches[5:]]\n\n        assert sum(y1) == 2 * sum(y2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_datetime_scale_TestHistPlotUnivariate.test_datetime_scale.assert_ax1_get_xlim_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_datetime_scale_TestHistPlotUnivariate.test_datetime_scale.assert_ax1_get_xlim_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1457, "end_line": 1466, "span_ids": ["TestHistPlotUnivariate.test_datetime_scale"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    @pytest.mark.skipif(\n        Version(np.__version__) < Version(\"1.17\"),\n        reason=\"Histogram over datetime64 requires numpy >= 1.17\",\n    )\n    def test_datetime_scale(self, long_df):\n\n        f, (ax1, ax2) = plt.subplots(2)\n        histplot(x=long_df[\"t\"], fill=True, ax=ax1)\n        histplot(x=long_df[\"t\"], fill=False, ax=ax2)\n        assert ax1.get_xlim() == ax2.get_xlim()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_kde_TestHistPlotUnivariate.test_kde.assert_kde_area_pytest": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_kde_TestHistPlotUnivariate.test_kde.assert_kde_area_pytest", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1468, "end_line": 1482, "span_ids": ["TestHistPlotUnivariate.test_kde"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    @pytest.mark.parametrize(\"stat\", [\"count\", \"density\", \"probability\"])\n    def test_kde(self, flat_series, stat):\n\n        ax = histplot(\n            flat_series, kde=True, stat=stat, kde_kws={\"cut\": 10}\n        )\n\n        bar_widths = [b.get_width() for b in ax.patches]\n        bar_heights = [b.get_height() for b in ax.patches]\n        hist_area = np.multiply(bar_widths, bar_heights).sum()\n\n        density, = ax.lines\n        kde_area = integrate(density.get_ydata(), density.get_xdata())\n\n        assert kde_area == pytest.approx(hist_area)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_kde_with_hue_TestHistPlotUnivariate.test_kde_with_hue.for_i_bars_in_enumerate_.if_multiple_layer_.elif_multiple_dodge_.assert_kde_area_pytest": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_kde_with_hue_TestHistPlotUnivariate.test_kde_with_hue.for_i_bars_in_enumerate_.if_multiple_layer_.elif_multiple_dodge_.assert_kde_area_pytest", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1484, "end_line": 1508, "span_ids": ["TestHistPlotUnivariate.test_kde_with_hue"], "tokens": 257}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    @pytest.mark.parametrize(\"multiple\", [\"layer\", \"dodge\"])\n    @pytest.mark.parametrize(\"stat\", [\"count\", \"density\", \"probability\"])\n    def test_kde_with_hue(self, long_df, stat, multiple):\n\n        n = 10\n        ax = histplot(\n            long_df, x=\"x\", hue=\"c\", multiple=multiple,\n            kde=True, stat=stat, element=\"bars\",\n            kde_kws={\"cut\": 10}, bins=n,\n        )\n\n        bar_groups = ax.patches[:n], ax.patches[-n:]\n\n        for i, bars in enumerate(bar_groups):\n            bar_widths = [b.get_width() for b in bars]\n            bar_heights = [b.get_height() for b in bars]\n            hist_area = np.multiply(bar_widths, bar_heights).sum()\n\n            x, y = ax.lines[i].get_xydata().T\n            kde_area = integrate(y, x)\n\n            if multiple == \"layer\":\n                assert kde_area == pytest.approx(hist_area)\n            elif multiple == \"dodge\":\n                assert kde_area == pytest.approx(hist_area * 2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_kde_default_cut_TestHistPlotUnivariate.test_kde_singular_data.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_kde_default_cut_TestHistPlotUnivariate.test_kde_singular_data.None_3", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1510, "end_line": 1553, "span_ids": ["TestHistPlotUnivariate.test_kde_yaxis", "TestHistPlotUnivariate.test_kde_default_cut", "TestHistPlotUnivariate.test_kde_singular_data", "TestHistPlotUnivariate.test_kde_hue", "TestHistPlotUnivariate.test_kde_line_kws"], "tokens": 363}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_kde_default_cut(self, flat_series):\n\n        ax = histplot(flat_series, kde=True)\n        support = ax.lines[0].get_xdata()\n        assert support.min() == flat_series.min()\n        assert support.max() == flat_series.max()\n\n    def test_kde_hue(self, long_df):\n\n        n = 10\n        ax = histplot(data=long_df, x=\"x\", hue=\"a\", kde=True, bins=n)\n\n        for bar, line in zip(ax.patches[::n], ax.lines):\n            assert_colors_equal(\n                bar.get_facecolor(), line.get_color(), check_alpha=False\n            )\n\n    def test_kde_yaxis(self, flat_series):\n\n        f, ax = plt.subplots()\n        histplot(x=flat_series, kde=True)\n        histplot(y=flat_series, kde=True)\n\n        x, y = ax.lines\n        assert_array_equal(x.get_xdata(), y.get_ydata())\n        assert_array_equal(x.get_ydata(), y.get_xdata())\n\n    def test_kde_line_kws(self, flat_series):\n\n        lw = 5\n        ax = histplot(flat_series, kde=True, line_kws=dict(lw=lw))\n        assert ax.lines[0].get_linewidth() == lw\n\n    def test_kde_singular_data(self):\n\n        with pytest.warns(None) as record:\n            ax = histplot(x=np.ones(10), kde=True)\n        assert not record\n        assert not ax.lines\n\n        with pytest.warns(None) as record:\n            ax = histplot(x=[5], kde=True)\n        assert not record\n        assert not ax.lines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_element_default_TestHistPlotUnivariate.test_bars_no_fill.for_bar_in_ax_patches_.assert_bar_get_edgecolor_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_element_default_TestHistPlotUnivariate.test_bars_no_fill.for_bar_in_ax_patches_.assert_bar_get_edgecolor_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1555, "end_line": 1573, "span_ids": ["TestHistPlotUnivariate.test_bars_no_fill", "TestHistPlotUnivariate.test_element_default"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_element_default(self, long_df):\n\n        f, (ax1, ax2) = plt.subplots(2)\n        histplot(long_df, x=\"x\", ax=ax1)\n        histplot(long_df, x=\"x\", ax=ax2, element=\"bars\")\n        assert len(ax1.patches) == len(ax2.patches)\n\n        f, (ax1, ax2) = plt.subplots(2)\n        histplot(long_df, x=\"x\", hue=\"a\", ax=ax1)\n        histplot(long_df, x=\"x\", hue=\"a\", ax=ax2, element=\"bars\")\n        assert len(ax1.patches) == len(ax2.patches)\n\n    def test_bars_no_fill(self, flat_series):\n\n        alpha = .5\n        ax = histplot(flat_series, element=\"bars\", fill=False, alpha=alpha)\n        for bar in ax.patches:\n            assert bar.get_facecolor() == (0, 0, 0, 0)\n            assert bar.get_edgecolor()[-1] == alpha", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_step_fill_TestHistPlotUnivariate.test_step_fill.assert_y_n_2_bar_he": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_step_fill_TestHistPlotUnivariate.test_step_fill.assert_y_n_2_bar_he", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1575, "end_line": 1594, "span_ids": ["TestHistPlotUnivariate.test_step_fill"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_step_fill(self, flat_series):\n\n        f, (ax1, ax2) = plt.subplots(2)\n\n        n = 10\n        histplot(flat_series, element=\"bars\", fill=True, bins=n, ax=ax1)\n        histplot(flat_series, element=\"step\", fill=True, bins=n, ax=ax2)\n\n        bar_heights = [b.get_height() for b in ax1.patches]\n        bar_widths = [b.get_width() for b in ax1.patches]\n        bar_edges = [b.get_x() for b in ax1.patches]\n\n        fill = ax2.collections[0]\n        x, y = fill.get_paths()[0].vertices[::-1].T\n\n        assert_array_equal(x[1:2 * n:2], bar_edges)\n        assert_array_equal(y[1:2 * n:2], bar_heights)\n\n        assert x[n * 2] == bar_edges[-1] + bar_widths[-1]\n        assert y[n * 2] == bar_heights[-1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_poly_fill_TestHistPlotUnivariate.test_poly_fill.assert_array_equal_y_1_n_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_poly_fill_TestHistPlotUnivariate.test_poly_fill.assert_array_equal_y_1_n_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1596, "end_line": 1612, "span_ids": ["TestHistPlotUnivariate.test_poly_fill"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_poly_fill(self, flat_series):\n\n        f, (ax1, ax2) = plt.subplots(2)\n\n        n = 10\n        histplot(flat_series, element=\"bars\", fill=True, bins=n, ax=ax1)\n        histplot(flat_series, element=\"poly\", fill=True, bins=n, ax=ax2)\n\n        bar_heights = np.array([b.get_height() for b in ax1.patches])\n        bar_widths = np.array([b.get_width() for b in ax1.patches])\n        bar_edges = np.array([b.get_x() for b in ax1.patches])\n\n        fill = ax2.collections[0]\n        x, y = fill.get_paths()[0].vertices[::-1].T\n\n        assert_array_equal(x[1:n + 1], bar_edges + bar_widths / 2)\n        assert_array_equal(y[1:n + 1], bar_heights)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_poly_no_fill_TestHistPlotUnivariate.test_poly_no_fill.assert_array_equal_y_bar": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_poly_no_fill_TestHistPlotUnivariate.test_poly_no_fill.assert_array_equal_y_bar", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1614, "end_line": 1629, "span_ids": ["TestHistPlotUnivariate.test_poly_no_fill"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_poly_no_fill(self, flat_series):\n\n        f, (ax1, ax2) = plt.subplots(2)\n\n        n = 10\n        histplot(flat_series, element=\"bars\", fill=False, bins=n, ax=ax1)\n        histplot(flat_series, element=\"poly\", fill=False, bins=n, ax=ax2)\n\n        bar_heights = np.array([b.get_height() for b in ax1.patches])\n        bar_widths = np.array([b.get_width() for b in ax1.patches])\n        bar_edges = np.array([b.get_x() for b in ax1.patches])\n\n        x, y = ax2.lines[0].get_xydata().T\n\n        assert_array_equal(x, bar_edges + bar_widths / 2)\n        assert_array_equal(y, bar_heights)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_step_no_fill_TestHistPlotUnivariate.test_step_no_fill.assert_y_1_y_2_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_step_no_fill_TestHistPlotUnivariate.test_step_no_fill.assert_y_1_y_2_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1631, "end_line": 1647, "span_ids": ["TestHistPlotUnivariate.test_step_no_fill"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_step_no_fill(self, flat_series):\n\n        f, (ax1, ax2) = plt.subplots(2)\n\n        histplot(flat_series, element=\"bars\", fill=False, ax=ax1)\n        histplot(flat_series, element=\"step\", fill=False, ax=ax2)\n\n        bar_heights = [b.get_height() for b in ax1.patches]\n        bar_widths = [b.get_width() for b in ax1.patches]\n        bar_edges = [b.get_x() for b in ax1.patches]\n\n        x, y = ax2.lines[0].get_xydata().T\n\n        assert_array_equal(x[:-1], bar_edges)\n        assert_array_equal(y[:-1], bar_heights)\n        assert x[-1] == bar_edges[-1] + bar_widths[-1]\n        assert y[-1] == y[-2]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_step_fill_xy_TestHistPlotUnivariate.test_weights_with_auto_bins.assert_len_ax_patches_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_step_fill_xy_TestHistPlotUnivariate.test_weights_with_auto_bins.assert_len_ax_patches_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1649, "end_line": 1684, "span_ids": ["TestHistPlotUnivariate.test_step_no_fill_xy", "TestHistPlotUnivariate.test_weighted_histogram", "TestHistPlotUnivariate.test_step_fill_xy", "TestHistPlotUnivariate.test_weights_with_auto_bins"], "tokens": 313}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_step_fill_xy(self, flat_series):\n\n        f, ax = plt.subplots()\n\n        histplot(x=flat_series, element=\"step\", fill=True)\n        histplot(y=flat_series, element=\"step\", fill=True)\n\n        xverts = ax.collections[0].get_paths()[0].vertices\n        yverts = ax.collections[1].get_paths()[0].vertices\n\n        assert_array_equal(xverts, yverts[:, ::-1])\n\n    def test_step_no_fill_xy(self, flat_series):\n\n        f, ax = plt.subplots()\n\n        histplot(x=flat_series, element=\"step\", fill=False)\n        histplot(y=flat_series, element=\"step\", fill=False)\n\n        xline, yline = ax.lines\n\n        assert_array_equal(xline.get_xdata(), yline.get_ydata())\n        assert_array_equal(xline.get_ydata(), yline.get_xdata())\n\n    def test_weighted_histogram(self):\n\n        ax = histplot(x=[0, 1, 2], weights=[1, 2, 3], discrete=True)\n\n        bar_heights = [b.get_height() for b in ax.patches]\n        assert bar_heights == [1, 2, 3]\n\n    def test_weights_with_auto_bins(self, long_df):\n\n        with pytest.warns(UserWarning):\n            ax = histplot(long_df, x=\"x\", weights=\"f\")\n        assert len(ax.patches) == 10", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_shrink_TestHistPlotUnivariate.test_shrink.for_p1_p2_in_zip_ax1_pat.assert_x2_w2_2_p": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_shrink_TestHistPlotUnivariate.test_shrink.for_p1_p2_in_zip_ax1_pat.assert_x2_w2_2_p", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1686, "end_line": 1702, "span_ids": ["TestHistPlotUnivariate.test_shrink"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_shrink(self, long_df):\n\n        f, (ax1, ax2) = plt.subplots(2)\n\n        bw = 2\n        shrink = .4\n\n        histplot(long_df, x=\"x\", binwidth=bw, ax=ax1)\n        histplot(long_df, x=\"x\", binwidth=bw, shrink=shrink, ax=ax2)\n\n        for p1, p2 in zip(ax1.patches, ax2.patches):\n\n            w1, w2 = p1.get_width(), p2.get_width()\n            assert w2 == pytest.approx(shrink * w1)\n\n            x1, x2 = p1.get_x(), p2.get_x()\n            assert (x2 + w2 / 2) == pytest.approx(x1 + w1 / 2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_log_scale_explicit_TestHistPlotUnivariate.test_log_scale_implicit.assert_np_allclose_steps_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_log_scale_explicit_TestHistPlotUnivariate.test_log_scale_implicit.assert_np_allclose_steps_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1704, "end_line": 1723, "span_ids": ["TestHistPlotUnivariate.test_log_scale_explicit", "TestHistPlotUnivariate.test_log_scale_implicit"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_log_scale_explicit(self, rng):\n\n        x = rng.lognormal(0, 2, 1000)\n        ax = histplot(x, log_scale=True, binwidth=1)\n\n        bar_widths = [b.get_width() for b in ax.patches]\n        steps = np.divide(bar_widths[1:], bar_widths[:-1])\n        assert np.allclose(steps, 10)\n\n    def test_log_scale_implicit(self, rng):\n\n        x = rng.lognormal(0, 2, 1000)\n\n        f, ax = plt.subplots()\n        ax.set_xscale(\"log\")\n        histplot(x, binwidth=1, ax=ax)\n\n        bar_widths = [b.get_width() for b in ax.patches]\n        steps = np.divide(bar_widths[1:], bar_widths[:-1])\n        assert np.allclose(steps, 10)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_auto_linewidth_TestHistPlotUnivariate.test_auto_linewidth.None_10": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_auto_linewidth_TestHistPlotUnivariate.test_auto_linewidth.None_10", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1725, "end_line": 1755, "span_ids": ["TestHistPlotUnivariate.test_auto_linewidth"], "tokens": 417}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    @pytest.mark.parametrize(\n        \"fill\", [True, False],\n    )\n    def test_auto_linewidth(self, flat_series, fill):\n\n        get_lw = lambda ax: ax.patches[0].get_linewidth()  # noqa: E731\n\n        kws = dict(element=\"bars\", fill=fill)\n\n        f, (ax1, ax2) = plt.subplots(2)\n        histplot(flat_series, **kws, bins=10, ax=ax1)\n        histplot(flat_series, **kws, bins=100, ax=ax2)\n        assert get_lw(ax1) > get_lw(ax2)\n\n        f, ax1 = plt.subplots(figsize=(10, 5))\n        f, ax2 = plt.subplots(figsize=(2, 5))\n        histplot(flat_series, **kws, bins=30, ax=ax1)\n        histplot(flat_series, **kws, bins=30, ax=ax2)\n        assert get_lw(ax1) > get_lw(ax2)\n\n        f, ax1 = plt.subplots(figsize=(4, 5))\n        f, ax2 = plt.subplots(figsize=(4, 5))\n        histplot(flat_series, **kws, bins=30, ax=ax1)\n        histplot(10 ** flat_series, **kws, bins=30, log_scale=True, ax=ax2)\n        assert get_lw(ax1) == pytest.approx(get_lw(ax2))\n\n        f, ax1 = plt.subplots(figsize=(4, 5))\n        f, ax2 = plt.subplots(figsize=(4, 5))\n        histplot(y=[0, 1, 1], **kws, discrete=True, ax=ax1)\n        histplot(y=[\"a\", \"b\", \"b\"], **kws, ax=ax2)\n        assert get_lw(ax1) == pytest.approx(get_lw(ax2))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_bar_kwargs_TestHistPlotUnivariate.test_step_line_kwargs.assert_line_get_linestyle": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_bar_kwargs_TestHistPlotUnivariate.test_step_line_kwargs.assert_line_get_linestyle", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1757, "end_line": 1782, "span_ids": ["TestHistPlotUnivariate.test_step_fill_kwargs", "TestHistPlotUnivariate.test_step_line_kwargs", "TestHistPlotUnivariate.test_bar_kwargs"], "tokens": 249}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_bar_kwargs(self, flat_series):\n\n        lw = 2\n        ec = (1, .2, .9, .5)\n        ax = histplot(flat_series, binwidth=1, ec=ec, lw=lw)\n        for bar in ax.patches:\n            assert_colors_equal(bar.get_edgecolor(), ec)\n            assert bar.get_linewidth() == lw\n\n    def test_step_fill_kwargs(self, flat_series):\n\n        lw = 2\n        ec = (1, .2, .9, .5)\n        ax = histplot(flat_series, element=\"step\", ec=ec, lw=lw)\n        poly = ax.collections[0]\n        assert_colors_equal(poly.get_edgecolor(), ec)\n        assert poly.get_linewidth() == lw\n\n    def test_step_line_kwargs(self, flat_series):\n\n        lw = 2\n        ls = \"--\"\n        ax = histplot(flat_series, element=\"step\", fill=False, lw=lw, ls=ls)\n        line = ax.lines[0]\n        assert line.get_linewidth() == lw\n        assert line.get_linestyle() == ls", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate_TestHistPlotBivariate.test_mesh.for_i_y_x_in_enumerat.assert_path_vertices_0_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate_TestHistPlotBivariate.test_mesh.for_i_y_x_in_enumerat.assert_path_vertices_0_1", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1785, "end_line": 1803, "span_ids": ["TestHistPlotBivariate", "TestHistPlotBivariate.test_mesh"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotBivariate:\n\n    def test_mesh(self, long_df):\n\n        hist = Histogram()\n        counts, (x_edges, y_edges) = hist(long_df[\"x\"], long_df[\"y\"])\n\n        ax = histplot(long_df, x=\"x\", y=\"y\")\n        mesh = ax.collections[0]\n        mesh_data = mesh.get_array()\n\n        assert_array_equal(mesh_data.data, counts.T.flat)\n        assert_array_equal(mesh_data.mask, counts.T.flat == 0)\n\n        edges = itertools.product(y_edges[:-1], x_edges[:-1])\n        for i, (y, x) in enumerate(edges):\n            path = mesh.get_paths()[i]\n            assert path.vertices[0, 0] == x\n            assert path.vertices[0, 1] == y", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_with_hue_TestHistPlotBivariate.test_mesh_with_hue.for_i_sub_df_in_long_df_.for_i_y_x_in_enumerat.assert_path_vertices_0_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_with_hue_TestHistPlotBivariate.test_mesh_with_hue.for_i_sub_df_in_long_df_.for_i_y_x_in_enumerat.assert_path_vertices_0_1", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1805, "end_line": 1826, "span_ids": ["TestHistPlotBivariate.test_mesh_with_hue"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotBivariate:\n\n    def test_mesh_with_hue(self, long_df):\n\n        ax = histplot(long_df, x=\"x\", y=\"y\", hue=\"c\")\n\n        hist = Histogram()\n        hist.define_bin_params(long_df[\"x\"], long_df[\"y\"])\n\n        for i, sub_df in long_df.groupby(\"c\"):\n\n            mesh = ax.collections[i]\n            mesh_data = mesh.get_array()\n\n            counts, (x_edges, y_edges) = hist(sub_df[\"x\"], sub_df[\"y\"])\n\n            assert_array_equal(mesh_data.data, counts.T.flat)\n            assert_array_equal(mesh_data.mask, counts.T.flat == 0)\n\n            edges = itertools.product(y_edges[:-1], x_edges[:-1])\n            for i, (y, x) in enumerate(edges):\n                path = mesh.get_paths()[i]\n                assert path.vertices[0, 0] == x\n                assert path.vertices[0, 1] == y", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_with_hue_unique_bins_TestHistPlotBivariate.test_mesh_with_hue_unique_bins.for_i_sub_df_in_long_df_.for_i_y_x_in_enumerat.assert_path_vertices_0_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_with_hue_unique_bins_TestHistPlotBivariate.test_mesh_with_hue_unique_bins.for_i_sub_df_in_long_df_.for_i_y_x_in_enumerat.assert_path_vertices_0_1", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1828, "end_line": 1848, "span_ids": ["TestHistPlotBivariate.test_mesh_with_hue_unique_bins"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotBivariate:\n\n    def test_mesh_with_hue_unique_bins(self, long_df):\n\n        ax = histplot(long_df, x=\"x\", y=\"y\", hue=\"c\", common_bins=False)\n\n        for i, sub_df in long_df.groupby(\"c\"):\n\n            hist = Histogram()\n\n            mesh = ax.collections[i]\n            mesh_data = mesh.get_array()\n\n            counts, (x_edges, y_edges) = hist(sub_df[\"x\"], sub_df[\"y\"])\n\n            assert_array_equal(mesh_data.data, counts.T.flat)\n            assert_array_equal(mesh_data.mask, counts.T.flat == 0)\n\n            edges = itertools.product(y_edges[:-1], x_edges[:-1])\n            for i, (y, x) in enumerate(edges):\n                path = mesh.get_paths()[i]\n                assert path.vertices[0, 0] == x\n                assert path.vertices[0, 1] == y", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_with_col_unique_bins_TestHistPlotBivariate.test_mesh_with_col_unique_bins.for_i_sub_df_in_long_df_.for_i_y_x_in_enumerat.assert_path_vertices_0_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_with_col_unique_bins_TestHistPlotBivariate.test_mesh_with_col_unique_bins.for_i_sub_df_in_long_df_.for_i_y_x_in_enumerat.assert_path_vertices_0_1", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1850, "end_line": 1870, "span_ids": ["TestHistPlotBivariate.test_mesh_with_col_unique_bins"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotBivariate:\n\n    def test_mesh_with_col_unique_bins(self, long_df):\n\n        g = displot(long_df, x=\"x\", y=\"y\", col=\"c\", common_bins=False)\n\n        for i, sub_df in long_df.groupby(\"c\"):\n\n            hist = Histogram()\n\n            mesh = g.axes.flat[i].collections[0]\n            mesh_data = mesh.get_array()\n\n            counts, (x_edges, y_edges) = hist(sub_df[\"x\"], sub_df[\"y\"])\n\n            assert_array_equal(mesh_data.data, counts.T.flat)\n            assert_array_equal(mesh_data.mask, counts.T.flat == 0)\n\n            edges = itertools.product(y_edges[:-1], x_edges[:-1])\n            for i, (y, x) in enumerate(edges):\n                path = mesh.get_paths()[i]\n                assert path.vertices[0, 0] == x\n                assert path.vertices[0, 1] == y", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_log_scale_TestHistPlotBivariate.test_mesh_log_scale.for_i_y_i_x_i_in_enum.assert_path_vertices_0_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_log_scale_TestHistPlotBivariate.test_mesh_log_scale.for_i_y_i_x_i_in_enum.assert_path_vertices_0_1", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1872, "end_line": 1888, "span_ids": ["TestHistPlotBivariate.test_mesh_log_scale"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotBivariate:\n\n    def test_mesh_log_scale(self, rng):\n\n        x, y = rng.lognormal(0, 1, (2, 1000))\n        hist = Histogram()\n        counts, (x_edges, y_edges) = hist(np.log10(x), np.log10(y))\n\n        ax = histplot(x=x, y=y, log_scale=True)\n        mesh = ax.collections[0]\n        mesh_data = mesh.get_array()\n\n        assert_array_equal(mesh_data.data, counts.T.flat)\n\n        edges = itertools.product(y_edges[:-1], x_edges[:-1])\n        for i, (y_i, x_i) in enumerate(edges):\n            path = mesh.get_paths()[i]\n            assert path.vertices[0, 0] == 10 ** x_i\n            assert path.vertices[0, 1] == 10 ** y_i", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_thresh_TestHistPlotBivariate.test_mesh_sticky_edges.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_thresh_TestHistPlotBivariate.test_mesh_sticky_edges.None_3", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1890, "end_line": 1914, "span_ids": ["TestHistPlotBivariate.test_mesh_sticky_edges", "TestHistPlotBivariate.test_mesh_thresh"], "tokens": 244}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotBivariate:\n\n    def test_mesh_thresh(self, long_df):\n\n        hist = Histogram()\n        counts, (x_edges, y_edges) = hist(long_df[\"x\"], long_df[\"y\"])\n\n        thresh = 5\n        ax = histplot(long_df, x=\"x\", y=\"y\", thresh=thresh)\n        mesh = ax.collections[0]\n        mesh_data = mesh.get_array()\n\n        assert_array_equal(mesh_data.data, counts.T.flat)\n        assert_array_equal(mesh_data.mask, (counts <= thresh).T.flat)\n\n    def test_mesh_sticky_edges(self, long_df):\n\n        ax = histplot(long_df, x=\"x\", y=\"y\", thresh=None)\n        mesh = ax.collections[0]\n        assert mesh.sticky_edges.x == [long_df[\"x\"].min(), long_df[\"x\"].max()]\n        assert mesh.sticky_edges.y == [long_df[\"y\"].min(), long_df[\"y\"].max()]\n\n        ax.clear()\n        ax = histplot(long_df, x=\"x\", y=\"y\")\n        mesh = ax.collections[0]\n        assert not mesh.sticky_edges.x\n        assert not mesh.sticky_edges.y", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_common_norm_TestHistPlotBivariate.test_mesh_common_norm.for_i_sub_df_in_long_df_.assert_array_equal_mesh_d": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_common_norm_TestHistPlotBivariate.test_mesh_common_norm.for_i_sub_df_in_long_df_.assert_array_equal_mesh_d", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1916, "end_line": 1934, "span_ids": ["TestHistPlotBivariate.test_mesh_common_norm"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotBivariate:\n\n    def test_mesh_common_norm(self, long_df):\n\n        stat = \"density\"\n        ax = histplot(\n            long_df, x=\"x\", y=\"y\", hue=\"c\", common_norm=True, stat=stat,\n        )\n\n        hist = Histogram(stat=\"density\")\n        hist.define_bin_params(long_df[\"x\"], long_df[\"y\"])\n\n        for i, sub_df in long_df.groupby(\"c\"):\n\n            mesh = ax.collections[i]\n            mesh_data = mesh.get_array()\n\n            density, (x_edges, y_edges) = hist(sub_df[\"x\"], sub_df[\"y\"])\n\n            scale = len(sub_df) / len(long_df)\n            assert_array_equal(mesh_data.data, (density * scale).T.flat)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_unique_norm_TestHistPlotBivariate.test_mesh_normalization.assert_mesh_data_data_sum": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_unique_norm_TestHistPlotBivariate.test_mesh_normalization.assert_mesh_data_data_sum", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1936, "end_line": 1965, "span_ids": ["TestHistPlotBivariate.test_mesh_unique_norm", "TestHistPlotBivariate.test_mesh_normalization"], "tokens": 255}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotBivariate:\n\n    def test_mesh_unique_norm(self, long_df):\n\n        stat = \"density\"\n        ax = histplot(\n            long_df, x=\"x\", y=\"y\", hue=\"c\", common_norm=False, stat=stat,\n        )\n\n        hist = Histogram()\n        bin_kws = hist.define_bin_params(long_df[\"x\"], long_df[\"y\"])\n\n        for i, sub_df in long_df.groupby(\"c\"):\n\n            sub_hist = Histogram(bins=bin_kws[\"bins\"], stat=stat)\n\n            mesh = ax.collections[i]\n            mesh_data = mesh.get_array()\n\n            density, (x_edges, y_edges) = sub_hist(sub_df[\"x\"], sub_df[\"y\"])\n            assert_array_equal(mesh_data.data, density.T.flat)\n\n    @pytest.mark.parametrize(\"stat\", [\"probability\", \"proportion\", \"percent\"])\n    def test_mesh_normalization(self, long_df, stat):\n\n        ax = histplot(\n            long_df, x=\"x\", y=\"y\", stat=stat,\n        )\n\n        mesh_data = ax.collections[0].get_array()\n        expected_sum = {\"percent\": 100}.get(stat, 1)\n        assert mesh_data.data.sum() == expected_sum", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_colors_TestHistPlotBivariate.test_mesh_colors.for_i_mesh_in_enumerate_.assert_array_equal_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_mesh_colors_TestHistPlotBivariate.test_mesh_colors.for_i_mesh_in_enumerate_.assert_array_equal_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1967, "end_line": 1989, "span_ids": ["TestHistPlotBivariate.test_mesh_colors"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotBivariate:\n\n    def test_mesh_colors(self, long_df):\n\n        color = \"r\"\n        f, ax = plt.subplots()\n        histplot(\n            long_df, x=\"x\", y=\"y\", color=color,\n        )\n        mesh = ax.collections[0]\n        assert_array_equal(\n            mesh.get_cmap().colors,\n            _DistributionPlotter()._cmap_from_color(color).colors,\n        )\n\n        f, ax = plt.subplots()\n        histplot(\n            long_df, x=\"x\", y=\"y\", hue=\"c\",\n        )\n        colors = color_palette()\n        for i, mesh in enumerate(ax.collections):\n            assert_array_equal(\n                mesh.get_cmap().colors,\n                _DistributionPlotter()._cmap_from_color(colors[i]).colors,\n            )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_color_limits_TestHistPlotBivariate.test_color_limits.assert_array_equal_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_color_limits_TestHistPlotBivariate.test_color_limits.assert_array_equal_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1991, "end_line": 2017, "span_ids": ["TestHistPlotBivariate.test_color_limits"], "tokens": 280}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotBivariate:\n\n    def test_color_limits(self, long_df):\n\n        f, (ax1, ax2, ax3) = plt.subplots(3)\n        kws = dict(data=long_df, x=\"x\", y=\"y\")\n        hist = Histogram()\n        counts, _ = hist(long_df[\"x\"], long_df[\"y\"])\n\n        histplot(**kws, ax=ax1)\n        assert ax1.collections[0].get_clim() == (0, counts.max())\n\n        vmax = 10\n        histplot(**kws, vmax=vmax, ax=ax2)\n        counts, _ = hist(long_df[\"x\"], long_df[\"y\"])\n        assert ax2.collections[0].get_clim() == (0, vmax)\n\n        pmax = .8\n        pthresh = .1\n        f = _DistributionPlotter()._quantile_to_level\n\n        histplot(**kws, pmax=pmax, pthresh=pthresh, ax=ax3)\n        counts, _ = hist(long_df[\"x\"], long_df[\"y\"])\n        mesh = ax3.collections[0]\n        assert mesh.get_clim() == (0, f(counts, pmax))\n        assert_array_equal(\n            mesh.get_array().mask,\n            (counts <= f(counts, pthresh)).T.flat,\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_hue_color_limits_TestHistPlotBivariate.test_colorbar.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotBivariate.test_hue_color_limits_TestHistPlotBivariate.test_colorbar.None_3", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 2019, "end_line": 2069, "span_ids": ["TestHistPlotBivariate.test_hue_color_limits", "TestHistPlotBivariate.test_colorbar"], "tokens": 538}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotBivariate:\n\n    def test_hue_color_limits(self, long_df):\n\n        _, (ax1, ax2, ax3, ax4) = plt.subplots(4)\n        kws = dict(data=long_df, x=\"x\", y=\"y\", hue=\"c\", bins=4)\n\n        hist = Histogram(bins=kws[\"bins\"])\n        hist.define_bin_params(long_df[\"x\"], long_df[\"y\"])\n        full_counts, _ = hist(long_df[\"x\"], long_df[\"y\"])\n\n        sub_counts = []\n        for _, sub_df in long_df.groupby(kws[\"hue\"]):\n            c, _ = hist(sub_df[\"x\"], sub_df[\"y\"])\n            sub_counts.append(c)\n\n        pmax = .8\n        pthresh = .05\n        f = _DistributionPlotter()._quantile_to_level\n\n        histplot(**kws, common_norm=True, ax=ax1)\n        for i, mesh in enumerate(ax1.collections):\n            assert mesh.get_clim() == (0, full_counts.max())\n\n        histplot(**kws, common_norm=False, ax=ax2)\n        for i, mesh in enumerate(ax2.collections):\n            assert mesh.get_clim() == (0, sub_counts[i].max())\n\n        histplot(**kws, common_norm=True, pmax=pmax, pthresh=pthresh, ax=ax3)\n        for i, mesh in enumerate(ax3.collections):\n            assert mesh.get_clim() == (0, f(full_counts, pmax))\n            assert_array_equal(\n                mesh.get_array().mask,\n                (sub_counts[i] <= f(full_counts, pthresh)).T.flat,\n            )\n\n        histplot(**kws, common_norm=False, pmax=pmax, pthresh=pthresh, ax=ax4)\n        for i, mesh in enumerate(ax4.collections):\n            assert mesh.get_clim() == (0, f(sub_counts[i], pmax))\n            assert_array_equal(\n                mesh.get_array().mask,\n                (sub_counts[i] <= f(sub_counts[i], pthresh)).T.flat,\n            )\n\n    def test_colorbar(self, long_df):\n\n        f, ax = plt.subplots()\n        histplot(long_df, x=\"x\", y=\"y\", cbar=True, ax=ax)\n        assert len(ax.figure.axes) == 2\n\n        f, (ax, cax) = plt.subplots(2)\n        histplot(long_df, x=\"x\", y=\"y\", cbar=True, cbar_ax=cax, ax=ax)\n        assert len(ax.figure.axes) == 2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestECDFPlotUnivariate_TestECDFPlotUnivariate.test_long_vectors.None_2.assert_array_equal_a_b_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestECDFPlotUnivariate_TestECDFPlotUnivariate.test_long_vectors.None_2.assert_array_equal_a_b_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 2072, "end_line": 2098, "span_ids": ["TestECDFPlotUnivariate.test_long_vectors", "TestECDFPlotUnivariate", "TestECDFPlotUnivariate.get_last_color"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestECDFPlotUnivariate(SharedAxesLevelTests):\n\n    func = staticmethod(ecdfplot)\n\n    def get_last_color(self, ax):\n\n        return to_rgb(ax.lines[-1].get_color())\n\n    @pytest.mark.parametrize(\"variable\", [\"x\", \"y\"])\n    def test_long_vectors(self, long_df, variable):\n\n        vector = long_df[variable]\n        vectors = [\n            variable, vector, vector.to_numpy(), vector.to_list(),\n        ]\n\n        f, ax = plt.subplots()\n        for vector in vectors:\n            ecdfplot(data=long_df, ax=ax, **{variable: vector})\n\n        xdata = [l.get_xdata() for l in ax.lines]\n        for a, b in itertools.product(xdata, xdata):\n            assert_array_equal(a, b)\n\n        ydata = [l.get_ydata() for l in ax.lines]\n        for a, b in itertools.product(ydata, ydata):\n            assert_array_equal(a, b)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestECDFPlotUnivariate.test_hue_TestECDFPlotUnivariate.test_drawstyle.assert_ax_lines_0_get_dr": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestECDFPlotUnivariate.test_hue_TestECDFPlotUnivariate.test_drawstyle.assert_ax_lines_0_get_dr", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 2100, "end_line": 2124, "span_ids": ["TestECDFPlotUnivariate.test_hue", "TestECDFPlotUnivariate.test_drawstyle", "TestECDFPlotUnivariate.test_line_kwargs"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestECDFPlotUnivariate(SharedAxesLevelTests):\n\n    def test_hue(self, long_df):\n\n        ax = ecdfplot(long_df, x=\"x\", hue=\"a\")\n\n        for line, color in zip(ax.lines[::-1], color_palette()):\n            assert_colors_equal(line.get_color(), color)\n\n    def test_line_kwargs(self, long_df):\n\n        color = \"r\"\n        ls = \"--\"\n        lw = 3\n        ax = ecdfplot(long_df, x=\"x\", color=color, ls=ls, lw=lw)\n\n        for line in ax.lines:\n            assert_colors_equal(line.get_color(), color)\n            assert line.get_linestyle() == ls\n            assert line.get_linewidth() == lw\n\n    @pytest.mark.parametrize(\"data_var\", [\"x\", \"y\"])\n    def test_drawstyle(self, flat_series, data_var):\n\n        ax = ecdfplot(**{data_var: flat_series})\n        drawstyles = dict(x=\"steps-post\", y=\"steps-pre\")\n        assert ax.lines[0].get_drawstyle() == drawstyles[data_var]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestECDFPlotUnivariate.test_proportion_limits_TestECDFPlotUnivariate.test_proportion_limits.assert_sticky_edges_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestECDFPlotUnivariate.test_proportion_limits_TestECDFPlotUnivariate.test_proportion_limits.assert_sticky_edges_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 2126, "end_line": 2136, "span_ids": ["TestECDFPlotUnivariate.test_proportion_limits"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestECDFPlotUnivariate(SharedAxesLevelTests):\n\n    @pytest.mark.parametrize(\n        \"data_var,stat_var\", [[\"x\", \"y\"], [\"y\", \"x\"]],\n    )\n    def test_proportion_limits(self, flat_series, data_var, stat_var):\n\n        ax = ecdfplot(**{data_var: flat_series})\n        data = getattr(ax.lines[0], f\"get_{stat_var}data\")()\n        assert data[0] == 0\n        assert data[-1] == 1\n        sticky_edges = getattr(ax.lines[0].sticky_edges, stat_var)\n        assert sticky_edges[:] == [0, 1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestECDFPlotUnivariate.test_proportion_limits_complementary_TestECDFPlotUnivariate.test_proportion_limits_complementary.assert_sticky_edges_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestECDFPlotUnivariate.test_proportion_limits_complementary_TestECDFPlotUnivariate.test_proportion_limits_complementary.assert_sticky_edges_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 2138, "end_line": 2148, "span_ids": ["TestECDFPlotUnivariate.test_proportion_limits_complementary"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestECDFPlotUnivariate(SharedAxesLevelTests):\n\n    @pytest.mark.parametrize(\n        \"data_var,stat_var\", [[\"x\", \"y\"], [\"y\", \"x\"]],\n    )\n    def test_proportion_limits_complementary(self, flat_series, data_var, stat_var):\n\n        ax = ecdfplot(**{data_var: flat_series}, complementary=True)\n        data = getattr(ax.lines[0], f\"get_{stat_var}data\")()\n        assert data[0] == 1\n        assert data[-1] == 0\n        sticky_edges = getattr(ax.lines[0].sticky_edges, stat_var)\n        assert sticky_edges[:] == [0, 1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestECDFPlotUnivariate.test_proportion_count_TestECDFPlotUnivariate.test_proportion_count.assert_sticky_edges_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestECDFPlotUnivariate.test_proportion_count_TestECDFPlotUnivariate.test_proportion_count.assert_sticky_edges_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 2150, "end_line": 2161, "span_ids": ["TestECDFPlotUnivariate.test_proportion_count"], "tokens": 149}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestECDFPlotUnivariate(SharedAxesLevelTests):\n\n    @pytest.mark.parametrize(\n        \"data_var,stat_var\", [[\"x\", \"y\"], [\"y\", \"x\"]],\n    )\n    def test_proportion_count(self, flat_series, data_var, stat_var):\n\n        n = len(flat_series)\n        ax = ecdfplot(**{data_var: flat_series}, stat=\"count\")\n        data = getattr(ax.lines[0], f\"get_{stat_var}data\")()\n        assert data[0] == 0\n        assert data[-1] == n\n        sticky_edges = getattr(ax.lines[0].sticky_edges, stat_var)\n        assert sticky_edges[:] == [0, n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestECDFPlotUnivariate.test_weights_TestECDFPlotUnivariate.test_bivariate_error.with_pytest_raises_NotImp.ecdfplot_data_long_df_x_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestECDFPlotUnivariate.test_weights_TestECDFPlotUnivariate.test_bivariate_error.with_pytest_raises_NotImp.ecdfplot_data_long_df_x_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 2163, "end_line": 2172, "span_ids": ["TestECDFPlotUnivariate.test_bivariate_error", "TestECDFPlotUnivariate.test_weights"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestECDFPlotUnivariate(SharedAxesLevelTests):\n\n    def test_weights(self):\n\n        ax = ecdfplot(x=[1, 2, 3], weights=[1, 1, 2])\n        y = ax.lines[0].get_ydata()\n        assert_array_equal(y, [0, .25, .5, 1])\n\n    def test_bivariate_error(self, long_df):\n\n        with pytest.raises(NotImplementedError, match=\"Bivariate ECDF plots\"):\n            ecdfplot(data=long_df, x=\"x\", y=\"y\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestECDFPlotUnivariate.test_log_scale_TestECDFPlotUnivariate.test_log_scale.assert_array_almost_equal": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestECDFPlotUnivariate.test_log_scale_TestECDFPlotUnivariate.test_log_scale.assert_array_almost_equal", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 2174, "end_line": 2185, "span_ids": ["TestECDFPlotUnivariate.test_log_scale"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestECDFPlotUnivariate(SharedAxesLevelTests):\n\n    def test_log_scale(self, long_df):\n\n        ax1, ax2 = plt.figure().subplots(2)\n\n        ecdfplot(data=long_df, x=\"z\", ax=ax1)\n        ecdfplot(data=long_df, x=\"z\", log_scale=True, ax=ax2)\n\n        # Ignore first point, which either -inf (in linear) or 0 (in log)\n        line1 = ax1.lines[0].get_xydata()[1:]\n        line2 = ax2.lines[0].get_xydata()[1:]\n\n        assert_array_almost_equal(line1, line2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot_TestDisPlot.test_versus_single_histplot.if_kwargs_.assert_plots_equal_ax_g2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot_TestDisPlot.test_versus_single_histplot.if_kwargs_.assert_plots_equal_ax_g2", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 2188, "end_line": 2223, "span_ids": ["TestDisPlot.test_versus_single_histplot", "TestDisPlot"], "tokens": 326}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDisPlot:\n\n    # TODO probably good to move these utility attributes/methods somewhere else\n    @pytest.mark.parametrize(\n        \"kwargs\", [\n            dict(),\n            dict(x=\"x\"),\n            dict(x=\"t\"),\n            dict(x=\"a\"),\n            dict(x=\"z\", log_scale=True),\n            dict(x=\"x\", binwidth=4),\n            dict(x=\"x\", weights=\"f\", bins=5),\n            dict(x=\"x\", color=\"green\", linewidth=2, binwidth=4),\n            dict(x=\"x\", hue=\"a\", fill=False),\n            dict(x=\"y\", hue=\"a\", fill=False),\n            dict(x=\"x\", hue=\"a\", multiple=\"stack\"),\n            dict(x=\"x\", hue=\"a\", element=\"step\"),\n            dict(x=\"x\", hue=\"a\", palette=\"muted\"),\n            dict(x=\"x\", hue=\"a\", kde=True),\n            dict(x=\"x\", hue=\"a\", stat=\"density\", common_norm=False),\n            dict(x=\"x\", y=\"y\"),\n        ],\n    )\n    def test_versus_single_histplot(self, long_df, kwargs):\n\n        ax = histplot(long_df, **kwargs)\n        g = displot(long_df, **kwargs)\n        assert_plots_equal(ax, g.ax)\n\n        if ax.legend_ is not None:\n            assert_legends_equal(ax.legend_, g._legend)\n\n        if kwargs:\n            long_df[\"_\"] = \"_\"\n            g2 = displot(long_df, col=\"_\", **kwargs)\n            assert_plots_equal(ax, g2.ax)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_versus_single_kdeplot_TestDisPlot.test_versus_single_kdeplot.if_kwargs_.assert_plots_equal_ax_g2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_versus_single_kdeplot_TestDisPlot.test_versus_single_kdeplot.if_kwargs_.assert_plots_equal_ax_g2", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 2225, "end_line": 2253, "span_ids": ["TestDisPlot.test_versus_single_kdeplot"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDisPlot:\n\n    @pytest.mark.parametrize(\n        \"kwargs\", [\n            dict(),\n            dict(x=\"x\"),\n            dict(x=\"t\"),\n            dict(x=\"z\", log_scale=True),\n            dict(x=\"x\", bw_adjust=.5),\n            dict(x=\"x\", weights=\"f\"),\n            dict(x=\"x\", color=\"green\", linewidth=2),\n            dict(x=\"x\", hue=\"a\", multiple=\"stack\"),\n            dict(x=\"x\", hue=\"a\", fill=True),\n            dict(x=\"y\", hue=\"a\", fill=False),\n            dict(x=\"x\", hue=\"a\", palette=\"muted\"),\n            dict(x=\"x\", y=\"y\"),\n        ],\n    )\n    def test_versus_single_kdeplot(self, long_df, kwargs):\n\n        ax = kdeplot(data=long_df, **kwargs)\n        g = displot(long_df, kind=\"kde\", **kwargs)\n        assert_plots_equal(ax, g.ax)\n\n        if ax.legend_ is not None:\n            assert_legends_equal(ax.legend_, g._legend)\n\n        if kwargs:\n            long_df[\"_\"] = \"_\"\n            g2 = displot(long_df, kind=\"kde\", col=\"_\", **kwargs)\n            assert_plots_equal(ax, g2.ax)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_versus_single_ecdfplot_TestDisPlot.test_versus_single_ecdfplot.if_kwargs_.assert_plots_equal_ax_g2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_versus_single_ecdfplot_TestDisPlot.test_versus_single_ecdfplot.if_kwargs_.assert_plots_equal_ax_g2", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 2255, "end_line": 2281, "span_ids": ["TestDisPlot.test_versus_single_ecdfplot"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDisPlot:\n\n    @pytest.mark.parametrize(\n        \"kwargs\", [\n            dict(),\n            dict(x=\"x\"),\n            dict(x=\"t\"),\n            dict(x=\"z\", log_scale=True),\n            dict(x=\"x\", weights=\"f\"),\n            dict(y=\"x\"),\n            dict(x=\"x\", color=\"green\", linewidth=2),\n            dict(x=\"x\", hue=\"a\", complementary=True),\n            dict(x=\"x\", hue=\"a\", stat=\"count\"),\n            dict(x=\"x\", hue=\"a\", palette=\"muted\"),\n        ],\n    )\n    def test_versus_single_ecdfplot(self, long_df, kwargs):\n\n        ax = ecdfplot(data=long_df, **kwargs)\n        g = displot(long_df, kind=\"ecdf\", **kwargs)\n        assert_plots_equal(ax, g.ax)\n\n        if ax.legend_ is not None:\n            assert_legends_equal(ax.legend_, g._legend)\n\n        if kwargs:\n            long_df[\"_\"] = \"_\"\n            g2 = displot(long_df, kind=\"ecdf\", col=\"_\", **kwargs)\n            assert_plots_equal(ax, g2.ax)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_with_rug_TestDisPlot.test_with_rug.assert_plots_equal_ax_g2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_with_rug_TestDisPlot.test_with_rug.assert_plots_equal_ax_g2", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 2283, "end_line": 2303, "span_ids": ["TestDisPlot.test_with_rug"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDisPlot:\n\n    @pytest.mark.parametrize(\n        \"kwargs\", [\n            dict(x=\"x\"),\n            dict(x=\"x\", y=\"y\"),\n            dict(x=\"x\", hue=\"a\"),\n        ]\n    )\n    def test_with_rug(self, long_df, kwargs):\n\n        ax = plt.figure().subplots()\n        histplot(data=long_df, **kwargs, ax=ax)\n        rugplot(data=long_df, **kwargs, ax=ax)\n\n        g = displot(long_df, rug=True, **kwargs)\n\n        assert_plots_equal(ax, g.ax, labels=False)\n\n        long_df[\"_\"] = \"_\"\n        g2 = displot(long_df, col=\"_\", rug=True, **kwargs)\n\n        assert_plots_equal(ax, g2.ax, labels=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_facets_TestDisPlot.test_facets.for_i_line_in_enumerate_.assert_text_in_facet_ax_g": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_facets_TestDisPlot.test_facets.for_i_line_in_enumerate_.assert_text_in_facet_ax_g", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 2305, "end_line": 2322, "span_ids": ["TestDisPlot.test_facets"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDisPlot:\n\n    @pytest.mark.parametrize(\n        \"facet_var\", [\"col\", \"row\"],\n    )\n    def test_facets(self, long_df, facet_var):\n\n        kwargs = {facet_var: \"a\"}\n        ax = kdeplot(data=long_df, x=\"x\", hue=\"a\")\n        g = displot(long_df, x=\"x\", kind=\"kde\", **kwargs)\n\n        legend_texts = ax.legend_.get_texts()\n\n        for i, line in enumerate(ax.lines[::-1]):\n            facet_ax = g.axes.flat[i]\n            facet_line = facet_ax.lines[0]\n            assert_array_equal(line.get_xydata(), facet_line.get_xydata())\n\n            text = legend_texts[i].get_text()\n            assert text in facet_ax.get_title()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_facet_multiple_TestDisPlot.test_facet_multiple.assert_plots_equal_ax_g_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_facet_multiple_TestDisPlot.test_facet_multiple.assert_plots_equal_ax_g_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 2324, "end_line": 2339, "span_ids": ["TestDisPlot.test_facet_multiple"], "tokens": 160}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDisPlot:\n\n    @pytest.mark.parametrize(\"multiple\", [\"dodge\", \"stack\", \"fill\"])\n    def test_facet_multiple(self, long_df, multiple):\n\n        bins = np.linspace(0, 20, 5)\n        ax = histplot(\n            data=long_df[long_df[\"c\"] == 0],\n            x=\"x\", hue=\"a\", hue_order=[\"a\", \"b\", \"c\"],\n            multiple=multiple, bins=bins,\n        )\n\n        g = displot(\n            data=long_df, x=\"x\", hue=\"a\", col=\"c\", hue_order=[\"a\", \"b\", \"c\"],\n            multiple=multiple, bins=bins,\n        )\n\n        assert_plots_equal(ax, g.axes_dict[0])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_ax_warning_TestDisPlot.test_bivariate_ecdf_error.with_pytest_raises_NotImp.displot_long_df_x_x_y": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_ax_warning_TestDisPlot.test_bivariate_ecdf_error.with_pytest_raises_NotImp.displot_long_df_x_x_y", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 2341, "end_line": 2370, "span_ids": ["TestDisPlot.test_bivariate_ecdf_error", "TestDisPlot.test_array_faceting", "TestDisPlot.test_ax_warning", "TestDisPlot.test_legend", "TestDisPlot.test_empty"], "tokens": 251}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDisPlot:\n\n    def test_ax_warning(self, long_df):\n\n        ax = plt.figure().subplots()\n        with pytest.warns(UserWarning, match=\"`displot` is a figure-level\"):\n            displot(long_df, x=\"x\", ax=ax)\n\n    @pytest.mark.parametrize(\"key\", [\"col\", \"row\"])\n    def test_array_faceting(self, long_df, key):\n\n        a = long_df[\"a\"].to_numpy()\n        vals = categorical_order(a)\n        g = displot(long_df, x=\"x\", **{key: a})\n        assert len(g.axes.flat) == len(vals)\n        for ax, val in zip(g.axes.flat, vals):\n            assert val in ax.get_title()\n\n    def test_legend(self, long_df):\n\n        g = displot(long_df, x=\"x\", hue=\"a\")\n        assert g._legend is not None\n\n    def test_empty(self):\n\n        g = displot(x=[], y=[])\n        assert isinstance(g, FacetGrid)\n\n    def test_bivariate_ecdf_error(self, long_df):\n\n        with pytest.raises(NotImplementedError):\n            displot(long_df, x=\"x\", y=\"y\", kind=\"ecdf\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_bivariate_kde_norm_TestDisPlot.test_bivariate_kde_norm.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_bivariate_kde_norm_TestDisPlot.test_bivariate_kde_norm.None_2", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 2372, "end_line": 2385, "span_ids": ["TestDisPlot.test_bivariate_kde_norm"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDisPlot:\n\n    def test_bivariate_kde_norm(self, rng):\n\n        x, y = rng.normal(0, 1, (2, 100))\n        z = [0] * 80 + [1] * 20\n\n        g = displot(x=x, y=y, col=z, kind=\"kde\", levels=10)\n        l1 = sum(bool(get_contour_coords(c)) for c in g.axes.flat[0].collections)\n        l2 = sum(bool(get_contour_coords(c)) for c in g.axes.flat[1].collections)\n        assert l1 > l2\n\n        g = displot(x=x, y=y, col=z, kind=\"kde\", levels=10, common_norm=False)\n        l1 = sum(bool(get_contour_coords(c)) for c in g.axes.flat[0].collections)\n        l2 = sum(bool(get_contour_coords(c)) for c in g.axes.flat[1].collections)\n        assert l1 == l2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_bivariate_hist_norm_TestDisPlot.test_bivariate_hist_norm.assert_clim1_1_clim2_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_bivariate_hist_norm_TestDisPlot.test_bivariate_hist_norm.assert_clim1_1_clim2_1", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 2387, "end_line": 2400, "span_ids": ["TestDisPlot.test_bivariate_hist_norm"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDisPlot:\n\n    def test_bivariate_hist_norm(self, rng):\n\n        x, y = rng.normal(0, 1, (2, 100))\n        z = [0] * 80 + [1] * 20\n\n        g = displot(x=x, y=y, col=z, kind=\"hist\")\n        clim1 = g.axes.flat[0].collections[0].get_clim()\n        clim2 = g.axes.flat[1].collections[0].get_clim()\n        assert clim1 == clim2\n\n        g = displot(x=x, y=y, col=z, kind=\"hist\", common_norm=False)\n        clim1 = g.axes.flat[0].collections[0].get_clim()\n        clim2 = g.axes.flat[1].collections[0].get_clim()\n        assert clim1[1] > clim2[1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_facetgrid_data_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestDisPlot.test_facetgrid_data_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 2402, "end_line": 2422, "span_ids": ["integrate", "TestDisPlot.test_facetgrid_data"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDisPlot:\n\n    def test_facetgrid_data(self, long_df):\n\n        g = displot(\n            data=long_df.to_dict(orient=\"list\"),\n            x=\"z\",\n            hue=long_df[\"a\"].rename(\"hue_var\"),\n            col=long_df[\"c\"].to_numpy(),\n        )\n        expected_cols = set(long_df.columns.to_list() + [\"hue_var\", \"_col_\"])\n        assert set(g.data.columns) == expected_cols\n        assert_array_equal(g.data[\"hue_var\"], long_df[\"a\"])\n        assert_array_equal(g.data[\"_col_\"], long_df[\"c\"])\n\n\ndef integrate(y, x):\n    \"\"\"\"Simple numerical integration for testing KDE code.\"\"\"\n    y = np.asarray(y)\n    x = np.asarray(x)\n    dx = np.diff(x)\n    return (dx * y[:-1] + dx * y[1:]).sum() / 2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_docstrings.py_from_seaborn__docstrings__": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_docstrings.py_from_seaborn__docstrings__", "embedding": null, "metadata": {"file_path": "tests/test_docstrings.py", "file_name": "test_docstrings.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 59, "span_ids": ["impl", "example_func", "TestDocstringComponents.test_from_function", "TestDocstringComponents.test_from_dict", "TestDocstringComponents", "ExampleClass", "ExampleClass.example_method", "TestDocstringComponents.test_from_nested_components", "imports", "TestDocstringComponents.test_from_method"], "tokens": 259}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from seaborn._docstrings import DocstringComponents\n\n\nEXAMPLE_DICT = dict(\n    param_a=\"\"\"\na : str\n    The first parameter.\n    \"\"\",\n)\n\n\nclass ExampleClass:\n    def example_method(self):\n        \"\"\"An example method.\n\n        Parameters\n        ----------\n        a : str\n           A method parameter.\n\n        \"\"\"\n\n\ndef example_func():\n    \"\"\"An example function.\n\n    Parameters\n    ----------\n    a : str\n        A function parameter.\n\n    \"\"\"\n\n\nclass TestDocstringComponents:\n\n    def test_from_dict(self):\n\n        obj = DocstringComponents(EXAMPLE_DICT)\n        assert obj.param_a == \"a : str\\n    The first parameter.\"\n\n    def test_from_nested_components(self):\n\n        obj_inner = DocstringComponents(EXAMPLE_DICT)\n        obj_outer = DocstringComponents.from_nested_components(inner=obj_inner)\n        assert obj_outer.inner.param_a == \"a : str\\n    The first parameter.\"\n\n    def test_from_function(self):\n\n        obj = DocstringComponents.from_function_params(example_func)\n        assert obj.a == \"a : str\\n    A function parameter.\"\n\n    def test_from_method(self):\n\n        obj = DocstringComponents.from_function_params(\n            ExampleClass.example_method\n        )\n        assert obj.a == \"a : str\\n    A method parameter.\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_tempfile_from_seaborn__testing_imp": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_tempfile_from_seaborn__testing_imp", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 33, "span_ids": ["impl:14", "impl", "impl:8", "imports:12", "impl:2", "imports:9", "imports:10", "imports:11", "impl:15", "imports", "imports:7"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import tempfile\nimport copy\n\nimport numpy as np\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\ntry:\n    from scipy.spatial import distance\n    from scipy.cluster import hierarchy\n    _no_scipy = False\nexcept ImportError:\n    _no_scipy = True\n\ntry:\n    import fastcluster\n    assert fastcluster\n    _no_fastcluster = False\nexcept ImportError:\n    _no_fastcluster = True\n\nimport numpy.testing as npt\ntry:\n    import pandas.testing as pdt\nexcept ImportError:\n    import pandas.util.testing as pdt\nimport pytest\n\nfrom seaborn import matrix as mat\nfrom seaborn import color_palette\nfrom seaborn._compat import get_colormap\nfrom seaborn._testing import assert_colors_equal", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap_TestHeatmap.test_df_input.assert_p_ylabel_lette": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap_TestHeatmap.test_df_input.assert_p_ylabel_lette", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 35, "end_line": 71, "span_ids": ["TestHeatmap", "TestHeatmap.test_ndarray_input", "TestHeatmap.test_df_input"], "tokens": 335}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHeatmap:\n    rs = np.random.RandomState(sum(map(ord, \"heatmap\")))\n\n    x_norm = rs.randn(4, 8)\n    letters = pd.Series([\"A\", \"B\", \"C\", \"D\"], name=\"letters\")\n    df_norm = pd.DataFrame(x_norm, index=letters)\n\n    x_unif = rs.rand(20, 13)\n    df_unif = pd.DataFrame(x_unif)\n\n    default_kws = dict(vmin=None, vmax=None, cmap=None, center=None,\n                       robust=False, annot=False, fmt=\".2f\", annot_kws=None,\n                       cbar=True, cbar_kws=None, mask=None)\n\n    def test_ndarray_input(self):\n\n        p = mat._HeatMapper(self.x_norm, **self.default_kws)\n        npt.assert_array_equal(p.plot_data, self.x_norm)\n        pdt.assert_frame_equal(p.data, pd.DataFrame(self.x_norm))\n\n        npt.assert_array_equal(p.xticklabels, np.arange(8))\n        npt.assert_array_equal(p.yticklabels, np.arange(4))\n\n        assert p.xlabel == \"\"\n        assert p.ylabel == \"\"\n\n    def test_df_input(self):\n\n        p = mat._HeatMapper(self.df_norm, **self.default_kws)\n        npt.assert_array_equal(p.plot_data, self.x_norm)\n        pdt.assert_frame_equal(p.data, self.df_norm)\n\n        npt.assert_array_equal(p.xticklabels, np.arange(8))\n        npt.assert_array_equal(p.yticklabels, self.letters.values)\n\n        assert p.xlabel == \"\"\n        assert p.ylabel == \"letters\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_df_multindex_input_TestHeatmap.test_df_multindex_input.assert_p_xlabel_lette": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_df_multindex_input_TestHeatmap.test_df_multindex_input.assert_p_xlabel_lette", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 73, "end_line": 91, "span_ids": ["TestHeatmap.test_df_multindex_input"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHeatmap:\n\n    def test_df_multindex_input(self):\n\n        df = self.df_norm.copy()\n        index = pd.MultiIndex.from_tuples([(\"A\", 1), (\"B\", 2),\n                                           (\"C\", 3), (\"D\", 4)],\n                                          names=[\"letter\", \"number\"])\n        index.name = \"letter-number\"\n        df.index = index\n\n        p = mat._HeatMapper(df, **self.default_kws)\n\n        combined_tick_labels = [\"A-1\", \"B-2\", \"C-3\", \"D-4\"]\n        npt.assert_array_equal(p.yticklabels, combined_tick_labels)\n        assert p.ylabel == \"letter-number\"\n\n        p = mat._HeatMapper(df.T, **self.default_kws)\n\n        npt.assert_array_equal(p.xticklabels, combined_tick_labels)\n        assert p.xlabel == \"letter-number\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_mask_input_TestHeatmap.test_mask_limits.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_mask_input_TestHeatmap.test_mask_limits.None_5", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 93, "end_line": 122, "span_ids": ["TestHeatmap.test_mask_input", "TestHeatmap.test_mask_limits"], "tokens": 282}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHeatmap:\n\n    @pytest.mark.parametrize(\"dtype\", [float, np.int64, object])\n    def test_mask_input(self, dtype):\n        kws = self.default_kws.copy()\n\n        mask = self.x_norm > 0\n        kws['mask'] = mask\n        data = self.x_norm.astype(dtype)\n        p = mat._HeatMapper(data, **kws)\n        plot_data = np.ma.masked_where(mask, data)\n\n        npt.assert_array_equal(p.plot_data, plot_data)\n\n    def test_mask_limits(self):\n        \"\"\"Make sure masked cells are not used to calculate extremes\"\"\"\n\n        kws = self.default_kws.copy()\n\n        mask = self.x_norm > 0\n        kws['mask'] = mask\n        p = mat._HeatMapper(self.x_norm, **kws)\n\n        assert p.vmax == np.ma.array(self.x_norm, mask=mask).max()\n        assert p.vmin == np.ma.array(self.x_norm, mask=mask).min()\n\n        mask = self.x_norm < 0\n        kws['mask'] = mask\n        p = mat._HeatMapper(self.x_norm, **kws)\n\n        assert p.vmin == np.ma.array(self.x_norm, mask=mask).min()\n        assert p.vmax == np.ma.array(self.x_norm, mask=mask).max()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_default_vlims_TestHeatmap.test_custom_vlim_colors.npt_assert_array_almost_e": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_default_vlims_TestHeatmap.test_custom_vlim_colors.npt_assert_array_almost_e", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 124, "end_line": 218, "span_ids": ["TestHeatmap.test_default_colors", "TestHeatmap.test_centered_vlims", "TestHeatmap.test_robust_vlims", "TestHeatmap.test_custom_diverging_vlims", "TestHeatmap.test_mask", "TestHeatmap.test_custom_vlim_colors", "TestHeatmap.test_custom_cmap", "TestHeatmap.test_custom_sequential_vlims", "TestHeatmap.test_array_with_nans", "TestHeatmap.test_default_vlims"], "tokens": 801}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHeatmap:\n\n    def test_default_vlims(self):\n\n        p = mat._HeatMapper(self.df_unif, **self.default_kws)\n        assert p.vmin == self.x_unif.min()\n        assert p.vmax == self.x_unif.max()\n\n    def test_robust_vlims(self):\n\n        kws = self.default_kws.copy()\n        kws[\"robust\"] = True\n        p = mat._HeatMapper(self.df_unif, **kws)\n\n        assert p.vmin == np.percentile(self.x_unif, 2)\n        assert p.vmax == np.percentile(self.x_unif, 98)\n\n    def test_custom_sequential_vlims(self):\n\n        kws = self.default_kws.copy()\n        kws[\"vmin\"] = 0\n        kws[\"vmax\"] = 1\n        p = mat._HeatMapper(self.df_unif, **kws)\n\n        assert p.vmin == 0\n        assert p.vmax == 1\n\n    def test_custom_diverging_vlims(self):\n\n        kws = self.default_kws.copy()\n        kws[\"vmin\"] = -4\n        kws[\"vmax\"] = 5\n        kws[\"center\"] = 0\n        p = mat._HeatMapper(self.df_norm, **kws)\n\n        assert p.vmin == -4\n        assert p.vmax == 5\n\n    def test_array_with_nans(self):\n\n        x1 = self.rs.rand(10, 10)\n        nulls = np.zeros(10) * np.nan\n        x2 = np.c_[x1, nulls]\n\n        m1 = mat._HeatMapper(x1, **self.default_kws)\n        m2 = mat._HeatMapper(x2, **self.default_kws)\n\n        assert m1.vmin == m2.vmin\n        assert m1.vmax == m2.vmax\n\n    def test_mask(self):\n\n        df = pd.DataFrame(data={'a': [1, 1, 1],\n                                'b': [2, np.nan, 2],\n                                'c': [3, 3, np.nan]})\n\n        kws = self.default_kws.copy()\n        kws[\"mask\"] = np.isnan(df.values)\n\n        m = mat._HeatMapper(df, **kws)\n\n        npt.assert_array_equal(np.isnan(m.plot_data.data),\n                               m.plot_data.mask)\n\n    def test_custom_cmap(self):\n\n        kws = self.default_kws.copy()\n        kws[\"cmap\"] = \"BuGn\"\n        p = mat._HeatMapper(self.df_unif, **kws)\n        assert p.cmap == mpl.cm.BuGn\n\n    def test_centered_vlims(self):\n\n        kws = self.default_kws.copy()\n        kws[\"center\"] = .5\n\n        p = mat._HeatMapper(self.df_unif, **kws)\n\n        assert p.vmin == self.df_unif.values.min()\n        assert p.vmax == self.df_unif.values.max()\n\n    def test_default_colors(self):\n\n        vals = np.linspace(.2, 1, 9)\n        cmap = mpl.cm.binary\n        ax = mat.heatmap([vals], cmap=cmap)\n        fc = ax.collections[0].get_facecolors()\n        cvals = np.linspace(0, 1, 9)\n        npt.assert_array_almost_equal(fc, cmap(cvals), 2)\n\n    def test_custom_vlim_colors(self):\n\n        vals = np.linspace(.2, 1, 9)\n        cmap = mpl.cm.binary\n        ax = mat.heatmap([vals], vmin=0, cmap=cmap)\n        fc = ax.collections[0].get_facecolors()\n        npt.assert_array_almost_equal(fc, cmap(vals), 2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_custom_center_colors_TestHeatmap.test_cmap_with_properties.None_8": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_custom_center_colors_TestHeatmap.test_cmap_with_properties.None_8", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 221, "end_line": 266, "span_ids": ["TestHeatmap.test_custom_center_colors", "TestHeatmap.test_cmap_with_properties"], "tokens": 470}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHeatmap:\n\n    def test_custom_center_colors(self):\n\n        vals = np.linspace(.2, 1, 9)\n        cmap = mpl.cm.binary\n        ax = mat.heatmap([vals], center=.5, cmap=cmap)\n        fc = ax.collections[0].get_facecolors()\n        npt.assert_array_almost_equal(fc, cmap(vals), 2)\n\n    def test_cmap_with_properties(self):\n\n        kws = self.default_kws.copy()\n        cmap = copy.copy(get_colormap(\"BrBG\"))\n        cmap.set_bad(\"red\")\n        kws[\"cmap\"] = cmap\n        hm = mat._HeatMapper(self.df_unif, **kws)\n        npt.assert_array_equal(\n            cmap(np.ma.masked_invalid([np.nan])),\n            hm.cmap(np.ma.masked_invalid([np.nan])))\n\n        kws[\"center\"] = 0.5\n        hm = mat._HeatMapper(self.df_unif, **kws)\n        npt.assert_array_equal(\n            cmap(np.ma.masked_invalid([np.nan])),\n            hm.cmap(np.ma.masked_invalid([np.nan])))\n\n        kws = self.default_kws.copy()\n        cmap = copy.copy(get_colormap(\"BrBG\"))\n        cmap.set_under(\"red\")\n        kws[\"cmap\"] = cmap\n        hm = mat._HeatMapper(self.df_unif, **kws)\n        npt.assert_array_equal(cmap(-np.inf), hm.cmap(-np.inf))\n\n        kws[\"center\"] = .5\n        hm = mat._HeatMapper(self.df_unif, **kws)\n        npt.assert_array_equal(cmap(-np.inf), hm.cmap(-np.inf))\n\n        kws = self.default_kws.copy()\n        cmap = copy.copy(get_colormap(\"BrBG\"))\n        cmap.set_over(\"red\")\n        kws[\"cmap\"] = cmap\n        hm = mat._HeatMapper(self.df_unif, **kws)\n        npt.assert_array_equal(cmap(-np.inf), hm.cmap(-np.inf))\n\n        kws[\"center\"] = .5\n        hm = mat._HeatMapper(self.df_unif, **kws)\n        npt.assert_array_equal(cmap(np.inf), hm.cmap(np.inf))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_custom_ticklabel_interval_TestHeatmap.test_custom_ticklabel_interval.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_custom_ticklabel_interval_TestHeatmap.test_custom_ticklabel_interval.None_3", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 285, "end_line": 299, "span_ids": ["TestHeatmap.test_custom_ticklabel_interval"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHeatmap:\n\n    def test_custom_ticklabel_interval(self):\n\n        kws = self.default_kws.copy()\n        xstep, ystep = 2, 3\n        kws['xticklabels'] = xstep\n        kws['yticklabels'] = ystep\n        p = mat._HeatMapper(self.df_norm, **kws)\n\n        nx, ny = self.df_norm.T.shape\n        npt.assert_array_equal(p.xticks, np.arange(0, nx, xstep) + .5)\n        npt.assert_array_equal(p.yticks, np.arange(0, ny, ystep) + .5)\n        npt.assert_array_equal(p.xticklabels,\n                               self.df_norm.columns[0:nx:xstep])\n        npt.assert_array_equal(p.yticklabels,\n                               self.df_norm.index[0:ny:ystep])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_heatmap_annotation_TestHeatmap.test_heatmap_annotation_overwrite_kws.for_text_in_ax_texts_.assert_text_get_va_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_heatmap_annotation_TestHeatmap.test_heatmap_annotation_overwrite_kws.for_text_in_ax_texts_.assert_text_get_va_", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 301, "end_line": 317, "span_ids": ["TestHeatmap.test_heatmap_annotation_overwrite_kws", "TestHeatmap.test_heatmap_annotation"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHeatmap:\n\n    def test_heatmap_annotation(self):\n\n        ax = mat.heatmap(self.df_norm, annot=True, fmt=\".1f\",\n                         annot_kws={\"fontsize\": 14})\n        for val, text in zip(self.x_norm.flat, ax.texts):\n            assert text.get_text() == f\"{val:.1f}\"\n            assert text.get_fontsize() == 14\n\n    def test_heatmap_annotation_overwrite_kws(self):\n\n        annot_kws = dict(color=\"0.3\", va=\"bottom\", ha=\"left\")\n        ax = mat.heatmap(self.df_norm, annot=True, fmt=\".1f\",\n                         annot_kws=annot_kws)\n        for text in ax.texts:\n            assert text.get_color() == \"0.3\"\n            assert text.get_ha() == \"left\"\n            assert text.get_va() == \"bottom\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_heatmap_annotation_with_mask_TestHeatmap.test_heatmap_annotation_with_mask.for_val_text_in_zip_df_m.assert_f_val_1f_te": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_heatmap_annotation_with_mask_TestHeatmap.test_heatmap_annotation_with_mask.for_val_text_in_zip_df_m.assert_f_val_1f_te", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 319, "end_line": 329, "span_ids": ["TestHeatmap.test_heatmap_annotation_with_mask"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHeatmap:\n\n    def test_heatmap_annotation_with_mask(self):\n\n        df = pd.DataFrame(data={'a': [1, 1, 1],\n                                'b': [2, np.nan, 2],\n                                'c': [3, 3, np.nan]})\n        mask = np.isnan(df.values)\n        df_masked = np.ma.masked_where(mask, df)\n        ax = mat.heatmap(df, annot=True, fmt='.1f', mask=mask)\n        assert len(df_masked.compressed()) == len(ax.texts)\n        for val, text in zip(df_masked.compressed(), ax.texts):\n            assert f\"{val:.1f}\" == text.get_text()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_heatmap_annotation_mesh_colors_TestHeatmap.test_heatmap_annotation_with_limited_ticklabels.for_val_text_in_zip_self.assert_text_get_text_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_heatmap_annotation_mesh_colors_TestHeatmap.test_heatmap_annotation_with_limited_ticklabels.for_val_text_in_zip_self.assert_text_get_text_", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 332, "end_line": 360, "span_ids": ["TestHeatmap.test_heatmap_annotation_with_limited_ticklabels", "TestHeatmap.test_heatmap_annotation_mesh_colors", "TestHeatmap.test_heatmap_annotation_different_shapes", "TestHeatmap.test_heatmap_annotation_other_data"], "tokens": 262}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHeatmap:\n\n    def test_heatmap_annotation_mesh_colors(self):\n\n        ax = mat.heatmap(self.df_norm, annot=True)\n        mesh = ax.collections[0]\n        assert len(mesh.get_facecolors()) == self.df_norm.values.size\n\n        plt.close(\"all\")\n\n    def test_heatmap_annotation_other_data(self):\n        annot_data = self.df_norm + 10\n\n        ax = mat.heatmap(self.df_norm, annot=annot_data, fmt=\".1f\",\n                         annot_kws={\"fontsize\": 14})\n\n        for val, text in zip(annot_data.values.flat, ax.texts):\n            assert text.get_text() == f\"{val:.1f}\"\n            assert text.get_fontsize() == 14\n\n    def test_heatmap_annotation_different_shapes(self):\n\n        annot_data = self.df_norm.iloc[:-1]\n        with pytest.raises(ValueError):\n            mat.heatmap(self.df_norm, annot=annot_data)\n\n    def test_heatmap_annotation_with_limited_ticklabels(self):\n        ax = mat.heatmap(self.df_norm, fmt=\".2f\", annot=True,\n                         xticklabels=False, yticklabels=False)\n        for val, text in zip(self.x_norm.flat, ax.texts):\n            assert text.get_text() == f\"{val:.2f}\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_heatmap_cbar_TestHeatmap.test_heatmap_cbar.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_heatmap_cbar_TestHeatmap.test_heatmap_cbar.None_5", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 355, "end_line": 370, "span_ids": ["TestHeatmap.test_heatmap_cbar"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHeatmap:\n\n    def test_heatmap_cbar(self):\n\n        f = plt.figure()\n        mat.heatmap(self.df_norm)\n        assert len(f.axes) == 2\n        plt.close(f)\n\n        f = plt.figure()\n        mat.heatmap(self.df_norm, cbar=False)\n        assert len(f.axes) == 1\n        plt.close(f)\n\n        f, (ax1, ax2) = plt.subplots(2)\n        mat.heatmap(self.df_norm, ax=ax1, cbar_ax=ax2)\n        assert len(f.axes) == 2\n        plt.close(f)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_heatmap_axes_TestHeatmap.test_heatmap_axes.assert_ax_get_ylim_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_heatmap_axes_TestHeatmap.test_heatmap_axes.assert_ax_get_ylim_", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 372, "end_line": 387, "span_ids": ["TestHeatmap.test_heatmap_axes"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHeatmap:\n\n    @pytest.mark.xfail(mpl.__version__ == \"3.1.1\",\n                       reason=\"matplotlib 3.1.1 bug\")\n    def test_heatmap_axes(self):\n\n        ax = mat.heatmap(self.df_norm)\n\n        xtl = [int(l.get_text()) for l in ax.get_xticklabels()]\n        assert xtl == list(self.df_norm.columns)\n        ytl = [l.get_text() for l in ax.get_yticklabels()]\n        assert ytl == list(self.df_norm.index)\n\n        assert ax.get_xlabel() == \"\"\n        assert ax.get_ylabel() == \"letters\"\n\n        assert ax.get_xlim() == (0, 8)\n        assert ax.get_ylim() == (4, 0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_heatmap_ticklabel_rotation_TestHeatmap.test_heatmap_ticklabel_rotation.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_heatmap_ticklabel_rotation_TestHeatmap.test_heatmap_ticklabel_rotation.None_3", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 389, "end_line": 415, "span_ids": ["TestHeatmap.test_heatmap_ticklabel_rotation"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHeatmap:\n\n    def test_heatmap_ticklabel_rotation(self):\n\n        f, ax = plt.subplots(figsize=(2, 2))\n        mat.heatmap(self.df_norm, xticklabels=1, yticklabels=1, ax=ax)\n\n        for t in ax.get_xticklabels():\n            assert t.get_rotation() == 0\n\n        for t in ax.get_yticklabels():\n            assert t.get_rotation() == 90\n\n        plt.close(f)\n\n        df = self.df_norm.copy()\n        df.columns = [str(c) * 10 for c in df.columns]\n        df.index = [i * 10 for i in df.index]\n\n        f, ax = plt.subplots(figsize=(2, 2))\n        mat.heatmap(df, xticklabels=1, yticklabels=1, ax=ax)\n\n        for t in ax.get_xticklabels():\n            assert t.get_rotation() == 90\n\n        for t in ax.get_yticklabels():\n            assert t.get_rotation() == 0\n\n        plt.close(f)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_heatmap_inner_lines_TestHeatmap.test_square_aspect.assert_obs_aspect_equ": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_heatmap_inner_lines_TestHeatmap.test_square_aspect.assert_obs_aspect_equ", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 417, "end_line": 431, "span_ids": ["TestHeatmap.test_heatmap_inner_lines", "TestHeatmap.test_square_aspect"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHeatmap:\n\n    def test_heatmap_inner_lines(self):\n\n        c = (0, 0, 1, 1)\n        ax = mat.heatmap(self.df_norm, linewidths=2, linecolor=c)\n        mesh = ax.collections[0]\n        assert mesh.get_linewidths()[0] == 2\n        assert tuple(mesh.get_edgecolor()[0]) == c\n\n    def test_square_aspect(self):\n\n        ax = mat.heatmap(self.df_norm, square=True)\n        obs_aspect = ax.get_aspect()\n        # mpl>3.3 returns 1 for setting \"equal\" aspect\n        # so test for the two possible equal outcomes\n        assert obs_aspect == \"equal\" or obs_aspect == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_mask_validation_TestHeatmap.test_mask_validation.None_1.mat__matrix_mask_self_df_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_mask_validation_TestHeatmap.test_mask_validation.None_1.mat__matrix_mask_self_df_", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 433, "end_line": 445, "span_ids": ["TestHeatmap.test_mask_validation"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHeatmap:\n\n    def test_mask_validation(self):\n\n        mask = mat._matrix_mask(self.df_norm, None)\n        assert mask.shape == self.df_norm.shape\n        assert mask.values.sum() == 0\n\n        with pytest.raises(ValueError):\n            bad_array_mask = self.rs.randn(3, 6) > 0\n            mat._matrix_mask(self.df_norm, bad_array_mask)\n\n        with pytest.raises(ValueError):\n            bad_df_mask = pd.DataFrame(self.rs.randn(4, 8) > 0)\n            mat._matrix_mask(self.df_norm, bad_df_mask)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_missing_data_mask_TestHeatmap.test_cbar_ticks.assert_len_ax2_collection": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_missing_data_mask_TestHeatmap.test_cbar_ticks.assert_len_ax2_collection", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 447, "end_line": 463, "span_ids": ["TestHeatmap.test_cbar_ticks", "TestHeatmap.test_missing_data_mask"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHeatmap:\n\n    def test_missing_data_mask(self):\n\n        data = pd.DataFrame(np.arange(4, dtype=float).reshape(2, 2))\n        data.loc[0, 0] = np.nan\n        mask = mat._matrix_mask(data, None)\n        npt.assert_array_equal(mask, [[True, False], [False, False]])\n\n        mask_in = np.array([[False, True], [False, False]])\n        mask_out = mat._matrix_mask(data, mask_in)\n        npt.assert_array_equal(mask_out, [[True, True], [False, False]])\n\n    def test_cbar_ticks(self):\n\n        f, (ax1, ax2) = plt.subplots(2)\n        mat.heatmap(self.df_norm, ax=ax1, cbar_ax=ax2,\n                    cbar_kws=dict(drawedges=True))\n        assert len(ax2.collections) == 2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram_TestDendrogram.if_not__no_scipy_.df_norm_leaves.np_asarray_df_norm_column": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram_TestDendrogram.if_not__no_scipy_.df_norm_leaves.np_asarray_df_norm_column", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 466, "end_line": 493, "span_ids": ["TestDendrogram"], "tokens": 285}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestDendrogram:\n\n    rs = np.random.RandomState(sum(map(ord, \"dendrogram\")))\n\n    default_kws = dict(linkage=None, metric='euclidean', method='single',\n                       axis=1, label=True, rotate=False)\n\n    x_norm = rs.randn(4, 8) + np.arange(8)\n    x_norm = (x_norm.T + np.arange(4)).T\n    letters = pd.Series([\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\"],\n                        name=\"letters\")\n\n    df_norm = pd.DataFrame(x_norm, columns=letters)\n\n    if not _no_scipy:\n        if _no_fastcluster:\n            x_norm_distances = distance.pdist(x_norm.T, metric='euclidean')\n            x_norm_linkage = hierarchy.linkage(x_norm_distances, method='single')\n        else:\n            x_norm_linkage = fastcluster.linkage_vector(x_norm.T,\n                                                        metric='euclidean',\n                                                        method='single')\n\n        x_norm_dendrogram = hierarchy.dendrogram(x_norm_linkage, no_plot=True,\n                                                 color_threshold=-np.inf)\n        x_norm_leaves = x_norm_dendrogram['leaves']\n        df_norm_leaves = np.asarray(df_norm.columns[x_norm_leaves])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_ndarray_input_TestDendrogram.test_ndarray_input.assert_p_ylabel_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_ndarray_input_TestDendrogram.test_ndarray_input.assert_p_ylabel_", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 495, "end_line": 509, "span_ids": ["TestDendrogram.test_ndarray_input"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestDendrogram:\n\n    def test_ndarray_input(self):\n        p = mat._DendrogramPlotter(self.x_norm, **self.default_kws)\n        npt.assert_array_equal(p.array.T, self.x_norm)\n        pdt.assert_frame_equal(p.data.T, pd.DataFrame(self.x_norm))\n\n        npt.assert_array_equal(p.linkage, self.x_norm_linkage)\n        assert p.dendrogram == self.x_norm_dendrogram\n\n        npt.assert_array_equal(p.reordered_ind, self.x_norm_leaves)\n\n        npt.assert_array_equal(p.xticklabels, self.x_norm_leaves)\n        npt.assert_array_equal(p.yticklabels, [])\n\n        assert p.xlabel is None\n        assert p.ylabel == ''", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_df_input_TestDendrogram.test_df_input.assert_p_ylabel_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_df_input_TestDendrogram.test_df_input.assert_p_ylabel_", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 511, "end_line": 525, "span_ids": ["TestDendrogram.test_df_input"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestDendrogram:\n\n    def test_df_input(self):\n        p = mat._DendrogramPlotter(self.df_norm, **self.default_kws)\n        npt.assert_array_equal(p.array.T, np.asarray(self.df_norm))\n        pdt.assert_frame_equal(p.data.T, self.df_norm)\n\n        npt.assert_array_equal(p.linkage, self.x_norm_linkage)\n        assert p.dendrogram == self.x_norm_dendrogram\n\n        npt.assert_array_equal(p.xticklabels,\n                               np.asarray(self.df_norm.columns)[\n                                   self.x_norm_leaves])\n        npt.assert_array_equal(p.yticklabels, [])\n\n        assert p.xlabel == 'letters'\n        assert p.ylabel == ''", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_df_multindex_input_TestDendrogram.test_df_multindex_input.assert_p_xlabel_lette": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_df_multindex_input_TestDendrogram.test_df_multindex_input.assert_p_xlabel_lette", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 527, "end_line": 544, "span_ids": ["TestDendrogram.test_df_multindex_input"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestDendrogram:\n\n    def test_df_multindex_input(self):\n\n        df = self.df_norm.copy()\n        index = pd.MultiIndex.from_tuples([(\"A\", 1), (\"B\", 2),\n                                           (\"C\", 3), (\"D\", 4)],\n                                          names=[\"letter\", \"number\"])\n        index.name = \"letter-number\"\n        df.index = index\n        kws = self.default_kws.copy()\n        kws['label'] = True\n\n        p = mat._DendrogramPlotter(df.T, **kws)\n\n        xticklabels = [\"A-1\", \"B-2\", \"C-3\", \"D-4\"]\n        xticklabels = [xticklabels[i] for i in p.reordered_ind]\n        npt.assert_array_equal(p.xticklabels, xticklabels)\n        npt.assert_array_equal(p.yticklabels, [])\n        assert p.xlabel == \"letter-number\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_axis0_input_TestDendrogram.test_axis0_input.assert_p_ylabel_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_axis0_input_TestDendrogram.test_axis0_input.assert_p_ylabel_", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 546, "end_line": 561, "span_ids": ["TestDendrogram.test_axis0_input"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestDendrogram:\n\n    def test_axis0_input(self):\n        kws = self.default_kws.copy()\n        kws['axis'] = 0\n        p = mat._DendrogramPlotter(self.df_norm.T, **kws)\n\n        npt.assert_array_equal(p.array, np.asarray(self.df_norm.T))\n        pdt.assert_frame_equal(p.data, self.df_norm.T)\n\n        npt.assert_array_equal(p.linkage, self.x_norm_linkage)\n        assert p.dendrogram == self.x_norm_dendrogram\n\n        npt.assert_array_equal(p.xticklabels, self.df_norm_leaves)\n        npt.assert_array_equal(p.yticklabels, [])\n\n        assert p.xlabel == 'letters'\n        assert p.ylabel == ''", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_rotate_input_TestDendrogram.test_rotate_axis0_input.npt_assert_array_equal_p_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_rotate_input_TestDendrogram.test_rotate_axis0_input.npt_assert_array_equal_p_", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 563, "end_line": 582, "span_ids": ["TestDendrogram.test_rotate_axis0_input", "TestDendrogram.test_rotate_input"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestDendrogram:\n\n    def test_rotate_input(self):\n        kws = self.default_kws.copy()\n        kws['rotate'] = True\n        p = mat._DendrogramPlotter(self.df_norm, **kws)\n        npt.assert_array_equal(p.array.T, np.asarray(self.df_norm))\n        pdt.assert_frame_equal(p.data.T, self.df_norm)\n\n        npt.assert_array_equal(p.xticklabels, [])\n        npt.assert_array_equal(p.yticklabels, self.df_norm_leaves)\n\n        assert p.xlabel == ''\n        assert p.ylabel == 'letters'\n\n    def test_rotate_axis0_input(self):\n        kws = self.default_kws.copy()\n        kws['rotate'] = True\n        kws['axis'] = 0\n        p = mat._DendrogramPlotter(self.df_norm.T, **kws)\n\n        npt.assert_array_equal(p.reordered_ind, self.x_norm_leaves)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_custom_linkage_TestDendrogram.test_custom_linkage.assert_p_dendrogram_de": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_custom_linkage_TestDendrogram.test_custom_linkage.assert_p_dendrogram_de", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 584, "end_line": 601, "span_ids": ["TestDendrogram.test_custom_linkage"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestDendrogram:\n\n    def test_custom_linkage(self):\n        kws = self.default_kws.copy()\n\n        try:\n            import fastcluster\n\n            linkage = fastcluster.linkage_vector(self.x_norm, method='single',\n                                                 metric='euclidean')\n        except ImportError:\n            d = distance.pdist(self.x_norm, metric='euclidean')\n            linkage = hierarchy.linkage(d, method='single')\n        dendrogram = hierarchy.dendrogram(linkage, no_plot=True,\n                                          color_threshold=-np.inf)\n        kws['linkage'] = linkage\n        p = mat._DendrogramPlotter(self.df_norm, **kws)\n\n        npt.assert_array_equal(p.linkage, linkage)\n        assert p.dendrogram == dendrogram", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_label_false_TestDendrogram.test_fastcluster_other_method.npt_assert_array_equal_p_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_label_false_TestDendrogram.test_fastcluster_other_method.npt_assert_array_equal_p_", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 603, "end_line": 637, "span_ids": ["TestDendrogram.test_linkage_scipy", "TestDendrogram.test_label_false", "TestDendrogram.test_fastcluster_other_method"], "tokens": 317}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestDendrogram:\n\n    def test_label_false(self):\n        kws = self.default_kws.copy()\n        kws['label'] = False\n        p = mat._DendrogramPlotter(self.df_norm, **kws)\n        assert p.xticks == []\n        assert p.yticks == []\n        assert p.xticklabels == []\n        assert p.yticklabels == []\n        assert p.xlabel == \"\"\n        assert p.ylabel == \"\"\n\n    def test_linkage_scipy(self):\n        p = mat._DendrogramPlotter(self.x_norm, **self.default_kws)\n\n        scipy_linkage = p._calculate_linkage_scipy()\n\n        from scipy.spatial import distance\n        from scipy.cluster import hierarchy\n\n        dists = distance.pdist(self.x_norm.T,\n                               metric=self.default_kws['metric'])\n        linkage = hierarchy.linkage(dists, method=self.default_kws['method'])\n\n        npt.assert_array_equal(scipy_linkage, linkage)\n\n    @pytest.mark.skipif(_no_fastcluster, reason=\"fastcluster not installed\")\n    def test_fastcluster_other_method(self):\n        import fastcluster\n\n        kws = self.default_kws.copy()\n        kws['method'] = 'average'\n        linkage = fastcluster.linkage(self.x_norm.T, method='average',\n                                      metric='euclidean')\n        p = mat._DendrogramPlotter(self.x_norm, **kws)\n        npt.assert_array_equal(p.linkage, linkage)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_fastcluster_non_euclidean_TestDendrogram.test_dendrogram_plot.assert_len_ax_collections": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_fastcluster_non_euclidean_TestDendrogram.test_dendrogram_plot.assert_len_ax_collections", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 639, "end_line": 662, "span_ids": ["TestDendrogram.test_fastcluster_non_euclidean", "TestDendrogram.test_dendrogram_plot"], "tokens": 247}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestDendrogram:\n\n    @pytest.mark.skipif(_no_fastcluster, reason=\"fastcluster not installed\")\n    def test_fastcluster_non_euclidean(self):\n        import fastcluster\n\n        kws = self.default_kws.copy()\n        kws['metric'] = 'cosine'\n        kws['method'] = 'average'\n        linkage = fastcluster.linkage(self.x_norm.T, method=kws['method'],\n                                      metric=kws['metric'])\n        p = mat._DendrogramPlotter(self.x_norm, **kws)\n        npt.assert_array_equal(p.linkage, linkage)\n\n    def test_dendrogram_plot(self):\n        d = mat.dendrogram(self.x_norm, **self.default_kws)\n\n        ax = plt.gca()\n        xlim = ax.get_xlim()\n        # 10 comes from _plot_dendrogram in scipy.cluster.hierarchy\n        xmax = len(d.reordered_ind) * 10\n\n        assert xlim[0] == 0\n        assert xlim[1] == xmax\n\n        assert len(ax.collections[0].get_paths()) == len(d.dependent_coord)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_dendrogram_rotate_TestDendrogram.test_dendrogram_rotate.assert_ylim_0_ymax": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_dendrogram_rotate_TestDendrogram.test_dendrogram_rotate.assert_ylim_0_ymax", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 664, "end_line": 681, "span_ids": ["TestDendrogram.test_dendrogram_rotate"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestDendrogram:\n\n    @pytest.mark.xfail(mpl.__version__ == \"3.1.1\",\n                       reason=\"matplotlib 3.1.1 bug\")\n    def test_dendrogram_rotate(self):\n        kws = self.default_kws.copy()\n        kws['rotate'] = True\n\n        d = mat.dendrogram(self.x_norm, **kws)\n\n        ax = plt.gca()\n        ylim = ax.get_ylim()\n\n        # 10 comes from _plot_dendrogram in scipy.cluster.hierarchy\n        ymax = len(d.reordered_ind) * 10\n\n        # Since y axis is inverted, ylim is (80, 0)\n        # and therefore not (0, 80) as usual:\n        assert ylim[1] == 0\n        assert ylim[0] == ymax", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_dendrogram_ticklabel_rotation_TestDendrogram.test_dendrogram_ticklabel_rotation.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestDendrogram.test_dendrogram_ticklabel_rotation_TestDendrogram.test_dendrogram_ticklabel_rotation.None_5", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 683, "end_line": 708, "span_ids": ["TestDendrogram.test_dendrogram_ticklabel_rotation"], "tokens": 226}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestDendrogram:\n\n    def test_dendrogram_ticklabel_rotation(self):\n        f, ax = plt.subplots(figsize=(2, 2))\n        mat.dendrogram(self.df_norm, ax=ax)\n\n        for t in ax.get_xticklabels():\n            assert t.get_rotation() == 0\n\n        plt.close(f)\n\n        df = self.df_norm.copy()\n        df.columns = [str(c) * 10 for c in df.columns]\n        df.index = [i * 10 for i in df.index]\n\n        f, ax = plt.subplots(figsize=(2, 2))\n        mat.dendrogram(df, ax=ax)\n\n        for t in ax.get_xticklabels():\n            assert t.get_rotation() == 90\n\n        plt.close(f)\n\n        f, ax = plt.subplots(figsize=(2, 2))\n        mat.dendrogram(df.T, axis=0, rotate=True)\n        for t in ax.get_yticklabels():\n            assert t.get_rotation() == 0\n        plt.close(f)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap_TestClustermap.test_corr_df_input.npt_assert_array_almost_e": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap_TestClustermap.test_corr_df_input.npt_assert_array_almost_e", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 711, "end_line": 767, "span_ids": ["TestClustermap.test_ndarray_input", "TestClustermap.test_corr_df_input", "TestClustermap.test_df_input", "TestClustermap"], "tokens": 585}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    rs = np.random.RandomState(sum(map(ord, \"clustermap\")))\n\n    x_norm = rs.randn(4, 8) + np.arange(8)\n    x_norm = (x_norm.T + np.arange(4)).T\n    letters = pd.Series([\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\"],\n                        name=\"letters\")\n\n    df_norm = pd.DataFrame(x_norm, columns=letters)\n\n    default_kws = dict(pivot_kws=None, z_score=None, standard_scale=None,\n                       figsize=(10, 10), row_colors=None, col_colors=None,\n                       dendrogram_ratio=.2, colors_ratio=.03,\n                       cbar_pos=(0, .8, .05, .2))\n\n    default_plot_kws = dict(metric='euclidean', method='average',\n                            colorbar_kws=None,\n                            row_cluster=True, col_cluster=True,\n                            row_linkage=None, col_linkage=None,\n                            tree_kws=None)\n\n    row_colors = color_palette('Set2', df_norm.shape[0])\n    col_colors = color_palette('Dark2', df_norm.shape[1])\n\n    if not _no_scipy:\n        if _no_fastcluster:\n            x_norm_distances = distance.pdist(x_norm.T, metric='euclidean')\n            x_norm_linkage = hierarchy.linkage(x_norm_distances, method='single')\n        else:\n            x_norm_linkage = fastcluster.linkage_vector(x_norm.T,\n                                                        metric='euclidean',\n                                                        method='single')\n\n        x_norm_dendrogram = hierarchy.dendrogram(x_norm_linkage, no_plot=True,\n                                                 color_threshold=-np.inf)\n        x_norm_leaves = x_norm_dendrogram['leaves']\n        df_norm_leaves = np.asarray(df_norm.columns[x_norm_leaves])\n\n    def test_ndarray_input(self):\n        cg = mat.ClusterGrid(self.x_norm, **self.default_kws)\n        pdt.assert_frame_equal(cg.data, pd.DataFrame(self.x_norm))\n        assert len(cg.fig.axes) == 4\n        assert cg.ax_row_colors is None\n        assert cg.ax_col_colors is None\n\n    def test_df_input(self):\n        cg = mat.ClusterGrid(self.df_norm, **self.default_kws)\n        pdt.assert_frame_equal(cg.data, self.df_norm)\n\n    def test_corr_df_input(self):\n        df = self.df_norm.corr()\n        cg = mat.ClusterGrid(df, **self.default_kws)\n        cg.plot(**self.default_plot_kws)\n        diag = cg.data2d.values[np.diag_indices_from(cg.data2d)]\n        npt.assert_array_almost_equal(diag, np.ones(cg.data2d.shape[0]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_pivot_input_TestClustermap.test_colors_input.assert_len_cg_fig_axes_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_pivot_input_TestClustermap.test_colors_input.assert_len_cg_fig_axes_", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 769, "end_line": 791, "span_ids": ["TestClustermap.test_colors_input", "TestClustermap.test_pivot_input"], "tokens": 226}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_pivot_input(self):\n        df_norm = self.df_norm.copy()\n        df_norm.index.name = 'numbers'\n        df_long = pd.melt(df_norm.reset_index(), var_name='letters',\n                          id_vars='numbers')\n        kws = self.default_kws.copy()\n        kws['pivot_kws'] = dict(index='numbers', columns='letters',\n                                values='value')\n        cg = mat.ClusterGrid(df_long, **kws)\n\n        pdt.assert_frame_equal(cg.data2d, df_norm)\n\n    def test_colors_input(self):\n        kws = self.default_kws.copy()\n\n        kws['row_colors'] = self.row_colors\n        kws['col_colors'] = self.col_colors\n\n        cg = mat.ClusterGrid(self.df_norm, **kws)\n        npt.assert_array_equal(cg.row_colors, self.row_colors)\n        npt.assert_array_equal(cg.col_colors, self.col_colors)\n\n        assert len(cg.fig.axes) == 6", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_categorical_colors_input_TestClustermap.test_categorical_colors_input.assert_len_cg_fig_axes_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_categorical_colors_input_TestClustermap.test_categorical_colors_input.assert_len_cg_fig_axes_", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 793, "end_line": 811, "span_ids": ["TestClustermap.test_categorical_colors_input"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_categorical_colors_input(self):\n        kws = self.default_kws.copy()\n\n        row_colors = pd.Series(self.row_colors, dtype=\"category\")\n        col_colors = pd.Series(\n            self.col_colors, dtype=\"category\", index=self.df_norm.columns\n        )\n\n        kws['row_colors'] = row_colors\n        kws['col_colors'] = col_colors\n\n        exp_row_colors = list(map(mpl.colors.to_rgb, row_colors))\n        exp_col_colors = list(map(mpl.colors.to_rgb, col_colors))\n\n        cg = mat.ClusterGrid(self.df_norm, **kws)\n        npt.assert_array_equal(cg.row_colors, exp_row_colors)\n        npt.assert_array_equal(cg.col_colors, exp_col_colors)\n\n        assert len(cg.fig.axes) == 6", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_nested_colors_input_TestClustermap.test_nested_colors_input.assert_len_cm_fig_axes_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_nested_colors_input_TestClustermap.test_nested_colors_input.assert_len_cm_fig_axes_", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 813, "end_line": 825, "span_ids": ["TestClustermap.test_nested_colors_input"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_nested_colors_input(self):\n        kws = self.default_kws.copy()\n\n        row_colors = [self.row_colors, self.row_colors]\n        col_colors = [self.col_colors, self.col_colors]\n        kws['row_colors'] = row_colors\n        kws['col_colors'] = col_colors\n\n        cm = mat.ClusterGrid(self.df_norm, **kws)\n        npt.assert_array_equal(cm.row_colors, row_colors)\n        npt.assert_array_equal(cm.col_colors, col_colors)\n\n        assert len(cm.fig.axes) == 6", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_colors_input_custom_cmap_TestClustermap.test_colors_input_custom_cmap.assert_len_cg_fig_axes_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_colors_input_custom_cmap_TestClustermap.test_colors_input_custom_cmap.assert_len_cg_fig_axes_", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 827, "end_line": 838, "span_ids": ["TestClustermap.test_colors_input_custom_cmap"], "tokens": 133}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_colors_input_custom_cmap(self):\n        kws = self.default_kws.copy()\n\n        kws['cmap'] = mpl.cm.PRGn\n        kws['row_colors'] = self.row_colors\n        kws['col_colors'] = self.col_colors\n\n        cg = mat.clustermap(self.df_norm, **kws)\n        npt.assert_array_equal(cg.row_colors, self.row_colors)\n        npt.assert_array_equal(cg.col_colors, self.col_colors)\n\n        assert len(cg.fig.axes) == 6", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_z_score_TestClustermap.test_color_list_to_matrix_and_cmap.for_i_leaf_in_enumerate_.assert_colors_equal_cmap_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_z_score_TestClustermap.test_color_list_to_matrix_and_cmap.for_i_leaf_in_enumerate_.assert_colors_equal_cmap_", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 840, "end_line": 894, "span_ids": ["TestClustermap.test_color_list_to_matrix_and_cmap", "TestClustermap.test_z_score_standard_scale", "TestClustermap.test_z_score_axis0", "TestClustermap.test_standard_scale", "TestClustermap.test_standard_scale_axis0", "TestClustermap.test_z_score"], "tokens": 517}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_z_score(self):\n        df = self.df_norm.copy()\n        df = (df - df.mean()) / df.std()\n        kws = self.default_kws.copy()\n        kws['z_score'] = 1\n\n        cg = mat.ClusterGrid(self.df_norm, **kws)\n        pdt.assert_frame_equal(cg.data2d, df)\n\n    def test_z_score_axis0(self):\n        df = self.df_norm.copy()\n        df = df.T\n        df = (df - df.mean()) / df.std()\n        df = df.T\n        kws = self.default_kws.copy()\n        kws['z_score'] = 0\n\n        cg = mat.ClusterGrid(self.df_norm, **kws)\n        pdt.assert_frame_equal(cg.data2d, df)\n\n    def test_standard_scale(self):\n        df = self.df_norm.copy()\n        df = (df - df.min()) / (df.max() - df.min())\n        kws = self.default_kws.copy()\n        kws['standard_scale'] = 1\n\n        cg = mat.ClusterGrid(self.df_norm, **kws)\n        pdt.assert_frame_equal(cg.data2d, df)\n\n    def test_standard_scale_axis0(self):\n        df = self.df_norm.copy()\n        df = df.T\n        df = (df - df.min()) / (df.max() - df.min())\n        df = df.T\n        kws = self.default_kws.copy()\n        kws['standard_scale'] = 0\n\n        cg = mat.ClusterGrid(self.df_norm, **kws)\n        pdt.assert_frame_equal(cg.data2d, df)\n\n    def test_z_score_standard_scale(self):\n        kws = self.default_kws.copy()\n        kws['z_score'] = True\n        kws['standard_scale'] = True\n        with pytest.raises(ValueError):\n            mat.ClusterGrid(self.df_norm, **kws)\n\n    def test_color_list_to_matrix_and_cmap(self):\n        # Note this uses the attribute named col_colors but tests row colors\n        matrix, cmap = mat.ClusterGrid.color_list_to_matrix_and_cmap(\n            self.col_colors, self.x_norm_leaves, axis=0)\n\n        for i, leaf in enumerate(self.x_norm_leaves):\n            color = self.col_colors[leaf]\n            assert_colors_equal(cmap(matrix[i, 0]), color)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_nested_color_list_to_matrix_and_cmap_TestClustermap.test_nested_color_list_to_matrix_and_cmap.for_i_leaf_in_enumerate_.for_j_color_row_in_enume.assert_colors_equal_cmap_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_nested_color_list_to_matrix_and_cmap_TestClustermap.test_nested_color_list_to_matrix_and_cmap.for_i_leaf_in_enumerate_.for_j_color_row_in_enume.assert_colors_equal_cmap_", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 896, "end_line": 905, "span_ids": ["TestClustermap.test_nested_color_list_to_matrix_and_cmap"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_nested_color_list_to_matrix_and_cmap(self):\n        # Note this uses the attribute named col_colors but tests row colors\n        colors = [self.col_colors, self.col_colors[::-1]]\n        matrix, cmap = mat.ClusterGrid.color_list_to_matrix_and_cmap(\n            colors, self.x_norm_leaves, axis=0)\n\n        for i, leaf in enumerate(self.x_norm_leaves):\n            for j, color_row in enumerate(colors):\n                color = color_row[leaf]\n                assert_colors_equal(cmap(matrix[i, j]), color)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_color_list_to_matrix_and_cmap_axis1_TestClustermap.test_savefig.cg_savefig_tempfile_Named": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_color_list_to_matrix_and_cmap_axis1_TestClustermap.test_savefig.cg_savefig_tempfile_Named", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 907, "end_line": 925, "span_ids": ["TestClustermap.test_color_list_to_matrix_and_cmap_different_sizes", "TestClustermap.test_color_list_to_matrix_and_cmap_axis1", "TestClustermap.test_savefig"], "tokens": 224}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_color_list_to_matrix_and_cmap_axis1(self):\n        matrix, cmap = mat.ClusterGrid.color_list_to_matrix_and_cmap(\n            self.col_colors, self.x_norm_leaves, axis=1)\n\n        for j, leaf in enumerate(self.x_norm_leaves):\n            color = self.col_colors[leaf]\n            assert_colors_equal(cmap(matrix[0, j]), color)\n\n    def test_color_list_to_matrix_and_cmap_different_sizes(self):\n        colors = [self.col_colors, self.col_colors * 2]\n        with pytest.raises(ValueError):\n            matrix, cmap = mat.ClusterGrid.color_list_to_matrix_and_cmap(\n                colors, self.x_norm_leaves, axis=1)\n\n    def test_savefig(self):\n        # Not sure if this is the right way to test....\n        cg = mat.ClusterGrid(self.df_norm, **self.default_kws)\n        cg.plot(**self.default_plot_kws)\n        cg.savefig(tempfile.NamedTemporaryFile(), format='png')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_plot_dendrograms_TestClustermap.test_plot_dendrograms.pdt_assert_frame_equal_cm": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_plot_dendrograms_TestClustermap.test_plot_dendrograms.pdt_assert_frame_equal_cm", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 927, "end_line": 938, "span_ids": ["TestClustermap.test_plot_dendrograms"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_plot_dendrograms(self):\n        cm = mat.clustermap(self.df_norm, **self.default_kws)\n\n        assert len(cm.ax_row_dendrogram.collections[0].get_paths()) == len(\n            cm.dendrogram_row.independent_coord\n        )\n        assert len(cm.ax_col_dendrogram.collections[0].get_paths()) == len(\n            cm.dendrogram_col.independent_coord\n        )\n        data2d = self.df_norm.iloc[cm.dendrogram_row.reordered_ind,\n                                   cm.dendrogram_col.reordered_ind]\n        pdt.assert_frame_equal(cm.data2d, data2d)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_cluster_false_TestClustermap.test_row_col_colors.assert_len_cm_ax_col_colo": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_cluster_false_TestClustermap.test_row_col_colors.assert_len_cm_ax_col_colo", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 940, "end_line": 964, "span_ids": ["TestClustermap.test_cluster_false", "TestClustermap.test_row_col_colors"], "tokens": 265}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_cluster_false(self):\n        kws = self.default_kws.copy()\n        kws['row_cluster'] = False\n        kws['col_cluster'] = False\n\n        cm = mat.clustermap(self.df_norm, **kws)\n        assert len(cm.ax_row_dendrogram.lines) == 0\n        assert len(cm.ax_col_dendrogram.lines) == 0\n\n        assert len(cm.ax_row_dendrogram.get_xticks()) == 0\n        assert len(cm.ax_row_dendrogram.get_yticks()) == 0\n        assert len(cm.ax_col_dendrogram.get_xticks()) == 0\n        assert len(cm.ax_col_dendrogram.get_yticks()) == 0\n\n        pdt.assert_frame_equal(cm.data2d, self.df_norm)\n\n    def test_row_col_colors(self):\n        kws = self.default_kws.copy()\n        kws['row_colors'] = self.row_colors\n        kws['col_colors'] = self.col_colors\n\n        cm = mat.clustermap(self.df_norm, **kws)\n\n        assert len(cm.ax_row_colors.collections) == 1\n        assert len(cm.ax_col_colors.collections) == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_cluster_false_row_col_colors_TestClustermap.test_cluster_false_row_col_colors.pdt_assert_frame_equal_cm": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_cluster_false_row_col_colors_TestClustermap.test_cluster_false_row_col_colors.pdt_assert_frame_equal_cm", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 966, "end_line": 984, "span_ids": ["TestClustermap.test_cluster_false_row_col_colors"], "tokens": 237}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_cluster_false_row_col_colors(self):\n        kws = self.default_kws.copy()\n        kws['row_cluster'] = False\n        kws['col_cluster'] = False\n        kws['row_colors'] = self.row_colors\n        kws['col_colors'] = self.col_colors\n\n        cm = mat.clustermap(self.df_norm, **kws)\n        assert len(cm.ax_row_dendrogram.lines) == 0\n        assert len(cm.ax_col_dendrogram.lines) == 0\n\n        assert len(cm.ax_row_dendrogram.get_xticks()) == 0\n        assert len(cm.ax_row_dendrogram.get_yticks()) == 0\n        assert len(cm.ax_col_dendrogram.get_xticks()) == 0\n        assert len(cm.ax_col_dendrogram.get_yticks()) == 0\n        assert len(cm.ax_row_colors.collections) == 1\n        assert len(cm.ax_col_colors.collections) == 1\n\n        pdt.assert_frame_equal(cm.data2d, self.df_norm)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_df_TestClustermap.test_row_col_colors_df.assert_col_labels_cm_c": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_df_TestClustermap.test_row_col_colors_df.assert_col_labels_cm_c", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 986, "end_line": 1007, "span_ids": ["TestClustermap.test_row_col_colors_df"], "tokens": 252}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_row_col_colors_df(self):\n        kws = self.default_kws.copy()\n        kws['row_colors'] = pd.DataFrame({'row_1': list(self.row_colors),\n                                          'row_2': list(self.row_colors)},\n                                         index=self.df_norm.index,\n                                         columns=['row_1', 'row_2'])\n        kws['col_colors'] = pd.DataFrame({'col_1': list(self.col_colors),\n                                          'col_2': list(self.col_colors)},\n                                         index=self.df_norm.columns,\n                                         columns=['col_1', 'col_2'])\n\n        cm = mat.clustermap(self.df_norm, **kws)\n\n        row_labels = [l.get_text() for l in\n                      cm.ax_row_colors.get_xticklabels()]\n        assert cm.row_color_labels == ['row_1', 'row_2']\n        assert row_labels == cm.row_color_labels\n\n        col_labels = [l.get_text() for l in\n                      cm.ax_col_colors.get_yticklabels()]\n        assert cm.col_color_labels == ['col_1', 'col_2']\n        assert col_labels == cm.col_color_labels", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_df_shuffled_TestClustermap.test_row_col_colors_df_shuffled.assert_list_cm_row_colors": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_df_shuffled_TestClustermap.test_row_col_colors_df_shuffled.assert_list_cm_row_colors", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 1009, "end_line": 1030, "span_ids": ["TestClustermap.test_row_col_colors_df_shuffled"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_row_col_colors_df_shuffled(self):\n        # Tests if colors are properly matched, even if given in wrong order\n\n        m, n = self.df_norm.shape\n        shuffled_inds = [self.df_norm.index[i] for i in\n                         list(range(0, m, 2)) + list(range(1, m, 2))]\n        shuffled_cols = [self.df_norm.columns[i] for i in\n                         list(range(0, n, 2)) + list(range(1, n, 2))]\n\n        kws = self.default_kws.copy()\n\n        row_colors = pd.DataFrame({'row_annot': list(self.row_colors)},\n                                  index=self.df_norm.index)\n        kws['row_colors'] = row_colors.loc[shuffled_inds]\n\n        col_colors = pd.DataFrame({'col_annot': list(self.col_colors)},\n                                  index=self.df_norm.columns)\n        kws['col_colors'] = col_colors.loc[shuffled_cols]\n\n        cm = mat.clustermap(self.df_norm, **kws)\n        assert list(cm.col_colors)[0] == list(self.col_colors)\n        assert list(cm.row_colors)[0] == list(self.row_colors)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_df_missing_TestClustermap.test_row_col_colors_df_missing.assert_list_cm_row_colors": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_df_missing_TestClustermap.test_row_col_colors_df_missing.assert_list_cm_row_colors", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 1032, "end_line": 1045, "span_ids": ["TestClustermap.test_row_col_colors_df_missing"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_row_col_colors_df_missing(self):\n        kws = self.default_kws.copy()\n        row_colors = pd.DataFrame({'row_annot': list(self.row_colors)},\n                                  index=self.df_norm.index)\n        kws['row_colors'] = row_colors.drop(self.df_norm.index[0])\n\n        col_colors = pd.DataFrame({'col_annot': list(self.col_colors)},\n                                  index=self.df_norm.columns)\n        kws['col_colors'] = col_colors.drop(self.df_norm.columns[0])\n\n        cm = mat.clustermap(self.df_norm, **kws)\n\n        assert list(cm.col_colors)[0] == [(1.0, 1.0, 1.0)] + list(self.col_colors[1:])\n        assert list(cm.row_colors)[0] == [(1.0, 1.0, 1.0)] + list(self.row_colors[1:])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_df_one_axis_TestClustermap.test_row_col_colors_df_one_axis.assert_col_labels_cm2_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_df_one_axis_TestClustermap.test_row_col_colors_df_one_axis.assert_col_labels_cm2_", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 1047, "end_line": 1074, "span_ids": ["TestClustermap.test_row_col_colors_df_one_axis"], "tokens": 310}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_row_col_colors_df_one_axis(self):\n        # Test case with only row annotation.\n        kws1 = self.default_kws.copy()\n        kws1['row_colors'] = pd.DataFrame({'row_1': list(self.row_colors),\n                                           'row_2': list(self.row_colors)},\n                                          index=self.df_norm.index,\n                                          columns=['row_1', 'row_2'])\n\n        cm1 = mat.clustermap(self.df_norm, **kws1)\n\n        row_labels = [l.get_text() for l in\n                      cm1.ax_row_colors.get_xticklabels()]\n        assert cm1.row_color_labels == ['row_1', 'row_2']\n        assert row_labels == cm1.row_color_labels\n\n        # Test case with only col annotation.\n        kws2 = self.default_kws.copy()\n        kws2['col_colors'] = pd.DataFrame({'col_1': list(self.col_colors),\n                                           'col_2': list(self.col_colors)},\n                                          index=self.df_norm.columns,\n                                          columns=['col_1', 'col_2'])\n\n        cm2 = mat.clustermap(self.df_norm, **kws2)\n\n        col_labels = [l.get_text() for l in\n                      cm2.ax_col_colors.get_yticklabels()]\n        assert cm2.col_color_labels == ['col_1', 'col_2']\n        assert col_labels == cm2.col_color_labels", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_series_TestClustermap.test_row_col_colors_series.assert_col_labels_cm_c": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_series_TestClustermap.test_row_col_colors_series.assert_col_labels_cm_c", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 1076, "end_line": 1091, "span_ids": ["TestClustermap.test_row_col_colors_series"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_row_col_colors_series(self):\n        kws = self.default_kws.copy()\n        kws['row_colors'] = pd.Series(list(self.row_colors), name='row_annot',\n                                      index=self.df_norm.index)\n        kws['col_colors'] = pd.Series(list(self.col_colors), name='col_annot',\n                                      index=self.df_norm.columns)\n\n        cm = mat.clustermap(self.df_norm, **kws)\n\n        row_labels = [l.get_text() for l in cm.ax_row_colors.get_xticklabels()]\n        assert cm.row_color_labels == ['row_annot']\n        assert row_labels == cm.row_color_labels\n\n        col_labels = [l.get_text() for l in cm.ax_col_colors.get_yticklabels()]\n        assert cm.col_color_labels == ['col_annot']\n        assert col_labels == cm.col_color_labels", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_series_shuffled_TestClustermap.test_row_col_colors_series_shuffled.assert_list_cm_row_colors": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_series_shuffled_TestClustermap.test_row_col_colors_series_shuffled.assert_list_cm_row_colors", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 1093, "end_line": 1115, "span_ids": ["TestClustermap.test_row_col_colors_series_shuffled"], "tokens": 262}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_row_col_colors_series_shuffled(self):\n        # Tests if colors are properly matched, even if given in wrong order\n\n        m, n = self.df_norm.shape\n        shuffled_inds = [self.df_norm.index[i] for i in\n                         list(range(0, m, 2)) + list(range(1, m, 2))]\n        shuffled_cols = [self.df_norm.columns[i] for i in\n                         list(range(0, n, 2)) + list(range(1, n, 2))]\n\n        kws = self.default_kws.copy()\n\n        row_colors = pd.Series(list(self.row_colors), name='row_annot',\n                               index=self.df_norm.index)\n        kws['row_colors'] = row_colors.loc[shuffled_inds]\n\n        col_colors = pd.Series(list(self.col_colors), name='col_annot',\n                               index=self.df_norm.columns)\n        kws['col_colors'] = col_colors.loc[shuffled_cols]\n\n        cm = mat.clustermap(self.df_norm, **kws)\n\n        assert list(cm.col_colors) == list(self.col_colors)\n        assert list(cm.row_colors) == list(self.row_colors)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_series_missing_TestClustermap.test_row_col_colors_series_missing.assert_list_cm_row_colors": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_series_missing_TestClustermap.test_row_col_colors_series_missing.assert_list_cm_row_colors", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 1117, "end_line": 1129, "span_ids": ["TestClustermap.test_row_col_colors_series_missing"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_row_col_colors_series_missing(self):\n        kws = self.default_kws.copy()\n        row_colors = pd.Series(list(self.row_colors), name='row_annot',\n                               index=self.df_norm.index)\n        kws['row_colors'] = row_colors.drop(self.df_norm.index[0])\n\n        col_colors = pd.Series(list(self.col_colors), name='col_annot',\n                               index=self.df_norm.columns)\n        kws['col_colors'] = col_colors.drop(self.df_norm.columns[0])\n\n        cm = mat.clustermap(self.df_norm, **kws)\n        assert list(cm.col_colors) == [(1.0, 1.0, 1.0)] + list(self.col_colors[1:])\n        assert list(cm.row_colors) == [(1.0, 1.0, 1.0)] + list(self.row_colors[1:])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_ignore_heatmap_kwargs_TestClustermap.test_row_col_colors_ignore_heatmap_kwargs.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_ignore_heatmap_kwargs_TestClustermap.test_row_col_colors_ignore_heatmap_kwargs.None_1", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 1131, "end_line": 1148, "span_ids": ["TestClustermap.test_row_col_colors_ignore_heatmap_kwargs"], "tokens": 167}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_row_col_colors_ignore_heatmap_kwargs(self):\n\n        g = mat.clustermap(self.rs.uniform(0, 200, self.df_norm.shape),\n                           row_colors=self.row_colors,\n                           col_colors=self.col_colors,\n                           cmap=\"Spectral\",\n                           norm=mpl.colors.LogNorm(),\n                           vmax=100)\n\n        assert np.array_equal(\n            np.array(self.row_colors)[g.dendrogram_row.reordered_ind],\n            g.ax_row_colors.collections[0].get_facecolors()[:, :3]\n        )\n\n        assert np.array_equal(\n            np.array(self.col_colors)[g.dendrogram_col.reordered_ind],\n            g.ax_col_colors.collections[0].get_facecolors()[:, :3]\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_raise_on_mixed_index_types_TestClustermap.test_row_col_colors_raise_on_mixed_index_types.None_1.mat_clustermap_self_x_nor": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_row_col_colors_raise_on_mixed_index_types_TestClustermap.test_row_col_colors_raise_on_mixed_index_types.None_1.mat_clustermap_self_x_nor", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 1150, "end_line": 1164, "span_ids": ["TestClustermap.test_row_col_colors_raise_on_mixed_index_types"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_row_col_colors_raise_on_mixed_index_types(self):\n\n        row_colors = pd.Series(\n            list(self.row_colors), name=\"row_annot\", index=self.df_norm.index\n        )\n\n        col_colors = pd.Series(\n            list(self.col_colors), name=\"col_annot\", index=self.df_norm.columns\n        )\n\n        with pytest.raises(TypeError):\n            mat.clustermap(self.x_norm, row_colors=row_colors)\n\n        with pytest.raises(TypeError):\n            mat.clustermap(self.x_norm, col_colors=col_colors)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_mask_reorganization_TestClustermap.test_mask_reorganization.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_mask_reorganization_TestClustermap.test_mask_reorganization.None_3", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 1166, "end_line": 1180, "span_ids": ["TestClustermap.test_mask_reorganization"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_mask_reorganization(self):\n\n        kws = self.default_kws.copy()\n        kws[\"mask\"] = self.df_norm > 0\n\n        g = mat.clustermap(self.df_norm, **kws)\n        npt.assert_array_equal(g.data2d.index, g.mask.index)\n        npt.assert_array_equal(g.data2d.columns, g.mask.columns)\n\n        npt.assert_array_equal(g.mask.index,\n                               self.df_norm.index[\n                                   g.dendrogram_row.reordered_ind])\n        npt.assert_array_equal(g.mask.columns,\n                               self.df_norm.columns[\n                                   g.dendrogram_col.reordered_ind])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_ticklabel_reorganization_TestClustermap.test_noticklabels.assert_ytl_actual_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_ticklabel_reorganization_TestClustermap.test_noticklabels.assert_ytl_actual_", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 1182, "end_line": 1212, "span_ids": ["TestClustermap.test_ticklabel_reorganization", "TestClustermap.test_noticklabels"], "tokens": 337}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_ticklabel_reorganization(self):\n\n        kws = self.default_kws.copy()\n        xtl = np.arange(self.df_norm.shape[1])\n        kws[\"xticklabels\"] = list(xtl)\n        ytl = self.letters.loc[:self.df_norm.shape[0]]\n        kws[\"yticklabels\"] = ytl\n\n        g = mat.clustermap(self.df_norm, **kws)\n\n        xtl_actual = [t.get_text() for t in g.ax_heatmap.get_xticklabels()]\n        ytl_actual = [t.get_text() for t in g.ax_heatmap.get_yticklabels()]\n\n        xtl_want = xtl[g.dendrogram_col.reordered_ind].astype(\" g1.ax_col_dendrogram.get_position().height)\n\n        assert (g2.ax_col_colors.get_position().height\n                > g1.ax_col_colors.get_position().height)\n\n        assert (g2.ax_heatmap.get_position().height\n                < g1.ax_heatmap.get_position().height)\n\n        assert (g2.ax_row_dendrogram.get_position().width\n                > g1.ax_row_dendrogram.get_position().width)\n\n        assert (g2.ax_row_colors.get_position().width\n                > g1.ax_row_colors.get_position().width)\n\n        assert (g2.ax_heatmap.get_position().width\n                < g1.ax_heatmap.get_position().width)\n\n        kws1 = self.default_kws.copy()\n        kws1.update(col_colors=self.col_colors)\n        kws2 = kws1.copy()\n        kws2.update(col_colors=[self.col_colors, self.col_colors])\n\n        g1 = mat.clustermap(self.df_norm, **kws1)\n        g2 = mat.clustermap(self.df_norm, **kws2)\n\n        assert (g2.ax_col_colors.get_position().height\n                > g1.ax_col_colors.get_position().height)\n\n        kws1 = self.default_kws.copy()\n        kws1.update(dendrogram_ratio=(.2, .2))\n\n        kws2 = kws1.copy()\n        kws2.update(dendrogram_ratio=(.2, .3))\n\n        g1 = mat.clustermap(self.df_norm, **kws1)\n        g2 = mat.clustermap(self.df_norm, **kws2)\n\n        # Fails on pinned matplotlib?\n        # assert (g2.ax_row_dendrogram.get_position().width\n        #         == g1.ax_row_dendrogram.get_position().width)\n        assert g1.gs.get_width_ratios() == g2.gs.get_width_ratios()\n\n        assert (g2.ax_col_dendrogram.get_position().height\n                > g1.ax_col_dendrogram.get_position().height)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_cbar_pos_TestClustermap.test_square_warning.assert_np_array_equal_g1_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_cbar_pos_TestClustermap.test_square_warning.assert_np_array_equal_g1_", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 1276, "end_line": 1302, "span_ids": ["TestClustermap.test_cbar_pos", "TestClustermap.test_square_warning"], "tokens": 283}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_cbar_pos(self):\n\n        kws = self.default_kws.copy()\n        kws[\"cbar_pos\"] = (.2, .1, .4, .3)\n\n        g = mat.clustermap(self.df_norm, **kws)\n        pos = g.ax_cbar.get_position()\n        assert pytest.approx(tuple(pos.p0)) == kws[\"cbar_pos\"][:2]\n        assert pytest.approx(pos.width) == kws[\"cbar_pos\"][2]\n        assert pytest.approx(pos.height) == kws[\"cbar_pos\"][3]\n\n        kws[\"cbar_pos\"] = None\n        g = mat.clustermap(self.df_norm, **kws)\n        assert g.ax_cbar is None\n\n    def test_square_warning(self):\n\n        kws = self.default_kws.copy()\n        g1 = mat.clustermap(self.df_norm, **kws)\n\n        with pytest.warns(UserWarning):\n            kws[\"square\"] = True\n            g2 = mat.clustermap(self.df_norm, **kws)\n\n        g1_shape = g1.ax_heatmap.get_position().get_points()\n        g2_shape = g2.ax_heatmap.get_position().get_points()\n        assert np.array_equal(g1_shape, g2_shape)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_clustermap_annotation_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestClustermap.test_clustermap_annotation_", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 1304, "end_line": 1337, "span_ids": ["impl:16", "TestClustermap.test_tree_kws", "TestClustermap.test_clustermap_annotation"], "tokens": 291}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\nclass TestClustermap:\n\n    def test_clustermap_annotation(self):\n\n        g = mat.clustermap(self.df_norm, annot=True, fmt=\".1f\")\n        for val, text in zip(np.asarray(g.data2d).flat, g.ax_heatmap.texts):\n            assert text.get_text() == f\"{val:.1f}\"\n\n        g = mat.clustermap(self.df_norm, annot=self.df_norm, fmt=\".1f\")\n        for val, text in zip(np.asarray(g.data2d).flat, g.ax_heatmap.texts):\n            assert text.get_text() == f\"{val:.1f}\"\n\n    def test_tree_kws(self):\n\n        rgb = (1, .5, .2)\n        g = mat.clustermap(self.df_norm, tree_kws=dict(color=rgb))\n        for ax in [g.ax_col_dendrogram, g.ax_row_dendrogram]:\n            tree, = ax.collections\n            assert tuple(tree.get_color().squeeze())[:3] == rgb\n\n\nif _no_scipy:\n\n    def test_required_scipy_errors():\n\n        x = np.random.normal(0, 1, (10, 10))\n\n        with pytest.raises(RuntimeError):\n            mat.clustermap(x)\n\n        with pytest.raises(RuntimeError):\n            mat.ClusterGrid(x)\n\n        with pytest.raises(RuntimeError):\n            mat.dendrogram(x)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_miscplot.py_plt_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_miscplot.py_plt_", "embedding": null, "metadata": {"file_path": "tests/test_miscplot.py", "file_name": "test_miscplot.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 35, "span_ids": ["TestPalPlot.test_palplot_size", "TestDogPlot", "imports", "TestDogPlot.test_dogplot", "TestPalPlot"], "tokens": 251}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import matplotlib.pyplot as plt\n\nfrom seaborn import miscplot as misc\nfrom seaborn.palettes import color_palette\nfrom .test_utils import _network\n\n\nclass TestPalPlot:\n    \"\"\"Test the function that visualizes a color palette.\"\"\"\n    def test_palplot_size(self):\n\n        pal4 = color_palette(\"husl\", 4)\n        misc.palplot(pal4)\n        size4 = plt.gcf().get_size_inches()\n        assert tuple(size4) == (4, 1)\n\n        pal5 = color_palette(\"husl\", 5)\n        misc.palplot(pal5)\n        size5 = plt.gcf().get_size_inches()\n        assert tuple(size5) == (5, 1)\n\n        palbig = color_palette(\"husl\", 3)\n        misc.palplot(palbig, 2)\n        sizebig = plt.gcf().get_size_inches()\n        assert tuple(sizebig) == (6, 2)\n\n\nclass TestDogPlot:\n\n    @_network(url=\"https://github.com/mwaskom/seaborn-data\")\n    def test_dogplot(self):\n        misc.dogplot()\n        ax = plt.gca()\n        assert len(ax.images) == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_colorsys_TestColorPalettes.test_big_palette_context.rcmod_set_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_colorsys_TestColorPalettes.test_big_palette_context.rcmod_set_", "embedding": null, "metadata": {"file_path": "tests/test_palettes.py", "file_name": "test_palettes.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 45, "span_ids": ["TestColorPalettes.test_current_palette", "TestColorPalettes.test_big_palette_context", "TestColorPalettes", "imports", "TestColorPalettes.test_palette_context"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import colorsys\nimport numpy as np\nimport matplotlib as mpl\n\nimport pytest\nimport numpy.testing as npt\n\nfrom seaborn import palettes, utils, rcmod\nfrom seaborn.external import husl\nfrom seaborn._compat import get_colormap\nfrom seaborn.colors import xkcd_rgb, crayons\n\n\nclass TestColorPalettes:\n\n    def test_current_palette(self):\n\n        pal = palettes.color_palette([\"red\", \"blue\", \"green\"])\n        rcmod.set_palette(pal)\n        assert pal == utils.get_color_cycle()\n        rcmod.set()\n\n    def test_palette_context(self):\n\n        default_pal = palettes.color_palette()\n        context_pal = palettes.color_palette(\"muted\")\n\n        with palettes.color_palette(context_pal):\n            assert utils.get_color_cycle() == context_pal\n\n        assert utils.get_color_cycle() == default_pal\n\n    def test_big_palette_context(self):\n\n        original_pal = palettes.color_palette(\"deep\", n_colors=8)\n        context_pal = palettes.color_palette(\"husl\", 10)\n\n        rcmod.set_palette(original_pal)\n        with palettes.color_palette(context_pal, 10):\n            assert utils.get_color_cycle() == context_pal\n\n        assert utils.get_color_cycle() == original_pal\n\n        # Reset default\n        rcmod.set()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_palette_size_TestColorPalettes.test_palette_size.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_palette_size_TestColorPalettes.test_palette_size.None_4", "embedding": null, "metadata": {"file_path": "tests/test_palettes.py", "file_name": "test_palettes.py", "file_type": "text/x-python", "category": "test", "start_line": 46, "end_line": 61, "span_ids": ["TestColorPalettes.test_palette_size"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColorPalettes:\n\n    def test_palette_size(self):\n\n        pal = palettes.color_palette(\"deep\")\n        assert len(pal) == palettes.QUAL_PALETTE_SIZES[\"deep\"]\n\n        pal = palettes.color_palette(\"pastel6\")\n        assert len(pal) == palettes.QUAL_PALETTE_SIZES[\"pastel6\"]\n\n        pal = palettes.color_palette(\"Set3\")\n        assert len(pal) == palettes.QUAL_PALETTE_SIZES[\"Set3\"]\n\n        pal = palettes.color_palette(\"husl\")\n        assert len(pal) == 6\n\n        pal = palettes.color_palette(\"Greens\")\n        assert len(pal) == 6", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_seaborn_palettes_TestColorPalettes.test_seaborn_palettes.for_name_in_pals_.assert_b_g_r_m_y_c_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_seaborn_palettes_TestColorPalettes.test_seaborn_palettes.for_name_in_pals_.assert_b_g_r_m_y_c_", "embedding": null, "metadata": {"file_path": "tests/test_palettes.py", "file_name": "test_palettes.py", "file_type": "text/x-python", "category": "test", "start_line": 63, "end_line": 70, "span_ids": ["TestColorPalettes.test_seaborn_palettes"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColorPalettes:\n\n    def test_seaborn_palettes(self):\n\n        pals = \"deep\", \"muted\", \"pastel\", \"bright\", \"dark\", \"colorblind\"\n        for name in pals:\n            full = palettes.color_palette(name, 10).as_hex()\n            short = palettes.color_palette(name + \"6\", 6).as_hex()\n            b, _, g, r, m, _, _, _, y, c = full\n            assert [b, g, r, m, y, c] == list(short)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_hls_palette_TestColorPalettes.test_husl_palette.npt_assert_array_equal_cm": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_hls_palette_TestColorPalettes.test_husl_palette.npt_assert_array_equal_cm", "embedding": null, "metadata": {"file_path": "tests/test_palettes.py", "file_name": "test_palettes.py", "file_type": "text/x-python", "category": "test", "start_line": 72, "end_line": 90, "span_ids": ["TestColorPalettes.test_hls_palette", "TestColorPalettes.test_husl_palette"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColorPalettes:\n\n    def test_hls_palette(self):\n\n        pal1 = palettes.hls_palette()\n        pal2 = palettes.color_palette(\"hls\")\n        npt.assert_array_equal(pal1, pal2)\n\n        cmap1 = palettes.hls_palette(as_cmap=True)\n        cmap2 = palettes.color_palette(\"hls\", as_cmap=True)\n        npt.assert_array_equal(cmap1([.2, .8]), cmap2([.2, .8]))\n\n    def test_husl_palette(self):\n\n        pal1 = palettes.husl_palette()\n        pal2 = palettes.color_palette(\"husl\")\n        npt.assert_array_equal(pal1, pal2)\n\n        cmap1 = palettes.husl_palette(as_cmap=True)\n        cmap2 = palettes.color_palette(\"husl\", as_cmap=True)\n        npt.assert_array_equal(cmap1([.2, .8]), cmap2([.2, .8]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_mpl_palette_TestColorPalettes.test_mpl_palette.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_mpl_palette_TestColorPalettes.test_mpl_palette.None_2", "embedding": null, "metadata": {"file_path": "tests/test_palettes.py", "file_name": "test_palettes.py", "file_type": "text/x-python", "category": "test", "start_line": 93, "end_line": 103, "span_ids": ["TestColorPalettes.test_mpl_palette"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColorPalettes:\n\n    def test_mpl_palette(self):\n\n        pal1 = palettes.mpl_palette(\"Reds\")\n        pal2 = palettes.color_palette(\"Reds\")\n        npt.assert_array_equal(pal1, pal2)\n\n        cmap1 = get_colormap(\"Reds\")\n        cmap2 = palettes.mpl_palette(\"Reds\", as_cmap=True)\n        cmap3 = palettes.color_palette(\"Reds\", as_cmap=True)\n        npt.assert_array_equal(cmap1, cmap2)\n        npt.assert_array_equal(cmap1, cmap3)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_mpl_dark_palette_TestColorPalettes.test_palette_cycles.assert_double_deep_dee": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_mpl_dark_palette_TestColorPalettes.test_palette_cycles.assert_double_deep_dee", "embedding": null, "metadata": {"file_path": "tests/test_palettes.py", "file_name": "test_palettes.py", "file_type": "text/x-python", "category": "test", "start_line": 104, "end_line": 151, "span_ids": ["TestColorPalettes.test_bad_palette_colors", "TestColorPalettes.test_bad_palette_name", "TestColorPalettes.test_palette_is_list_of_tuples", "TestColorPalettes.test_mpl_dark_palette", "TestColorPalettes.test_palette_desat", "TestColorPalettes.test_terrible_palette_name", "TestColorPalettes.test_palette_cycles"], "tokens": 389}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColorPalettes:\n\n    def test_mpl_dark_palette(self):\n\n        mpl_pal1 = palettes.mpl_palette(\"Blues_d\")\n        mpl_pal2 = palettes.color_palette(\"Blues_d\")\n        npt.assert_array_equal(mpl_pal1, mpl_pal2)\n\n        mpl_pal1 = palettes.mpl_palette(\"Blues_r_d\")\n        mpl_pal2 = palettes.color_palette(\"Blues_r_d\")\n        npt.assert_array_equal(mpl_pal1, mpl_pal2)\n\n    def test_bad_palette_name(self):\n\n        with pytest.raises(ValueError):\n            palettes.color_palette(\"IAmNotAPalette\")\n\n    def test_terrible_palette_name(self):\n\n        with pytest.raises(ValueError):\n            palettes.color_palette(\"jet\")\n\n    def test_bad_palette_colors(self):\n\n        pal = [\"red\", \"blue\", \"iamnotacolor\"]\n        with pytest.raises(ValueError):\n            palettes.color_palette(pal)\n\n    def test_palette_desat(self):\n\n        pal1 = palettes.husl_palette(6)\n        pal1 = [utils.desaturate(c, .5) for c in pal1]\n        pal2 = palettes.color_palette(\"husl\", desat=.5)\n        npt.assert_array_equal(pal1, pal2)\n\n    def test_palette_is_list_of_tuples(self):\n\n        pal_in = np.array([\"red\", \"blue\", \"green\"])\n        pal_out = palettes.color_palette(pal_in, 3)\n\n        assert isinstance(pal_out, list)\n        assert isinstance(pal_out[0], tuple)\n        assert isinstance(pal_out[0][0], float)\n        assert len(pal_out[0]) == 3\n\n    def test_palette_cycles(self):\n\n        deep = palettes.color_palette(\"deep6\")\n        double_deep = palettes.color_palette(\"deep6\", 12)\n        assert double_deep == deep + deep", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_hls_values_TestColorPalettes.test_hls_values.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_hls_values_TestColorPalettes.test_hls_values.None_2", "embedding": null, "metadata": {"file_path": "tests/test_palettes.py", "file_name": "test_palettes.py", "file_type": "text/x-python", "category": "test", "start_line": 153, "end_line": 168, "span_ids": ["TestColorPalettes.test_hls_values"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColorPalettes:\n\n    def test_hls_values(self):\n\n        pal1 = palettes.hls_palette(6, h=0)\n        pal2 = palettes.hls_palette(6, h=.5)\n        pal2 = pal2[3:] + pal2[:3]\n        npt.assert_array_almost_equal(pal1, pal2)\n\n        pal_dark = palettes.hls_palette(5, l=.2)  # noqa\n        pal_bright = palettes.hls_palette(5, l=.8)  # noqa\n        npt.assert_array_less(list(map(sum, pal_dark)),\n                              list(map(sum, pal_bright)))\n\n        pal_flat = palettes.hls_palette(5, s=.1)\n        pal_bold = palettes.hls_palette(5, s=.9)\n        npt.assert_array_less(list(map(np.std, pal_flat)),\n                              list(map(np.std, pal_bold)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_husl_values_TestColorPalettes.test_husl_values.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_husl_values_TestColorPalettes.test_husl_values.None_2", "embedding": null, "metadata": {"file_path": "tests/test_palettes.py", "file_name": "test_palettes.py", "file_type": "text/x-python", "category": "test", "start_line": 170, "end_line": 185, "span_ids": ["TestColorPalettes.test_husl_values"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColorPalettes:\n\n    def test_husl_values(self):\n\n        pal1 = palettes.husl_palette(6, h=0)\n        pal2 = palettes.husl_palette(6, h=.5)\n        pal2 = pal2[3:] + pal2[:3]\n        npt.assert_array_almost_equal(pal1, pal2)\n\n        pal_dark = palettes.husl_palette(5, l=.2)  # noqa\n        pal_bright = palettes.husl_palette(5, l=.8)  # noqa\n        npt.assert_array_less(list(map(sum, pal_dark)),\n                              list(map(sum, pal_bright)))\n\n        pal_flat = palettes.husl_palette(5, s=.1)\n        pal_bold = palettes.husl_palette(5, s=.9)\n        npt.assert_array_less(list(map(np.std, pal_flat)),\n                              list(map(np.std, pal_bold)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_cbrewer_qual_TestColorPalettes.test_rgb_from_hls.assert_rgb_got_rgb_wan": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_cbrewer_qual_TestColorPalettes.test_rgb_from_hls.assert_rgb_got_rgb_wan", "embedding": null, "metadata": {"file_path": "tests/test_palettes.py", "file_name": "test_palettes.py", "file_type": "text/x-python", "category": "test", "start_line": 187, "end_line": 208, "span_ids": ["TestColorPalettes.test_rgb_from_hls", "TestColorPalettes.test_cbrewer_qual", "TestColorPalettes.test_mpl_reversal"], "tokens": 219}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColorPalettes:\n\n    def test_cbrewer_qual(self):\n\n        pal_short = palettes.mpl_palette(\"Set1\", 4)\n        pal_long = palettes.mpl_palette(\"Set1\", 6)\n        assert pal_short == pal_long[:4]\n\n        pal_full = palettes.mpl_palette(\"Set2\", 8)\n        pal_long = palettes.mpl_palette(\"Set2\", 10)\n        assert pal_full == pal_long[:8]\n\n    def test_mpl_reversal(self):\n\n        pal_forward = palettes.mpl_palette(\"BuPu\", 6)\n        pal_reverse = palettes.mpl_palette(\"BuPu_r\", 6)\n        npt.assert_array_almost_equal(pal_forward, pal_reverse[::-1])\n\n    def test_rgb_from_hls(self):\n\n        color = .5, .8, .4\n        rgb_got = palettes._color_to_rgb(color, \"hls\")\n        rgb_want = colorsys.hls_to_rgb(*color)\n        assert rgb_got == rgb_want", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_rgb_from_husl_TestColorPalettes.test_rgb_from_xkcd.assert_rgb_got_rgb_wan": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_rgb_from_husl_TestColorPalettes.test_rgb_from_xkcd.assert_rgb_got_rgb_wan", "embedding": null, "metadata": {"file_path": "tests/test_palettes.py", "file_name": "test_palettes.py", "file_type": "text/x-python", "category": "test", "start_line": 210, "end_line": 228, "span_ids": ["TestColorPalettes.test_rgb_from_xkcd", "TestColorPalettes.test_rgb_from_husl"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColorPalettes:\n\n    def test_rgb_from_husl(self):\n\n        color = 120, 50, 40\n        rgb_got = palettes._color_to_rgb(color, \"husl\")\n        rgb_want = tuple(husl.husl_to_rgb(*color))\n        assert rgb_got == rgb_want\n\n        for h in range(0, 360):\n            color = h, 100, 100\n            rgb = palettes._color_to_rgb(color, \"husl\")\n            assert min(rgb) >= 0\n            assert max(rgb) <= 1\n\n    def test_rgb_from_xkcd(self):\n\n        color = \"dull red\"\n        rgb_got = palettes._color_to_rgb(color, \"xkcd\")\n        rgb_want = mpl.colors.to_rgb(xkcd_rgb[color])\n        assert rgb_got == rgb_want", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_light_palette_TestColorPalettes.test_light_palette.None_6": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_light_palette_TestColorPalettes.test_light_palette.None_6", "embedding": null, "metadata": {"file_path": "tests/test_palettes.py", "file_name": "test_palettes.py", "file_type": "text/x-python", "category": "test", "start_line": 230, "end_line": 254, "span_ids": ["TestColorPalettes.test_light_palette"], "tokens": 277}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColorPalettes:\n\n    def test_light_palette(self):\n\n        n = 4\n        pal_forward = palettes.light_palette(\"red\", n)\n        pal_reverse = palettes.light_palette(\"red\", n, reverse=True)\n        assert np.allclose(pal_forward, pal_reverse[::-1])\n\n        red = mpl.colors.colorConverter.to_rgb(\"red\")\n        assert pal_forward[-1] == red\n\n        pal_f_from_string = palettes.color_palette(\"light:red\", n)\n        assert pal_forward[3] == pal_f_from_string[3]\n\n        pal_r_from_string = palettes.color_palette(\"light:red_r\", n)\n        assert pal_reverse[3] == pal_r_from_string[3]\n\n        pal_cmap = palettes.light_palette(\"blue\", as_cmap=True)\n        assert isinstance(pal_cmap, mpl.colors.LinearSegmentedColormap)\n\n        pal_cmap_from_string = palettes.color_palette(\"light:blue\", as_cmap=True)\n        assert pal_cmap(.8) == pal_cmap_from_string(.8)\n\n        pal_cmap = palettes.light_palette(\"blue\", as_cmap=True, reverse=True)\n        pal_cmap_from_string = palettes.color_palette(\"light:blue_r\", as_cmap=True)\n        assert pal_cmap(.8) == pal_cmap_from_string(.8)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_dark_palette_TestColorPalettes.test_dark_palette.None_6": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_dark_palette_TestColorPalettes.test_dark_palette.None_6", "embedding": null, "metadata": {"file_path": "tests/test_palettes.py", "file_name": "test_palettes.py", "file_type": "text/x-python", "category": "test", "start_line": 256, "end_line": 280, "span_ids": ["TestColorPalettes.test_dark_palette"], "tokens": 277}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColorPalettes:\n\n    def test_dark_palette(self):\n\n        n = 4\n        pal_forward = palettes.dark_palette(\"red\", n)\n        pal_reverse = palettes.dark_palette(\"red\", n, reverse=True)\n        assert np.allclose(pal_forward, pal_reverse[::-1])\n\n        red = mpl.colors.colorConverter.to_rgb(\"red\")\n        assert pal_forward[-1] == red\n\n        pal_f_from_string = palettes.color_palette(\"dark:red\", n)\n        assert pal_forward[3] == pal_f_from_string[3]\n\n        pal_r_from_string = palettes.color_palette(\"dark:red_r\", n)\n        assert pal_reverse[3] == pal_r_from_string[3]\n\n        pal_cmap = palettes.dark_palette(\"blue\", as_cmap=True)\n        assert isinstance(pal_cmap, mpl.colors.LinearSegmentedColormap)\n\n        pal_cmap_from_string = palettes.color_palette(\"dark:blue\", as_cmap=True)\n        assert pal_cmap(.8) == pal_cmap_from_string(.8)\n\n        pal_cmap = palettes.dark_palette(\"blue\", as_cmap=True, reverse=True)\n        pal_cmap_from_string = palettes.color_palette(\"dark:blue_r\", as_cmap=True)\n        assert pal_cmap(.8) == pal_cmap_from_string(.8)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_diverging_palette_TestColorPalettes.test_diverging_palette.assert_isinstance_pal_cma": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_diverging_palette_TestColorPalettes.test_diverging_palette.assert_isinstance_pal_cma", "embedding": null, "metadata": {"file_path": "tests/test_palettes.py", "file_name": "test_palettes.py", "file_type": "text/x-python", "category": "test", "start_line": 282, "end_line": 302, "span_ids": ["TestColorPalettes.test_diverging_palette"], "tokens": 237}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColorPalettes:\n\n    def test_diverging_palette(self):\n\n        h_neg, h_pos = 100, 200\n        sat, lum = 70, 50\n        args = h_neg, h_pos, sat, lum\n\n        n = 12\n        pal = palettes.diverging_palette(*args, n=n)\n        neg_pal = palettes.light_palette((h_neg, sat, lum), int(n // 2),\n                                         input=\"husl\")\n        pos_pal = palettes.light_palette((h_pos, sat, lum), int(n // 2),\n                                         input=\"husl\")\n        assert len(pal) == n\n        assert pal[0] == neg_pal[-1]\n        assert pal[-1] == pos_pal[-1]\n\n        pal_dark = palettes.diverging_palette(*args, n=n, center=\"dark\")\n        assert np.mean(pal[int(n / 2)]) > np.mean(pal_dark[int(n / 2)])\n\n        pal_cmap = palettes.diverging_palette(*args, as_cmap=True)\n        assert isinstance(pal_cmap, mpl.colors.LinearSegmentedColormap)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_blend_palette_TestColorPalettes.test_cubehelix_reverse.assert_pal_forward_pal": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_blend_palette_TestColorPalettes.test_cubehelix_reverse.assert_pal_forward_pal", "embedding": null, "metadata": {"file_path": "tests/test_palettes.py", "file_name": "test_palettes.py", "file_type": "text/x-python", "category": "test", "start_line": 304, "end_line": 336, "span_ids": ["TestColorPalettes.test_cubehelix_reverse", "TestColorPalettes.test_blend_palette", "TestColorPalettes.test_cubehelix_against_matplotlib", "TestColorPalettes.test_cubehelix_n_colors"], "tokens": 297}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColorPalettes:\n\n    def test_blend_palette(self):\n\n        colors = [\"red\", \"yellow\", \"white\"]\n        pal_cmap = palettes.blend_palette(colors, as_cmap=True)\n        assert isinstance(pal_cmap, mpl.colors.LinearSegmentedColormap)\n\n        colors = [\"red\", \"blue\"]\n        pal = palettes.blend_palette(colors)\n        pal_str = \"blend:\" + \",\".join(colors)\n        pal_from_str = palettes.color_palette(pal_str)\n        assert pal == pal_from_str\n\n    def test_cubehelix_against_matplotlib(self):\n\n        x = np.linspace(0, 1, 8)\n        mpl_pal = mpl.cm.cubehelix(x)[:, :3].tolist()\n\n        sns_pal = palettes.cubehelix_palette(8, start=0.5, rot=-1.5, hue=1,\n                                             dark=0, light=1, reverse=True)\n\n        assert sns_pal == mpl_pal\n\n    def test_cubehelix_n_colors(self):\n\n        for n in [3, 5, 8]:\n            pal = palettes.cubehelix_palette(n)\n            assert len(pal) == n\n\n    def test_cubehelix_reverse(self):\n\n        pal_forward = palettes.cubehelix_palette()\n        pal_reverse = palettes.cubehelix_palette(reverse=True)\n        assert pal_forward == pal_reverse[::-1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_cubehelix_cmap_TestColorPalettes.test_cubehelix_cmap.assert_pal_forward_pal": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_cubehelix_cmap_TestColorPalettes.test_cubehelix_cmap.assert_pal_forward_pal", "embedding": null, "metadata": {"file_path": "tests/test_palettes.py", "file_name": "test_palettes.py", "file_type": "text/x-python", "category": "test", "start_line": 338, "end_line": 350, "span_ids": ["TestColorPalettes.test_cubehelix_cmap"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColorPalettes:\n\n    def test_cubehelix_cmap(self):\n\n        cmap = palettes.cubehelix_palette(as_cmap=True)\n        assert isinstance(cmap, mpl.colors.ListedColormap)\n        pal = palettes.cubehelix_palette()\n        x = np.linspace(0, 1, 6)\n        npt.assert_array_equal(cmap(x)[:, :3], pal)\n\n        cmap_rev = palettes.cubehelix_palette(as_cmap=True, reverse=True)\n        x = np.linspace(0, 1, 6)\n        pal_forward = cmap(x).tolist()\n        pal_reverse = cmap_rev(x[::-1]).tolist()\n        assert pal_forward == pal_reverse", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_cubehelix_code_TestColorPalettes.test_cubehelix_code.assert_pal1_5_pal2_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_cubehelix_code_TestColorPalettes.test_cubehelix_code.assert_pal1_5_pal2_", "embedding": null, "metadata": {"file_path": "tests/test_palettes.py", "file_name": "test_palettes.py", "file_type": "text/x-python", "category": "test", "start_line": 352, "end_line": 375, "span_ids": ["TestColorPalettes.test_cubehelix_code"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColorPalettes:\n\n    def test_cubehelix_code(self):\n\n        color_palette = palettes.color_palette\n        cubehelix_palette = palettes.cubehelix_palette\n\n        pal1 = color_palette(\"ch:\", 8)\n        pal2 = color_palette(cubehelix_palette(8))\n        assert pal1 == pal2\n\n        pal1 = color_palette(\"ch:.5, -.25,hue = .5,light=.75\", 8)\n        pal2 = color_palette(cubehelix_palette(8, .5, -.25, hue=.5, light=.75))\n        assert pal1 == pal2\n\n        pal1 = color_palette(\"ch:h=1,r=.5\", 9)\n        pal2 = color_palette(cubehelix_palette(9, hue=1, rot=.5))\n        assert pal1 == pal2\n\n        pal1 = color_palette(\"ch:_r\", 6)\n        pal2 = color_palette(cubehelix_palette(6, reverse=True))\n        assert pal1 == pal2\n\n        pal1 = color_palette(\"ch:_r\", as_cmap=True)\n        pal2 = cubehelix_palette(6, reverse=True, as_cmap=True)\n        assert pal1(.5) == pal2(.5)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_xkcd_palette_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_palettes.py_TestColorPalettes.test_xkcd_palette_", "embedding": null, "metadata": {"file_path": "tests/test_palettes.py", "file_name": "test_palettes.py", "file_type": "text/x-python", "category": "test", "start_line": 377, "end_line": 424, "span_ids": ["TestColorPalettes.test_as_hex", "TestColorPalettes.test_xkcd_palette", "TestColorPalettes.test_crayon_palette", "TestColorPalettes.test_preserved_palette_length", "TestColorPalettes.test_color_codes", "TestColorPalettes.test_html_rep"], "tokens": 370}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColorPalettes:\n\n    def test_xkcd_palette(self):\n\n        names = list(xkcd_rgb.keys())[10:15]\n        colors = palettes.xkcd_palette(names)\n        for name, color in zip(names, colors):\n            as_hex = mpl.colors.rgb2hex(color)\n            assert as_hex == xkcd_rgb[name]\n\n    def test_crayon_palette(self):\n\n        names = list(crayons.keys())[10:15]\n        colors = palettes.crayon_palette(names)\n        for name, color in zip(names, colors):\n            as_hex = mpl.colors.rgb2hex(color)\n            assert as_hex == crayons[name].lower()\n\n    def test_color_codes(self):\n\n        palettes.set_color_codes(\"deep\")\n        colors = palettes.color_palette(\"deep6\") + [\".1\"]\n        for code, color in zip(\"bgrmyck\", colors):\n            rgb_want = mpl.colors.colorConverter.to_rgb(color)\n            rgb_got = mpl.colors.colorConverter.to_rgb(code)\n            assert rgb_want == rgb_got\n        palettes.set_color_codes(\"reset\")\n\n        with pytest.raises(ValueError):\n            palettes.set_color_codes(\"Set1\")\n\n    def test_as_hex(self):\n\n        pal = palettes.color_palette(\"deep\")\n        for rgb, hex in zip(pal, pal.as_hex()):\n            assert mpl.colors.rgb2hex(rgb) == hex\n\n    def test_preserved_palette_length(self):\n\n        pal_in = palettes.color_palette(\"Set1\", 10)\n        pal_out = palettes.color_palette(pal_in)\n        assert pal_in == pal_out\n\n    def test_html_rep(self):\n\n        pal = palettes.color_palette()\n        html = pal._repr_html_()\n        for color in pal.as_hex():\n            assert color in html", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_pytest_has_verdana.return.verdana_font_unlikely_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_pytest_has_verdana.return.verdana_font_unlikely_", "embedding": null, "metadata": {"file_path": "tests/test_rcmod.py", "file_name": "test_rcmod.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 30, "span_ids": ["has_verdana", "imports"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\nimport numpy as np\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nimport numpy.testing as npt\n\nfrom seaborn import rcmod, palettes, utils\n\n\ndef has_verdana():\n    \"\"\"Helper to verify if Verdana font is present\"\"\"\n    # This import is relatively lengthy, so to prevent its import for\n    # testing other tests in this module not requiring this knowledge,\n    # import font_manager here\n    import matplotlib.font_manager as mplfm\n    try:\n        verdana_font = mplfm.findfont('Verdana', fallback_to_default=False)\n    except:  # noqa\n        # if https://github.com/matplotlib/matplotlib/pull/3435\n        # gets accepted\n        return False\n    # otherwise check if not matching the logic for a 'default' one\n    try:\n        unlikely_font = mplfm.findfont(\"very_unlikely_to_exist1234\",\n                                       fallback_to_default=False)\n    except:  # noqa\n        # if matched verdana but not unlikely, Verdana must exist\n        return True\n    # otherwise -- if they match, must be the same default\n    return verdana_font != unlikely_font", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_RCParamTester_RCParamTester.assert_rc_params_equal.for_key_v1_in_params1_it.if_isinstance_v1_np_ndar.else_.assert_v1_v2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_RCParamTester_RCParamTester.assert_rc_params_equal.for_key_v1_in_params1_it.if_isinstance_v1_np_ndar.else_.assert_v1_v2", "embedding": null, "metadata": {"file_path": "tests/test_rcmod.py", "file_name": "test_rcmod.py", "file_type": "text/x-python", "category": "test", "start_line": 33, "end_line": 65, "span_ids": ["RCParamTester.assert_rc_params", "RCParamTester.assert_rc_params_equal", "RCParamTester", "RCParamTester.flatten_list"], "tokens": 237}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RCParamTester:\n\n    def flatten_list(self, orig_list):\n\n        iter_list = map(np.atleast_1d, orig_list)\n        flat_list = [item for sublist in iter_list for item in sublist]\n        return flat_list\n\n    def assert_rc_params(self, params):\n\n        for k, v in params.items():\n            # Various subtle issues in matplotlib lead to unexpected\n            # values for the backend rcParam, which isn't relevant here\n            if k == \"backend\":\n                continue\n            if isinstance(v, np.ndarray):\n                npt.assert_array_equal(mpl.rcParams[k], v)\n            else:\n                assert mpl.rcParams[k] == v\n\n    def assert_rc_params_equal(self, params1, params2):\n\n        for key, v1 in params1.items():\n            # Various subtle issues in matplotlib lead to unexpected\n            # values for the backend rcParam, which isn't relevant here\n            if key == \"backend\":\n                continue\n\n            v2 = params2[key]\n            if isinstance(v1, np.ndarray):\n                npt.assert_array_equal(v1, v2)\n            else:\n                assert v1 == v2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_TestAxesStyle_TestAxesStyle.test_set_rc.rcmod_set_theme_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_TestAxesStyle_TestAxesStyle.test_set_rc.rcmod_set_theme_", "embedding": null, "metadata": {"file_path": "tests/test_rcmod.py", "file_name": "test_rcmod.py", "file_type": "text/x-python", "category": "test", "start_line": 68, "end_line": 127, "span_ids": ["TestAxesStyle.test_set_rc", "TestAxesStyle.test_bad_style", "TestAxesStyle.test_default_return", "TestAxesStyle", "TestAxesStyle.test_set_style", "TestAxesStyle.test_style_context_independence", "TestAxesStyle.test_key_usage", "TestAxesStyle.test_rc_override", "TestAxesStyle.test_style_context_manager"], "tokens": 383}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestAxesStyle(RCParamTester):\n\n    styles = [\"white\", \"dark\", \"whitegrid\", \"darkgrid\", \"ticks\"]\n\n    def test_default_return(self):\n\n        current = rcmod.axes_style()\n        self.assert_rc_params(current)\n\n    def test_key_usage(self):\n\n        _style_keys = set(rcmod._style_keys)\n        for style in self.styles:\n            assert not set(rcmod.axes_style(style)) ^ _style_keys\n\n    def test_bad_style(self):\n\n        with pytest.raises(ValueError):\n            rcmod.axes_style(\"i_am_not_a_style\")\n\n    def test_rc_override(self):\n\n        rc = {\"axes.facecolor\": \"blue\", \"foo.notaparam\": \"bar\"}\n        out = rcmod.axes_style(\"darkgrid\", rc)\n        assert out[\"axes.facecolor\"] == \"blue\"\n        assert \"foo.notaparam\" not in out\n\n    def test_set_style(self):\n\n        for style in self.styles:\n\n            style_dict = rcmod.axes_style(style)\n            rcmod.set_style(style)\n            self.assert_rc_params(style_dict)\n\n    def test_style_context_manager(self):\n\n        rcmod.set_style(\"darkgrid\")\n        orig_params = rcmod.axes_style()\n        context_params = rcmod.axes_style(\"whitegrid\")\n\n        with rcmod.axes_style(\"whitegrid\"):\n            self.assert_rc_params(context_params)\n        self.assert_rc_params(orig_params)\n\n        @rcmod.axes_style(\"whitegrid\")\n        def func():\n            self.assert_rc_params(context_params)\n        func()\n        self.assert_rc_params(orig_params)\n\n    def test_style_context_independence(self):\n\n        assert set(rcmod._style_keys) ^ set(rcmod._context_keys)\n\n    def test_set_rc(self):\n\n        rcmod.set_theme(rc={\"lines.linewidth\": 4})\n        assert mpl.rcParams[\"lines.linewidth\"] == 4\n        rcmod.set_theme()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_TestAxesStyle.test_set_with_palette_TestAxesStyle.test_set_with_palette.rcmod_set_theme_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_TestAxesStyle.test_set_with_palette_TestAxesStyle.test_set_with_palette.rcmod_set_theme_", "embedding": null, "metadata": {"file_path": "tests/test_rcmod.py", "file_name": "test_rcmod.py", "file_type": "text/x-python", "category": "test", "start_line": 129, "end_line": 150, "span_ids": ["TestAxesStyle.test_set_with_palette"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestAxesStyle(RCParamTester):\n\n    def test_set_with_palette(self):\n\n        rcmod.reset_orig()\n\n        rcmod.set_theme(palette=\"deep\")\n        assert utils.get_color_cycle() == palettes.color_palette(\"deep\", 10)\n        rcmod.reset_orig()\n\n        rcmod.set_theme(palette=\"deep\", color_codes=False)\n        assert utils.get_color_cycle() == palettes.color_palette(\"deep\", 10)\n        rcmod.reset_orig()\n\n        pal = palettes.color_palette(\"deep\")\n        rcmod.set_theme(palette=pal)\n        assert utils.get_color_cycle() == palettes.color_palette(\"deep\", 10)\n        rcmod.reset_orig()\n\n        rcmod.set_theme(palette=pal, color_codes=False)\n        assert utils.get_color_cycle() == palettes.color_palette(\"deep\", 10)\n        rcmod.reset_orig()\n\n        rcmod.set_theme()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_TestAxesStyle.test_reset_defaults_TestAxesStyle.test_set_is_alias.rcmod_set_theme_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_TestAxesStyle.test_reset_defaults_TestAxesStyle.test_set_is_alias.rcmod_set_theme_", "embedding": null, "metadata": {"file_path": "tests/test_rcmod.py", "file_name": "test_rcmod.py", "file_type": "text/x-python", "category": "test", "start_line": 152, "end_line": 175, "span_ids": ["TestAxesStyle.test_set_is_alias", "TestAxesStyle.test_reset_defaults", "TestAxesStyle.test_reset_orig"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestAxesStyle(RCParamTester):\n\n    def test_reset_defaults(self):\n\n        rcmod.reset_defaults()\n        self.assert_rc_params(mpl.rcParamsDefault)\n        rcmod.set_theme()\n\n    def test_reset_orig(self):\n\n        rcmod.reset_orig()\n        self.assert_rc_params(mpl.rcParamsOrig)\n        rcmod.set_theme()\n\n    def test_set_is_alias(self):\n\n        rcmod.set_theme(context=\"paper\", style=\"white\")\n        params1 = mpl.rcParams.copy()\n        rcmod.reset_orig()\n\n        rcmod.set_theme(context=\"paper\", style=\"white\")\n        params2 = mpl.rcParams.copy()\n\n        self.assert_rc_params_equal(params1, params2)\n\n        rcmod.set_theme()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_TestPlottingContext_TestPlottingContext.test_font_scale.for_k_in_font_keys_.assert_notebook_ref_k_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_TestPlottingContext_TestPlottingContext.test_font_scale.for_k_in_font_keys_.assert_notebook_ref_k_", "embedding": null, "metadata": {"file_path": "tests/test_rcmod.py", "file_name": "test_rcmod.py", "file_type": "text/x-python", "category": "test", "start_line": 178, "end_line": 212, "span_ids": ["TestPlottingContext.test_font_scale", "TestPlottingContext", "TestPlottingContext.test_default_return", "TestPlottingContext.test_bad_context", "TestPlottingContext.test_key_usage"], "tokens": 229}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlottingContext(RCParamTester):\n\n    contexts = [\"paper\", \"notebook\", \"talk\", \"poster\"]\n\n    def test_default_return(self):\n\n        current = rcmod.plotting_context()\n        self.assert_rc_params(current)\n\n    def test_key_usage(self):\n\n        _context_keys = set(rcmod._context_keys)\n        for context in self.contexts:\n            missing = set(rcmod.plotting_context(context)) ^ _context_keys\n            assert not missing\n\n    def test_bad_context(self):\n\n        with pytest.raises(ValueError):\n            rcmod.plotting_context(\"i_am_not_a_context\")\n\n    def test_font_scale(self):\n\n        notebook_ref = rcmod.plotting_context(\"notebook\")\n        notebook_big = rcmod.plotting_context(\"notebook\", 2)\n\n        font_keys = [\n            \"font.size\",\n            \"axes.labelsize\", \"axes.titlesize\",\n            \"xtick.labelsize\", \"ytick.labelsize\",\n            \"legend.fontsize\", \"legend.title_fontsize\",\n        ]\n\n        for k in font_keys:\n            assert notebook_ref[k] * 2 == notebook_big[k]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_TestPlottingContext.test_rc_override_TestPlottingContext.test_context_context_manager.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_TestPlottingContext.test_rc_override_TestPlottingContext.test_context_context_manager.None_3", "embedding": null, "metadata": {"file_path": "tests/test_rcmod.py", "file_name": "test_rcmod.py", "file_type": "text/x-python", "category": "test", "start_line": 214, "end_line": 244, "span_ids": ["TestPlottingContext.test_set_context", "TestPlottingContext.test_context_context_manager", "TestPlottingContext.test_rc_override"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlottingContext(RCParamTester):\n\n    def test_rc_override(self):\n\n        key, val = \"grid.linewidth\", 5\n        rc = {key: val, \"foo\": \"bar\"}\n        out = rcmod.plotting_context(\"talk\", rc=rc)\n        assert out[key] == val\n        assert \"foo\" not in out\n\n    def test_set_context(self):\n\n        for context in self.contexts:\n\n            context_dict = rcmod.plotting_context(context)\n            rcmod.set_context(context)\n            self.assert_rc_params(context_dict)\n\n    def test_context_context_manager(self):\n\n        rcmod.set_context(\"notebook\")\n        orig_params = rcmod.plotting_context()\n        context_params = rcmod.plotting_context(\"paper\")\n\n        with rcmod.plotting_context(\"paper\"):\n            self.assert_rc_params(context_params)\n        self.assert_rc_params(orig_params)\n\n        @rcmod.plotting_context(\"paper\")\n        def func():\n            self.assert_rc_params(context_params)\n        func()\n        self.assert_rc_params(orig_params)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_TestFonts_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_TestFonts_", "embedding": null, "metadata": {"file_path": "tests/test_rcmod.py", "file_name": "test_rcmod.py", "file_type": "text/x-python", "category": "test", "start_line": 264, "end_line": 303, "span_ids": ["TestFonts.test_set_font", "TestFonts", "TestFonts.test_different_sans_serif", "TestFonts.test_set_serif_font"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFonts:\n\n    _no_verdana = not has_verdana()\n\n    @pytest.mark.skipif(_no_verdana, reason=\"Verdana font is not present\")\n    def test_set_font(self):\n\n        rcmod.set_theme(font=\"Verdana\")\n\n        _, ax = plt.subplots()\n        ax.set_xlabel(\"foo\")\n\n        assert ax.xaxis.label.get_fontname() == \"Verdana\"\n\n        rcmod.set_theme()\n\n    def test_set_serif_font(self):\n\n        rcmod.set_theme(font=\"serif\")\n\n        _, ax = plt.subplots()\n        ax.set_xlabel(\"foo\")\n\n        assert ax.xaxis.label.get_fontname() in mpl.rcParams[\"font.serif\"]\n\n        rcmod.set_theme()\n\n    @pytest.mark.skipif(_no_verdana, reason=\"Verdana font is not present\")\n    def test_different_sans_serif(self):\n\n        rcmod.set_theme()\n        rcmod.set_style(rc={\"font.sans-serif\": [\"Verdana\"]})\n\n        _, ax = plt.subplots()\n        ax.set_xlabel(\"foo\")\n\n        assert ax.xaxis.label.get_fontname() == \"Verdana\"\n\n        rcmod.set_theme()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_np_TestLinearPlotter.test_establish_variables_from_bad.with_pytest_raises_ValueE.p_establish_variables_Non": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_np_TestLinearPlotter.test_establish_variables_from_bad.with_pytest_raises_ValueE.p_establish_variables_Non", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 85, "span_ids": ["impl", "TestLinearPlotter.test_establish_variables_from_frame", "TestLinearPlotter.test_establish_variables_from_lists", "TestLinearPlotter.test_establish_variables_from_mix", "impl:2", "imports:9", "imports:10", "TestLinearPlotter.test_establish_variables_from_array", "TestLinearPlotter.test_establish_variables_from_bad", "impl:9", "imports", "imports:7", "impl:3", "TestLinearPlotter", "TestLinearPlotter.test_establish_variables_from_series", "imports:8", "impl:4"], "tokens": 636}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\nimport pytest\nimport numpy.testing as npt\ntry:\n    import pandas.testing as pdt\nexcept ImportError:\n    import pandas.util.testing as pdt\n\ntry:\n    import statsmodels.regression.linear_model as smlm\n    _no_statsmodels = False\nexcept ImportError:\n    _no_statsmodels = True\n\nfrom seaborn import regression as lm\nfrom seaborn.external.version import Version\nfrom seaborn.palettes import color_palette\n\nrs = np.random.RandomState(0)\n\n\nclass TestLinearPlotter:\n\n    rs = np.random.RandomState(77)\n    df = pd.DataFrame(dict(x=rs.normal(size=60),\n                           d=rs.randint(-2, 3, 60),\n                           y=rs.gamma(4, size=60),\n                           s=np.tile(list(\"abcdefghij\"), 6)))\n    df[\"z\"] = df.y + rs.randn(60)\n    df[\"y_na\"] = df.y.copy()\n    df.loc[[10, 20, 30], 'y_na'] = np.nan\n\n    def test_establish_variables_from_frame(self):\n\n        p = lm._LinearPlotter()\n        p.establish_variables(self.df, x=\"x\", y=\"y\")\n        pdt.assert_series_equal(p.x, self.df.x)\n        pdt.assert_series_equal(p.y, self.df.y)\n        pdt.assert_frame_equal(p.data, self.df)\n\n    def test_establish_variables_from_series(self):\n\n        p = lm._LinearPlotter()\n        p.establish_variables(None, x=self.df.x, y=self.df.y)\n        pdt.assert_series_equal(p.x, self.df.x)\n        pdt.assert_series_equal(p.y, self.df.y)\n        assert p.data is None\n\n    def test_establish_variables_from_array(self):\n\n        p = lm._LinearPlotter()\n        p.establish_variables(None,\n                              x=self.df.x.values,\n                              y=self.df.y.values)\n        npt.assert_array_equal(p.x, self.df.x)\n        npt.assert_array_equal(p.y, self.df.y)\n        assert p.data is None\n\n    def test_establish_variables_from_lists(self):\n\n        p = lm._LinearPlotter()\n        p.establish_variables(None,\n                              x=self.df.x.values.tolist(),\n                              y=self.df.y.values.tolist())\n        npt.assert_array_equal(p.x, self.df.x)\n        npt.assert_array_equal(p.y, self.df.y)\n        assert p.data is None\n\n    def test_establish_variables_from_mix(self):\n\n        p = lm._LinearPlotter()\n        p.establish_variables(self.df, x=\"x\", y=self.df.y)\n        pdt.assert_series_equal(p.x, self.df.x)\n        pdt.assert_series_equal(p.y, self.df.y)\n        pdt.assert_frame_equal(p.data, self.df)\n\n    def test_establish_variables_from_bad(self):\n\n        p = lm._LinearPlotter()\n        with pytest.raises(ValueError):\n            p.establish_variables(None, x=\"x\", y=self.df.y)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestLinearPlotter.test_dropna_TestLinearPlotter.test_dropna.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestLinearPlotter.test_dropna_TestLinearPlotter.test_dropna.None_5", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 87, "end_line": 97, "span_ids": ["TestLinearPlotter.test_dropna"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLinearPlotter:\n\n    def test_dropna(self):\n\n        p = lm._LinearPlotter()\n        p.establish_variables(self.df, x=\"x\", y_na=\"y_na\")\n        pdt.assert_series_equal(p.x, self.df.x)\n        pdt.assert_series_equal(p.y_na, self.df.y_na)\n\n        p.dropna(\"x\", \"y_na\")\n        mask = self.df.y_na.notnull()\n        pdt.assert_series_equal(p.x, self.df.x[mask])\n        pdt.assert_series_equal(p.y_na, self.df.y_na[mask])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter_TestRegressionPlotter.test_singleton.assert_not_p_fit_reg": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter_TestRegressionPlotter.test_singleton.assert_not_p_fit_reg", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 100, "end_line": 172, "span_ids": ["TestRegressionPlotter.test_variables_from_mix", "TestRegressionPlotter.test_dropna", "TestRegressionPlotter.test_singleton", "TestRegressionPlotter.test_variables_must_be_1d", "TestRegressionPlotter.test_variables_from_series", "TestRegressionPlotter.test_variables_from_frame", "TestRegressionPlotter"], "tokens": 688}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlotter:\n\n    rs = np.random.RandomState(49)\n\n    grid = np.linspace(-3, 3, 30)\n    n_boot = 100\n    bins_numeric = 3\n    bins_given = [-1, 0, 1]\n\n    df = pd.DataFrame(dict(x=rs.normal(size=60),\n                           d=rs.randint(-2, 3, 60),\n                           y=rs.gamma(4, size=60),\n                           s=np.tile(list(range(6)), 10)))\n    df[\"z\"] = df.y + rs.randn(60)\n    df[\"y_na\"] = df.y.copy()\n\n    bw_err = rs.randn(6)[df.s.values] * 2\n    df.y += bw_err\n\n    p = 1 / (1 + np.exp(-(df.x * 2 + rs.randn(60))))\n    df[\"c\"] = [rs.binomial(1, p_i) for p_i in p]\n    df.loc[[10, 20, 30], 'y_na'] = np.nan\n\n    def test_variables_from_frame(self):\n\n        p = lm._RegressionPlotter(\"x\", \"y\", data=self.df, units=\"s\")\n\n        pdt.assert_series_equal(p.x, self.df.x)\n        pdt.assert_series_equal(p.y, self.df.y)\n        pdt.assert_series_equal(p.units, self.df.s)\n        pdt.assert_frame_equal(p.data, self.df)\n\n    def test_variables_from_series(self):\n\n        p = lm._RegressionPlotter(self.df.x, self.df.y, units=self.df.s)\n\n        npt.assert_array_equal(p.x, self.df.x)\n        npt.assert_array_equal(p.y, self.df.y)\n        npt.assert_array_equal(p.units, self.df.s)\n        assert p.data is None\n\n    def test_variables_from_mix(self):\n\n        p = lm._RegressionPlotter(\"x\", self.df.y + 1, data=self.df)\n\n        npt.assert_array_equal(p.x, self.df.x)\n        npt.assert_array_equal(p.y, self.df.y + 1)\n        pdt.assert_frame_equal(p.data, self.df)\n\n    def test_variables_must_be_1d(self):\n\n        array_2d = np.random.randn(20, 2)\n        array_1d = np.random.randn(20)\n        with pytest.raises(ValueError):\n            lm._RegressionPlotter(array_2d, array_1d)\n        with pytest.raises(ValueError):\n            lm._RegressionPlotter(array_1d, array_2d)\n\n    def test_dropna(self):\n\n        p = lm._RegressionPlotter(\"x\", \"y_na\", data=self.df)\n        assert len(p.x) == pd.notnull(self.df.y_na).sum()\n\n        p = lm._RegressionPlotter(\"x\", \"y_na\", data=self.df, dropna=False)\n        assert len(p.x) == len(self.df.y_na)\n\n    @pytest.mark.parametrize(\"x,y\",\n                             [([1.5], [2]),\n                              (np.array([1.5]), np.array([2])),\n                              (pd.Series(1.5), pd.Series(2))])\n    def test_singleton(self, x, y):\n        p = lm._RegressionPlotter(x, y)\n        assert not p.fit_reg", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_ci_TestRegressionPlotter.test_ci.assert_p_x_ci_sd_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_ci_TestRegressionPlotter.test_ci.assert_p_x_ci_sd_", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 174, "end_line": 186, "span_ids": ["TestRegressionPlotter.test_ci"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlotter:\n\n    def test_ci(self):\n\n        p = lm._RegressionPlotter(\"x\", \"y\", data=self.df, ci=95)\n        assert p.ci == 95\n        assert p.x_ci == 95\n\n        p = lm._RegressionPlotter(\"x\", \"y\", data=self.df, ci=95, x_ci=68)\n        assert p.ci == 95\n        assert p.x_ci == 68\n\n        p = lm._RegressionPlotter(\"x\", \"y\", data=self.df, ci=95, x_ci=\"sd\")\n        assert p.ci == 95\n        assert p.x_ci == \"sd\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_fast_regression_TestRegressionPlotter.test_fast_regression.npt_assert_array_almost_e": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_fast_regression_TestRegressionPlotter.test_fast_regression.npt_assert_array_almost_e", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 188, "end_line": 200, "span_ids": ["TestRegressionPlotter.test_fast_regression"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlotter:\n\n    @pytest.mark.skipif(_no_statsmodels, reason=\"no statsmodels\")\n    def test_fast_regression(self):\n\n        p = lm._RegressionPlotter(\"x\", \"y\", data=self.df, n_boot=self.n_boot)\n\n        # Fit with the \"fast\" function, which just does linear algebra\n        yhat_fast, _ = p.fit_fast(self.grid)\n\n        # Fit using the statsmodels function with an OLS model\n        yhat_smod, _ = p.fit_statsmodels(self.grid, smlm.OLS)\n\n        # Compare the vector of y_hat values\n        npt.assert_array_almost_equal(yhat_fast, yhat_smod)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_regress_poly_TestRegressionPlotter.test_regress_poly.npt_assert_array_almost_e": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_regress_poly_TestRegressionPlotter.test_regress_poly.npt_assert_array_almost_e", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 202, "end_line": 214, "span_ids": ["TestRegressionPlotter.test_regress_poly"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlotter:\n\n    @pytest.mark.skipif(_no_statsmodels, reason=\"no statsmodels\")\n    def test_regress_poly(self):\n\n        p = lm._RegressionPlotter(\"x\", \"y\", data=self.df, n_boot=self.n_boot)\n\n        # Fit an first-order polynomial\n        yhat_poly, _ = p.fit_poly(self.grid, 1)\n\n        # Fit using the statsmodels function with an OLS model\n        yhat_smod, _ = p.fit_statsmodels(self.grid, smlm.OLS)\n\n        # Compare the vector of y_hat values\n        npt.assert_array_almost_equal(yhat_poly, yhat_smod)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_regress_logx_TestRegressionPlotter.test_regress_logx.assert_yhat_lin_90_yha": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_regress_logx_TestRegressionPlotter.test_regress_logx.assert_yhat_lin_90_yha", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 216, "end_line": 228, "span_ids": ["TestRegressionPlotter.test_regress_logx"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlotter:\n\n    def test_regress_logx(self):\n\n        x = np.arange(1, 10)\n        y = np.arange(1, 10)\n        grid = np.linspace(1, 10, 100)\n        p = lm._RegressionPlotter(x, y, n_boot=self.n_boot)\n\n        yhat_lin, _ = p.fit_fast(grid)\n        yhat_log, _ = p.fit_logx(grid)\n\n        assert yhat_lin[0] > yhat_log[0]\n        assert yhat_log[20] > yhat_lin[20]\n        assert yhat_lin[90] > yhat_log[90]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_regress_n_boot_TestRegressionPlotter.test_regress_n_boot.npt_assert_equal_boots_sm": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_regress_n_boot_TestRegressionPlotter.test_regress_n_boot.npt_assert_equal_boots_sm", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 230, "end_line": 245, "span_ids": ["TestRegressionPlotter.test_regress_n_boot"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlotter:\n\n    @pytest.mark.skipif(_no_statsmodels, reason=\"no statsmodels\")\n    def test_regress_n_boot(self):\n\n        p = lm._RegressionPlotter(\"x\", \"y\", data=self.df, n_boot=self.n_boot)\n\n        # Fast (linear algebra) version\n        _, boots_fast = p.fit_fast(self.grid)\n        npt.assert_equal(boots_fast.shape, (self.n_boot, self.grid.size))\n\n        # Slower (np.polyfit) version\n        _, boots_poly = p.fit_poly(self.grid, 1)\n        npt.assert_equal(boots_poly.shape, (self.n_boot, self.grid.size))\n\n        # Slowest (statsmodels) version\n        _, boots_smod = p.fit_statsmodels(self.grid, smlm.OLS)\n        npt.assert_equal(boots_smod.shape, (self.n_boot, self.grid.size))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_regress_without_bootstrap_TestRegressionPlotter.test_regress_without_bootstrap.assert_boots_smod_is_None": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_regress_without_bootstrap_TestRegressionPlotter.test_regress_without_bootstrap.assert_boots_smod_is_None", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 247, "end_line": 263, "span_ids": ["TestRegressionPlotter.test_regress_without_bootstrap"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlotter:\n\n    @pytest.mark.skipif(_no_statsmodels, reason=\"no statsmodels\")\n    def test_regress_without_bootstrap(self):\n\n        p = lm._RegressionPlotter(\"x\", \"y\", data=self.df,\n                                  n_boot=self.n_boot, ci=None)\n\n        # Fast (linear algebra) version\n        _, boots_fast = p.fit_fast(self.grid)\n        assert boots_fast is None\n\n        # Slower (np.polyfit) version\n        _, boots_poly = p.fit_poly(self.grid, 1)\n        assert boots_poly is None\n\n        # Slowest (statsmodels) version\n        _, boots_smod = p.fit_statsmodels(self.grid, smlm.OLS)\n        assert boots_smod is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_regress_bootstrap_seed_TestRegressionPlotter.test_regress_bootstrap_seed.npt_assert_array_equal_bo": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_regress_bootstrap_seed_TestRegressionPlotter.test_regress_bootstrap_seed.npt_assert_array_equal_bo", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 265, "end_line": 275, "span_ids": ["TestRegressionPlotter.test_regress_bootstrap_seed"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlotter:\n\n    def test_regress_bootstrap_seed(self):\n\n        seed = 200\n        p1 = lm._RegressionPlotter(\"x\", \"y\", data=self.df,\n                                   n_boot=self.n_boot, seed=seed)\n        p2 = lm._RegressionPlotter(\"x\", \"y\", data=self.df,\n                                   n_boot=self.n_boot, seed=seed)\n\n        _, boots1 = p1.fit_fast(self.grid)\n        _, boots2 = p2.fit_fast(self.grid)\n        npt.assert_array_equal(boots1, boots2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_numeric_bins_TestRegressionPlotter.test_bin_results.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_numeric_bins_TestRegressionPlotter.test_bin_results.None_2", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 277, "end_line": 295, "span_ids": ["TestRegressionPlotter.test_bin_results", "TestRegressionPlotter.test_provided_bins", "TestRegressionPlotter.test_numeric_bins"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlotter:\n\n    def test_numeric_bins(self):\n\n        p = lm._RegressionPlotter(self.df.x, self.df.y)\n        x_binned, bins = p.bin_predictor(self.bins_numeric)\n        npt.assert_equal(len(bins), self.bins_numeric)\n        npt.assert_array_equal(np.unique(x_binned), bins)\n\n    def test_provided_bins(self):\n\n        p = lm._RegressionPlotter(self.df.x, self.df.y)\n        x_binned, bins = p.bin_predictor(self.bins_given)\n        npt.assert_array_equal(np.unique(x_binned), self.bins_given)\n\n    def test_bin_results(self):\n\n        p = lm._RegressionPlotter(self.df.x, self.df.y)\n        x_binned, bins = p.bin_predictor(self.bins_given)\n        assert self.df.x[x_binned == 0].min() > self.df.x[x_binned == -1].max()\n        assert self.df.x[x_binned == 1].min() > self.df.x[x_binned == 0].max()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_scatter_data_TestRegressionPlotter.test_scatter_data.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_scatter_data_TestRegressionPlotter.test_scatter_data.None_7", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 297, "end_line": 318, "span_ids": ["TestRegressionPlotter.test_scatter_data"], "tokens": 253}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlotter:\n\n    def test_scatter_data(self):\n\n        p = lm._RegressionPlotter(self.df.x, self.df.y)\n        x, y = p.scatter_data\n        npt.assert_array_equal(x, self.df.x)\n        npt.assert_array_equal(y, self.df.y)\n\n        p = lm._RegressionPlotter(self.df.d, self.df.y)\n        x, y = p.scatter_data\n        npt.assert_array_equal(x, self.df.d)\n        npt.assert_array_equal(y, self.df.y)\n\n        p = lm._RegressionPlotter(self.df.d, self.df.y, x_jitter=.1)\n        x, y = p.scatter_data\n        assert (x != self.df.d).any()\n        npt.assert_array_less(np.abs(self.df.d - x), np.repeat(.1, len(x)))\n        npt.assert_array_equal(y, self.df.y)\n\n        p = lm._RegressionPlotter(self.df.d, self.df.y, y_jitter=.05)\n        x, y = p.scatter_data\n        npt.assert_array_equal(x, self.df.d)\n        npt.assert_array_less(np.abs(self.df.y - y), np.repeat(.1, len(y)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_estimate_data_TestRegressionPlotter.test_estimate_cis.npt_assert_array_equal_ci": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_estimate_data_TestRegressionPlotter.test_estimate_cis.npt_assert_array_equal_ci", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 320, "end_line": 347, "span_ids": ["TestRegressionPlotter.test_estimate_data", "TestRegressionPlotter.test_estimate_cis"], "tokens": 279}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlotter:\n\n    def test_estimate_data(self):\n\n        p = lm._RegressionPlotter(self.df.d, self.df.y, x_estimator=np.mean)\n\n        x, y, ci = p.estimate_data\n\n        npt.assert_array_equal(x, np.sort(np.unique(self.df.d)))\n        npt.assert_array_almost_equal(y, self.df.groupby(\"d\").y.mean())\n        npt.assert_array_less(np.array(ci)[:, 0], y)\n        npt.assert_array_less(y, np.array(ci)[:, 1])\n\n    def test_estimate_cis(self):\n\n        seed = 123\n\n        p = lm._RegressionPlotter(self.df.d, self.df.y,\n                                  x_estimator=np.mean, ci=95, seed=seed)\n        _, _, ci_big = p.estimate_data\n\n        p = lm._RegressionPlotter(self.df.d, self.df.y,\n                                  x_estimator=np.mean, ci=50, seed=seed)\n        _, _, ci_wee = p.estimate_data\n        npt.assert_array_less(np.diff(ci_wee), np.diff(ci_big))\n\n        p = lm._RegressionPlotter(self.df.d, self.df.y,\n                                  x_estimator=np.mean, ci=None)\n        _, _, ci_nil = p.estimate_data\n        npt.assert_array_equal(ci_nil, [None] * len(ci_nil))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_estimate_units_TestRegressionPlotter.test_estimate_units.npt_assert_array_less_ci_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_estimate_units_TestRegressionPlotter.test_estimate_units.npt_assert_array_less_ci_", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 349, "end_line": 363, "span_ids": ["TestRegressionPlotter.test_estimate_units"], "tokens": 149}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlotter:\n\n    def test_estimate_units(self):\n\n        # Seed the RNG locally\n        seed = 345\n\n        p = lm._RegressionPlotter(\"x\", \"y\", data=self.df,\n                                  units=\"s\", seed=seed, x_bins=3)\n        _, _, ci_big = p.estimate_data\n        ci_big = np.diff(ci_big, axis=1)\n\n        p = lm._RegressionPlotter(\"x\", \"y\", data=self.df, seed=seed, x_bins=3)\n        _, _, ci_wee = p.estimate_data\n        ci_wee = np.diff(ci_wee, axis=1)\n\n        npt.assert_array_less(ci_wee, ci_big)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_partial_TestRegressionPlotter.test_partial.None_6": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_partial_TestRegressionPlotter.test_partial.None_6", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 365, "end_line": 386, "span_ids": ["TestRegressionPlotter.test_partial"], "tokens": 220}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlotter:\n\n    def test_partial(self):\n\n        x = self.rs.randn(100)\n        y = x + self.rs.randn(100)\n        z = x + self.rs.randn(100)\n\n        p = lm._RegressionPlotter(y, z)\n        _, r_orig = np.corrcoef(p.x, p.y)[0]\n\n        p = lm._RegressionPlotter(y, z, y_partial=x)\n        _, r_semipartial = np.corrcoef(p.x, p.y)[0]\n        assert r_semipartial < r_orig\n\n        p = lm._RegressionPlotter(y, z, x_partial=x, y_partial=x)\n        _, r_partial = np.corrcoef(p.x, p.y)[0]\n        assert r_partial < r_orig\n\n        x = pd.Series(x)\n        y = pd.Series(y)\n        p = lm._RegressionPlotter(y, z, x_partial=x, y_partial=x)\n        _, r_partial = np.corrcoef(p.x, p.y)[0]\n        assert r_partial < r_orig", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_logistic_regression_TestRegressionPlotter.test_logistic_perfect_separation.assert_np_isnan_yhat_all": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_logistic_regression_TestRegressionPlotter.test_logistic_perfect_separation.assert_np_isnan_yhat_all", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 388, "end_line": 405, "span_ids": ["TestRegressionPlotter.test_logistic_perfect_separation", "TestRegressionPlotter.test_logistic_regression"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlotter:\n\n    @pytest.mark.skipif(_no_statsmodels, reason=\"no statsmodels\")\n    def test_logistic_regression(self):\n\n        p = lm._RegressionPlotter(\"x\", \"c\", data=self.df,\n                                  logistic=True, n_boot=self.n_boot)\n        _, yhat, _ = p.fit_regression(x_range=(-3, 3))\n        npt.assert_array_less(yhat, 1)\n        npt.assert_array_less(0, yhat)\n\n    @pytest.mark.skipif(_no_statsmodels, reason=\"no statsmodels\")\n    def test_logistic_perfect_separation(self):\n\n        y = self.df.x > self.df.x.mean()\n        p = lm._RegressionPlotter(\"x\", y, data=self.df,\n                                  logistic=True, n_boot=10)\n        with np.errstate(all=\"ignore\"):\n            _, yhat, _ = p.fit_regression(x_range=(-3, 3))\n        assert np.isnan(yhat).all()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_robust_regression_TestRegressionPlotter.test_robust_regression.assert_len_ols_yhat_l": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_robust_regression_TestRegressionPlotter.test_robust_regression.assert_len_ols_yhat_l", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 407, "end_line": 418, "span_ids": ["TestRegressionPlotter.test_robust_regression"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlotter:\n\n    @pytest.mark.skipif(_no_statsmodels, reason=\"no statsmodels\")\n    def test_robust_regression(self):\n\n        p_ols = lm._RegressionPlotter(\"x\", \"y\", data=self.df,\n                                      n_boot=self.n_boot)\n        _, ols_yhat, _ = p_ols.fit_regression(x_range=(-3, 3))\n\n        p_robust = lm._RegressionPlotter(\"x\", \"y\", data=self.df,\n                                         robust=True, n_boot=self.n_boot)\n        _, robust_yhat, _ = p_robust.fit_regression(x_range=(-3, 3))\n\n        assert len(ols_yhat) == len(robust_yhat)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_lowess_regression_TestRegressionPlotter.test_regression_options.None_1.lm__RegressionPlotter_x_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_lowess_regression_TestRegressionPlotter.test_regression_options.None_1.lm__RegressionPlotter_x_", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 420, "end_line": 437, "span_ids": ["TestRegressionPlotter.test_regression_options", "TestRegressionPlotter.test_lowess_regression"], "tokens": 160}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlotter:\n\n    @pytest.mark.skipif(_no_statsmodels, reason=\"no statsmodels\")\n    def test_lowess_regression(self):\n\n        p = lm._RegressionPlotter(\"x\", \"y\", data=self.df, lowess=True)\n        grid, yhat, err_bands = p.fit_regression(x_range=(-3, 3))\n\n        assert len(grid) == len(yhat)\n        assert err_bands is None\n\n    def test_regression_options(self):\n\n        with pytest.raises(ValueError):\n            lm._RegressionPlotter(\"x\", \"y\", data=self.df,\n                                  lowess=True, order=2)\n\n        with pytest.raises(ValueError):\n            lm._RegressionPlotter(\"x\", \"y\", data=self.df,\n                                  lowess=True, logistic=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_regression_limits_TestRegressionPlotter.test_regression_limits.assert_grid_max_self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlotter.test_regression_limits_TestRegressionPlotter.test_regression_limits.assert_grid_max_self", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 439, "end_line": 452, "span_ids": ["TestRegressionPlotter.test_regression_limits"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlotter:\n\n    def test_regression_limits(self):\n\n        f, ax = plt.subplots()\n        ax.scatter(self.df.x, self.df.y)\n        p = lm._RegressionPlotter(\"x\", \"y\", data=self.df)\n        grid, _, _ = p.fit_regression(ax)\n        xlim = ax.get_xlim()\n        assert grid.min() == xlim[0]\n        assert grid.max() == xlim[1]\n\n        p = lm._RegressionPlotter(\"x\", \"y\", data=self.df, truncate=True)\n        grid, _, _ = p.fit_regression()\n        assert grid.min() == self.df.x.min()\n        assert grid.max() == self.df.x.max()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots_TestRegressionPlots.test_regplot_basic.npt_assert_array_equal_y_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots_TestRegressionPlots.test_regplot_basic.npt_assert_array_equal_y_", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 455, "end_line": 476, "span_ids": ["TestRegressionPlots", "TestRegressionPlots.test_regplot_basic"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlots:\n\n    rs = np.random.RandomState(56)\n    df = pd.DataFrame(dict(x=rs.randn(90),\n                           y=rs.randn(90) + 5,\n                           z=rs.randint(0, 1, 90),\n                           g=np.repeat(list(\"abc\"), 30),\n                           h=np.tile(list(\"xy\"), 45),\n                           u=np.tile(np.arange(6), 15)))\n    bw_err = rs.randn(6)[df.u.values]\n    df.y += bw_err\n\n    def test_regplot_basic(self):\n\n        f, ax = plt.subplots()\n        lm.regplot(x=\"x\", y=\"y\", data=self.df)\n        assert len(ax.lines) == 1\n        assert len(ax.collections) == 2\n\n        x, y = ax.collections[0].get_offsets().T\n        npt.assert_array_equal(x, self.df.x)\n        npt.assert_array_equal(y, self.df.y)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_regplot_selective_TestRegressionPlots.test_regplot_selective.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_regplot_selective_TestRegressionPlots.test_regplot_selective.None_2", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 478, "end_line": 496, "span_ids": ["TestRegressionPlots.test_regplot_selective"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlots:\n\n    def test_regplot_selective(self):\n\n        f, ax = plt.subplots()\n        ax = lm.regplot(x=\"x\", y=\"y\", data=self.df, scatter=False, ax=ax)\n        assert len(ax.lines) == 1\n        assert len(ax.collections) == 1\n        ax.clear()\n\n        f, ax = plt.subplots()\n        ax = lm.regplot(x=\"x\", y=\"y\", data=self.df, fit_reg=False)\n        assert len(ax.lines) == 0\n        assert len(ax.collections) == 1\n        ax.clear()\n\n        f, ax = plt.subplots()\n        ax = lm.regplot(x=\"x\", y=\"y\", data=self.df, ci=None)\n        assert len(ax.lines) == 1\n        assert len(ax.collections) == 1\n        ax.clear()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_regplot_binned_TestRegressionPlots.test_lmplot_hue.assert_len_ax_collections": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_regplot_binned_TestRegressionPlots.test_lmplot_hue.assert_len_ax_collections", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 525, "end_line": 554, "span_ids": ["TestRegressionPlots.test_lmplot_no_data", "TestRegressionPlots.test_lmplot_basic", "TestRegressionPlots.test_lmplot_hue", "TestRegressionPlots.test_regplot_binned"], "tokens": 255}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlots:\n\n    def test_regplot_binned(self):\n\n        ax = lm.regplot(x=\"x\", y=\"y\", data=self.df, x_bins=5)\n        assert len(ax.lines) == 6\n        assert len(ax.collections) == 2\n\n    def test_lmplot_no_data(self):\n\n        with pytest.raises(TypeError):\n            # keyword argument `data` is required\n            lm.lmplot(x=\"x\", y=\"y\")\n\n    def test_lmplot_basic(self):\n\n        g = lm.lmplot(x=\"x\", y=\"y\", data=self.df)\n        ax = g.axes[0, 0]\n        assert len(ax.lines) == 1\n        assert len(ax.collections) == 2\n\n        x, y = ax.collections[0].get_offsets().T\n        npt.assert_array_equal(x, self.df.x)\n        npt.assert_array_equal(y, self.df.y)\n\n    def test_lmplot_hue(self):\n\n        g = lm.lmplot(x=\"x\", y=\"y\", data=self.df, hue=\"h\")\n        ax = g.axes[0, 0]\n\n        assert len(ax.lines) == 2\n        assert len(ax.collections) == 4", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_lmplot_markers_TestRegressionPlots.test_lmplot_markers.with_pytest_raises_ValueE.lm_lmplot_x_x_y_y_d": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_lmplot_markers_TestRegressionPlots.test_lmplot_markers.with_pytest_raises_ValueE.lm_lmplot_x_x_y_y_d", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 556, "end_line": 566, "span_ids": ["TestRegressionPlots.test_lmplot_markers"], "tokens": 149}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlots:\n\n    def test_lmplot_markers(self):\n\n        g1 = lm.lmplot(x=\"x\", y=\"y\", data=self.df, hue=\"h\", markers=\"s\")\n        assert g1.hue_kws == {\"marker\": [\"s\", \"s\"]}\n\n        g2 = lm.lmplot(x=\"x\", y=\"y\", data=self.df, hue=\"h\", markers=[\"o\", \"s\"])\n        assert g2.hue_kws == {\"marker\": [\"o\", \"s\"]}\n\n        with pytest.raises(ValueError):\n            lm.lmplot(x=\"x\", y=\"y\", data=self.df, hue=\"h\",\n                      markers=[\"o\", \"s\", \"d\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_lmplot_marker_linewidths_TestRegressionPlots.test_lmplot_facets.assert_g_axes_shape_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_lmplot_marker_linewidths_TestRegressionPlots.test_lmplot_facets.assert_g_axes_shape_1", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 568, "end_line": 584, "span_ids": ["TestRegressionPlots.test_lmplot_marker_linewidths", "TestRegressionPlots.test_lmplot_facets"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlots:\n\n    def test_lmplot_marker_linewidths(self):\n\n        g = lm.lmplot(x=\"x\", y=\"y\", data=self.df, hue=\"h\",\n                      fit_reg=False, markers=[\"o\", \"+\"])\n        c = g.axes[0, 0].collections\n        assert c[1].get_linewidths()[0] == mpl.rcParams[\"lines.linewidth\"]\n\n    def test_lmplot_facets(self):\n\n        g = lm.lmplot(x=\"x\", y=\"y\", data=self.df, row=\"g\", col=\"h\")\n        assert g.axes.shape == (3, 2)\n\n        g = lm.lmplot(x=\"x\", y=\"y\", data=self.df, col=\"u\", col_wrap=4)\n        assert g.axes.shape == (6,)\n\n        g = lm.lmplot(x=\"x\", y=\"y\", data=self.df, hue=\"h\", col=\"u\")\n        assert g.axes.shape == (1, 6)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_lmplot_hue_col_nolegend_TestRegressionPlots.test_lmplot_scatter_kws.npt_assert_array_equal_bl": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_lmplot_hue_col_nolegend_TestRegressionPlots.test_lmplot_scatter_kws.npt_assert_array_equal_bl", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 586, "end_line": 598, "span_ids": ["TestRegressionPlots.test_lmplot_hue_col_nolegend", "TestRegressionPlots.test_lmplot_scatter_kws"], "tokens": 163}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlots:\n\n    def test_lmplot_hue_col_nolegend(self):\n\n        g = lm.lmplot(x=\"x\", y=\"y\", data=self.df, col=\"h\", hue=\"h\")\n        assert g._legend is None\n\n    def test_lmplot_scatter_kws(self):\n\n        g = lm.lmplot(x=\"x\", y=\"y\", hue=\"h\", data=self.df, ci=None)\n        red_scatter, blue_scatter = g.axes[0, 0].collections\n\n        red, blue = color_palette(n_colors=2)\n        npt.assert_array_equal(red, red_scatter.get_facecolors()[0, :3])\n        npt.assert_array_equal(blue, blue_scatter.get_facecolors()[0, :3])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_lmplot_facet_truncate_TestRegressionPlots.test_lmplot_facet_truncate.for_ax_in_g_axes_flat_.for_line_in_ax_lines_.assert_ax_get_xlim_t": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_lmplot_facet_truncate_TestRegressionPlots.test_lmplot_facet_truncate.for_ax_in_g_axes_flat_.for_line_in_ax_lines_.assert_ax_get_xlim_t", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 600, "end_line": 613, "span_ids": ["TestRegressionPlots.test_lmplot_facet_truncate"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlots:\n\n    @pytest.mark.skipif(Version(mpl.__version__) < Version(\"3.4\"),\n                        reason=\"MPL bug #15967\")\n    @pytest.mark.parametrize(\"sharex\", [True, False])\n    def test_lmplot_facet_truncate(self, sharex):\n\n        g = lm.lmplot(\n            data=self.df, x=\"x\", y=\"y\", hue=\"g\", col=\"h\",\n            truncate=False, facet_kws=dict(sharex=sharex),\n        )\n\n        for ax in g.axes.flat:\n            for line in ax.lines:\n                xdata = line.get_xdata()\n                assert ax.get_xlim() == tuple(xdata[[0, -1]])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_lmplot_sharey_TestRegressionPlots.test_lmplot_sharey.assert_ax1_get_ylim_1_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_lmplot_sharey_TestRegressionPlots.test_lmplot_sharey.assert_ax1_get_ylim_1_", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 615, "end_line": 627, "span_ids": ["TestRegressionPlots.test_lmplot_sharey"], "tokens": 163}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlots:\n\n    def test_lmplot_sharey(self):\n\n        df = pd.DataFrame(dict(\n            x=[0, 1, 2, 0, 1, 2],\n            y=[1, -1, 0, -100, 200, 0],\n            z=[\"a\", \"a\", \"a\", \"b\", \"b\", \"b\"],\n        ))\n\n        with pytest.warns(UserWarning):\n            g = lm.lmplot(data=df, x=\"x\", y=\"y\", col=\"z\", sharey=False)\n        ax1, ax2 = g.axes.flat\n        assert ax1.get_ylim()[0] > ax2.get_ylim()[0]\n        assert ax1.get_ylim()[1] < ax2.get_ylim()[1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_lmplot_facet_kws_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_lmplot_facet_kws_", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 629, "end_line": 674, "span_ids": ["TestRegressionPlots.test_residplot", "TestRegressionPlots.test_three_point_colors", "TestRegressionPlots.test_regplot_xlim", "TestRegressionPlots.test_lmplot_facet_kws", "TestRegressionPlots.test_residplot_lowess"], "tokens": 431}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlots:\n\n    def test_lmplot_facet_kws(self):\n\n        xlim = -4, 20\n        g = lm.lmplot(\n            data=self.df, x=\"x\", y=\"y\", col=\"h\", facet_kws={\"xlim\": xlim}\n        )\n        for ax in g.axes.flat:\n            assert ax.get_xlim() == xlim\n\n    def test_residplot(self):\n\n        x, y = self.df.x, self.df.y\n        ax = lm.residplot(x=x, y=y)\n\n        resid = y - np.polyval(np.polyfit(x, y, 1), x)\n        x_plot, y_plot = ax.collections[0].get_offsets().T\n\n        npt.assert_array_equal(x, x_plot)\n        npt.assert_array_almost_equal(resid, y_plot)\n\n    @pytest.mark.skipif(_no_statsmodels, reason=\"no statsmodels\")\n    def test_residplot_lowess(self):\n\n        ax = lm.residplot(x=\"x\", y=\"y\", data=self.df, lowess=True)\n        assert len(ax.lines) == 2\n\n        x, y = ax.lines[1].get_xydata().T\n        npt.assert_array_equal(x, np.sort(self.df.x))\n\n    def test_three_point_colors(self):\n\n        x, y = np.random.randn(2, 3)\n        ax = lm.regplot(x=x, y=y, color=(1, 0, 0))\n        color = ax.collections[0].get_facecolors()\n        npt.assert_almost_equal(color[0, :3],\n                                (1, 0, 0))\n\n    def test_regplot_xlim(self):\n\n        f, ax = plt.subplots()\n        x, y1, y2 = np.random.randn(3, 50)\n        lm.regplot(x=x, y=y1, truncate=False)\n        lm.regplot(x=x, y=y2, truncate=False)\n        line1, line2 = ax.lines\n        assert np.array_equal(line1.get_xdata(), line2.get_xdata())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_from_itertools_import_pro_from_seaborn__testing_imp": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_from_itertools_import_pro_from_seaborn__testing_imp", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 25, "span_ids": ["imports"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from itertools import product\nimport numpy as np\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nfrom matplotlib.colors import same_color, to_rgba\n\nimport pytest\nfrom numpy.testing import assert_array_equal, assert_array_almost_equal\n\nfrom seaborn.external.version import Version\nfrom seaborn.palettes import color_palette\nfrom seaborn._oldcore import categorical_order\n\nfrom seaborn.relational import (\n    _RelationalPlotter,\n    _LinePlotter,\n    _ScatterPlotter,\n    relplot,\n    lineplot,\n    scatterplot\n)\n\nfrom seaborn.utils import _draw_figure\nfrom seaborn._compat import get_colormap\nfrom seaborn._testing import assert_plots_equal", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_long_semantics_long_semantics.return.request_param": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_long_semantics_long_semantics.return.request_param", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 26, "end_line": 41, "span_ids": ["long_semantics"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture(params=[\n    dict(x=\"x\", y=\"y\"),\n    dict(x=\"t\", y=\"y\"),\n    dict(x=\"a\", y=\"y\"),\n    dict(x=\"x\", y=\"y\", hue=\"y\"),\n    dict(x=\"x\", y=\"y\", hue=\"a\"),\n    dict(x=\"x\", y=\"y\", size=\"a\"),\n    dict(x=\"x\", y=\"y\", style=\"a\"),\n    dict(x=\"x\", y=\"y\", hue=\"s\"),\n    dict(x=\"x\", y=\"y\", size=\"s\"),\n    dict(x=\"x\", y=\"y\", style=\"s\"),\n    dict(x=\"x\", y=\"y\", hue=\"a\", style=\"a\"),\n    dict(x=\"x\", y=\"y\", hue=\"a\", size=\"b\", style=\"b\"),\n])\ndef long_semantics(request):\n    return request.param", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_Helpers_Helpers.paths_equal.return.equal": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_Helpers_Helpers.paths_equal.return.equal", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 44, "end_line": 62, "span_ids": ["Helpers.paths_equal", "Helpers.scatter_rgbs", "Helpers"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Helpers:\n\n    # TODO Better place for these?\n\n    def scatter_rgbs(self, collections):\n        rgbs = []\n        for col in collections:\n            rgb = tuple(col.get_facecolor().squeeze()[:3])\n            rgbs.append(rgb)\n        return rgbs\n\n    def paths_equal(self, *args):\n\n        equal = all([len(a) == len(args[0]) for a in args])\n\n        for p1, p2 in zip(*args):\n            equal &= np.array_equal(p1.vertices, p2.vertices)\n            equal &= np.array_equal(p1.codes, p2.codes)\n        return equal", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_SharedAxesLevelTests_SharedAxesLevelTests.test_color.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_SharedAxesLevelTests_SharedAxesLevelTests.test_color.None_3", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 65, "end_line": 84, "span_ids": ["SharedAxesLevelTests.test_color", "SharedAxesLevelTests"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SharedAxesLevelTests:\n\n    def test_color(self, long_df):\n\n        ax = plt.figure().subplots()\n        self.func(data=long_df, x=\"x\", y=\"y\", ax=ax)\n        assert self.get_last_color(ax) == to_rgba(\"C0\")\n\n        ax = plt.figure().subplots()\n        self.func(data=long_df, x=\"x\", y=\"y\", ax=ax)\n        self.func(data=long_df, x=\"x\", y=\"y\", ax=ax)\n        assert self.get_last_color(ax) == to_rgba(\"C1\")\n\n        ax = plt.figure().subplots()\n        self.func(data=long_df, x=\"x\", y=\"y\", color=\"C2\", ax=ax)\n        assert self.get_last_color(ax) == to_rgba(\"C2\")\n\n        ax = plt.figure().subplots()\n        self.func(data=long_df, x=\"x\", y=\"y\", c=\"C2\", ax=ax)\n        assert self.get_last_color(ax) == to_rgba(\"C2\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter_TestRelationalPlotter.test_wide_df_variables.assert_p_variables_style": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter_TestRelationalPlotter.test_wide_df_variables.assert_p_variables_style", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 87, "end_line": 116, "span_ids": ["TestRelationalPlotter.test_wide_df_variables", "TestRelationalPlotter"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRelationalPlotter(Helpers):\n\n    def test_wide_df_variables(self, wide_df):\n\n        p = _RelationalPlotter()\n        p.assign_variables(data=wide_df)\n        assert p.input_format == \"wide\"\n        assert list(p.variables) == [\"x\", \"y\", \"hue\", \"style\"]\n        assert len(p.plot_data) == np.product(wide_df.shape)\n\n        x = p.plot_data[\"x\"]\n        expected_x = np.tile(wide_df.index, wide_df.shape[1])\n        assert_array_equal(x, expected_x)\n\n        y = p.plot_data[\"y\"]\n        expected_y = wide_df.to_numpy().ravel(order=\"f\")\n        assert_array_equal(y, expected_y)\n\n        hue = p.plot_data[\"hue\"]\n        expected_hue = np.repeat(wide_df.columns.to_numpy(), wide_df.shape[0])\n        assert_array_equal(hue, expected_hue)\n\n        style = p.plot_data[\"style\"]\n        expected_style = expected_hue\n        assert_array_equal(style, expected_style)\n\n        assert p.variables[\"x\"] == wide_df.index.name\n        assert p.variables[\"y\"] is None\n        assert p.variables[\"hue\"] == wide_df.columns.name\n        assert p.variables[\"style\"] == wide_df.columns.name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_df_with_nonnumeric_variables_TestRelationalPlotter.test_wide_df_with_nonnumeric_variables.assert_p_variables_style": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_df_with_nonnumeric_variables_TestRelationalPlotter.test_wide_df_with_nonnumeric_variables.assert_p_variables_style", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 118, "end_line": 150, "span_ids": ["TestRelationalPlotter.test_wide_df_with_nonnumeric_variables"], "tokens": 282}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRelationalPlotter(Helpers):\n\n    def test_wide_df_with_nonnumeric_variables(self, long_df):\n\n        p = _RelationalPlotter()\n        p.assign_variables(data=long_df)\n        assert p.input_format == \"wide\"\n        assert list(p.variables) == [\"x\", \"y\", \"hue\", \"style\"]\n\n        numeric_df = long_df.select_dtypes(\"number\")\n\n        assert len(p.plot_data) == np.product(numeric_df.shape)\n\n        x = p.plot_data[\"x\"]\n        expected_x = np.tile(numeric_df.index, numeric_df.shape[1])\n        assert_array_equal(x, expected_x)\n\n        y = p.plot_data[\"y\"]\n        expected_y = numeric_df.to_numpy().ravel(order=\"f\")\n        assert_array_equal(y, expected_y)\n\n        hue = p.plot_data[\"hue\"]\n        expected_hue = np.repeat(\n            numeric_df.columns.to_numpy(), numeric_df.shape[0]\n        )\n        assert_array_equal(hue, expected_hue)\n\n        style = p.plot_data[\"style\"]\n        expected_style = expected_hue\n        assert_array_equal(style, expected_style)\n\n        assert p.variables[\"x\"] == numeric_df.index.name\n        assert p.variables[\"y\"] is None\n        assert p.variables[\"hue\"] == numeric_df.columns.name\n        assert p.variables[\"style\"] == numeric_df.columns.name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_array_variables_TestRelationalPlotter.test_wide_array_variables.assert_p_variables_style": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_array_variables_TestRelationalPlotter.test_wide_array_variables.assert_p_variables_style", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 152, "end_line": 181, "span_ids": ["TestRelationalPlotter.test_wide_array_variables"], "tokens": 254}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRelationalPlotter(Helpers):\n\n    def test_wide_array_variables(self, wide_array):\n\n        p = _RelationalPlotter()\n        p.assign_variables(data=wide_array)\n        assert p.input_format == \"wide\"\n        assert list(p.variables) == [\"x\", \"y\", \"hue\", \"style\"]\n        assert len(p.plot_data) == np.product(wide_array.shape)\n\n        nrow, ncol = wide_array.shape\n\n        x = p.plot_data[\"x\"]\n        expected_x = np.tile(np.arange(nrow), ncol)\n        assert_array_equal(x, expected_x)\n\n        y = p.plot_data[\"y\"]\n        expected_y = wide_array.ravel(order=\"f\")\n        assert_array_equal(y, expected_y)\n\n        hue = p.plot_data[\"hue\"]\n        expected_hue = np.repeat(np.arange(ncol), nrow)\n        assert_array_equal(hue, expected_hue)\n\n        style = p.plot_data[\"style\"]\n        expected_style = expected_hue\n        assert_array_equal(style, expected_style)\n\n        assert p.variables[\"x\"] is None\n        assert p.variables[\"y\"] is None\n        assert p.variables[\"hue\"] is None\n        assert p.variables[\"style\"] is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_flat_array_variables_TestRelationalPlotter.test_flat_array_variables.assert_p_variables_y_i": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_flat_array_variables_TestRelationalPlotter.test_flat_array_variables.assert_p_variables_y_i", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 183, "end_line": 200, "span_ids": ["TestRelationalPlotter.test_flat_array_variables"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRelationalPlotter(Helpers):\n\n    def test_flat_array_variables(self, flat_array):\n\n        p = _RelationalPlotter()\n        p.assign_variables(data=flat_array)\n        assert p.input_format == \"wide\"\n        assert list(p.variables) == [\"x\", \"y\"]\n        assert len(p.plot_data) == np.product(flat_array.shape)\n\n        x = p.plot_data[\"x\"]\n        expected_x = np.arange(flat_array.shape[0])\n        assert_array_equal(x, expected_x)\n\n        y = p.plot_data[\"y\"]\n        expected_y = flat_array\n        assert_array_equal(y, expected_y)\n\n        assert p.variables[\"x\"] is None\n        assert p.variables[\"y\"] is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_flat_list_variables_TestRelationalPlotter.test_flat_list_variables.assert_p_variables_y_i": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_flat_list_variables_TestRelationalPlotter.test_flat_list_variables.assert_p_variables_y_i", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 202, "end_line": 219, "span_ids": ["TestRelationalPlotter.test_flat_list_variables"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRelationalPlotter(Helpers):\n\n    def test_flat_list_variables(self, flat_list):\n\n        p = _RelationalPlotter()\n        p.assign_variables(data=flat_list)\n        assert p.input_format == \"wide\"\n        assert list(p.variables) == [\"x\", \"y\"]\n        assert len(p.plot_data) == len(flat_list)\n\n        x = p.plot_data[\"x\"]\n        expected_x = np.arange(len(flat_list))\n        assert_array_equal(x, expected_x)\n\n        y = p.plot_data[\"y\"]\n        expected_y = flat_list\n        assert_array_equal(y, expected_y)\n\n        assert p.variables[\"x\"] is None\n        assert p.variables[\"y\"] is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_flat_series_variables_TestRelationalPlotter.test_flat_series_variables.assert_p_variables_y_i": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_flat_series_variables_TestRelationalPlotter.test_flat_series_variables.assert_p_variables_y_i", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 221, "end_line": 238, "span_ids": ["TestRelationalPlotter.test_flat_series_variables"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRelationalPlotter(Helpers):\n\n    def test_flat_series_variables(self, flat_series):\n\n        p = _RelationalPlotter()\n        p.assign_variables(data=flat_series)\n        assert p.input_format == \"wide\"\n        assert list(p.variables) == [\"x\", \"y\"]\n        assert len(p.plot_data) == len(flat_series)\n\n        x = p.plot_data[\"x\"]\n        expected_x = flat_series.index\n        assert_array_equal(x, expected_x)\n\n        y = p.plot_data[\"y\"]\n        expected_y = flat_series\n        assert_array_equal(y, expected_y)\n\n        assert p.variables[\"x\"] is flat_series.index.name\n        assert p.variables[\"y\"] is flat_series.name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_list_of_series_variables_TestRelationalPlotter.test_wide_list_of_series_variables.assert_p_variables_style": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_list_of_series_variables_TestRelationalPlotter.test_wide_list_of_series_variables.assert_p_variables_style", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 240, "end_line": 278, "span_ids": ["TestRelationalPlotter.test_wide_list_of_series_variables"], "tokens": 319}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRelationalPlotter(Helpers):\n\n    def test_wide_list_of_series_variables(self, wide_list_of_series):\n\n        p = _RelationalPlotter()\n        p.assign_variables(data=wide_list_of_series)\n        assert p.input_format == \"wide\"\n        assert list(p.variables) == [\"x\", \"y\", \"hue\", \"style\"]\n\n        chunks = len(wide_list_of_series)\n        chunk_size = max(len(l) for l in wide_list_of_series)\n\n        assert len(p.plot_data) == chunks * chunk_size\n\n        index_union = np.unique(\n            np.concatenate([s.index for s in wide_list_of_series])\n        )\n\n        x = p.plot_data[\"x\"]\n        expected_x = np.tile(index_union, chunks)\n        assert_array_equal(x, expected_x)\n\n        y = p.plot_data[\"y\"]\n        expected_y = np.concatenate([\n            s.reindex(index_union) for s in wide_list_of_series\n        ])\n        assert_array_equal(y, expected_y)\n\n        hue = p.plot_data[\"hue\"]\n        series_names = [s.name for s in wide_list_of_series]\n        expected_hue = np.repeat(series_names, chunk_size)\n        assert_array_equal(hue, expected_hue)\n\n        style = p.plot_data[\"style\"]\n        expected_style = expected_hue\n        assert_array_equal(style, expected_style)\n\n        assert p.variables[\"x\"] is None\n        assert p.variables[\"y\"] is None\n        assert p.variables[\"hue\"] is None\n        assert p.variables[\"style\"] is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_list_of_arrays_variables_TestRelationalPlotter.test_wide_list_of_arrays_variables.assert_p_variables_style": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_list_of_arrays_variables_TestRelationalPlotter.test_wide_list_of_arrays_variables.assert_p_variables_style", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 280, "end_line": 311, "span_ids": ["TestRelationalPlotter.test_wide_list_of_arrays_variables"], "tokens": 276}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRelationalPlotter(Helpers):\n\n    def test_wide_list_of_arrays_variables(self, wide_list_of_arrays):\n\n        p = _RelationalPlotter()\n        p.assign_variables(data=wide_list_of_arrays)\n        assert p.input_format == \"wide\"\n        assert list(p.variables) == [\"x\", \"y\", \"hue\", \"style\"]\n\n        chunks = len(wide_list_of_arrays)\n        chunk_size = max(len(l) for l in wide_list_of_arrays)\n\n        assert len(p.plot_data) == chunks * chunk_size\n\n        x = p.plot_data[\"x\"]\n        expected_x = np.tile(np.arange(chunk_size), chunks)\n        assert_array_equal(x, expected_x)\n\n        y = p.plot_data[\"y\"].dropna()\n        expected_y = np.concatenate(wide_list_of_arrays)\n        assert_array_equal(y, expected_y)\n\n        hue = p.plot_data[\"hue\"]\n        expected_hue = np.repeat(np.arange(chunks), chunk_size)\n        assert_array_equal(hue, expected_hue)\n\n        style = p.plot_data[\"style\"]\n        expected_style = expected_hue\n        assert_array_equal(style, expected_style)\n\n        assert p.variables[\"x\"] is None\n        assert p.variables[\"y\"] is None\n        assert p.variables[\"hue\"] is None\n        assert p.variables[\"style\"] is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_list_of_list_variables_TestRelationalPlotter.test_wide_list_of_list_variables.assert_p_variables_style": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_list_of_list_variables_TestRelationalPlotter.test_wide_list_of_list_variables.assert_p_variables_style", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 313, "end_line": 344, "span_ids": ["TestRelationalPlotter.test_wide_list_of_list_variables"], "tokens": 276}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRelationalPlotter(Helpers):\n\n    def test_wide_list_of_list_variables(self, wide_list_of_lists):\n\n        p = _RelationalPlotter()\n        p.assign_variables(data=wide_list_of_lists)\n        assert p.input_format == \"wide\"\n        assert list(p.variables) == [\"x\", \"y\", \"hue\", \"style\"]\n\n        chunks = len(wide_list_of_lists)\n        chunk_size = max(len(l) for l in wide_list_of_lists)\n\n        assert len(p.plot_data) == chunks * chunk_size\n\n        x = p.plot_data[\"x\"]\n        expected_x = np.tile(np.arange(chunk_size), chunks)\n        assert_array_equal(x, expected_x)\n\n        y = p.plot_data[\"y\"].dropna()\n        expected_y = np.concatenate(wide_list_of_lists)\n        assert_array_equal(y, expected_y)\n\n        hue = p.plot_data[\"hue\"]\n        expected_hue = np.repeat(np.arange(chunks), chunk_size)\n        assert_array_equal(hue, expected_hue)\n\n        style = p.plot_data[\"style\"]\n        expected_style = expected_hue\n        assert_array_equal(style, expected_style)\n\n        assert p.variables[\"x\"] is None\n        assert p.variables[\"y\"] is None\n        assert p.variables[\"hue\"] is None\n        assert p.variables[\"style\"] is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_dict_of_series_variables_TestRelationalPlotter.test_wide_dict_of_series_variables.assert_p_variables_style": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_dict_of_series_variables_TestRelationalPlotter.test_wide_dict_of_series_variables.assert_p_variables_style", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 346, "end_line": 377, "span_ids": ["TestRelationalPlotter.test_wide_dict_of_series_variables"], "tokens": 281}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRelationalPlotter(Helpers):\n\n    def test_wide_dict_of_series_variables(self, wide_dict_of_series):\n\n        p = _RelationalPlotter()\n        p.assign_variables(data=wide_dict_of_series)\n        assert p.input_format == \"wide\"\n        assert list(p.variables) == [\"x\", \"y\", \"hue\", \"style\"]\n\n        chunks = len(wide_dict_of_series)\n        chunk_size = max(len(l) for l in wide_dict_of_series.values())\n\n        assert len(p.plot_data) == chunks * chunk_size\n\n        x = p.plot_data[\"x\"]\n        expected_x = np.tile(np.arange(chunk_size), chunks)\n        assert_array_equal(x, expected_x)\n\n        y = p.plot_data[\"y\"].dropna()\n        expected_y = np.concatenate(list(wide_dict_of_series.values()))\n        assert_array_equal(y, expected_y)\n\n        hue = p.plot_data[\"hue\"]\n        expected_hue = np.repeat(list(wide_dict_of_series), chunk_size)\n        assert_array_equal(hue, expected_hue)\n\n        style = p.plot_data[\"style\"]\n        expected_style = expected_hue\n        assert_array_equal(style, expected_style)\n\n        assert p.variables[\"x\"] is None\n        assert p.variables[\"y\"] is None\n        assert p.variables[\"hue\"] is None\n        assert p.variables[\"style\"] is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_dict_of_arrays_variables_TestRelationalPlotter.test_wide_dict_of_arrays_variables.assert_p_variables_style": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_dict_of_arrays_variables_TestRelationalPlotter.test_wide_dict_of_arrays_variables.assert_p_variables_style", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 379, "end_line": 410, "span_ids": ["TestRelationalPlotter.test_wide_dict_of_arrays_variables"], "tokens": 281}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRelationalPlotter(Helpers):\n\n    def test_wide_dict_of_arrays_variables(self, wide_dict_of_arrays):\n\n        p = _RelationalPlotter()\n        p.assign_variables(data=wide_dict_of_arrays)\n        assert p.input_format == \"wide\"\n        assert list(p.variables) == [\"x\", \"y\", \"hue\", \"style\"]\n\n        chunks = len(wide_dict_of_arrays)\n        chunk_size = max(len(l) for l in wide_dict_of_arrays.values())\n\n        assert len(p.plot_data) == chunks * chunk_size\n\n        x = p.plot_data[\"x\"]\n        expected_x = np.tile(np.arange(chunk_size), chunks)\n        assert_array_equal(x, expected_x)\n\n        y = p.plot_data[\"y\"].dropna()\n        expected_y = np.concatenate(list(wide_dict_of_arrays.values()))\n        assert_array_equal(y, expected_y)\n\n        hue = p.plot_data[\"hue\"]\n        expected_hue = np.repeat(list(wide_dict_of_arrays), chunk_size)\n        assert_array_equal(hue, expected_hue)\n\n        style = p.plot_data[\"style\"]\n        expected_style = expected_hue\n        assert_array_equal(style, expected_style)\n\n        assert p.variables[\"x\"] is None\n        assert p.variables[\"y\"] is None\n        assert p.variables[\"hue\"] is None\n        assert p.variables[\"style\"] is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_dict_of_lists_variables_TestRelationalPlotter.test_wide_dict_of_lists_variables.assert_p_variables_style": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_wide_dict_of_lists_variables_TestRelationalPlotter.test_wide_dict_of_lists_variables.assert_p_variables_style", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 412, "end_line": 443, "span_ids": ["TestRelationalPlotter.test_wide_dict_of_lists_variables"], "tokens": 281}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRelationalPlotter(Helpers):\n\n    def test_wide_dict_of_lists_variables(self, wide_dict_of_lists):\n\n        p = _RelationalPlotter()\n        p.assign_variables(data=wide_dict_of_lists)\n        assert p.input_format == \"wide\"\n        assert list(p.variables) == [\"x\", \"y\", \"hue\", \"style\"]\n\n        chunks = len(wide_dict_of_lists)\n        chunk_size = max(len(l) for l in wide_dict_of_lists.values())\n\n        assert len(p.plot_data) == chunks * chunk_size\n\n        x = p.plot_data[\"x\"]\n        expected_x = np.tile(np.arange(chunk_size), chunks)\n        assert_array_equal(x, expected_x)\n\n        y = p.plot_data[\"y\"].dropna()\n        expected_y = np.concatenate(list(wide_dict_of_lists.values()))\n        assert_array_equal(y, expected_y)\n\n        hue = p.plot_data[\"hue\"]\n        expected_hue = np.repeat(list(wide_dict_of_lists), chunk_size)\n        assert_array_equal(hue, expected_hue)\n\n        style = p.plot_data[\"style\"]\n        expected_style = expected_hue\n        assert_array_equal(style, expected_style)\n\n        assert p.variables[\"x\"] is None\n        assert p.variables[\"y\"] is None\n        assert p.variables[\"hue\"] is None\n        assert p.variables[\"style\"] is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_simple_TestRelationalPlotter.test_relplot_simple.with_pytest_raises_ValueE.g.relplot_data_long_df_x_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_simple_TestRelationalPlotter.test_relplot_simple.with_pytest_raises_ValueE.g.relplot_data_long_df_x_", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 445, "end_line": 459, "span_ids": ["TestRelationalPlotter.test_relplot_simple"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRelationalPlotter(Helpers):\n\n    def test_relplot_simple(self, long_df):\n\n        g = relplot(data=long_df, x=\"x\", y=\"y\", kind=\"scatter\")\n        x, y = g.ax.collections[0].get_offsets().T\n        assert_array_equal(x, long_df[\"x\"])\n        assert_array_equal(y, long_df[\"y\"])\n\n        g = relplot(data=long_df, x=\"x\", y=\"y\", kind=\"line\")\n        x, y = g.ax.lines[0].get_xydata().T\n        expected = long_df.groupby(\"x\").y.mean()\n        assert_array_equal(x, expected.index)\n        assert y == pytest.approx(expected.values)\n\n        with pytest.raises(ValueError):\n            g = relplot(data=long_df, x=\"x\", y=\"y\", kind=\"not_a_kind\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_complex_TestRelationalPlotter.test_relplot_complex.None_3.for___grp_df_ax_in_zi.assert_array_equal_y_grp": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_complex_TestRelationalPlotter.test_relplot_complex.None_3.for___grp_df_ax_in_zi.assert_array_equal_y_grp", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 461, "end_line": 498, "span_ids": ["TestRelationalPlotter.test_relplot_complex"], "tokens": 436}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRelationalPlotter(Helpers):\n\n    def test_relplot_complex(self, long_df):\n\n        for sem in [\"hue\", \"size\", \"style\"]:\n            g = relplot(data=long_df, x=\"x\", y=\"y\", **{sem: \"a\"})\n            x, y = g.ax.collections[0].get_offsets().T\n            assert_array_equal(x, long_df[\"x\"])\n            assert_array_equal(y, long_df[\"y\"])\n\n        for sem in [\"hue\", \"size\", \"style\"]:\n            g = relplot(\n                data=long_df, x=\"x\", y=\"y\", col=\"c\", **{sem: \"a\"}\n            )\n            grouped = long_df.groupby(\"c\")\n            for (_, grp_df), ax in zip(grouped, g.axes.flat):\n                x, y = ax.collections[0].get_offsets().T\n                assert_array_equal(x, grp_df[\"x\"])\n                assert_array_equal(y, grp_df[\"y\"])\n\n        for sem in [\"size\", \"style\"]:\n            g = relplot(\n                data=long_df, x=\"x\", y=\"y\", hue=\"b\", col=\"c\", **{sem: \"a\"}\n            )\n            grouped = long_df.groupby(\"c\")\n            for (_, grp_df), ax in zip(grouped, g.axes.flat):\n                x, y = ax.collections[0].get_offsets().T\n                assert_array_equal(x, grp_df[\"x\"])\n                assert_array_equal(y, grp_df[\"y\"])\n\n        for sem in [\"hue\", \"size\", \"style\"]:\n            g = relplot(\n                data=long_df.sort_values([\"c\", \"b\"]),\n                x=\"x\", y=\"y\", col=\"b\", row=\"c\", **{sem: \"a\"}\n            )\n            grouped = long_df.groupby([\"c\", \"b\"])\n            for (_, grp_df), ax in zip(grouped, g.axes.flat):\n                x, y = ax.collections[0].get_offsets().T\n                assert_array_equal(x, grp_df[\"x\"])\n                assert_array_equal(y, grp_df[\"y\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_vectors_TestRelationalPlotter.test_relplot_vectors.for___grp_df_ax_in_zi.assert_array_equal_y_grp": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_vectors_TestRelationalPlotter.test_relplot_vectors.for___grp_df_ax_in_zi.assert_array_equal_y_grp", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 500, "end_line": 515, "span_ids": ["TestRelationalPlotter.test_relplot_vectors"], "tokens": 224}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRelationalPlotter(Helpers):\n\n    @pytest.mark.parametrize(\"vector_type\", [\"series\", \"numpy\", \"list\"])\n    def test_relplot_vectors(self, long_df, vector_type):\n\n        semantics = dict(x=\"x\", y=\"y\", hue=\"f\", col=\"c\")\n        kws = {key: long_df[val] for key, val in semantics.items()}\n        if vector_type == \"numpy\":\n            kws = {k: v.to_numpy() for k, v in kws.items()}\n        elif vector_type == \"list\":\n            kws = {k: v.to_list() for k, v in kws.items()}\n        g = relplot(data=long_df, **kws)\n        grouped = long_df.groupby(\"c\")\n        assert len(g.axes_dict) == len(grouped)\n        for (_, grp_df), ax in zip(grouped, g.axes.flat):\n            x, y = ax.collections[0].get_offsets().T\n            assert_array_equal(x, grp_df[\"x\"])\n            assert_array_equal(y, grp_df[\"y\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_wide_TestRelationalPlotter.test_relplot_hues.for___grp_df_ax_in_zi.assert_same_color_points_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_wide_TestRelationalPlotter.test_relplot_hues.for___grp_df_ax_in_zi.assert_same_color_points_", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 517, "end_line": 537, "span_ids": ["TestRelationalPlotter.test_relplot_wide", "TestRelationalPlotter.test_relplot_hues"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRelationalPlotter(Helpers):\n\n    def test_relplot_wide(self, wide_df):\n\n        g = relplot(data=wide_df)\n        x, y = g.ax.collections[0].get_offsets().T\n        assert_array_equal(y, wide_df.to_numpy().T.ravel())\n        assert not g.ax.get_ylabel()\n\n    def test_relplot_hues(self, long_df):\n\n        palette = [\"r\", \"b\", \"g\"]\n        g = relplot(\n            x=\"x\", y=\"y\", hue=\"a\", style=\"b\", col=\"c\",\n            palette=palette, data=long_df\n        )\n\n        palette = dict(zip(long_df[\"a\"].unique(), palette))\n        grouped = long_df.groupby(\"c\")\n        for (_, grp_df), ax in zip(grouped, g.axes.flat):\n            points = ax.collections[0]\n            expected_hues = [palette[val] for val in grp_df[\"a\"]]\n            assert same_color(points.get_facecolors(), expected_hues)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_sizes_TestRelationalPlotter.test_relplot_sizes.for___grp_df_ax_in_zi.assert_array_equal_points": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_sizes_TestRelationalPlotter.test_relplot_sizes.for___grp_df_ax_in_zi.assert_array_equal_points", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 539, "end_line": 553, "span_ids": ["TestRelationalPlotter.test_relplot_sizes"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRelationalPlotter(Helpers):\n\n    def test_relplot_sizes(self, long_df):\n\n        sizes = [5, 12, 7]\n        g = relplot(\n            data=long_df,\n            x=\"x\", y=\"y\", size=\"a\", hue=\"b\", col=\"c\",\n            sizes=sizes,\n        )\n\n        sizes = dict(zip(long_df[\"a\"].unique(), sizes))\n        grouped = long_df.groupby(\"c\")\n        for (_, grp_df), ax in zip(grouped, g.axes.flat):\n            points = ax.collections[0]\n            expected_sizes = [sizes[val] for val in grp_df[\"a\"]]\n            assert_array_equal(points.get_sizes(), expected_sizes)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_styles_TestRelationalPlotter.test_relplot_styles.for___grp_df_ax_in_zi.assert_self_paths_equal_p": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_styles_TestRelationalPlotter.test_relplot_styles.for___grp_df_ax_in_zi.assert_self_paths_equal_p", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 555, "end_line": 574, "span_ids": ["TestRelationalPlotter.test_relplot_styles"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRelationalPlotter(Helpers):\n\n    def test_relplot_styles(self, long_df):\n\n        markers = [\"o\", \"d\", \"s\"]\n        g = relplot(\n            data=long_df,\n            x=\"x\", y=\"y\", style=\"a\", hue=\"b\", col=\"c\",\n            markers=markers,\n        )\n\n        paths = []\n        for m in markers:\n            m = mpl.markers.MarkerStyle(m)\n            paths.append(m.get_path().transformed(m.get_transform()))\n        paths = dict(zip(long_df[\"a\"].unique(), paths))\n\n        grouped = long_df.groupby(\"c\")\n        for (_, grp_df), ax in zip(grouped, g.axes.flat):\n            points = ax.collections[0]\n            expected_paths = [paths[val] for val in grp_df[\"a\"]]\n            assert self.paths_equal(points.get_paths(), expected_paths)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_stringy_numerics_TestRelationalPlotter.test_relplot_stringy_numerics.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_stringy_numerics_TestRelationalPlotter.test_relplot_stringy_numerics.None_1", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 576, "end_line": 592, "span_ids": ["TestRelationalPlotter.test_relplot_stringy_numerics"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRelationalPlotter(Helpers):\n\n    def test_relplot_stringy_numerics(self, long_df):\n\n        long_df[\"x_str\"] = long_df[\"x\"].astype(str)\n\n        g = relplot(data=long_df, x=\"x\", y=\"y\", hue=\"x_str\")\n        points = g.ax.collections[0]\n        xys = points.get_offsets()\n        mask = np.ma.getmask(xys)\n        assert not mask.any()\n        assert_array_equal(xys, long_df[[\"x\", \"y\"]])\n\n        g = relplot(data=long_df, x=\"x\", y=\"y\", size=\"x_str\")\n        points = g.ax.collections[0]\n        xys = points.get_offsets()\n        mask = np.ma.getmask(xys)\n        assert not mask.any()\n        assert_array_equal(xys, long_df[[\"x\", \"y\"]])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_legend_TestRelationalPlotter.test_relplot_legend.for_line_color_in_zip_li.assert_line_get_color_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_legend_TestRelationalPlotter.test_relplot_legend.for_line_color_in_zip_li.assert_line_get_color_", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 594, "end_line": 621, "span_ids": ["TestRelationalPlotter.test_relplot_legend"], "tokens": 332}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRelationalPlotter(Helpers):\n\n    def test_relplot_legend(self, long_df):\n\n        g = relplot(data=long_df, x=\"x\", y=\"y\")\n        assert g._legend is None\n\n        g = relplot(data=long_df, x=\"x\", y=\"y\", hue=\"a\")\n        texts = [t.get_text() for t in g._legend.texts]\n        expected_texts = long_df[\"a\"].unique()\n        assert_array_equal(texts, expected_texts)\n\n        g = relplot(data=long_df, x=\"x\", y=\"y\", hue=\"s\", size=\"s\")\n        texts = [t.get_text() for t in g._legend.texts]\n        assert_array_equal(texts, np.sort(texts))\n\n        g = relplot(data=long_df, x=\"x\", y=\"y\", hue=\"a\", legend=False)\n        assert g._legend is None\n\n        palette = color_palette(\"deep\", len(long_df[\"b\"].unique()))\n        a_like_b = dict(zip(long_df[\"a\"].unique(), long_df[\"b\"].unique()))\n        long_df[\"a_like_b\"] = long_df[\"a\"].map(a_like_b)\n        g = relplot(\n            data=long_df,\n            x=\"x\", y=\"y\", hue=\"b\", style=\"a_like_b\",\n            palette=palette, kind=\"line\", estimator=None,\n        )\n        lines = g._legend.get_lines()[1:]  # Chop off title dummy\n        for line, color in zip(lines, palette):\n            assert line.get_color() == color", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_data_TestRelationalPlotter.test_relplot_data.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_relplot_data_TestRelationalPlotter.test_relplot_data.None_1", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 623, "end_line": 635, "span_ids": ["TestRelationalPlotter.test_relplot_data"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRelationalPlotter(Helpers):\n\n    def test_relplot_data(self, long_df):\n\n        g = relplot(\n            data=long_df.to_dict(orient=\"list\"),\n            x=\"x\",\n            y=long_df[\"y\"].rename(\"y_var\"),\n            hue=long_df[\"a\"].to_numpy(),\n            col=\"c\",\n        )\n        expected_cols = set(long_df.columns.to_list() + [\"_hue_\", \"y_var\"])\n        assert set(g.data.columns) == expected_cols\n        assert_array_equal(g.data[\"y_var\"], long_df[\"y\"])\n        assert_array_equal(g.data[\"_hue_\"], long_df[\"a\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_facet_variable_collision_TestRelationalPlotter.test_ax_kwarg_removal.assert_len_g_ax_collectio": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestRelationalPlotter.test_facet_variable_collision_TestRelationalPlotter.test_ax_kwarg_removal.assert_len_g_ax_collectio", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 637, "end_line": 655, "span_ids": ["TestRelationalPlotter.test_facet_variable_collision", "TestRelationalPlotter.test_ax_kwarg_removal"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRelationalPlotter(Helpers):\n\n    def test_facet_variable_collision(self, long_df):\n\n        # https://github.com/mwaskom/seaborn/issues/2488\n        col_data = long_df[\"c\"]\n        long_df = long_df.assign(size=col_data)\n\n        g = relplot(\n            data=long_df,\n            x=\"x\", y=\"y\", col=\"size\",\n        )\n        assert g.axes.shape == (1, len(col_data.unique()))\n\n    def test_ax_kwarg_removal(self, long_df):\n\n        f, ax = plt.subplots()\n        with pytest.warns(UserWarning):\n            g = relplot(data=long_df, x=\"x\", y=\"y\", ax=ax)\n        assert len(ax.collections) == 0\n        assert len(g.ax.collections) > 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter_TestLinePlotter.test_legend_data.None_23": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter_TestLinePlotter.test_legend_data.None_23", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 658, "end_line": 774, "span_ids": ["TestLinePlotter.test_legend_data", "TestLinePlotter.get_last_color", "TestLinePlotter"], "tokens": 921}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLinePlotter(SharedAxesLevelTests, Helpers):\n\n    func = staticmethod(lineplot)\n\n    def get_last_color(self, ax):\n\n        return to_rgba(ax.lines[-1].get_color())\n\n    def test_legend_data(self, long_df):\n\n        f, ax = plt.subplots()\n\n        p = _LinePlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\"),\n            legend=\"full\"\n        )\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        assert handles == []\n\n        # --\n\n        ax.clear()\n        p = _LinePlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\"),\n            legend=\"full\",\n        )\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        colors = [h.get_color() for h in handles]\n        assert labels == p._hue_map.levels\n        assert colors == p._hue_map(p._hue_map.levels)\n\n        # --\n\n        ax.clear()\n        p = _LinePlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\", style=\"a\"),\n            legend=\"full\",\n        )\n        p.map_style(markers=True)\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        colors = [h.get_color() for h in handles]\n        markers = [h.get_marker() for h in handles]\n        assert labels == p._hue_map.levels\n        assert labels == p._style_map.levels\n        assert colors == p._hue_map(p._hue_map.levels)\n        assert markers == p._style_map(p._style_map.levels, \"marker\")\n\n        # --\n\n        ax.clear()\n        p = _LinePlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\", style=\"b\"),\n            legend=\"full\",\n        )\n        p.map_style(markers=True)\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        colors = [h.get_color() for h in handles]\n        markers = [h.get_marker() for h in handles]\n        expected_labels = (\n            [\"a\"]\n            + p._hue_map.levels\n            + [\"b\"] + p._style_map.levels\n        )\n        expected_colors = (\n            [\"w\"] + p._hue_map(p._hue_map.levels)\n            + [\"w\"] + [\".2\" for _ in p._style_map.levels]\n        )\n        expected_markers = (\n            [\"\"] + [\"None\" for _ in p._hue_map.levels]\n            + [\"\"] + p._style_map(p._style_map.levels, \"marker\")\n        )\n        assert labels == expected_labels\n        assert colors == expected_colors\n        assert markers == expected_markers\n\n        # --\n\n        ax.clear()\n        p = _LinePlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\", size=\"a\"),\n            legend=\"full\"\n        )\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        colors = [h.get_color() for h in handles]\n        widths = [h.get_linewidth() for h in handles]\n        assert labels == p._hue_map.levels\n        assert labels == p._size_map.levels\n        assert colors == p._hue_map(p._hue_map.levels)\n        assert widths == p._size_map(p._size_map.levels)\n\n        # --\n\n        x, y = np.random.randn(2, 40)\n        z = np.tile(np.arange(20), 2)\n\n        p = _LinePlotter(variables=dict(x=x, y=y, hue=z))\n\n        ax.clear()\n        p.legend = \"full\"\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        assert labels == [str(l) for l in p._hue_map.levels]\n\n        ax.clear()\n        p.legend = \"brief\"\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        # ... other code\n\n        ax.clear()\n        # ... other code\n        p.add_legend_data(ax)\n        # ... other code\n        p.add_legend_data(ax)\n        # ... other code\n\n        ax.clear()\n        # ... other code\n\n        ax.clear()\n        # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_legend_data.assert_len_labels_len__TestLinePlotter.test_legend_data.None_42": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_legend_data.assert_len_labels_len__TestLinePlotter.test_legend_data.None_42", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 775, "end_line": 858, "span_ids": ["TestLinePlotter.test_legend_data"], "tokens": 760}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLinePlotter(SharedAxesLevelTests, Helpers):\n\n    def test_legend_data(self, long_df):\n        # ... other code\n        handles, labels = ax.get_legend_handles_labels()\n        # ... other code\n        assert labels == p._hue_map.levels\n        # ... other code\n        assert colors == p._hue_map(p._hue_map.levels)\n        # ... other code\n        handles, labels = ax.get_legend_handles_labels()\n        # ... other code\n        handles, labels = ax.get_legend_handles_labels()\n        assert len(labels) < len(p._hue_map.levels)\n\n        p = _LinePlotter(variables=dict(x=x, y=y, size=z))\n\n        ax.clear()\n        p.legend = \"full\"\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        assert labels == [str(l) for l in p._size_map.levels]\n\n        ax.clear()\n        p.legend = \"brief\"\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        assert len(labels) < len(p._size_map.levels)\n\n        ax.clear()\n        p.legend = \"auto\"\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        assert len(labels) < len(p._size_map.levels)\n\n        ax.clear()\n        p.legend = True\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        assert len(labels) < len(p._size_map.levels)\n\n        ax.clear()\n        p.legend = \"bad_value\"\n        with pytest.raises(ValueError):\n            p.add_legend_data(ax)\n\n        ax.clear()\n        p = _LinePlotter(\n            variables=dict(x=x, y=y, hue=z + 1),\n            legend=\"brief\"\n        )\n        p.map_hue(norm=mpl.colors.LogNorm()),\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        assert float(labels[1]) / float(labels[0]) == 10\n\n        ax.clear()\n        p = _LinePlotter(\n            variables=dict(x=x, y=y, hue=z % 2),\n            legend=\"auto\"\n        )\n        p.map_hue(norm=mpl.colors.LogNorm()),\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        assert labels == [\"0\", \"1\"]\n\n        ax.clear()\n        p = _LinePlotter(\n            variables=dict(x=x, y=y, size=z + 1),\n            legend=\"brief\"\n        )\n        p.map_size(norm=mpl.colors.LogNorm())\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        assert float(labels[1]) / float(labels[0]) == 10\n\n        ax.clear()\n        p = _LinePlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"f\"),\n            legend=\"brief\",\n        )\n        p.add_legend_data(ax)\n        expected_labels = ['0.20', '0.22', '0.24', '0.26', '0.28']\n        handles, labels = ax.get_legend_handles_labels()\n        assert labels == expected_labels\n\n        ax.clear()\n        p = _LinePlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", size=\"f\"),\n            legend=\"brief\",\n        )\n        p.add_legend_data(ax)\n        expected_levels = ['0.20', '0.22', '0.24', '0.26', '0.28']\n        handles, labels = ax.get_legend_handles_labels()\n        assert labels == expected_levels", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_plot_TestLinePlotter.test_plot.assert_len_ax_collections": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_plot_TestLinePlotter.test_plot.assert_len_ax_collections", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 860, "end_line": 957, "span_ids": ["TestLinePlotter.test_plot"], "tokens": 904}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLinePlotter(SharedAxesLevelTests, Helpers):\n\n    def test_plot(self, long_df, repeated_df):\n\n        f, ax = plt.subplots()\n\n        p = _LinePlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\"),\n            sort=False,\n            estimator=None\n        )\n        p.plot(ax, {})\n        line, = ax.lines\n        assert_array_equal(line.get_xdata(), long_df.x.to_numpy())\n        assert_array_equal(line.get_ydata(), long_df.y.to_numpy())\n\n        ax.clear()\n        p.plot(ax, {\"color\": \"k\", \"label\": \"test\"})\n        line, = ax.lines\n        assert line.get_color() == \"k\"\n        assert line.get_label() == \"test\"\n\n        p = _LinePlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\"),\n            sort=True, estimator=None\n        )\n\n        ax.clear()\n        p.plot(ax, {})\n        line, = ax.lines\n        sorted_data = long_df.sort_values([\"x\", \"y\"])\n        assert_array_equal(line.get_xdata(), sorted_data.x.to_numpy())\n        assert_array_equal(line.get_ydata(), sorted_data.y.to_numpy())\n\n        p = _LinePlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\"),\n        )\n\n        ax.clear()\n        p.plot(ax, {})\n        assert len(ax.lines) == len(p._hue_map.levels)\n        for line, level in zip(ax.lines, p._hue_map.levels):\n            assert line.get_color() == p._hue_map(level)\n\n        p = _LinePlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", size=\"a\"),\n        )\n\n        ax.clear()\n        p.plot(ax, {})\n        assert len(ax.lines) == len(p._size_map.levels)\n        for line, level in zip(ax.lines, p._size_map.levels):\n            assert line.get_linewidth() == p._size_map(level)\n\n        p = _LinePlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\", style=\"a\"),\n        )\n        p.map_style(markers=True)\n\n        ax.clear()\n        p.plot(ax, {})\n        assert len(ax.lines) == len(p._hue_map.levels)\n        assert len(ax.lines) == len(p._style_map.levels)\n        for line, level in zip(ax.lines, p._hue_map.levels):\n            assert line.get_color() == p._hue_map(level)\n            assert line.get_marker() == p._style_map(level, \"marker\")\n\n        p = _LinePlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\", style=\"b\"),\n        )\n        p.map_style(markers=True)\n\n        ax.clear()\n        p.plot(ax, {})\n        levels = product(p._hue_map.levels, p._style_map.levels)\n        expected_line_count = len(p._hue_map.levels) * len(p._style_map.levels)\n        assert len(ax.lines) == expected_line_count\n        for line, (hue, style) in zip(ax.lines, levels):\n            assert line.get_color() == p._hue_map(hue)\n            assert line.get_marker() == p._style_map(style, \"marker\")\n\n        p = _LinePlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\"),\n            estimator=\"mean\", err_style=\"band\", errorbar=\"sd\", sort=True\n        )\n\n        ax.clear()\n        p.plot(ax, {})\n        line, = ax.lines\n        expected_data = long_df.groupby(\"x\").y.mean()\n        assert_array_equal(line.get_xdata(), expected_data.index.to_numpy())\n        assert np.allclose(line.get_ydata(), expected_data.to_numpy())\n        assert len(ax.collections) == 1\n        # ... other code\n        line, = ax.lines\n        # ... other code\n        assert len(ax.lines) == len(ax.collections) == len(p._hue_map.levels)\n        # ... other code\n        assert len(ax.collections) == len(p._hue_map.levels)\n        for c in ax.collections:\n            # ... other code\n        # ... other code\n        with pytest.raises(ValueError):\n            # ... other code\n        # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_plot._Test_that_nans_do_not_p_TestLinePlotter.test_plot.None_39": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_plot._Test_that_nans_do_not_p_TestLinePlotter.test_plot.None_39", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 959, "end_line": 1067, "span_ids": ["TestLinePlotter.test_plot"], "tokens": 931}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLinePlotter(SharedAxesLevelTests, Helpers):\n\n    def test_plot(self, long_df, repeated_df):\n        # ... other code\n\n        ax.clear()\n        # ... other code\n        line, = ax.lines\n        # ... other code\n\n        ax.clear()\n        # ... other code\n\n        ax.clear()\n        # ... other code\n        assert len(ax.lines) == len(p._style_map.levels)\n        # ... other code\n        p.plot(ax, {})\n        # ... other code\n        p.plot(ax, {})\n\n        # Test that nans do not propagate to means or CIs\n\n        p = _LinePlotter(\n            variables=dict(\n                x=[1, 1, 1, 2, 2, 2, 3, 3, 3],\n                y=[1, 2, 3, 3, np.nan, 5, 4, 5, 6],\n            ),\n            estimator=\"mean\", err_style=\"band\", errorbar=\"ci\", n_boot=100, sort=True,\n        )\n        ax.clear()\n        p.plot(ax, {})\n        line, = ax.lines\n        assert line.get_xdata().tolist() == [1, 2, 3]\n        err_band = ax.collections[0].get_paths()\n        assert len(err_band) == 1\n        assert len(err_band[0].vertices) == 9\n\n        p = _LinePlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\"),\n            estimator=\"mean\", err_style=\"band\", errorbar=\"sd\"\n        )\n\n        ax.clear()\n        p.plot(ax, {})\n        assert len(ax.lines) == len(ax.collections) == len(p._hue_map.levels)\n        for c in ax.collections:\n            assert isinstance(c, mpl.collections.PolyCollection)\n\n        p = _LinePlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\"),\n            estimator=\"mean\", err_style=\"bars\", errorbar=\"sd\"\n        )\n\n        ax.clear()\n        p.plot(ax, {})\n        n_lines = len(ax.lines)\n        assert n_lines / 2 == len(ax.collections) == len(p._hue_map.levels)\n        assert len(ax.collections) == len(p._hue_map.levels)\n        for c in ax.collections:\n            assert isinstance(c, mpl.collections.LineCollection)\n\n        p = _LinePlotter(\n            data=repeated_df,\n            variables=dict(x=\"x\", y=\"y\", units=\"u\"),\n            estimator=None\n        )\n\n        ax.clear()\n        p.plot(ax, {})\n        n_units = len(repeated_df[\"u\"].unique())\n        assert len(ax.lines) == n_units\n\n        p = _LinePlotter(\n            data=repeated_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\", units=\"u\"),\n            estimator=None\n        )\n\n        ax.clear()\n        p.plot(ax, {})\n        n_units *= len(repeated_df[\"a\"].unique())\n        assert len(ax.lines) == n_units\n\n        p.estimator = \"mean\"\n        with pytest.raises(ValueError):\n            p.plot(ax, {})\n\n        p = _LinePlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\"),\n            err_style=\"band\", err_kws={\"alpha\": .5},\n        )\n\n        ax.clear()\n        p.plot(ax, {})\n        for band in ax.collections:\n            assert band.get_alpha() == .5\n\n        p = _LinePlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\"),\n            err_style=\"bars\", err_kws={\"elinewidth\": 2},\n        )\n\n        ax.clear()\n        p.plot(ax, {})\n        for lines in ax.collections:\n            assert lines.get_linestyles() == 2\n\n        p.err_style = \"invalid\"\n        with pytest.raises(ValueError):\n            p.plot(ax, {})\n\n        x_str = long_df[\"x\"].astype(str)\n        p = _LinePlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=x_str),\n        )\n        ax.clear()\n        p.plot(ax, {})\n\n        p = _LinePlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", size=x_str),\n        )\n        ax.clear()\n        p.plot(ax, {})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_log_scale_TestLinePlotter.test_log_scale.None_8": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_log_scale_TestLinePlotter.test_log_scale.None_8", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 1069, "end_line": 1095, "span_ids": ["TestLinePlotter.test_log_scale"], "tokens": 242}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLinePlotter(SharedAxesLevelTests, Helpers):\n\n    def test_log_scale(self):\n\n        f, ax = plt.subplots()\n        ax.set_xscale(\"log\")\n\n        x = [1, 10, 100]\n        y = [1, 2, 3]\n\n        lineplot(x=x, y=y)\n        line = ax.lines[0]\n        assert_array_equal(line.get_xdata(), x)\n        assert_array_equal(line.get_ydata(), y)\n\n        f, ax = plt.subplots()\n        ax.set_xscale(\"log\")\n        ax.set_yscale(\"log\")\n\n        x = [1, 1, 2, 2]\n        y = [1, 10, 1, 100]\n\n        lineplot(x=x, y=y, err_style=\"bars\", errorbar=(\"pi\", 100))\n        line = ax.lines[0]\n        assert line.get_ydata()[1] == 10\n\n        ebars = ax.collections[0].get_segments()\n        assert_array_equal(ebars[0][:, 1], y[:2])\n        assert_array_equal(ebars[1][:, 1], y[2:])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_axis_labels_TestLinePlotter.test_axis_labels.assert_not_ax2_yaxis_labe": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_axis_labels_TestLinePlotter.test_axis_labels.assert_not_ax2_yaxis_labe", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 1097, "end_line": 1113, "span_ids": ["TestLinePlotter.test_axis_labels"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLinePlotter(SharedAxesLevelTests, Helpers):\n\n    def test_axis_labels(self, long_df):\n\n        f, (ax1, ax2) = plt.subplots(1, 2, sharey=True)\n\n        p = _LinePlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\"),\n        )\n\n        p.plot(ax1, {})\n        assert ax1.get_xlabel() == \"x\"\n        assert ax1.get_ylabel() == \"y\"\n\n        p.plot(ax2, {})\n        assert ax2.get_xlabel() == \"x\"\n        assert ax2.get_ylabel() == \"y\"\n        assert not ax2.yaxis.label.get_visible()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_matplotlib_kwargs_TestLinePlotter.test_matplotlib_kwargs.for_key_val_in_kws_items.assert_plot_val_val": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_matplotlib_kwargs_TestLinePlotter.test_matplotlib_kwargs.for_key_val_in_kws_items.assert_plot_val_val", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 1115, "end_line": 1129, "span_ids": ["TestLinePlotter.test_matplotlib_kwargs"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLinePlotter(SharedAxesLevelTests, Helpers):\n\n    def test_matplotlib_kwargs(self, long_df):\n\n        kws = {\n            \"linestyle\": \"--\",\n            \"linewidth\": 3,\n            \"color\": (1, .5, .2),\n            \"markeredgecolor\": (.2, .5, .2),\n            \"markeredgewidth\": 1,\n        }\n        ax = lineplot(data=long_df, x=\"x\", y=\"y\", **kws)\n\n        line, *_ = ax.lines\n        for key, val in kws.items():\n            plot_val = getattr(line, f\"get_{key}\")()\n            assert plot_val == val", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_nonmapped_dashes_TestLinePlotter.test_lineplot_axes.assert_ax_is_ax1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_nonmapped_dashes_TestLinePlotter.test_lineplot_axes.assert_ax_is_ax1", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 1131, "end_line": 1147, "span_ids": ["TestLinePlotter.test_lineplot_axes", "TestLinePlotter.test_nonmapped_dashes"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLinePlotter(SharedAxesLevelTests, Helpers):\n\n    def test_nonmapped_dashes(self):\n\n        ax = lineplot(x=[1, 2], y=[1, 2], dashes=(2, 1))\n        line = ax.lines[0]\n        # Not a great test, but lines don't expose the dash style publicly\n        assert line.get_linestyle() == \"--\"\n\n    def test_lineplot_axes(self, wide_df):\n\n        f1, ax1 = plt.subplots()\n        f2, ax2 = plt.subplots()\n\n        ax = lineplot(data=wide_df)\n        assert ax is ax2\n\n        ax = lineplot(data=wide_df, ax=ax1)\n        assert ax is ax1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_lineplot_vs_relplot_TestLinePlotter.test_lineplot_vs_relplot.for_l1_l2_in_zip_lin_lin.assert_l1_get_linestyle_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_lineplot_vs_relplot_TestLinePlotter.test_lineplot_vs_relplot.for_l1_l2_in_zip_lin_lin.assert_l1_get_linestyle_", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 1149, "end_line": 1161, "span_ids": ["TestLinePlotter.test_lineplot_vs_relplot"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLinePlotter(SharedAxesLevelTests, Helpers):\n\n    def test_lineplot_vs_relplot(self, long_df, long_semantics):\n\n        ax = lineplot(data=long_df, **long_semantics)\n        g = relplot(data=long_df, kind=\"line\", **long_semantics)\n\n        lin_lines = ax.lines\n        rel_lines = g.ax.lines\n\n        for l1, l2 in zip(lin_lines, rel_lines):\n            assert_array_equal(l1.get_xydata(), l2.get_xydata())\n            assert same_color(l1.get_color(), l2.get_color())\n            assert l1.get_linewidth() == l2.get_linewidth()\n            assert l1.get_linestyle() == l2.get_linestyle()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_lineplot_smoke_TestLinePlotter.test_lineplot_smoke.None_51": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_lineplot_smoke_TestLinePlotter.test_lineplot_smoke.None_51", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 1163, "end_line": 1249, "span_ids": ["TestLinePlotter.test_lineplot_smoke"], "tokens": 624}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLinePlotter(SharedAxesLevelTests, Helpers):\n\n    def test_lineplot_smoke(\n        self,\n        wide_df, wide_array,\n        wide_list_of_series, wide_list_of_arrays, wide_list_of_lists,\n        flat_array, flat_series, flat_list,\n        long_df, missing_df, object_df\n    ):\n\n        f, ax = plt.subplots()\n\n        lineplot(x=[], y=[])\n        ax.clear()\n\n        lineplot(data=wide_df)\n        ax.clear()\n\n        lineplot(data=wide_array)\n        ax.clear()\n\n        lineplot(data=wide_list_of_series)\n        ax.clear()\n\n        lineplot(data=wide_list_of_arrays)\n        ax.clear()\n\n        lineplot(data=wide_list_of_lists)\n        ax.clear()\n\n        lineplot(data=flat_series)\n        ax.clear()\n\n        lineplot(data=flat_array)\n        ax.clear()\n\n        lineplot(data=flat_list)\n        ax.clear()\n\n        lineplot(x=\"x\", y=\"y\", data=long_df)\n        ax.clear()\n\n        lineplot(x=long_df.x, y=long_df.y)\n        ax.clear()\n\n        lineplot(x=long_df.x, y=\"y\", data=long_df)\n        ax.clear()\n\n        lineplot(x=\"x\", y=long_df.y.to_numpy(), data=long_df)\n        ax.clear()\n\n        lineplot(x=\"x\", y=\"t\", data=long_df)\n        ax.clear()\n\n        lineplot(x=\"x\", y=\"y\", hue=\"a\", data=long_df)\n        ax.clear()\n\n        lineplot(x=\"x\", y=\"y\", hue=\"a\", style=\"a\", data=long_df)\n        ax.clear()\n\n        lineplot(x=\"x\", y=\"y\", hue=\"a\", style=\"b\", data=long_df)\n        ax.clear()\n\n        lineplot(x=\"x\", y=\"y\", hue=\"a\", style=\"a\", data=missing_df)\n        ax.clear()\n\n        lineplot(x=\"x\", y=\"y\", hue=\"a\", style=\"b\", data=missing_df)\n        ax.clear()\n\n        lineplot(x=\"x\", y=\"y\", hue=\"a\", size=\"a\", data=long_df)\n        ax.clear()\n\n        lineplot(x=\"x\", y=\"y\", hue=\"a\", size=\"s\", data=long_df)\n        ax.clear()\n\n        lineplot(x=\"x\", y=\"y\", hue=\"a\", size=\"a\", data=missing_df)\n        ax.clear()\n\n        lineplot(x=\"x\", y=\"y\", hue=\"a\", size=\"s\", data=missing_df)\n        ax.clear()\n\n        lineplot(x=\"x\", y=\"y\", hue=\"f\", data=object_df)\n        ax.clear()\n\n        lineplot(x=\"x\", y=\"y\", hue=\"c\", size=\"f\", data=object_df)\n        ax.clear()\n\n        lineplot(x=\"x\", y=\"y\", hue=\"f\", size=\"s\", data=object_df)\n        ax.clear()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_ci_deprecation_TestLinePlotter.test_ci_deprecation.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_ci_deprecation_TestLinePlotter.test_ci_deprecation.None_3", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 1278, "end_line": 1290, "span_ids": ["TestLinePlotter.test_ci_deprecation"], "tokens": 221}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLinePlotter(SharedAxesLevelTests, Helpers):\n\n    def test_ci_deprecation(self, long_df):\n\n        axs = plt.figure().subplots(2)\n        lineplot(data=long_df, x=\"x\", y=\"y\", errorbar=(\"ci\", 95), seed=0, ax=axs[0])\n        with pytest.warns(FutureWarning, match=\"\\n\\nThe `ci` parameter is deprecated\"):\n            lineplot(data=long_df, x=\"x\", y=\"y\", ci=95, seed=0, ax=axs[1])\n        assert_plots_equal(*axs)\n\n        axs = plt.figure().subplots(2)\n        lineplot(data=long_df, x=\"x\", y=\"y\", errorbar=\"sd\", ax=axs[0])\n        with pytest.warns(FutureWarning, match=\"\\n\\nThe `ci` parameter is deprecated\"):\n            lineplot(data=long_df, x=\"x\", y=\"y\", ci=\"sd\", ax=axs[1])\n        assert_plots_equal(*axs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter_TestScatterPlotter.test_color.if_Version_mpl___version_.assert_self_get_last_colo": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter_TestScatterPlotter.test_color.if_Version_mpl___version_.assert_self_get_last_colo", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 1266, "end_line": 1294, "span_ids": ["TestScatterPlotter.test_color", "TestScatterPlotter", "TestScatterPlotter.get_last_color"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScatterPlotter(SharedAxesLevelTests, Helpers):\n\n    func = staticmethod(scatterplot)\n\n    def get_last_color(self, ax):\n\n        colors = ax.collections[-1].get_facecolors()\n        unique_colors = np.unique(colors, axis=0)\n        assert len(unique_colors) == 1\n        return to_rgba(unique_colors.squeeze())\n\n    def test_color(self, long_df):\n\n        super().test_color(long_df)\n\n        ax = plt.figure().subplots()\n        self.func(data=long_df, x=\"x\", y=\"y\", facecolor=\"C5\", ax=ax)\n        assert self.get_last_color(ax) == to_rgba(\"C5\")\n\n        ax = plt.figure().subplots()\n        self.func(data=long_df, x=\"x\", y=\"y\", facecolors=\"C6\", ax=ax)\n        assert self.get_last_color(ax) == to_rgba(\"C6\")\n\n        if Version(mpl.__version__) >= Version(\"3.1.0\"):\n            # https://github.com/matplotlib/matplotlib/pull/12851\n\n            ax = plt.figure().subplots()\n            self.func(data=long_df, x=\"x\", y=\"y\", fc=\"C4\", ax=ax)\n            assert self.get_last_color(ax) == to_rgba(\"C4\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_legend_data_TestScatterPlotter.test_legend_data.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_legend_data_TestScatterPlotter.test_legend_data.None_4", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 1296, "end_line": 1396, "span_ids": ["TestScatterPlotter.test_legend_data"], "tokens": 879}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScatterPlotter(SharedAxesLevelTests, Helpers):\n\n    def test_legend_data(self, long_df):\n\n        m = mpl.markers.MarkerStyle(\"o\")\n        default_mark = m.get_path().transformed(m.get_transform())\n\n        m = mpl.markers.MarkerStyle(\"\")\n        null = m.get_path().transformed(m.get_transform())\n\n        f, ax = plt.subplots()\n\n        p = _ScatterPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\"),\n            legend=\"full\",\n        )\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        assert handles == []\n\n        # --\n\n        ax.clear()\n        p = _ScatterPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\"),\n            legend=\"full\",\n        )\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        colors = [h.get_facecolors()[0] for h in handles]\n        expected_colors = p._hue_map(p._hue_map.levels)\n        assert labels == p._hue_map.levels\n        assert same_color(colors, expected_colors)\n\n        # --\n\n        ax.clear()\n        p = _ScatterPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\", style=\"a\"),\n            legend=\"full\",\n        )\n        p.map_style(markers=True)\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        colors = [h.get_facecolors()[0] for h in handles]\n        expected_colors = p._hue_map(p._hue_map.levels)\n        paths = [h.get_paths()[0] for h in handles]\n        expected_paths = p._style_map(p._style_map.levels, \"path\")\n        assert labels == p._hue_map.levels\n        assert labels == p._style_map.levels\n        assert same_color(colors, expected_colors)\n        assert self.paths_equal(paths, expected_paths)\n\n        # --\n\n        ax.clear()\n        p = _ScatterPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\", style=\"b\"),\n            legend=\"full\",\n        )\n        p.map_style(markers=True)\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        colors = [h.get_facecolors()[0] for h in handles]\n        paths = [h.get_paths()[0] for h in handles]\n        expected_colors = (\n            [\"w\"] + p._hue_map(p._hue_map.levels)\n            + [\"w\"] + [\".2\" for _ in p._style_map.levels]\n        )\n        expected_paths = (\n            [null] + [default_mark for _ in p._hue_map.levels]\n            + [null] + p._style_map(p._style_map.levels, \"path\")\n        )\n        assert labels == (\n            [\"a\"] + p._hue_map.levels + [\"b\"] + p._style_map.levels\n        )\n        assert same_color(colors, expected_colors)\n        assert self.paths_equal(paths, expected_paths)\n\n        # --\n\n        ax.clear()\n        p = _ScatterPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\", size=\"a\"),\n            legend=\"full\"\n        )\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        colors = [h.get_facecolors()[0] for h in handles]\n        expected_colors = p._hue_map(p._hue_map.levels)\n        sizes = [h.get_sizes()[0] for h in handles]\n        expected_sizes = p._size_map(p._size_map.levels)\n        assert labels == p._hue_map.levels\n        assert labels == p._size_map.levels\n        assert same_color(colors, expected_colors)\n        assert sizes == expected_sizes\n\n        # --\n\n        ax.clear()\n        # ... other code\n        p.add_legend_data(ax)\n\n        # --\n\n        ax.clear()\n        # ... other code\n        p.add_legend_data(ax)\n\n        # --\n        # ... other code\n        p.add_legend_data(ax)\n        # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_legend_data.None_11_TestScatterPlotter.test_legend_data.with_pytest_raises_ValueE.p_add_legend_data_ax_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_legend_data.None_11_TestScatterPlotter.test_legend_data.with_pytest_raises_ValueE.p_add_legend_data_ax_", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 1398, "end_line": 1470, "span_ids": ["TestScatterPlotter.test_legend_data"], "tokens": 696}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScatterPlotter(SharedAxesLevelTests, Helpers):\n\n    def test_legend_data(self, long_df):\n        # ... other code\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        # ... other code\n\n        ax.clear()\n        # ... other code\n        handles, labels = ax.get_legend_handles_labels()\n        # ... other code\n        assert same_color(colors, expected_colors)\n        assert self.paths_equal(paths, expected_paths)\n        # ... other code\n        assert labels == p._hue_map.levels\n        # ... other code\n        assert same_color(colors, expected_colors)\n        # ... other code\n\n        ax.clear()\n        sizes_list = [10, 100, 200]\n        p = _ScatterPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", size=\"s\"),\n            legend=\"full\",\n        )\n        p.map_size(sizes=sizes_list)\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        sizes = [h.get_sizes()[0] for h in handles]\n        expected_sizes = p._size_map(p._size_map.levels)\n        assert labels == [str(l) for l in p._size_map.levels]\n        assert sizes == expected_sizes\n\n        # --\n\n        ax.clear()\n        sizes_dict = {2: 10, 4: 100, 8: 200}\n        p = _ScatterPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", size=\"s\"),\n            legend=\"full\"\n        )\n        p.map_size(sizes=sizes_dict)\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        sizes = [h.get_sizes()[0] for h in handles]\n        expected_sizes = p._size_map(p._size_map.levels)\n        assert labels == [str(l) for l in p._size_map.levels]\n        assert sizes == expected_sizes\n\n        # --\n\n        x, y = np.random.randn(2, 40)\n        z = np.tile(np.arange(20), 2)\n\n        p = _ScatterPlotter(\n            variables=dict(x=x, y=y, hue=z),\n        )\n\n        ax.clear()\n        p.legend = \"full\"\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        assert labels == [str(l) for l in p._hue_map.levels]\n\n        ax.clear()\n        p.legend = \"brief\"\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        assert len(labels) < len(p._hue_map.levels)\n\n        p = _ScatterPlotter(\n            variables=dict(x=x, y=y, size=z),\n        )\n\n        ax.clear()\n        p.legend = \"full\"\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        assert labels == [str(l) for l in p._size_map.levels]\n\n        ax.clear()\n        p.legend = \"brief\"\n        p.add_legend_data(ax)\n        handles, labels = ax.get_legend_handles_labels()\n        assert len(labels) < len(p._size_map.levels)\n\n        ax.clear()\n        p.legend = \"bad_value\"\n        with pytest.raises(ValueError):\n            p.add_legend_data(ax)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_plot_TestScatterPlotter.test_plot.None_21": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_plot_TestScatterPlotter.test_plot.None_21", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 1472, "end_line": 1559, "span_ids": ["TestScatterPlotter.test_plot"], "tokens": 710}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScatterPlotter(SharedAxesLevelTests, Helpers):\n\n    def test_plot(self, long_df, repeated_df):\n\n        f, ax = plt.subplots()\n\n        p = _ScatterPlotter(data=long_df, variables=dict(x=\"x\", y=\"y\"))\n\n        p.plot(ax, {})\n        points = ax.collections[0]\n        assert_array_equal(points.get_offsets(), long_df[[\"x\", \"y\"]].to_numpy())\n\n        ax.clear()\n        p.plot(ax, {\"color\": \"k\", \"label\": \"test\"})\n        points = ax.collections[0]\n        assert same_color(points.get_facecolor(), \"k\")\n        assert points.get_label() == \"test\"\n\n        p = _ScatterPlotter(\n            data=long_df, variables=dict(x=\"x\", y=\"y\", hue=\"a\")\n        )\n\n        ax.clear()\n        p.plot(ax, {})\n        points = ax.collections[0]\n        expected_colors = p._hue_map(p.plot_data[\"hue\"])\n        assert same_color(points.get_facecolors(), expected_colors)\n\n        p = _ScatterPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", style=\"c\"),\n        )\n        p.map_style(markers=[\"+\", \"x\"])\n\n        ax.clear()\n        color = (1, .3, .8)\n        p.plot(ax, {\"color\": color})\n        points = ax.collections[0]\n        assert same_color(points.get_edgecolors(), [color])\n\n        p = _ScatterPlotter(\n            data=long_df, variables=dict(x=\"x\", y=\"y\", size=\"a\"),\n        )\n\n        ax.clear()\n        p.plot(ax, {})\n        points = ax.collections[0]\n        expected_sizes = p._size_map(p.plot_data[\"size\"])\n        assert_array_equal(points.get_sizes(), expected_sizes)\n\n        p = _ScatterPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\", style=\"a\"),\n        )\n        p.map_style(markers=True)\n\n        ax.clear()\n        p.plot(ax, {})\n        points = ax.collections[0]\n        expected_colors = p._hue_map(p.plot_data[\"hue\"])\n        expected_paths = p._style_map(p.plot_data[\"style\"], \"path\")\n        assert same_color(points.get_facecolors(), expected_colors)\n        assert self.paths_equal(points.get_paths(), expected_paths)\n\n        p = _ScatterPlotter(\n            data=long_df,\n            variables=dict(x=\"x\", y=\"y\", hue=\"a\", style=\"b\"),\n        )\n        p.map_style(markers=True)\n\n        ax.clear()\n        p.plot(ax, {})\n        points = ax.collections[0]\n        expected_colors = p._hue_map(p.plot_data[\"hue\"])\n        expected_paths = p._style_map(p.plot_data[\"style\"], \"path\")\n        assert same_color(points.get_facecolors(), expected_colors)\n        assert self.paths_equal(points.get_paths(), expected_paths)\n\n        x_str = long_df[\"x\"].astype(str)\n        p = _ScatterPlotter(\n            data=long_df, variables=dict(x=\"x\", y=\"y\", hue=x_str),\n        )\n        ax.clear()\n        p.plot(ax, {})\n\n        p = _ScatterPlotter(\n            data=long_df, variables=dict(x=\"x\", y=\"y\", size=x_str),\n        )\n        ax.clear()\n        p.plot(ax, {})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_axis_labels_TestScatterPlotter.test_scatterplot_axes.assert_ax_is_ax1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_axis_labels_TestScatterPlotter.test_scatterplot_axes.assert_ax_is_ax1", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 1561, "end_line": 1585, "span_ids": ["TestScatterPlotter.test_axis_labels", "TestScatterPlotter.test_scatterplot_axes"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScatterPlotter(SharedAxesLevelTests, Helpers):\n\n    def test_axis_labels(self, long_df):\n\n        f, (ax1, ax2) = plt.subplots(1, 2, sharey=True)\n\n        p = _ScatterPlotter(data=long_df, variables=dict(x=\"x\", y=\"y\"))\n\n        p.plot(ax1, {})\n        assert ax1.get_xlabel() == \"x\"\n        assert ax1.get_ylabel() == \"y\"\n\n        p.plot(ax2, {})\n        assert ax2.get_xlabel() == \"x\"\n        assert ax2.get_ylabel() == \"y\"\n        assert not ax2.yaxis.label.get_visible()\n\n    def test_scatterplot_axes(self, wide_df):\n\n        f1, ax1 = plt.subplots()\n        f2, ax2 = plt.subplots()\n\n        ax = scatterplot(data=wide_df)\n        assert ax is ax2\n\n        ax = scatterplot(data=wide_df, ax=ax1)\n        assert ax is ax1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_literal_attribute_vectors_TestScatterPlotter.test_literal_attribute_vectors.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_literal_attribute_vectors_TestScatterPlotter.test_literal_attribute_vectors.None_2", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 1587, "end_line": 1600, "span_ids": ["TestScatterPlotter.test_literal_attribute_vectors"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScatterPlotter(SharedAxesLevelTests, Helpers):\n\n    def test_literal_attribute_vectors(self):\n\n        f, ax = plt.subplots()\n\n        x = y = [1, 2, 3]\n        s = [5, 10, 15]\n        c = [(1, 1, 0, 1), (1, 0, 1, .5), (.5, 1, 0, 1)]\n\n        scatterplot(x=x, y=y, c=c, s=s, ax=ax)\n\n        points, = ax.collections\n\n        assert_array_equal(points.get_sizes().squeeze(), s)\n        assert_array_equal(points.get_facecolors(), c)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_linewidths_TestScatterPlotter.test_linewidths.assert_ax_collections_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_linewidths_TestScatterPlotter.test_linewidths.assert_ax_collections_0_", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 1626, "end_line": 1656, "span_ids": ["TestScatterPlotter.test_linewidths"], "tokens": 334}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScatterPlotter(SharedAxesLevelTests, Helpers):\n\n    def test_linewidths(self, long_df):\n\n        f, ax = plt.subplots()\n\n        scatterplot(data=long_df, x=\"x\", y=\"y\", s=10)\n        scatterplot(data=long_df, x=\"x\", y=\"y\", s=20)\n        points1, points2 = ax.collections\n        assert (\n            points1.get_linewidths().item() < points2.get_linewidths().item()\n        )\n\n        ax.clear()\n        scatterplot(data=long_df, x=\"x\", y=\"y\", s=long_df[\"x\"])\n        scatterplot(data=long_df, x=\"x\", y=\"y\", s=long_df[\"x\"] * 2)\n        points1, points2 = ax.collections\n        assert (\n            points1.get_linewidths().item() < points2.get_linewidths().item()\n        )\n\n        ax.clear()\n        scatterplot(data=long_df, x=\"x\", y=\"y\", size=long_df[\"x\"])\n        scatterplot(data=long_df, x=\"x\", y=\"y\", size=long_df[\"x\"] * 2)\n        points1, points2, *_ = ax.collections\n        assert (\n            points1.get_linewidths().item() < points2.get_linewidths().item()\n        )\n\n        ax.clear()\n        lw = 2\n        scatterplot(data=long_df, x=\"x\", y=\"y\", linewidth=lw)\n        assert ax.collections[0].get_linewidths().item() == lw", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_size_norm_extrapolation_TestScatterPlotter.test_size_norm_extrapolation.for_key_in_set_legend_dat.assert_legend_data_0_key": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_size_norm_extrapolation_TestScatterPlotter.test_size_norm_extrapolation.for_key_in_set_legend_dat.assert_legend_data_0_key", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 1658, "end_line": 1690, "span_ids": ["TestScatterPlotter.test_size_norm_extrapolation"], "tokens": 364}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScatterPlotter(SharedAxesLevelTests, Helpers):\n\n    def test_size_norm_extrapolation(self):\n\n        # https://github.com/mwaskom/seaborn/issues/2539\n        x = np.arange(0, 20, 2)\n        f, axs = plt.subplots(1, 2, sharex=True, sharey=True)\n\n        slc = 5\n        kws = dict(sizes=(50, 200), size_norm=(0, x.max()), legend=\"brief\")\n\n        scatterplot(x=x, y=x, size=x, ax=axs[0], **kws)\n        scatterplot(x=x[:slc], y=x[:slc], size=x[:slc], ax=axs[1], **kws)\n\n        assert np.allclose(\n            axs[0].collections[0].get_sizes()[:slc],\n            axs[1].collections[0].get_sizes()\n        )\n\n        legends = [ax.legend_ for ax in axs]\n        legend_data = [\n            {\n                label.get_text(): handle.get_sizes().item()\n                for label, handle in zip(legend.get_texts(), legend.legendHandles)\n            } for legend in legends\n        ]\n\n        for key in set(legend_data[0]) & set(legend_data[1]):\n            if key == \"y\":\n                # At some point (circa 3.0) matplotlib auto-added pandas series\n                # with a valid name into the legend, which messes up this test.\n                # I can't track down when that was added (or removed), so let's\n                # just anticipate and ignore it here.\n                continue\n            assert legend_data[0][key] == legend_data[1][key]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_datetime_scale_TestScatterPlotter.test_unfilled_marker_edgecolor_warning.assert_not_record": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_datetime_scale_TestScatterPlotter.test_unfilled_marker_edgecolor_warning.assert_not_record", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 1692, "end_line": 1703, "span_ids": ["TestScatterPlotter.test_unfilled_marker_edgecolor_warning", "TestScatterPlotter.test_datetime_scale"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScatterPlotter(SharedAxesLevelTests, Helpers):\n\n    def test_datetime_scale(self, long_df):\n\n        ax = scatterplot(data=long_df, x=\"t\", y=\"y\")\n        # Check that we avoid weird matplotlib default auto scaling\n        # https://github.com/matplotlib/matplotlib/issues/17586\n        ax.get_xlim()[0] > ax.xaxis.convert_units(np.datetime64(\"2002-01-01\"))\n\n    def test_unfilled_marker_edgecolor_warning(self, long_df):  # GH2636\n\n        with pytest.warns(None) as record:\n            scatterplot(data=long_df, x=\"x\", y=\"y\", marker=\"+\")\n        assert not record", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_scatterplot_vs_relplot_TestScatterPlotter.test_scatterplot_vs_relplot.for_s_pts_r_pts_in_zip_a.assert_self_paths_equal_s": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_scatterplot_vs_relplot_TestScatterPlotter.test_scatterplot_vs_relplot.for_s_pts_r_pts_in_zip_a.assert_self_paths_equal_s", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 1705, "end_line": 1715, "span_ids": ["TestScatterPlotter.test_scatterplot_vs_relplot"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScatterPlotter(SharedAxesLevelTests, Helpers):\n\n    def test_scatterplot_vs_relplot(self, long_df, long_semantics):\n\n        ax = scatterplot(data=long_df, **long_semantics)\n        g = relplot(data=long_df, kind=\"scatter\", **long_semantics)\n\n        for s_pts, r_pts in zip(ax.collections, g.ax.collections):\n\n            assert_array_equal(s_pts.get_offsets(), r_pts.get_offsets())\n            assert_array_equal(s_pts.get_sizes(), r_pts.get_sizes())\n            assert_array_equal(s_pts.get_facecolors(), r_pts.get_facecolors())\n            assert self.paths_equal(s_pts.get_paths(), r_pts.get_paths())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_scatterplot_smoke_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_scatterplot_smoke_", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 1717, "end_line": 1801, "span_ids": ["TestScatterPlotter.test_scatterplot_smoke"], "tokens": 606}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScatterPlotter(SharedAxesLevelTests, Helpers):\n\n    def test_scatterplot_smoke(\n        self,\n        wide_df, wide_array,\n        flat_series, flat_array, flat_list,\n        wide_list_of_series, wide_list_of_arrays, wide_list_of_lists,\n        long_df, missing_df, object_df\n    ):\n\n        f, ax = plt.subplots()\n\n        scatterplot(x=[], y=[])\n        ax.clear()\n\n        scatterplot(data=wide_df)\n        ax.clear()\n\n        scatterplot(data=wide_array)\n        ax.clear()\n\n        scatterplot(data=wide_list_of_series)\n        ax.clear()\n\n        scatterplot(data=wide_list_of_arrays)\n        ax.clear()\n\n        scatterplot(data=wide_list_of_lists)\n        ax.clear()\n\n        scatterplot(data=flat_series)\n        ax.clear()\n\n        scatterplot(data=flat_array)\n        ax.clear()\n\n        scatterplot(data=flat_list)\n        ax.clear()\n\n        scatterplot(x=\"x\", y=\"y\", data=long_df)\n        ax.clear()\n\n        scatterplot(x=long_df.x, y=long_df.y)\n        ax.clear()\n\n        scatterplot(x=long_df.x, y=\"y\", data=long_df)\n        ax.clear()\n\n        scatterplot(x=\"x\", y=long_df.y.to_numpy(), data=long_df)\n        ax.clear()\n\n        scatterplot(x=\"x\", y=\"y\", hue=\"a\", data=long_df)\n        ax.clear()\n\n        scatterplot(x=\"x\", y=\"y\", hue=\"a\", style=\"a\", data=long_df)\n        ax.clear()\n\n        scatterplot(x=\"x\", y=\"y\", hue=\"a\", style=\"b\", data=long_df)\n        ax.clear()\n\n        scatterplot(x=\"x\", y=\"y\", hue=\"a\", style=\"a\", data=missing_df)\n        ax.clear()\n\n        scatterplot(x=\"x\", y=\"y\", hue=\"a\", style=\"b\", data=missing_df)\n        ax.clear()\n\n        scatterplot(x=\"x\", y=\"y\", hue=\"a\", size=\"a\", data=long_df)\n        ax.clear()\n\n        scatterplot(x=\"x\", y=\"y\", hue=\"a\", size=\"s\", data=long_df)\n        ax.clear()\n\n        scatterplot(x=\"x\", y=\"y\", hue=\"a\", size=\"a\", data=missing_df)\n        ax.clear()\n\n        scatterplot(x=\"x\", y=\"y\", hue=\"a\", size=\"s\", data=missing_df)\n        ax.clear()\n\n        scatterplot(x=\"x\", y=\"y\", hue=\"f\", data=object_df)\n        ax.clear()\n\n        scatterplot(x=\"x\", y=\"y\", hue=\"c\", size=\"f\", data=object_df)\n        ax.clear()\n\n        scatterplot(x=\"x\", y=\"y\", hue=\"f\", size=\"s\", data=object_df)\n        ax.clear()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_np_DistributionFixtures.weights.return.rng_uniform_0_5_100_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_np_DistributionFixtures.weights.return.rng_uniform_0_5_100_", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 34, "span_ids": ["impl", "DistributionFixtures.y", "DistributionFixtures.x", "impl:2", "DistributionFixtures.weights", "imports:4", "imports", "DistributionFixtures", "imports:3"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nimport pandas as pd\n\ntry:\n    import statsmodels.distributions as smdist\nexcept ImportError:\n    smdist = None\n\nimport pytest\nfrom numpy.testing import assert_array_equal, assert_array_almost_equal\n\nfrom seaborn._statistics import (\n    KDE,\n    Histogram,\n    ECDF,\n    EstimateAggregator,\n    _validate_errorbar_arg,\n    _no_scipy,\n)\n\n\nclass DistributionFixtures:\n\n    @pytest.fixture\n    def x(self, rng):\n        return rng.normal(0, 1, 100)\n\n    @pytest.fixture\n    def y(self, rng):\n        return rng.normal(0, 5, 100)\n\n    @pytest.fixture\n    def weights(self, rng):\n        return rng.uniform(0, 5, 100)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestKDE_TestKDE.test_cut.assert_support_max_p": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestKDE_TestKDE.test_cut.assert_support_max_p", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 37, "end_line": 70, "span_ids": ["TestKDE.integrate", "TestKDE", "TestKDE.test_cut", "TestKDE.test_gridsize"], "tokens": 279}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDE:\n\n    def integrate(self, y, x):\n        y = np.asarray(y)\n        x = np.asarray(x)\n        dx = np.diff(x)\n        return (dx * y[:-1] + dx * y[1:]).sum() / 2\n\n    def test_gridsize(self, rng):\n\n        x = rng.normal(0, 3, 1000)\n\n        n = 200\n        kde = KDE(gridsize=n)\n        density, support = kde(x)\n        assert density.size == n\n        assert support.size == n\n\n    def test_cut(self, rng):\n\n        x = rng.normal(0, 3, 1000)\n\n        kde = KDE(cut=0)\n        _, support = kde(x)\n        assert support.min() == x.min()\n        assert support.max() == x.max()\n\n        cut = 2\n        bw_scale = .5\n        bw = x.std() * bw_scale\n        kde = KDE(cut=cut, bw_method=bw_scale, gridsize=1000)\n        _, support = kde(x)\n        assert support.min() == pytest.approx(x.min() - bw * cut, abs=1e-2)\n        assert support.max() == pytest.approx(x.max() + bw * cut, abs=1e-2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestKDE.test_clip_TestKDE.test_bivariate_grid.assert_yy_size_n": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestKDE.test_clip_TestKDE.test_bivariate_grid.assert_yy_size_n", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 72, "end_line": 137, "span_ids": ["TestKDE.test_bw_method", "TestKDE.test_cumulative", "TestKDE.test_bivariate_grid", "TestKDE.test_cached_support", "TestKDE.test_bw_adjust", "TestKDE.test_density_normalization", "TestKDE.test_clip"], "tokens": 567}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDE:\n\n    def test_clip(self, rng):\n\n        x = rng.normal(0, 3, 100)\n        clip = -1, 1\n        kde = KDE(clip=clip)\n        _, support = kde(x)\n\n        assert support.min() >= clip[0]\n        assert support.max() <= clip[1]\n\n    def test_density_normalization(self, rng):\n\n        x = rng.normal(0, 3, 1000)\n        kde = KDE()\n        density, support = kde(x)\n        assert self.integrate(density, support) == pytest.approx(1, abs=1e-5)\n\n    @pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\n    def test_cumulative(self, rng):\n\n        x = rng.normal(0, 3, 1000)\n        kde = KDE(cumulative=True)\n        density, _ = kde(x)\n        assert density[0] == pytest.approx(0, abs=1e-5)\n        assert density[-1] == pytest.approx(1, abs=1e-5)\n\n    def test_cached_support(self, rng):\n\n        x = rng.normal(0, 3, 100)\n        kde = KDE()\n        kde.define_support(x)\n        _, support = kde(x[(x > -1) & (x < 1)])\n        assert_array_equal(support, kde.support)\n\n    def test_bw_method(self, rng):\n\n        x = rng.normal(0, 3, 100)\n        kde1 = KDE(bw_method=.2)\n        kde2 = KDE(bw_method=2)\n\n        d1, _ = kde1(x)\n        d2, _ = kde2(x)\n\n        assert np.abs(np.diff(d1)).mean() > np.abs(np.diff(d2)).mean()\n\n    def test_bw_adjust(self, rng):\n\n        x = rng.normal(0, 3, 100)\n        kde1 = KDE(bw_adjust=.2)\n        kde2 = KDE(bw_adjust=2)\n\n        d1, _ = kde1(x)\n        d2, _ = kde2(x)\n\n        assert np.abs(np.diff(d1)).mean() > np.abs(np.diff(d2)).mean()\n\n    def test_bivariate_grid(self, rng):\n\n        n = 100\n        x, y = rng.normal(0, 3, (2, 50))\n        kde = KDE(gridsize=n)\n        density, (xx, yy) = kde(x, y)\n\n        assert density.shape == (n, n)\n        assert xx.size == n\n        assert yy.size == n", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestKDE.test_bivariate_normalization_TestKDE.test_bivariate_normalization.assert_total_pytest_ap": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestKDE.test_bivariate_normalization_TestKDE.test_bivariate_normalization.assert_total_pytest_ap", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 139, "end_line": 149, "span_ids": ["TestKDE.test_bivariate_normalization"], "tokens": 113}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDE:\n\n    def test_bivariate_normalization(self, rng):\n\n        x, y = rng.normal(0, 3, (2, 50))\n        kde = KDE(gridsize=100)\n        density, (xx, yy) = kde(x, y)\n\n        dx = xx[1] - xx[0]\n        dy = yy[1] - yy[0]\n\n        total = density.sum() * (dx * dy)\n        assert total == pytest.approx(1, abs=1e-2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestKDE.test_bivariate_cumulative_TestKDE.test_bivariate_cumulative.assert_density_1_1_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestKDE.test_bivariate_cumulative_TestKDE.test_bivariate_cumulative.assert_density_1_1_", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 151, "end_line": 159, "span_ids": ["TestKDE.test_bivariate_cumulative"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDE:\n\n    @pytest.mark.skipif(_no_scipy, reason=\"Test requires scipy\")\n    def test_bivariate_cumulative(self, rng):\n\n        x, y = rng.normal(0, 3, (2, 50))\n        kde = KDE(gridsize=100, cumulative=True)\n        density, _ = kde(x, y)\n\n        assert density[0, 0] == pytest.approx(0, abs=1e-2)\n        assert density[-1, -1] == pytest.approx(1, abs=1e-2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram_TestHistogram.test_array_bins.assert_array_equal_bin_kw": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram_TestHistogram.test_array_bins.assert_array_equal_bin_kw", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 162, "end_line": 184, "span_ids": ["TestHistogram.test_string_bins", "TestHistogram.test_int_bins", "TestHistogram", "TestHistogram.test_array_bins"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistogram(DistributionFixtures):\n\n    def test_string_bins(self, x):\n\n        h = Histogram(bins=\"sqrt\")\n        bin_kws = h.define_bin_params(x)\n        assert bin_kws[\"range\"] == (x.min(), x.max())\n        assert bin_kws[\"bins\"] == int(np.sqrt(len(x)))\n\n    def test_int_bins(self, x):\n\n        n = 24\n        h = Histogram(bins=n)\n        bin_kws = h.define_bin_params(x)\n        assert bin_kws[\"range\"] == (x.min(), x.max())\n        assert bin_kws[\"bins\"] == n\n\n    def test_array_bins(self, x):\n\n        bins = [-3, -2, 1, 2, 3]\n        h = Histogram(bins=bins)\n        bin_kws = h.define_bin_params(x)\n        assert_array_equal(bin_kws[\"bins\"], bins)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_bivariate_string_bins_TestHistogram.test_bivariate_string_bins.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_bivariate_string_bins_TestHistogram.test_bivariate_string_bins.None_3", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 186, "end_line": 198, "span_ids": ["TestHistogram.test_bivariate_string_bins"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistogram(DistributionFixtures):\n\n    def test_bivariate_string_bins(self, x, y):\n\n        s1, s2 = \"sqrt\", \"fd\"\n\n        h = Histogram(bins=s1)\n        e1, e2 = h.define_bin_params(x, y)[\"bins\"]\n        assert_array_equal(e1, np.histogram_bin_edges(x, s1))\n        assert_array_equal(e2, np.histogram_bin_edges(y, s1))\n\n        h = Histogram(bins=(s1, s2))\n        e1, e2 = h.define_bin_params(x, y)[\"bins\"]\n        assert_array_equal(e1, np.histogram_bin_edges(x, s1))\n        assert_array_equal(e2, np.histogram_bin_edges(y, s2))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_bivariate_int_bins_TestHistogram.test_bivariate_int_bins.assert_len_e2_b2_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_bivariate_int_bins_TestHistogram.test_bivariate_int_bins.assert_len_e2_b2_1", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 200, "end_line": 212, "span_ids": ["TestHistogram.test_bivariate_int_bins"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistogram(DistributionFixtures):\n\n    def test_bivariate_int_bins(self, x, y):\n\n        b1, b2 = 5, 10\n\n        h = Histogram(bins=b1)\n        e1, e2 = h.define_bin_params(x, y)[\"bins\"]\n        assert len(e1) == b1 + 1\n        assert len(e2) == b1 + 1\n\n        h = Histogram(bins=(b1, b2))\n        e1, e2 = h.define_bin_params(x, y)[\"bins\"]\n        assert len(e1) == b1 + 1\n        assert len(e2) == b2 + 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_bivariate_array_bins_TestHistogram.test_bivariate_array_bins.assert_array_equal_e2_b2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_bivariate_array_bins_TestHistogram.test_bivariate_array_bins.assert_array_equal_e2_b2", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 214, "end_line": 227, "span_ids": ["TestHistogram.test_bivariate_array_bins"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistogram(DistributionFixtures):\n\n    def test_bivariate_array_bins(self, x, y):\n\n        b1 = [-3, -2, 1, 2, 3]\n        b2 = [-5, -2, 3, 6]\n\n        h = Histogram(bins=b1)\n        e1, e2 = h.define_bin_params(x, y)[\"bins\"]\n        assert_array_equal(e1, b1)\n        assert_array_equal(e2, b1)\n\n        h = Histogram(bins=(b1, b2))\n        e1, e2 = h.define_bin_params(x, y)[\"bins\"]\n        assert_array_equal(e1, b1)\n        assert_array_equal(e2, b2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_binwidth_TestHistogram.test_bivariate_binwidth.None_6": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_binwidth_TestHistogram.test_bivariate_binwidth.None_6", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 229, "end_line": 250, "span_ids": ["TestHistogram.test_bivariate_binwidth", "TestHistogram.test_binwidth"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistogram(DistributionFixtures):\n\n    def test_binwidth(self, x):\n\n        binwidth = .5\n        h = Histogram(binwidth=binwidth)\n        bin_kws = h.define_bin_params(x)\n        n_bins = bin_kws[\"bins\"]\n        left, right = bin_kws[\"range\"]\n        assert (right - left) / n_bins == pytest.approx(binwidth)\n\n    def test_bivariate_binwidth(self, x, y):\n\n        w1, w2 = .5, 1\n\n        h = Histogram(binwidth=w1)\n        e1, e2 = h.define_bin_params(x, y)[\"bins\"]\n        assert np.all(np.diff(e1) == w1)\n        assert np.all(np.diff(e2) == w1)\n\n        h = Histogram(binwidth=(w1, w2))\n        e1, e2 = h.define_bin_params(x, y)[\"bins\"]\n        assert np.all(np.diff(e1) == w1)\n        assert np.all(np.diff(e2) == w2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_binrange_TestHistogram.test_bivariate_binrange.assert_e2_max_r2_1_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_binrange_TestHistogram.test_bivariate_binrange.assert_e2_max_r2_1_", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 252, "end_line": 275, "span_ids": ["TestHistogram.test_bivariate_binrange", "TestHistogram.test_binrange"], "tokens": 244}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistogram(DistributionFixtures):\n\n    def test_binrange(self, x):\n\n        binrange = (-4, 4)\n        h = Histogram(binrange=binrange)\n        bin_kws = h.define_bin_params(x)\n        assert bin_kws[\"range\"] == binrange\n\n    def test_bivariate_binrange(self, x, y):\n\n        r1, r2 = (-4, 4), (-10, 10)\n\n        h = Histogram(binrange=r1)\n        e1, e2 = h.define_bin_params(x, y)[\"bins\"]\n        assert e1.min() == r1[0]\n        assert e1.max() == r1[1]\n        assert e2.min() == r1[0]\n        assert e2.max() == r1[1]\n\n        h = Histogram(binrange=(r1, r2))\n        e1, e2 = h.define_bin_params(x, y)[\"bins\"]\n        assert e1.min() == r1[0]\n        assert e1.max() == r1[1]\n        assert e2.min() == r2[0]\n        assert e2.max() == r2[1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_discrete_bins_TestHistogram.test_cumulative_frequency.assert_heights_1_len": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_discrete_bins_TestHistogram.test_cumulative_frequency.assert_heights_1_len", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 277, "end_line": 353, "span_ids": ["TestHistogram.test_odd_single_observation", "TestHistogram.test_histogram", "TestHistogram.test_probability_stat", "TestHistogram.test_cumulative_probability", "TestHistogram.test_cumulative_frequency", "TestHistogram.test_binwidth_roundoff", "TestHistogram.test_cumulative_count", "TestHistogram.test_density_stat", "TestHistogram.test_cumulative_density", "TestHistogram.test_count_stat", "TestHistogram.test_discrete_bins", "TestHistogram.test_frequency_stat"], "tokens": 590}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistogram(DistributionFixtures):\n\n    def test_discrete_bins(self, rng):\n\n        x = rng.binomial(20, .5, 100)\n        h = Histogram(discrete=True)\n        bin_kws = h.define_bin_params(x)\n        assert bin_kws[\"range\"] == (x.min() - .5, x.max() + .5)\n        assert bin_kws[\"bins\"] == (x.max() - x.min() + 1)\n\n    def test_odd_single_observation(self):\n        # GH2721\n        x = np.array([0.49928])\n        h, e = Histogram(binwidth=0.03)(x)\n        assert len(h) == 1\n        assert (e[1] - e[0]) == pytest.approx(.03)\n\n    def test_binwidth_roundoff(self):\n        # GH2785\n        x = np.array([2.4, 2.5, 2.6])\n        h, e = Histogram(binwidth=0.01)(x)\n        assert h.sum() == 3\n\n    def test_histogram(self, x):\n\n        h = Histogram()\n        heights, edges = h(x)\n        heights_mpl, edges_mpl = np.histogram(x, bins=\"auto\")\n\n        assert_array_equal(heights, heights_mpl)\n        assert_array_equal(edges, edges_mpl)\n\n    def test_count_stat(self, x):\n\n        h = Histogram(stat=\"count\")\n        heights, _ = h(x)\n        assert heights.sum() == len(x)\n\n    def test_density_stat(self, x):\n\n        h = Histogram(stat=\"density\")\n        heights, edges = h(x)\n        assert (heights * np.diff(edges)).sum() == 1\n\n    def test_probability_stat(self, x):\n\n        h = Histogram(stat=\"probability\")\n        heights, _ = h(x)\n        assert heights.sum() == 1\n\n    def test_frequency_stat(self, x):\n\n        h = Histogram(stat=\"frequency\")\n        heights, edges = h(x)\n        assert (heights * np.diff(edges)).sum() == len(x)\n\n    def test_cumulative_count(self, x):\n\n        h = Histogram(stat=\"count\", cumulative=True)\n        heights, _ = h(x)\n        assert heights[-1] == len(x)\n\n    def test_cumulative_density(self, x):\n\n        h = Histogram(stat=\"density\", cumulative=True)\n        heights, _ = h(x)\n        assert heights[-1] == 1\n\n    def test_cumulative_probability(self, x):\n\n        h = Histogram(stat=\"probability\", cumulative=True)\n        heights, _ = h(x)\n        assert heights[-1] == 1\n\n    def test_cumulative_frequency(self, x):\n\n        h = Histogram(stat=\"frequency\", cumulative=True)\n        heights, _ = h(x)\n        assert heights[-1] == len(x)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_bivariate_histogram_TestHistogram.test_bivariate_histogram.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_bivariate_histogram_TestHistogram.test_bivariate_histogram.None_2", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 355, "end_line": 366, "span_ids": ["TestHistogram.test_bivariate_histogram"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistogram(DistributionFixtures):\n\n    def test_bivariate_histogram(self, x, y):\n\n        h = Histogram()\n        heights, edges = h(x, y)\n        bins_mpl = (\n            np.histogram_bin_edges(x, \"auto\"),\n            np.histogram_bin_edges(y, \"auto\"),\n        )\n        heights_mpl, *edges_mpl = np.histogram2d(x, y, bins_mpl)\n        assert_array_equal(heights, heights_mpl)\n        assert_array_equal(edges[0], edges_mpl[0])\n        assert_array_equal(edges[1], edges_mpl[1])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_bivariate_count_stat_TestHistogram.test_bad_stat.with_pytest_raises_ValueE.Histogram_stat_invalid_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestHistogram.test_bivariate_count_stat_TestHistogram.test_bad_stat.with_pytest_raises_ValueE.Histogram_stat_invalid_", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 368, "end_line": 421, "span_ids": ["TestHistogram.test_bivariate_probability_stat", "TestHistogram.test_bivariate_cumulative_frequency", "TestHistogram.test_bivariate_cumulative_density", "TestHistogram.test_bivariate_frequency_stat", "TestHistogram.test_bivariate_density_stat", "TestHistogram.test_bivariate_count_stat", "TestHistogram.test_bivariate_cumulative_probability", "TestHistogram.test_bad_stat", "TestHistogram.test_bivariate_cumulative_count"], "tokens": 440}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistogram(DistributionFixtures):\n\n    def test_bivariate_count_stat(self, x, y):\n\n        h = Histogram(stat=\"count\")\n        heights, _ = h(x, y)\n        assert heights.sum() == len(x)\n\n    def test_bivariate_density_stat(self, x, y):\n\n        h = Histogram(stat=\"density\")\n        heights, (edges_x, edges_y) = h(x, y)\n        areas = np.outer(np.diff(edges_x), np.diff(edges_y))\n        assert (heights * areas).sum() == pytest.approx(1)\n\n    def test_bivariate_probability_stat(self, x, y):\n\n        h = Histogram(stat=\"probability\")\n        heights, _ = h(x, y)\n        assert heights.sum() == 1\n\n    def test_bivariate_frequency_stat(self, x, y):\n\n        h = Histogram(stat=\"frequency\")\n        heights, (x_edges, y_edges) = h(x, y)\n        area = np.outer(np.diff(x_edges), np.diff(y_edges))\n        assert (heights * area).sum() == len(x)\n\n    def test_bivariate_cumulative_count(self, x, y):\n\n        h = Histogram(stat=\"count\", cumulative=True)\n        heights, _ = h(x, y)\n        assert heights[-1, -1] == len(x)\n\n    def test_bivariate_cumulative_density(self, x, y):\n\n        h = Histogram(stat=\"density\", cumulative=True)\n        heights, _ = h(x, y)\n        assert heights[-1, -1] == pytest.approx(1)\n\n    def test_bivariate_cumulative_frequency(self, x, y):\n\n        h = Histogram(stat=\"frequency\", cumulative=True)\n        heights, _ = h(x, y)\n        assert heights[-1, -1] == len(x)\n\n    def test_bivariate_cumulative_probability(self, x, y):\n\n        h = Histogram(stat=\"probability\", cumulative=True)\n        heights, _ = h(x, y)\n        assert heights[-1, -1] == pytest.approx(1)\n\n    def test_bad_stat(self):\n\n        with pytest.raises(ValueError):\n            Histogram(stat=\"invalid\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestECDF_TestECDF.test_univariate_count_weights.assert_stat_0_0": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestECDF_TestECDF.test_univariate_count_weights.assert_stat_0_0", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 424, "end_line": 458, "span_ids": ["TestECDF.test_univariate_proportion_weights", "TestECDF.test_univariate_proportion", "TestECDF", "TestECDF.test_univariate_count_weights", "TestECDF.test_univariate_count"], "tokens": 309}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestECDF(DistributionFixtures):\n\n    def test_univariate_proportion(self, x):\n\n        ecdf = ECDF()\n        stat, vals = ecdf(x)\n        assert_array_equal(vals[1:], np.sort(x))\n        assert_array_almost_equal(stat[1:], np.linspace(0, 1, len(x) + 1)[1:])\n        assert stat[0] == 0\n\n    def test_univariate_count(self, x):\n\n        ecdf = ECDF(stat=\"count\")\n        stat, vals = ecdf(x)\n\n        assert_array_equal(vals[1:], np.sort(x))\n        assert_array_almost_equal(stat[1:], np.arange(len(x)) + 1)\n        assert stat[0] == 0\n\n    def test_univariate_proportion_weights(self, x, weights):\n\n        ecdf = ECDF()\n        stat, vals = ecdf(x, weights=weights)\n        assert_array_equal(vals[1:], np.sort(x))\n        expected_stats = weights[x.argsort()].cumsum() / weights.sum()\n        assert_array_almost_equal(stat[1:], expected_stats)\n        assert stat[0] == 0\n\n    def test_univariate_count_weights(self, x, weights):\n\n        ecdf = ECDF(stat=\"count\")\n        stat, vals = ecdf(x, weights=weights)\n        assert_array_equal(vals[1:], np.sort(x))\n        assert_array_almost_equal(stat[1:], weights[x.argsort()].cumsum())\n        assert stat[0] == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestECDF.test_against_statsmodels_TestECDF.test_bivariate_error.with_pytest_raises_NotImp.ecdf_x_y_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestECDF.test_against_statsmodels_TestECDF.test_bivariate_error.with_pytest_raises_NotImp.ecdf_x_y_", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 460, "end_line": 484, "span_ids": ["TestECDF.test_against_statsmodels", "TestECDF.test_bivariate_error", "TestECDF.test_invalid_stat"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestECDF(DistributionFixtures):\n\n    @pytest.mark.skipif(smdist is None, reason=\"Requires statsmodels\")\n    def test_against_statsmodels(self, x):\n\n        sm_ecdf = smdist.empirical_distribution.ECDF(x)\n\n        ecdf = ECDF()\n        stat, vals = ecdf(x)\n        assert_array_equal(vals, sm_ecdf.x)\n        assert_array_almost_equal(stat, sm_ecdf.y)\n\n        ecdf = ECDF(complementary=True)\n        stat, vals = ecdf(x)\n        assert_array_equal(vals, sm_ecdf.x)\n        assert_array_almost_equal(stat, sm_ecdf.y[::-1])\n\n    def test_invalid_stat(self, x):\n\n        with pytest.raises(ValueError, match=\"`stat` must be one of\"):\n            ECDF(stat=\"density\")\n\n    def test_bivariate_error(self, x, y):\n\n        with pytest.raises(NotImplementedError, match=\"Bivariate ECDF\"):\n            ecdf = ECDF()\n            ecdf(x, y)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestEstimateAggregator.test_sd_errorbars_TestEstimateAggregator.test_sd_errorbars.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestEstimateAggregator.test_sd_errorbars_TestEstimateAggregator.test_sd_errorbars.None_5", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 516, "end_line": 528, "span_ids": ["TestEstimateAggregator.test_sd_errorbars"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestEstimateAggregator:\n\n    def test_sd_errorbars(self, long_df):\n\n        agg = EstimateAggregator(\"mean\", \"sd\")\n        out = agg(long_df, \"x\")\n        assert out[\"x\"] == long_df[\"x\"].mean()\n        assert out[\"xmin\"] == (long_df[\"x\"].mean() - long_df[\"x\"].std())\n        assert out[\"xmax\"] == (long_df[\"x\"].mean() + long_df[\"x\"].std())\n\n        agg = EstimateAggregator(\"mean\", (\"sd\", 2))\n        out = agg(long_df, \"x\")\n        assert out[\"x\"] == long_df[\"x\"].mean()\n        assert out[\"xmin\"] == (long_df[\"x\"].mean() - 2 * long_df[\"x\"].std())\n        assert out[\"xmax\"] == (long_df[\"x\"].mean() + 2 * long_df[\"x\"].std())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestEstimateAggregator.test_pi_errorbars_TestEstimateAggregator.test_pi_errorbars.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestEstimateAggregator.test_pi_errorbars_TestEstimateAggregator.test_pi_errorbars.None_3", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 530, "end_line": 540, "span_ids": ["TestEstimateAggregator.test_pi_errorbars"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestEstimateAggregator:\n\n    def test_pi_errorbars(self, long_df):\n\n        agg = EstimateAggregator(\"mean\", \"pi\")\n        out = agg(long_df, \"y\")\n        assert out[\"ymin\"] == np.percentile(long_df[\"y\"], 2.5)\n        assert out[\"ymax\"] == np.percentile(long_df[\"y\"], 97.5)\n\n        agg = EstimateAggregator(\"mean\", (\"pi\", 50))\n        out = agg(long_df, \"y\")\n        assert out[\"ymin\"] == np.percentile(long_df[\"y\"], 25)\n        assert out[\"ymax\"] == np.percentile(long_df[\"y\"], 75)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestEstimateAggregator.test_ci_errorbars_TestEstimateAggregator.test_ci_errorbars.assert_array_equal_out_or": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestEstimateAggregator.test_ci_errorbars_TestEstimateAggregator.test_ci_errorbars.assert_array_equal_out_or", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 542, "end_line": 565, "span_ids": ["TestEstimateAggregator.test_ci_errorbars"], "tokens": 285}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestEstimateAggregator:\n\n    def test_ci_errorbars(self, long_df):\n\n        agg = EstimateAggregator(\"mean\", \"ci\", n_boot=100000, seed=0)\n        out = agg(long_df, \"y\")\n\n        agg_ref = EstimateAggregator(\"mean\", (\"se\", 1.96))\n        out_ref = agg_ref(long_df, \"y\")\n\n        assert out[\"ymin\"] == pytest.approx(out_ref[\"ymin\"], abs=1e-2)\n        assert out[\"ymax\"] == pytest.approx(out_ref[\"ymax\"], abs=1e-2)\n\n        agg = EstimateAggregator(\"mean\", (\"ci\", 68), n_boot=100000, seed=0)\n        out = agg(long_df, \"y\")\n\n        agg_ref = EstimateAggregator(\"mean\", (\"se\", 1))\n        out_ref = agg_ref(long_df, \"y\")\n\n        assert out[\"ymin\"] == pytest.approx(out_ref[\"ymin\"], abs=1e-2)\n        assert out[\"ymax\"] == pytest.approx(out_ref[\"ymax\"], abs=1e-2)\n\n        agg = EstimateAggregator(\"mean\", \"ci\", seed=0)\n        out_orig = agg_ref(long_df, \"y\")\n        out_test = agg_ref(long_df, \"y\")\n        assert_array_equal(out_orig, out_test)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestEstimateAggregator.test_custom_errorbars_TestEstimateAggregator.test_singleton_errorbars.assert_pd_isna_out_ymax_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestEstimateAggregator.test_custom_errorbars_TestEstimateAggregator.test_singleton_errorbars.assert_pd_isna_out_ymax_", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 567, "end_line": 582, "span_ids": ["TestEstimateAggregator.test_custom_errorbars", "TestEstimateAggregator.test_singleton_errorbars"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestEstimateAggregator:\n\n    def test_custom_errorbars(self, long_df):\n\n        f = lambda x: (x.min(), x.max())  # noqa: E731\n        agg = EstimateAggregator(\"mean\", f)\n        out = agg(long_df, \"y\")\n        assert out[\"ymin\"] == long_df[\"y\"].min()\n        assert out[\"ymax\"] == long_df[\"y\"].max()\n\n    def test_singleton_errorbars(self):\n\n        agg = EstimateAggregator(\"mean\", \"ci\")\n        val = 7\n        out = agg(pd.DataFrame(dict(y=[val])), \"y\")\n        assert out[\"y\"] == val\n        assert pd.isna(out[\"ymin\"])\n        assert pd.isna(out[\"ymax\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestEstimateAggregator.test_errorbar_validation_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestEstimateAggregator.test_errorbar_validation_", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 584, "end_line": 610, "span_ids": ["TestEstimateAggregator.test_errorbar_validation"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestEstimateAggregator:\n\n    def test_errorbar_validation(self):\n\n        method, level = _validate_errorbar_arg((\"ci\", 99))\n        assert method == \"ci\"\n        assert level == 99\n\n        method, level = _validate_errorbar_arg(\"sd\")\n        assert method == \"sd\"\n        assert level == 1\n\n        f = lambda x: (x.min(), x.max())  # noqa: E731\n        method, level = _validate_errorbar_arg(f)\n        assert method is f\n        assert level is None\n\n        bad_args = [\n            (\"sem\", ValueError),\n            ((\"std\", 2), ValueError),\n            ((\"pi\", 5, 95), ValueError),\n            (95, TypeError),\n            ((\"ci\", \"large\"), TypeError),\n        ]\n\n        for arg, exception in bad_args:\n            with pytest.raises(exception, match=\"`errorbar` must be\"):\n                _validate_errorbar_arg(arg)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py__Tests_for_seaborn_util_a_norm.np_random_randn_100_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py__Tests_for_seaborn_util_a_norm.np_random_randn_100_", "embedding": null, "metadata": {"file_path": "tests/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 35, "span_ids": ["impl", "docstring", "imports"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Tests for seaborn utility functions.\"\"\"\nimport re\nimport tempfile\nfrom urllib.request import urlopen\nfrom http.client import HTTPException\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nfrom cycler import cycler\n\nimport pytest\nfrom numpy.testing import (\n    assert_array_equal,\n)\nfrom pandas.testing import (\n    assert_series_equal,\n    assert_frame_equal,\n)\n\nfrom seaborn import utils, rcmod\nfrom seaborn.external.version import Version\nfrom seaborn.utils import (\n    get_dataset_names,\n    get_color_cycle,\n    remove_na,\n    load_dataset,\n    _assign_default_kwargs,\n    _draw_figure,\n    _deprecate_ci,\n)\n\n\na_norm = np.random.randn(100)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py__network_test_ci_to_errsize.assert_array_equal_actual": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py__network_test_ci_to_errsize.assert_array_equal_actual", "embedding": null, "metadata": {"file_path": "tests/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 37, "end_line": 73, "span_ids": ["test_ci_to_errsize", "_network"], "tokens": 228}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _network(t=None, url=\"https://github.com\"):\n    \"\"\"\n    Decorator that will skip a test if `url` is unreachable.\n\n    Parameters\n    ----------\n    t : function, optional\n    url : str, optional\n\n    \"\"\"\n    if t is None:\n        return lambda x: _network(x, url=url)\n\n    def wrapper(*args, **kwargs):\n        # attempt to connect\n        try:\n            f = urlopen(url)\n        except (OSError, HTTPException):\n            pytest.skip(\"No internet connection\")\n        else:\n            f.close()\n            return t(*args, **kwargs)\n    return wrapper\n\n\ndef test_ci_to_errsize():\n    \"\"\"Test behavior of ci_to_errsize.\"\"\"\n    cis = [[.5, .5],\n           [1.25, 1.5]]\n\n    heights = [1, 1.5]\n\n    actual_errsize = np.array([[.5, 1],\n                               [.25, 0]])\n\n    test_errsize = utils.ci_to_errsize(cis, heights)\n    assert_array_equal(actual_errsize, test_errsize)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_desaturate_test_saturate.assert_out_1_0_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_desaturate_test_saturate.assert_out_1_0_0_", "embedding": null, "metadata": {"file_path": "tests/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 76, "end_line": 100, "span_ids": ["test_desaturation_prop", "test_saturate", "test_desaturate"], "tokens": 218}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_desaturate():\n    \"\"\"Test color desaturation.\"\"\"\n    out1 = utils.desaturate(\"red\", .5)\n    assert out1 == (.75, .25, .25)\n\n    out2 = utils.desaturate(\"#00FF00\", .5)\n    assert out2 == (.25, .75, .25)\n\n    out3 = utils.desaturate((0, 0, 1), .5)\n    assert out3 == (.25, .25, .75)\n\n    out4 = utils.desaturate(\"red\", .5)\n    assert out4 == (.75, .25, .25)\n\n\ndef test_desaturation_prop():\n    \"\"\"Test that pct outside of [0, 1] raises exception.\"\"\"\n    with pytest.raises(ValueError):\n        utils.desaturate(\"blue\", 50)\n\n\ndef test_saturate():\n    \"\"\"Test performance of saturation function.\"\"\"\n    out = utils.saturate((.75, .25, .25))\n    assert out == (1, 0, 0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_to_utf8_test_to_utf8.assert_u_exp": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_to_utf8_test_to_utf8.assert_u_exp", "embedding": null, "metadata": {"file_path": "tests/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 103, "end_line": 121, "span_ids": ["test_to_utf8"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n    \"s,exp\",\n    [\n        (\"a\", \"a\"),\n        (\"abc\", \"abc\"),\n        (b\"a\", \"a\"),\n        (b\"abc\", \"abc\"),\n        (bytearray(\"abc\", \"utf-8\"), \"abc\"),\n        (bytearray(), \"\"),\n        (1, \"1\"),\n        (0, \"0\"),\n        ([], str([])),\n    ],\n)\ndef test_to_utf8(s, exp):\n    \"\"\"Test the to_utf8 function: object to string\"\"\"\n    u = utils.to_utf8(s)\n    assert type(u) == str\n    assert u == exp", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_TestSpineUtils_TestSpineUtils.test_despine.None_3.assert_ax_spines_side_g": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_TestSpineUtils_TestSpineUtils.test_despine.None_3.assert_ax_spines_side_g", "embedding": null, "metadata": {"file_path": "tests/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 124, "end_line": 147, "span_ids": ["TestSpineUtils.test_despine", "TestSpineUtils"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSpineUtils:\n\n    sides = [\"left\", \"right\", \"bottom\", \"top\"]\n    outer_sides = [\"top\", \"right\"]\n    inner_sides = [\"left\", \"bottom\"]\n\n    offset = 10\n    original_position = (\"outward\", 0)\n    offset_position = (\"outward\", offset)\n\n    def test_despine(self):\n        f, ax = plt.subplots()\n        for side in self.sides:\n            assert ax.spines[side].get_visible()\n\n        utils.despine()\n        for side in self.outer_sides:\n            assert ~ax.spines[side].get_visible()\n        for side in self.inner_sides:\n            assert ax.spines[side].get_visible()\n\n        utils.despine(**dict(zip(self.sides, [True] * 4)))\n        for side in self.sides:\n            assert ~ax.spines[side].get_visible()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_TestSpineUtils.test_despine_specific_axes_TestSpineUtils.test_despine_side_specific_offset.for_side_in_self_sides_.if_is_visible_and_side_.else_.assert_new_position_se": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_TestSpineUtils.test_despine_specific_axes_TestSpineUtils.test_despine_side_specific_offset.for_side_in_self_sides_.if_is_visible_and_side_.else_.assert_new_position_se", "embedding": null, "metadata": {"file_path": "tests/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 149, "end_line": 190, "span_ids": ["TestSpineUtils.test_despine_side_specific_offset", "TestSpineUtils.test_despine_specific_axes", "TestSpineUtils.test_despine_with_offset"], "tokens": 316}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSpineUtils:\n\n    def test_despine_specific_axes(self):\n        f, (ax1, ax2) = plt.subplots(2, 1)\n\n        utils.despine(ax=ax2)\n\n        for side in self.sides:\n            assert ax1.spines[side].get_visible()\n\n        for side in self.outer_sides:\n            assert ~ax2.spines[side].get_visible()\n        for side in self.inner_sides:\n            assert ax2.spines[side].get_visible()\n\n    def test_despine_with_offset(self):\n        f, ax = plt.subplots()\n\n        for side in self.sides:\n            pos = ax.spines[side].get_position()\n            assert pos == self.original_position\n\n        utils.despine(ax=ax, offset=self.offset)\n\n        for side in self.sides:\n            is_visible = ax.spines[side].get_visible()\n            new_position = ax.spines[side].get_position()\n            if is_visible:\n                assert new_position == self.offset_position\n            else:\n                assert new_position == self.original_position\n\n    def test_despine_side_specific_offset(self):\n\n        f, ax = plt.subplots()\n        utils.despine(ax=ax, offset=dict(left=self.offset))\n\n        for side in self.sides:\n            is_visible = ax.spines[side].get_visible()\n            new_position = ax.spines[side].get_position()\n            if is_visible and side == \"left\":\n                assert new_position == self.offset_position\n            else:\n                assert new_position == self.original_position", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_TestSpineUtils.test_despine_with_offset_specific_axes_TestSpineUtils.test_despine_with_offset_specific_axes.for_side_in_self_sides_.if_ax2_spines_side_get_v.else_.assert_pos2_self_origi": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_TestSpineUtils.test_despine_with_offset_specific_axes_TestSpineUtils.test_despine_with_offset_specific_axes.for_side_in_self_sides_.if_ax2_spines_side_get_v.else_.assert_pos2_self_origi", "embedding": null, "metadata": {"file_path": "tests/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 192, "end_line": 204, "span_ids": ["TestSpineUtils.test_despine_with_offset_specific_axes"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSpineUtils:\n\n    def test_despine_with_offset_specific_axes(self):\n        f, (ax1, ax2) = plt.subplots(2, 1)\n\n        utils.despine(offset=self.offset, ax=ax2)\n\n        for side in self.sides:\n            pos1 = ax1.spines[side].get_position()\n            pos2 = ax2.spines[side].get_position()\n            assert pos1 == self.original_position\n            if ax2.spines[side].get_visible():\n                assert pos2 == self.offset_position\n            else:\n                assert pos2 == self.original_position", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_TestSpineUtils.test_despine_trim_spines_TestSpineUtils.test_despine_trim_categorical.assert_bounds_0_2_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_TestSpineUtils.test_despine_trim_spines_TestSpineUtils.test_despine_trim_categorical.assert_bounds_0_2_", "embedding": null, "metadata": {"file_path": "tests/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 206, "end_line": 248, "span_ids": ["TestSpineUtils.test_despine_trim_spines", "TestSpineUtils.test_despine_trim_inverted", "TestSpineUtils.test_despine_trim_categorical", "TestSpineUtils.test_despine_trim_noticks"], "tokens": 344}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSpineUtils:\n\n    def test_despine_trim_spines(self):\n\n        f, ax = plt.subplots()\n        ax.plot([1, 2, 3], [1, 2, 3])\n        ax.set_xlim(.75, 3.25)\n\n        utils.despine(trim=True)\n        for side in self.inner_sides:\n            bounds = ax.spines[side].get_bounds()\n            assert bounds == (1, 3)\n\n    def test_despine_trim_inverted(self):\n\n        f, ax = plt.subplots()\n        ax.plot([1, 2, 3], [1, 2, 3])\n        ax.set_ylim(.85, 3.15)\n        ax.invert_yaxis()\n\n        utils.despine(trim=True)\n        for side in self.inner_sides:\n            bounds = ax.spines[side].get_bounds()\n            assert bounds == (1, 3)\n\n    def test_despine_trim_noticks(self):\n\n        f, ax = plt.subplots()\n        ax.plot([1, 2, 3], [1, 2, 3])\n        ax.set_yticks([])\n        utils.despine(trim=True)\n        assert ax.get_yticks().size == 0\n\n    def test_despine_trim_categorical(self):\n\n        f, ax = plt.subplots()\n        ax.plot([\"a\", \"b\", \"c\"], [1, 2, 3])\n\n        utils.despine(trim=True)\n\n        bounds = ax.spines[\"left\"].get_bounds()\n        assert bounds == (1, 3)\n\n        bounds = ax.spines[\"bottom\"].get_bounds()\n        assert bounds == (0, 2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_TestSpineUtils.test_despine_moved_ticks_TestSpineUtils.test_despine_moved_ticks.None_7": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_TestSpineUtils.test_despine_moved_ticks_TestSpineUtils.test_despine_moved_ticks.None_7", "embedding": null, "metadata": {"file_path": "tests/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 250, "end_line": 282, "span_ids": ["TestSpineUtils.test_despine_moved_ticks"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSpineUtils:\n\n    def test_despine_moved_ticks(self):\n\n        f, ax = plt.subplots()\n        for t in ax.yaxis.majorTicks:\n            t.tick1line.set_visible(True)\n        utils.despine(ax=ax, left=True, right=False)\n        for t in ax.yaxis.majorTicks:\n            assert t.tick2line.get_visible()\n        plt.close(f)\n\n        f, ax = plt.subplots()\n        for t in ax.yaxis.majorTicks:\n            t.tick1line.set_visible(False)\n        utils.despine(ax=ax, left=True, right=False)\n        for t in ax.yaxis.majorTicks:\n            assert not t.tick2line.get_visible()\n        plt.close(f)\n\n        f, ax = plt.subplots()\n        for t in ax.xaxis.majorTicks:\n            t.tick1line.set_visible(True)\n        utils.despine(ax=ax, bottom=True, top=False)\n        for t in ax.xaxis.majorTicks:\n            assert t.tick2line.get_visible()\n        plt.close(f)\n\n        f, ax = plt.subplots()\n        for t in ax.xaxis.majorTicks:\n            t.tick1line.set_visible(False)\n        utils.despine(ax=ax, bottom=True, top=False)\n        for t in ax.xaxis.majorTicks:\n            assert not t.tick2line.get_visible()\n        plt.close(f)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_ticklabels_overlap_test_ticklabels_overlap.assert_not_y": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_ticklabels_overlap_test_ticklabels_overlap.assert_not_y", "embedding": null, "metadata": {"file_path": "tests/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 285, "end_line": 302, "span_ids": ["test_ticklabels_overlap"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ticklabels_overlap():\n\n    rcmod.set()\n    f, ax = plt.subplots(figsize=(2, 2))\n    f.tight_layout()  # This gets the Agg renderer working\n\n    assert not utils.axis_ticklabels_overlap(ax.get_xticklabels())\n\n    big_strings = \"abcdefgh\", \"ijklmnop\"\n    ax.set_xlim(-.5, 1.5)\n    ax.set_xticks([0, 1])\n    ax.set_xticklabels(big_strings)\n\n    assert utils.axis_ticklabels_overlap(ax.get_xticklabels())\n\n    x, y = utils.axes_ticklabels_overlap(ax)\n    assert x\n    assert not y", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_move_legend_matplotlib_objects_test_move_legend_matplotlib_objects.assert_fig_legends_0_get": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_move_legend_matplotlib_objects_test_move_legend_matplotlib_objects.assert_fig_legends_0_get", "embedding": null, "metadata": {"file_path": "tests/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 338, "end_line": 384, "span_ids": ["test_move_legend_matplotlib_objects"], "tokens": 385}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_move_legend_matplotlib_objects():\n\n    fig, ax = plt.subplots()\n\n    colors = \"C2\", \"C5\"\n    labels = \"first label\", \"second label\"\n    title = \"the legend\"\n\n    for color, label in zip(colors, labels):\n        ax.plot([0, 1], color=color, label=label)\n    ax.legend(loc=\"upper right\", title=title)\n    utils._draw_figure(fig)\n    xfm = ax.transAxes.inverted().transform\n\n    # --- Test axes legend\n\n    old_pos = xfm(ax.legend_.legendPatch.get_extents())\n\n    new_fontsize = 14\n    utils.move_legend(ax, \"lower left\", title_fontsize=new_fontsize)\n    utils._draw_figure(fig)\n    new_pos = xfm(ax.legend_.legendPatch.get_extents())\n\n    assert (new_pos < old_pos).all()\n    assert ax.legend_.get_title().get_text() == title\n    assert ax.legend_.get_title().get_size() == new_fontsize\n\n    # --- Test title replacement\n\n    new_title = \"new title\"\n    utils.move_legend(ax, \"lower left\", title=new_title)\n    utils._draw_figure(fig)\n    assert ax.legend_.get_title().get_text() == new_title\n\n    # --- Test figure legend\n\n    fig.legend(loc=\"upper right\", title=title)\n    _draw_figure(fig)\n    xfm = fig.transFigure.inverted().transform\n    old_pos = xfm(fig.legends[0].legendPatch.get_extents())\n\n    utils.move_legend(fig, \"lower left\", title=new_title)\n    _draw_figure(fig)\n\n    new_pos = xfm(fig.legends[0].legendPatch.get_extents())\n    assert (new_pos < old_pos).all()\n    assert fig.legends[0].get_title().get_text() == new_title", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_move_legend_grid_object_test_move_legend_grid_object.for_i_h_in_enumerate_g_l.assert_mpl_colors_to_rgb_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_move_legend_grid_object_test_move_legend_grid_object.for_i_h_in_enumerate_g_l.assert_mpl_colors_to_rgb_", "embedding": null, "metadata": {"file_path": "tests/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 387, "end_line": 412, "span_ids": ["test_move_legend_grid_object"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_move_legend_grid_object(long_df):\n\n    from seaborn.axisgrid import FacetGrid\n\n    hue_var = \"a\"\n    g = FacetGrid(long_df, hue=hue_var)\n    g.map(plt.plot, \"x\", \"y\")\n\n    g.add_legend()\n    _draw_figure(g.figure)\n\n    xfm = g.figure.transFigure.inverted().transform\n    old_pos = xfm(g.legend.legendPatch.get_extents())\n\n    fontsize = 20\n    utils.move_legend(g, \"lower left\", title_fontsize=fontsize)\n    _draw_figure(g.figure)\n\n    new_pos = xfm(g.legend.legendPatch.get_extents())\n    assert (new_pos < old_pos).all()\n    assert g.legend.get_title().get_text() == hue_var\n    assert g.legend.get_title().get_size() == fontsize\n\n    assert g.legend.legendHandles\n    for i, h in enumerate(g.legend.legendHandles):\n        assert mpl.colors.to_rgb(h.get_color()) == mpl.colors.to_rgb(f\"C{i}\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_move_legend_input_checks_test_load_cached_datasets.for_name_in_get_dataset_n.check_load_cached_dataset": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_move_legend_input_checks_test_load_cached_datasets.for_name_in_get_dataset_n.check_load_cached_dataset", "embedding": null, "metadata": {"file_path": "tests/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 415, "end_line": 487, "span_ids": ["check_load_dataset", "test_load_datasets", "test_get_dataset_names", "test_load_dataset_passed_data_error", "test_load_cached_datasets", "test_load_dataset_string_error", "check_load_cached_dataset", "test_move_legend_input_checks"], "tokens": 490}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_move_legend_input_checks():\n\n    ax = plt.figure().subplots()\n    with pytest.raises(TypeError):\n        utils.move_legend(ax.xaxis, \"best\")\n\n    with pytest.raises(ValueError):\n        utils.move_legend(ax, \"best\")\n\n    with pytest.raises(ValueError):\n        utils.move_legend(ax.figure, \"best\")\n\n\ndef check_load_dataset(name):\n    ds = load_dataset(name, cache=False)\n    assert(isinstance(ds, pd.DataFrame))\n\n\ndef check_load_cached_dataset(name):\n    # Test the caching using a temporary file.\n    with tempfile.TemporaryDirectory() as tmpdir:\n        # download and cache\n        ds = load_dataset(name, cache=True, data_home=tmpdir)\n\n        # use cached version\n        ds2 = load_dataset(name, cache=True, data_home=tmpdir)\n        assert_frame_equal(ds, ds2)\n\n\n@_network(url=\"https://github.com/mwaskom/seaborn-data\")\ndef test_get_dataset_names():\n    names = get_dataset_names()\n    assert names\n    assert \"tips\" in names\n\n\n@_network(url=\"https://github.com/mwaskom/seaborn-data\")\ndef test_load_datasets():\n\n    # Heavy test to verify that we can load all available datasets\n    for name in get_dataset_names():\n        # unfortunately @network somehow obscures this generator so it\n        # does not get in effect, so we need to call explicitly\n        # yield check_load_dataset, name\n        check_load_dataset(name)\n\n\n@_network(url=\"https://github.com/mwaskom/seaborn-data\")\ndef test_load_dataset_string_error():\n\n    name = \"bad_name\"\n    err = f\"'{name}' is not one of the example datasets.\"\n    with pytest.raises(ValueError, match=err):\n        load_dataset(name)\n\n\ndef test_load_dataset_passed_data_error():\n\n    df = pd.DataFrame()\n    err = \"This function accepts only strings\"\n    with pytest.raises(TypeError, match=err):\n        load_dataset(df)\n\n\n@_network(url=\"https://github.com/mwaskom/seaborn-data\")\ndef test_load_cached_datasets():\n\n    # Heavy test to verify that we can load all available datasets\n    for name in get_dataset_names():\n        # unfortunately @network somehow obscures this generator so it\n        # does not get in effect, so we need to call explicitly\n        # yield check_load_dataset, name\n        check_load_cached_dataset(name)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_relative_luminance_test_relative_luminance.for_lum1_lum2_in_zip_lum.assert_lum1_pytest_app": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_relative_luminance_test_relative_luminance.for_lum1_lum2_in_zip_lum.assert_lum1_pytest_app", "embedding": null, "metadata": {"file_path": "tests/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 490, "end_line": 506, "span_ids": ["test_relative_luminance"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_relative_luminance():\n    \"\"\"Test relative luminance.\"\"\"\n    out1 = utils.relative_luminance(\"white\")\n    assert out1 == 1\n\n    out2 = utils.relative_luminance(\"#000000\")\n    assert out2 == 0\n\n    out3 = utils.relative_luminance((.25, .5, .75))\n    assert out3 == pytest.approx(0.201624536)\n\n    rgbs = mpl.cm.RdBu(np.linspace(0, 1, 10))\n    lums1 = [utils.relative_luminance(rgb) for rgb in rgbs]\n    lums2 = utils.relative_luminance(rgbs)\n\n    for lum1, lum2 in zip(lums1, lums2):\n        assert lum1 == pytest.approx(lum2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_get_color_cycle_test_get_color_cycle.with_mpl_rc_context_rc_.assert_get_color_cycle_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_get_color_cycle_test_get_color_cycle.with_mpl_rc_context_rc_.assert_get_color_cycle_", "embedding": null, "metadata": {"file_path": "tests/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 509, "end_line": 523, "span_ids": ["test_get_color_cycle"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n    \"cycler,result\",\n    [\n        (cycler(color=[\"y\"]), [\"y\"]),\n        (cycler(color=[\"k\"]), [\"k\"]),\n        (cycler(color=[\"k\", \"y\"]), [\"k\", \"y\"]),\n        (cycler(color=[\"y\", \"k\"]), [\"y\", \"k\"]),\n        (cycler(color=[\"b\", \"r\"]), [\"b\", \"r\"]),\n        (cycler(color=[\"r\", \"b\"]), [\"r\", \"b\"]),\n        (cycler(lw=[1, 2]), [\".15\"]),  # no color in cycle\n    ],\n)\ndef test_get_color_cycle(cycler, result):\n    with mpl.rc_context(rc={\"axes.prop_cycle\": cycler}):\n        assert get_color_cycle() == result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_remove_na_test_remove_na.assert_series_equal_a_ser": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_remove_na_test_remove_na.assert_series_equal_a_ser", "embedding": null, "metadata": {"file_path": "tests/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 526, "end_line": 534, "span_ids": ["test_remove_na"], "tokens": 108}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_remove_na():\n\n    a_array = np.array([1, 2, np.nan, 3])\n    a_array_rm = remove_na(a_array)\n    assert_array_equal(a_array_rm, np.array([1, 2, 3]))\n\n    a_series = pd.Series([1, 2, np.nan, 3])\n    a_series_rm = remove_na(a_series)\n    assert_series_equal(a_series_rm, pd.Series([1., 2, 3], [0, 1, 3]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_assign_default_kwargs_test_draw_figure.assert_ax_get_xticklabels": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_assign_default_kwargs_test_draw_figure.assert_ax_get_xticklabels", "embedding": null, "metadata": {"file_path": "tests/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 537, "end_line": 558, "span_ids": ["test_assign_default_kwargs", "test_draw_figure"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_assign_default_kwargs():\n\n    def f(a, b, c, d):\n        pass\n\n    def g(c=1, d=2):\n        pass\n\n    kws = {\"c\": 3}\n\n    kws = _assign_default_kwargs(kws, f, g)\n    assert kws == {\"c\": 3, \"d\": 2}\n\n\ndef test_draw_figure():\n\n    f, ax = plt.subplots()\n    ax.plot([\"a\", \"b\", \"c\"], [1, 2, 3])\n    _draw_figure(f)\n    assert not f.stale\n    # ticklabels are not populated until a draw, but this may change\n    assert ax.get_xticklabels()[0].get_text() == \"a\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_deprecate_ci_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_deprecate_ci_", "embedding": null, "metadata": {"file_path": "tests/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 561, "end_line": 576, "span_ids": ["test_deprecate_ci"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_deprecate_ci():\n\n    msg = \"\\n\\nThe `ci` parameter is deprecated. Use `errorbar=\"\n\n    with pytest.warns(FutureWarning, match=msg + \"None\"):\n        out = _deprecate_ci(None, None)\n    assert out is None\n\n    with pytest.warns(FutureWarning, match=msg + \"'sd'\"):\n        out = _deprecate_ci(None, \"sd\")\n    assert out == \"sd\"\n\n    with pytest.warns(FutureWarning, match=msg + r\"\\('ci', 68\\)\"):\n        out = _deprecate_ci(None, 68)\n    assert out == (\"ci\", 68)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/conf.py__Configuration_file_for___Define_replacements_us": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/conf.py__Configuration_file_for___Define_replacements_us", "embedding": null, "metadata": {"file_path": "doc/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 90, "span_ids": ["impl", "impl:2", "docstring:11", "docstring", "imports"], "tokens": 609}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Path setup --------------------------------------------------------------\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#\nimport os\nimport sys\nimport time\nimport seaborn\nfrom seaborn._core.properties import PROPERTIES\n\nsys.path.insert(0, os.path.abspath('sphinxext'))\n\n\n# -- Project information -----------------------------------------------------\n\nproject = 'seaborn'\ncopyright = f'2012-{time.strftime(\"%Y\")}'\nauthor = 'Michael Waskom'\nversion = release = seaborn.__version__\n\n\n# -- General configuration ---------------------------------------------------\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (amed 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    'sphinx.ext.autodoc',\n    'sphinx.ext.doctest',\n    'sphinx.ext.coverage',\n    'sphinx.ext.mathjax',\n    'sphinx.ext.autosummary',\n    'sphinx.ext.intersphinx',\n    'matplotlib.sphinxext.plot_directive',\n    'gallery_generator',\n    'tutorial_builder',\n    'numpydoc',\n    'sphinx_copybutton',\n    'sphinx_issues',\n    'sphinx_design',\n]\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The root document.\nroot_doc = 'index'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path.\nexclude_patterns = ['_build', 'docstrings', 'nextgen', 'Thumbs.db', '.DS_Store']\n\n# The reST default role (used for this markup: `text`) to use for all documents.\ndefault_role = 'literal'\n\n# Generate the API documentation when building\nautosummary_generate = True\nnumpydoc_show_class_members = False\n\n# Sphinx-issues configuration\nissues_github_path = 'mwaskom/seaborn'\n\n# Include the example source for plots in API docs\nplot_include_source = True\nplot_formats = [('png', 90)]\nplot_html_show_formats = False\nplot_html_show_source_link = False\n\n# Don't add a source link in the sidebar\nhtml_show_sourcelink = False\n\n# Control the appearance of type hints\nautodoc_typehints = \"none\"\nautodoc_typehints_format = \"short\"\n\n# Allow shorthand references for main function interface\nrst_prolog = \"\"\"\n.. currentmodule:: seaborn\n\"\"\"\n\n# Define replacements (used in whatsnew bullets)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/conf.py_rst_epilog_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/conf.py_rst_epilog_", "embedding": null, "metadata": {"file_path": "doc/conf.py", "file_name": "conf.py", "file_type": "text/x-python", "category": "implementation", "start_line": 91, "end_line": 174, "span_ids": ["impl:2", "impl:45"], "tokens": 783}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "rst_epilog = \"\"\"\n\n.. role:: raw-html(raw)\n   :format: html\n\n.. role:: raw-latex(raw)\n   :format: latex\n\n.. |API| replace:: :raw-html:`API` :raw-latex:`{\\small\\sc [API]}`\n.. |Defaults| replace:: :raw-html:`Defaults` :raw-latex:`{\\small\\sc [Defaults]}`\n.. |Docs| replace:: :raw-html:`Docs` :raw-latex:`{\\small\\sc [Docs]}`\n.. |Feature| replace:: :raw-html:`Feature` :raw-latex:`{\\small\\sc [Feature]}`\n.. |Enhancement| replace:: :raw-html:`Enhancement` :raw-latex:`{\\small\\sc [Enhancement]}`\n.. |Fix| replace:: :raw-html:`Fix` :raw-latex:`{\\small\\sc [Fix]}`\n.. |Build| replace:: :raw-html:`Build` :raw-latex:`{\\small\\sc [Deps]}`\n\n\"\"\"  # noqa\n\nrst_epilog += \"\\n\".join([\n    f\".. |{key}| replace:: :ref:`{key} <{val.__class__.__name__.lower()}_property>`\"\n    for key, val in PROPERTIES.items()\n])\n\n# -- Options for HTML output -------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\nhtml_theme = 'pydata_sphinx_theme'\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named 'default.css' will overwrite the builtin 'default.css'.\nhtml_static_path = ['_static', 'example_thumbs']\nfor path in html_static_path:\n    if not os.path.exists(path):\n        os.makedirs(path)\n\nhtml_css_files = [f'css/custom.css?v={seaborn.__version__}']\n\nhtml_logo = \"_static/logo-wide-lightbg.svg\"\nhtml_favicon = \"_static/favicon.ico\"\n\nhtml_theme_options = {\n    \"icon_links\": [\n        {\n            \"name\": \"GitHub\",\n            \"url\": \"https://github.com/mwaskom/seaborn\",\n            \"icon\": \"fab fa-github\",\n            \"type\": \"fontawesome\",\n        },\n        {\n            \"name\": \"Twitter\",\n            \"url\": \"https://twitter.com/michaelwaskom\",\n            \"icon\": \"fab fa-twitter\",\n            \"type\": \"fontawesome\",\n        },\n    ],\n    \"show_prev_next\": False,\n    \"navbar_start\": [\"navbar-logo\"],\n    \"navbar_end\": [\"navbar-icon-links\"],\n    \"header_links_before_dropdown\": 8,\n}\n\nhtml_context = {\n    \"default_mode\": \"light\",\n}\n\nhtml_sidebars = {\n    \"index\": [],\n    \"examples/index\": [],\n    \"**\": [\"sidebar-nav-bs.html\"],\n}\n\n# -- Intersphinx ------------------------------------------------\n\nintersphinx_mapping = {\n    'numpy': ('https://numpy.org/doc/stable/', None),\n    'scipy': ('https://docs.scipy.org/doc/scipy/', None),\n    'matplotlib': ('https://matplotlib.org/stable', None),\n    'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None),\n    'statsmodels': ('https://www.statsmodels.org/stable/', None)\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_from_pathlib_import_Path_TEMPLATE._": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_from_pathlib_import_Path_TEMPLATE._", "embedding": null, "metadata": {"file_path": "doc/sphinxext/tutorial_builder.py", "file_name": "tutorial_builder.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 46, "span_ids": ["impl", "imports"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from pathlib import Path\nimport warnings\n\nfrom jinja2 import Environment\nimport yaml\n\nimport numpy as np\nimport matplotlib as mpl\nimport seaborn as sns\nimport seaborn.objects as so\n\n\nTEMPLATE = \"\"\"\n:notoc:\n\n.. _tutorial:\n\nUser guide and tutorial\n=======================\n{% for section in sections %}\n{{ section.header }}\n{% for page in section.pages %}\n.. grid:: 1\n  :gutter: 2\n\n  .. grid-item-card::\n\n    .. grid:: 2\n\n      .. grid-item::\n        :columns: 3\n\n        .. image:: ./tutorial/{{ page }}.svg\n          :target: ./tutorial/{{ page }}.html\n\n      .. grid-item::\n        :columns: 9\n        :margin: auto\n\n        .. toctree::\n          :maxdepth: 2\n\n          tutorial/{{ page }}\n{% endfor %}\n{% endfor %}\n\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_main_write_thumbnail.with_.fig_savefig_svg_path_for": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_main_write_thumbnail.with_.fig_savefig_svg_path_for", "embedding": null, "metadata": {"file_path": "doc/sphinxext/tutorial_builder.py", "file_name": "tutorial_builder.py", "file_type": "text/x-python", "category": "implementation", "start_line": 49, "end_line": 92, "span_ids": ["main", "write_thumbnail"], "tokens": 310}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def main(app):\n\n    content_yaml = Path(app.builder.srcdir) / \"tutorial.yaml\"\n    tutorial_rst = Path(app.builder.srcdir) / \"tutorial.rst\"\n\n    tutorial_dir = Path(app.builder.srcdir) / \"tutorial\"\n    tutorial_dir.mkdir(exist_ok=True)\n\n    with open(content_yaml) as fid:\n        sections = yaml.load(fid, yaml.BaseLoader)\n\n    for section in sections:\n        title = section[\"title\"]\n        section[\"header\"] = \"\\n\".join([title, \"-\" * len(title)]) if title else \"\"\n\n    env = Environment().from_string(TEMPLATE)\n    content = env.render(sections=sections)\n\n    with open(tutorial_rst, \"w\") as fid:\n        fid.write(content)\n\n    for section in sections:\n        for page in section[\"pages\"]:\n            if (\n                not (svg_path := tutorial_dir / f\"{page}.svg\").exists()\n                or svg_path.stat().st_mtime < Path(__file__).stat().st_mtime\n            ):\n                write_thumbnail(svg_path, page)\n\n\ndef write_thumbnail(svg_path, page):\n\n    with (\n        sns.axes_style(\"dark\"),\n        sns.plotting_context(\"notebook\"),\n        sns.color_palette(\"deep\")\n    ):\n        fig = globals()[page]()\n        for ax in fig.axes:\n            ax.set(xticklabels=[], yticklabels=[], xlabel=\"\", ylabel=\"\", title=\"\")\n        with warnings.catch_warnings():\n            warnings.simplefilter(\"ignore\")\n            fig.tight_layout()\n        fig.savefig(svg_path, format=\"svg\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_introduction_introduction.return.f": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_introduction_introduction.return.f", "embedding": null, "metadata": {"file_path": "doc/sphinxext/tutorial_builder.py", "file_name": "tutorial_builder.py", "file_type": "text/x-python", "category": "implementation", "start_line": 95, "end_line": 127, "span_ids": ["introduction"], "tokens": 356}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def introduction():\n\n    tips = sns.load_dataset(\"tips\")\n    fmri = sns.load_dataset(\"fmri\").query(\"region == 'parietal'\")\n    penguins = sns.load_dataset(\"penguins\")\n\n    f = mpl.figure.Figure(figsize=(5, 5))\n    with sns.axes_style(\"whitegrid\"):\n        f.subplots(2, 2)\n\n    sns.scatterplot(\n        tips, x=\"total_bill\", y=\"tip\", hue=\"sex\", size=\"size\",\n        alpha=.75, palette=[\"C0\", \".5\"], legend=False, ax=f.axes[0],\n    )\n    sns.kdeplot(\n        tips.query(\"size != 5\"), x=\"total_bill\", hue=\"size\",\n        palette=\"blend:C0,.5\", fill=True, linewidth=.5,\n        legend=False, common_norm=False, ax=f.axes[1],\n    )\n    sns.lineplot(\n        fmri, x=\"timepoint\", y=\"signal\", hue=\"event\",\n        errorbar=(\"se\", 2), legend=False, palette=[\"C0\", \".5\"], ax=f.axes[2],\n    )\n    sns.boxplot(\n        penguins, x=\"bill_depth_mm\", y=\"species\", hue=\"sex\",\n        whiskerprops=dict(linewidth=1.5), medianprops=dict(linewidth=1.5),\n        boxprops=dict(linewidth=1.5), capprops=dict(linewidth=0),\n        width=.5, palette=[\"C0\", \".8\"], whis=5, ax=f.axes[3],\n    )\n    f.axes[3].legend_ = None\n    for ax in f.axes:\n        ax.set(xticks=[], yticks=[])\n    return f", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_function_overview_function_overview.return.f": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_function_overview_function_overview.return.f", "embedding": null, "metadata": {"file_path": "doc/sphinxext/tutorial_builder.py", "file_name": "tutorial_builder.py", "file_type": "text/x-python", "category": "implementation", "start_line": 130, "end_line": 179, "span_ids": ["function_overview"], "tokens": 620}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def function_overview():\n\n    from matplotlib.patches import FancyBboxPatch\n\n    f = mpl.figure.Figure(figsize=(7, 5))\n    with sns.axes_style(\"white\"):\n        ax = f.subplots()\n    f.subplots_adjust(0, 0, 1, 1)\n    ax.set_axis_off()\n    ax.set(xlim=(0, 1), ylim=(0, 1))\n\n    deep = sns.color_palette(\"deep\")\n    colors = dict(relational=deep[0], distributions=deep[1], categorical=deep[2])\n    dark = sns.color_palette(\"dark\")\n    text_colors = dict(relational=dark[0], distributions=dark[1], categorical=dark[2])\n\n    functions = dict(\n        relational=[\"scatterplot\", \"lineplot\"],\n        distributions=[\"histplot\", \"kdeplot\", \"ecdfplot\", \"rugplot\"],\n        categorical=[\n            \"stripplot\", \"swarmplot\", \"boxplot\", \"violinplot\", \"pointplot\", \"barplot\"\n        ],\n    )\n    pad, w, h = .06, .2, .15\n    xs, y = np.arange(0, 1, 1 / 3) + pad * 1.05, .7\n    for x, mod in zip(xs, functions):\n        color = colors[mod] + (.2,)\n        text_color = text_colors[mod]\n        ax.add_artist(FancyBboxPatch((x, y), w, h, f\"round,pad={pad}\", color=\"white\"))\n        ax.add_artist(FancyBboxPatch(\n            (x, y), w, h, f\"round,pad={pad}\",\n            linewidth=1, edgecolor=text_color, facecolor=color,\n        ))\n        ax.text(\n            x + w / 2, y + h / 2, f\"{mod[:3]}plot\\n({mod})\",\n            ha=\"center\", va=\"center\", size=20, color=text_color\n        )\n        for i, func in enumerate(functions[mod]):\n            x_i, y_i = x + w / 2, y - i * .1 - h / 2 - pad\n            xy = x_i - w / 2, y_i - pad / 3\n            ax.add_artist(\n                FancyBboxPatch(xy, w, h / 4, f\"round,pad={pad / 3}\", color=\"white\")\n            )\n            ax.add_artist(FancyBboxPatch(\n                xy, w, h / 4, f\"round,pad={pad / 3}\",\n                linewidth=1, edgecolor=text_color, facecolor=color\n            ))\n            ax.text(x_i, y_i, func, ha=\"center\", va=\"center\", size=16, color=text_color)\n        ax.plot([x_i, x_i], [y, y_i], zorder=-100, color=text_color, lw=1)\n    return f", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_data_structure_data_structure.return.f": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_data_structure_data_structure.return.f", "embedding": null, "metadata": {"file_path": "doc/sphinxext/tutorial_builder.py", "file_name": "tutorial_builder.py", "file_type": "text/x-python", "category": "implementation", "start_line": 182, "end_line": 201, "span_ids": ["data_structure"], "tokens": 261}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def data_structure():\n\n    f = mpl.figure.Figure(figsize=(7, 5))\n    gs = mpl.gridspec.GridSpec(\n        figure=f, ncols=6, nrows=2, height_ratios=(1, 20),\n        left=0, right=.35, bottom=0, top=.9, wspace=.1, hspace=.01\n    )\n    colors = [c + (.5,) for c in sns.color_palette(\"deep\")]\n    f.add_subplot(gs[0, :], facecolor=\".8\")\n    for i in range(gs.ncols):\n        f.add_subplot(gs[1:, i], facecolor=colors[i])\n\n    gs = mpl.gridspec.GridSpec(\n        figure=f, ncols=2, nrows=2, height_ratios=(1, 8), width_ratios=(1, 11),\n        left=.4, right=1, bottom=.2, top=.8, wspace=.015, hspace=.02\n    )\n    f.add_subplot(gs[0, 1:], facecolor=colors[2])\n    f.add_subplot(gs[1:, 0], facecolor=colors[1])\n    f.add_subplot(gs[1, 1], facecolor=colors[0])\n    return f", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_error_bars_error_bars.return.g_figure": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_error_bars_error_bars.return.g_figure", "embedding": null, "metadata": {"file_path": "doc/sphinxext/tutorial_builder.py", "file_name": "tutorial_builder.py", "file_type": "text/x-python", "category": "implementation", "start_line": 204, "end_line": 214, "span_ids": ["error_bars"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def error_bars():\n\n    diamonds = sns.load_dataset(\"diamonds\")\n    with sns.axes_style(\"whitegrid\"):\n        g = sns.catplot(\n            diamonds, x=\"carat\", y=\"clarity\", hue=\"clarity\", kind=\"point\",\n            errorbar=(\"sd\", .5), join=False, legend=False, facet_kws={\"despine\": False},\n            palette=\"ch:s=-.2,r=-.2,d=.4,l=.6_r\", scale=.75, capsize=.3,\n        )\n    g.ax.yaxis.set_inverted(False)\n    return g.figure", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_properties_properties.return.f": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_properties_properties.return.f", "embedding": null, "metadata": {"file_path": "doc/sphinxext/tutorial_builder.py", "file_name": "tutorial_builder.py", "file_type": "text/x-python", "category": "implementation", "start_line": 217, "end_line": 243, "span_ids": ["properties"], "tokens": 282}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def properties():\n\n    f = mpl.figure.Figure(figsize=(5, 5))\n\n    x = np.arange(1, 11)\n    y = np.zeros_like(x)\n\n    p = so.Plot(x, y)\n    ps = 14\n    plots = [\n        p.add(so.Dot(pointsize=ps), color=map(str, x)),\n        p.add(so.Dot(color=\".3\", pointsize=ps), alpha=x),\n        p.add(so.Dot(color=\".9\", pointsize=ps, edgewidth=2), edgecolor=x),\n        p.add(so.Dot(color=\".3\"), pointsize=x).scale(pointsize=(4, 18)),\n        p.add(so.Dot(pointsize=ps, color=\".9\", edgecolor=\".2\"), edgewidth=x),\n        p.add(so.Dot(pointsize=ps, color=\".3\"), marker=map(str, x)),\n        p.add(so.Dot(pointsize=ps, color=\".3\", marker=\"x\"), stroke=x),\n    ]\n\n    with sns.axes_style(\"ticks\"):\n        axs = f.subplots(len(plots))\n    for p, ax in zip(plots, axs):\n        p.on(ax).plot()\n        ax.set(xticks=x, yticks=[], xticklabels=[], ylim=(-.2, .3))\n        sns.despine(ax=ax, left=True)\n    f.legends = []\n    return f", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_objects_interface_objects_interface.return.f": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_objects_interface_objects_interface.return.f", "embedding": null, "metadata": {"file_path": "doc/sphinxext/tutorial_builder.py", "file_name": "tutorial_builder.py", "file_type": "text/x-python", "category": "implementation", "start_line": 246, "end_line": 271, "span_ids": ["objects_interface"], "tokens": 343}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def objects_interface():\n\n    f = mpl.figure.Figure(figsize=(5, 4))\n    C = sns.color_palette(\"deep\")\n    ax = f.subplots()\n    fontsize = 22\n    rects = [((.135, .50), .69), ((.275, .38), .26), ((.59, .38), .40)]\n    for i, (xy, w) in enumerate(rects):\n        ax.add_artist(mpl.patches.Rectangle(xy, w, .09, color=C[i], alpha=.2, lw=0))\n    ax.text(0, .52, \"Plot(data, 'x', 'y', color='var1')\", size=fontsize, color=\".2\")\n    ax.text(0, .40, \".add(Dot(alpha=.5), marker='var2')\", size=fontsize, color=\".2\")\n    annots = [\n        (\"Mapped\\nin all layers\", (.48, .62), (0, 55)),\n        (\"Set directly\", (.41, .35), (0, -55)),\n        (\"Mapped\\nin this layer\", (.80, .35), (0, -55)),\n    ]\n    for i, (text, xy, xytext) in enumerate(annots):\n        ax.annotate(\n            text, xy, xytext,\n            textcoords=\"offset points\", fontsize=18, ha=\"center\", va=\"center\",\n            arrowprops=dict(arrowstyle=\"->\", linewidth=1.5, color=C[i]), color=C[i],\n        )\n    ax.set_axis_off()\n    f.subplots_adjust(0, 0, 1, 1)\n\n    return f", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_relational_relational.return.g_figure": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_relational_relational.return.g_figure", "embedding": null, "metadata": {"file_path": "doc/sphinxext/tutorial_builder.py", "file_name": "tutorial_builder.py", "file_type": "text/x-python", "category": "implementation", "start_line": 274, "end_line": 284, "span_ids": ["relational"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def relational():\n\n    mpg = sns.load_dataset(\"mpg\")\n    with sns.axes_style(\"ticks\"):\n        g = sns.relplot(\n            data=mpg, x=\"horsepower\", y=\"mpg\", size=\"displacement\", hue=\"weight\",\n            sizes=(50, 500), hue_norm=(2000, 4500), alpha=.75, legend=False,\n            palette=\"ch:start=-.5,rot=.7,dark=.3,light=.7_r\",\n        )\n    g.figure.set_size_inches(5, 5)\n    return g.figure", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_distributions_categorical.return.g_figure": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_distributions_categorical.return.g_figure", "embedding": null, "metadata": {"file_path": "doc/sphinxext/tutorial_builder.py", "file_name": "tutorial_builder.py", "file_type": "text/x-python", "category": "implementation", "start_line": 287, "end_line": 310, "span_ids": ["distributions", "categorical"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def distributions():\n\n    penguins = sns.load_dataset(\"penguins\").dropna()\n    with sns.axes_style(\"white\"):\n        g = sns.displot(\n            penguins, x=\"flipper_length_mm\", row=\"island\",\n            binwidth=4, kde=True, line_kws=dict(linewidth=2), legend=False,\n        )\n    sns.despine(left=True)\n    g.figure.set_size_inches(5, 5)\n    return g.figure\n\n\ndef categorical():\n\n    penguins = sns.load_dataset(\"penguins\").dropna()\n    with sns.axes_style(\"whitegrid\"):\n        g = sns.catplot(\n            penguins, x=\"sex\", y=\"body_mass_g\", hue=\"island\", col=\"sex\",\n            kind=\"box\", whis=np.inf, legend=False, sharex=False,\n        )\n    sns.despine(left=True)\n    g.figure.set_size_inches(5, 5)\n    return g.figure", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_regression_regression.return.g_figure": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_regression_regression.return.g_figure", "embedding": null, "metadata": {"file_path": "doc/sphinxext/tutorial_builder.py", "file_name": "tutorial_builder.py", "file_type": "text/x-python", "category": "implementation", "start_line": 313, "end_line": 324, "span_ids": ["regression"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def regression():\n\n    anscombe = sns.load_dataset(\"anscombe\")\n    with sns.axes_style(\"white\"):\n        g = sns.lmplot(\n            anscombe, x=\"x\", y=\"y\", hue=\"dataset\", col=\"dataset\", col_wrap=2,\n            scatter_kws=dict(edgecolor=\".2\", facecolor=\".7\", s=80),\n            line_kws=dict(lw=4), ci=None,\n        )\n    g.set(xlim=(2, None), ylim=(2, None))\n    g.figure.set_size_inches(5, 5)\n    return g.figure", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_axis_grids_axis_grids.return.g_figure": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_axis_grids_axis_grids.return.g_figure", "embedding": null, "metadata": {"file_path": "doc/sphinxext/tutorial_builder.py", "file_name": "tutorial_builder.py", "file_type": "text/x-python", "category": "implementation", "start_line": 327, "end_line": 337, "span_ids": ["axis_grids"], "tokens": 112}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def axis_grids():\n\n    penguins = sns.load_dataset(\"penguins\").sample(200, random_state=0)\n    with sns.axes_style(\"ticks\"):\n        g = sns.pairplot(\n            penguins.drop(\"flipper_length_mm\", axis=1),\n            diag_kind=\"kde\", diag_kws=dict(fill=False),\n            plot_kws=dict(s=40, fc=\"none\", ec=\"C0\", alpha=.75, linewidth=.75),\n        )\n    g.figure.set_size_inches(5, 5)\n    return g.figure", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_aesthetics_aesthetics.return.f": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_aesthetics_aesthetics.return.f", "embedding": null, "metadata": {"file_path": "doc/sphinxext/tutorial_builder.py", "file_name": "tutorial_builder.py", "file_type": "text/x-python", "category": "implementation", "start_line": 340, "end_line": 349, "span_ids": ["aesthetics"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def aesthetics():\n\n    f = mpl.figure.Figure(figsize=(5, 5))\n    for i, style in enumerate([\"darkgrid\", \"white\", \"ticks\", \"whitegrid\"], 1):\n        with sns.axes_style(style):\n            ax = f.add_subplot(2, 2, i)\n        ax.set(xticks=[0, .25, .5, .75, 1], yticks=[0, .25, .5, .75, 1])\n    sns.despine(ax=f.axes[1])\n    sns.despine(ax=f.axes[2])\n    return f", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_color_palettes_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/doc/sphinxext/tutorial_builder.py_color_palettes_", "embedding": null, "metadata": {"file_path": "doc/sphinxext/tutorial_builder.py", "file_name": "tutorial_builder.py", "file_type": "text/x-python", "category": "implementation", "start_line": 352, "end_line": 367, "span_ids": ["color_palettes", "setup"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def color_palettes():\n\n    f = mpl.figure.Figure(figsize=(5, 5))\n    palettes = [\"deep\", \"husl\", \"gray\", \"ch:\", \"mako\", \"vlag\", \"icefire\"]\n    axs = f.subplots(len(palettes))\n    x = np.arange(10)\n    for ax, name in zip(axs, palettes):\n        cmap = mpl.colors.ListedColormap(sns.color_palette(name, x.size))\n        ax.pcolormesh(x[None, :], linewidth=.5, edgecolor=\"w\", alpha=.8, cmap=cmap)\n        ax.set_axis_off()\n    return f\n\n\ndef setup(app):\n    app.connect(\"builder-inited\", main)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/examples/strip_regplot.py___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/examples/strip_regplot.py___", "embedding": null, "metadata": {"file_path": "examples/strip_regplot.py", "file_name": "strip_regplot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 19, "span_ids": ["impl", "docstring", "imports"], "tokens": 111}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nRegression fit over a strip plot\n================================\n\n_thumb: .53, .5\n\"\"\"\nimport seaborn as sns\nsns.set_theme()\n\nmpg = sns.load_dataset(\"mpg\")\nsns.catplot(\n    data=mpg, x=\"cylinders\", y=\"acceleration\", hue=\"weight\",\n    native_scale=True, zorder=1\n)\nsns.regplot(\n    data=mpg, x=\"cylinders\", y=\"acceleration\",\n    scatter=False, truncate=False, order=2, color=\".2\",\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_compat.py_set_scale_obj_set_scale_obj.if_Version_mpl___version_.else_.ax_set_f_axis_scale_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_compat.py_set_scale_obj_set_scale_obj.if_Version_mpl___version_.else_.ax_set_f_axis_scale_", "embedding": null, "metadata": {"file_path": "seaborn/_compat.py", "file_name": "_compat.py", "file_type": "text/x-python", "category": "implementation", "start_line": 108, "end_line": 127, "span_ids": ["set_scale_obj"], "tokens": 238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def set_scale_obj(ax, axis, scale):\n    \"\"\"Handle backwards compatability with setting matplotlib scale.\"\"\"\n    if Version(mpl.__version__) < Version(\"3.4\"):\n        # The ability to pass a BaseScale instance to Axes.set_{}scale was added\n        # to matplotlib in version 3.4.0: GH: matplotlib/matplotlib/pull/19089\n        # Workaround: use the scale name, which is restrictive only if the user\n        # wants to define a custom scale; they'll need to update the registry too.\n        if scale.name is None:\n            # Hack to support our custom Formatter-less CatScale\n            return\n        method = getattr(ax, f\"set_{axis}scale\")\n        kws = {}\n        if scale.name == \"function\":\n            trans = scale.get_transform()\n            kws[\"functions\"] = (trans._forward, trans._inverse)\n        method(scale.name, **kws)\n        axis_obj = getattr(ax, f\"{axis}axis\")\n        scale.set_default_locators_and_formatters(axis_obj)\n    else:\n        ax.set(**{f\"{axis}scale\": scale})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_compat.py_get_colormap_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_compat.py_get_colormap_", "embedding": null, "metadata": {"file_path": "seaborn/_compat.py", "file_name": "_compat.py", "file_type": "text/x-python", "category": "implementation", "start_line": 130, "end_line": 165, "span_ids": ["set_layout_engine", "register_colormap", "share_axis", "get_colormap"], "tokens": 262}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_colormap(name):\n    \"\"\"Handle changes to matplotlib colormap interface in 3.6.\"\"\"\n    try:\n        return mpl.colormaps[name]\n    except AttributeError:\n        return mpl.cm.get_cmap(name)\n\n\ndef register_colormap(name, cmap):\n    \"\"\"Handle changes to matplotlib colormap interface in 3.6.\"\"\"\n    try:\n        if name not in mpl.colormaps:\n            mpl.colormaps.register(cmap, name=name)\n    except AttributeError:\n        mpl.cm.register_cmap(name, cmap)\n\n\ndef set_layout_engine(fig, engine):\n    \"\"\"Handle changes to auto layout engine interface in 3.6\"\"\"\n    if hasattr(fig, \"set_layout_engine\"):\n        fig.set_layout_engine(engine)\n    else:\n        if engine == \"tight\":\n            fig.set_tight_layout(True)\n        elif engine == \"constrained\":\n            fig.set_constrained_layout(True)\n\n\ndef share_axis(ax0, ax1, which):\n    \"\"\"Handle changes to post-hoc axis sharing.\"\"\"\n    if Version(mpl.__version__) < Version(\"3.5.0\"):\n        group = getattr(ax0, f\"get_shared_{which}_axes\")()\n        group.join(ax1, ax0)\n    else:\n        getattr(ax1, f\"share{which}\")(ax0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/moves.py_from___future___import_an_Move.__call__.raise_NotImplementedError": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/moves.py_from___future___import_an_Move.__call__.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "seaborn/_core/moves.py", "file_name": "moves.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 21, "span_ids": ["Move.__call__", "imports", "Move"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from __future__ import annotations\nfrom dataclasses import dataclass\nfrom typing import ClassVar, Callable, Optional, Union\n\nimport numpy as np\nfrom pandas import DataFrame\n\nfrom seaborn._core.groupby import GroupBy\nfrom seaborn._core.scales import Scale\n\n\n@dataclass\nclass Move:\n    \"\"\"Base class for objects that apply simple positional transforms.\"\"\"\n\n    group_by_orient: ClassVar[bool] = True\n\n    def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame:\n        raise NotImplementedError", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/moves.py_Jitter_Jitter.__call__.return.data": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/moves.py_Jitter_Jitter.__call__.return.data", "embedding": null, "metadata": {"file_path": "seaborn/_core/moves.py", "file_name": "moves.py", "file_type": "text/x-python", "category": "implementation", "start_line": 24, "end_line": 61, "span_ids": ["Jitter.__call__", "Jitter"], "tokens": 274}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Jitter(Move):\n    \"\"\"\n    Random displacement of marks along either or both axes to reduce overplotting.\n    \"\"\"\n    width: float = 0\n    x: float = 0\n    y: float = 0\n\n    seed: Optional[int] = None\n\n    # TODO what is the best way to have a reasonable default?\n    # The problem is that \"reasonable\" seems dependent on the mark\n\n    def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame:\n\n        # TODO is it a problem that GroupBy is not used for anything here?\n        # Should we type it as optional?\n\n        data = data.copy()\n\n        rng = np.random.default_rng(self.seed)\n\n        def jitter(data, col, scale):\n            noise = rng.uniform(-.5, +.5, len(data))\n            offsets = noise * scale\n            return data[col] + offsets\n\n        if self.width:\n            data[orient] = jitter(data, orient, self.width * data[\"width\"])\n        if self.x:\n            data[\"x\"] = jitter(data, \"x\", self.x)\n        if self.y:\n            data[\"y\"] = jitter(data, \"y\", self.y)\n\n        return data", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/moves.py_Shift_Shift.__call__.return.data": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/moves.py_Shift_Shift.__call__.return.data", "embedding": null, "metadata": {"file_path": "seaborn/_core/moves.py", "file_name": "moves.py", "file_type": "text/x-python", "category": "implementation", "start_line": 159, "end_line": 174, "span_ids": ["Shift.__call__", "Shift"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Shift(Move):\n    \"\"\"\n    Displacement of all marks with the same magnitude / direction.\n    \"\"\"\n    x: float = 0\n    y: float = 0\n\n    def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame:\n\n        data = data.copy(deep=False)\n        data[\"x\"] = data[\"x\"] + self.x\n        data[\"y\"] = data[\"y\"] + self.y\n        return data", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/moves.py_Norm_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/moves.py_Norm_", "embedding": null, "metadata": {"file_path": "seaborn/_core/moves.py", "file_name": "moves.py", "file_type": "text/x-python", "category": "implementation", "start_line": 177, "end_line": 215, "span_ids": ["Norm", "Norm.__call__", "Norm._norm"], "tokens": 237}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Norm(Move):\n    \"\"\"\n    Divisive scaling on the value axis after aggregating within groups.\n    \"\"\"\n\n    func: Union[Callable, str] = \"max\"\n    where: Optional[str] = None\n    by: Optional[list[str]] = None\n    percent: bool = False\n\n    group_by_orient: ClassVar[bool] = False\n\n    def _norm(self, df, var):\n\n        if self.where is None:\n            denom_data = df[var]\n        else:\n            denom_data = df.query(self.where)[var]\n        df[var] = df[var] / denom_data.agg(self.func)\n\n        if self.percent:\n            df[var] = df[var] * 100\n\n        return df\n\n    def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame:\n\n        other = {\"x\": \"y\", \"y\": \"x\"}[orient]\n        return groupby.apply(data, self._norm, other)\n\n\n# TODO\n# @dataclass\n# class Ridge(Move):\n#     ...", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py__The_classes_for_specif_default.Default_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py__The_classes_for_specif_default.Default_", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 87, "span_ids": ["impl", "impl:4", "imports:35", "impl:2", "PairSpec", "docstring", "imports:36", "Default", "Default.__repr__", "FacetSpec", "imports", "impl:3", "docstring:2", "imports:37", "Layer"], "tokens": 486}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"The classes for specifying and compiling a declarative visualization.\"\"\"\nfrom __future__ import annotations\n\nimport io\nimport os\nimport re\nimport sys\nimport inspect\nimport itertools\nimport textwrap\nfrom contextlib import contextmanager\nfrom collections import abc\nfrom collections.abc import Callable, Generator\nfrom typing import Any, List, Optional, cast\n\nfrom cycler import cycler\nimport pandas as pd\nfrom pandas import DataFrame, Series\nimport matplotlib as mpl\nfrom matplotlib.axes import Axes\nfrom matplotlib.artist import Artist\nfrom matplotlib.figure import Figure\n\nfrom seaborn._marks.base import Mark\nfrom seaborn._stats.base import Stat\nfrom seaborn._core.data import PlotData\nfrom seaborn._core.moves import Move\nfrom seaborn._core.scales import Scale\nfrom seaborn._core.subplots import Subplots\nfrom seaborn._core.groupby import GroupBy\nfrom seaborn._core.properties import PROPERTIES, Property\nfrom seaborn._core.typing import DataSource, VariableSpec, VariableSpecList, OrderSpec\nfrom seaborn._core.rules import categorical_order\nfrom seaborn._compat import set_scale_obj, set_layout_engine\nfrom seaborn.rcmod import axes_style, plotting_context\nfrom seaborn.palettes import color_palette\nfrom seaborn.external.version import Version\n\nfrom typing import TYPE_CHECKING\nif TYPE_CHECKING:\n    from matplotlib.figure import SubFigure\n\n\nif sys.version_info >= (3, 8):\n    from typing import TypedDict\nelse:\n    from typing_extensions import TypedDict\n\n\n# ---- Definitions for internal specs --------------------------------- #\n\n\nclass Layer(TypedDict, total=False):\n\n    mark: Mark  # TODO allow list?\n    stat: Stat | None  # TODO allow list?\n    move: Move | list[Move] | None\n    data: PlotData\n    source: DataSource\n    vars: dict[str, VariableSpec]\n    orient: str\n    legend: bool\n\n\nclass FacetSpec(TypedDict, total=False):\n\n    variables: dict[str, VariableSpec]\n    structure: dict[str, list[str]]\n    wrap: int | None\n\n\nclass PairSpec(TypedDict, total=False):\n\n    variables: dict[str, VariableSpec]\n    structure: dict[str, list[str]]\n    cross: bool\n    wrap: int | None\n\n\n# --- Local helpers ----------------------------------------------------------------\n\nclass Default:\n    def __repr__(self):\n        return \"\"\n\n\ndefault = Default()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_theme_context_theme_context.try_.finally_.for_code_color_in_zip_.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_theme_context_theme_context.try_.finally_.for_code_color_in_zip_.None_1", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 90, "end_line": 108, "span_ids": ["theme_context"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@contextmanager\ndef theme_context(params: dict[str, Any]) -> Generator:\n    \"\"\"Temporarily modify specifc matplotlib rcParams.\"\"\"\n    orig_params = {k: mpl.rcParams[k] for k in params}\n    color_codes = \"bgrmyck\"\n    nice_colors = [*color_palette(\"deep6\"), (.15, .15, .15)]\n    orig_colors = [mpl.colors.colorConverter.colors[x] for x in color_codes]\n    # TODO how to allow this to reflect the color cycle when relevant?\n    try:\n        mpl.rcParams.update(params)\n        for (code, color) in zip(color_codes, nice_colors):\n            mpl.colors.colorConverter.colors[code] = color\n            mpl.colors.colorConverter.cache[code] = color\n        yield\n    finally:\n        mpl.rcParams.update(orig_params)\n        for (code, color) in zip(color_codes, orig_colors):\n            mpl.colors.colorConverter.colors[code] = color\n            mpl.colors.colorConverter.cache[code] = color", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_build_plot_signature_build_plot_signature.return.cls": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_build_plot_signature_build_plot_signature.return.cls", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 111, "end_line": 140, "span_ids": ["build_plot_signature"], "tokens": 225}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def build_plot_signature(cls):\n    \"\"\"\n    Decorator function for giving Plot a useful signature.\n\n    Currently this mostly saves us some duplicated typing, but we would\n    like eventually to have a way of registering new semantic properties,\n    at which point dynamic signature generation would become more important.\n\n    \"\"\"\n    sig = inspect.signature(cls)\n    params = [\n        inspect.Parameter(\"args\", inspect.Parameter.VAR_POSITIONAL),\n        inspect.Parameter(\"data\", inspect.Parameter.KEYWORD_ONLY, default=None)\n    ]\n    params.extend([\n        inspect.Parameter(name, inspect.Parameter.KEYWORD_ONLY, default=None)\n        for name in PROPERTIES\n    ])\n    new_sig = sig.replace(parameters=params)\n    cls.__signature__ = new_sig\n\n    known_properties = textwrap.fill(\n        \", \".join([f\"|{p}|\" for p in PROPERTIES]),\n        width=78, subsequent_indent=\" \" * 8,\n    )\n\n    if cls.__doc__ is not None:  # support python -OO mode\n        cls.__doc__ = cls.__doc__.format(known_properties=known_properties)\n\n    return cls", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py__The_main_interface_Plot.__init__.self._target.None": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py__The_main_interface_Plot.__init__.self._target.None", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 143, "end_line": 229, "span_ids": ["Plot", "build_plot_signature"], "tokens": 671}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# ---- The main interface for declarative plotting -------------------- #\n\n\n@build_plot_signature\nclass Plot:\n    \"\"\"\n    An interface for declaratively specifying statistical graphics.\n\n    Plots are constructed by initializing this class and adding one or more\n    layers, comprising a `Mark` and optional `Stat` or `Move`.  Additionally,\n    faceting variables or variable pairings may be defined to divide the space\n    into multiple subplots. The mappings from data values to visual properties\n    can be parametrized using scales, although the plot will try to infer good\n    defaults when scales are not explicitly defined.\n\n    The constructor accepts a data source (a :class:`pandas.DataFrame` or\n    dictionary with columnar values) and variable assignments. Variables can be\n    passed as keys to the data source or directly as data vectors.  If multiple\n    data-containing objects are provided, they will be index-aligned.\n\n    The data source and variables defined in the constructor will be used for\n    all layers in the plot, unless overridden or disabled when adding a layer.\n\n    The following variables can be defined in the constructor:\n        {known_properties}\n\n    The `data`, `x`, and `y` variables can be passed as positional arguments or\n    using keywords. Whether the first positional argument is interpreted as a\n    data source or `x` variable depends on its type.\n\n    The methods of this class return a copy of the instance; use chaining to\n    build up a plot through multiple calls. Methods can be called in any order.\n\n    Most methods only add information to the plot spec; no actual processing\n    happens until the plot is shown or saved. It is also possible to compile\n    the plot without rendering it to access the lower-level representation.\n\n    \"\"\"\n    _data: PlotData\n    _layers: list[Layer]\n\n    _scales: dict[str, Scale]\n    _shares: dict[str, bool | str]\n    _limits: dict[str, tuple[Any, Any]]\n    _labels: dict[str, str | Callable[[str], str]]\n    _theme: dict[str, Any]\n\n    _facet_spec: FacetSpec\n    _pair_spec: PairSpec\n\n    _figure_spec: dict[str, Any]\n    _subplot_spec: dict[str, Any]\n    _layout_spec: dict[str, Any]\n\n    def __init__(\n        self,\n        *args: DataSource | VariableSpec,\n        data: DataSource = None,\n        **variables: VariableSpec,\n    ):\n\n        if args:\n            data, variables = self._resolve_positionals(args, data, variables)\n\n        unknown = [x for x in variables if x not in PROPERTIES]\n        if unknown:\n            err = f\"Plot() got unexpected keyword argument(s): {', '.join(unknown)}\"\n            raise TypeError(err)\n\n        self._data = PlotData(data, variables)\n\n        self._layers = []\n\n        self._scales = {}\n        self._shares = {}\n        self._limits = {}\n        self._labels = {}\n        self._theme = {}\n\n        self._facet_spec = {}\n        self._pair_spec = {}\n\n        self._figure_spec = {}\n        self._subplot_spec = {}\n        self._layout_spec = {}\n\n        self._target = None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.__add___Plot._clone.return.new": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.__add___Plot._clone.return.new", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 265, "end_line": 303, "span_ids": ["Plot._repr_png_", "Plot._clone", "Plot.__add__"], "tokens": 290}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@build_plot_signature\nclass Plot:\n\n    def __add__(self, other):\n\n        if isinstance(other, Mark) or isinstance(other, Stat):\n            raise TypeError(\"Sorry, this isn't ggplot! Perhaps try Plot.add?\")\n\n        other_type = other.__class__.__name__\n        raise TypeError(f\"Unsupported operand type(s) for +: 'Plot' and '{other_type}\")\n\n    def _repr_png_(self) -> tuple[bytes, dict[str, float]]:\n\n        return self.plot()._repr_png_()\n\n    # TODO _repr_svg_?\n\n    def _clone(self) -> Plot:\n        \"\"\"Generate a new object with the same information as the current spec.\"\"\"\n        new = Plot()\n\n        # TODO any way to enforce that data does not get mutated?\n        new._data = self._data\n\n        new._layers.extend(self._layers)\n\n        new._scales.update(self._scales)\n        new._shares.update(self._shares)\n        new._limits.update(self._limits)\n        new._labels.update(self._labels)\n        new._theme.update(self._theme)\n\n        new._facet_spec.update(self._facet_spec)\n        new._pair_spec.update(self._pair_spec)\n\n        new._figure_spec.update(self._figure_spec)\n        new._subplot_spec.update(self._subplot_spec)\n        new._layout_spec.update(self._layout_spec)\n\n        new._target = self._target\n\n        return new", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot._theme_with_defaults_Plot._variables.return.variables": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot._theme_with_defaults_Plot._variables.return.variables", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 305, "end_line": 335, "span_ids": ["Plot._variables", "Plot._theme_with_defaults"], "tokens": 256}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@build_plot_signature\nclass Plot:\n\n    def _theme_with_defaults(self) -> dict[str, Any]:\n\n        style_groups = [\n            \"axes\", \"figure\", \"font\", \"grid\", \"hatch\", \"legend\", \"lines\",\n            \"mathtext\", \"markers\", \"patch\", \"savefig\", \"scatter\",\n            \"xaxis\", \"xtick\", \"yaxis\", \"ytick\",\n        ]\n        base = {\n            k: mpl.rcParamsDefault[k] for k in mpl.rcParams\n            if any(k.startswith(p) for p in style_groups)\n        }\n        theme = {\n            **base,\n            **axes_style(\"darkgrid\"),\n            **plotting_context(\"notebook\"),\n            \"axes.prop_cycle\": cycler(\"color\", color_palette(\"deep\")),\n        }\n        theme.update(self._theme)\n        return theme\n\n    @property\n    def _variables(self) -> list[str]:\n\n        variables = (\n            list(self._data.frame)\n            + list(self._pair_spec.get(\"variables\", []))\n            + list(self._facet_spec.get(\"variables\", []))\n        )\n        for layer in self._layers:\n            variables.extend(c for c in layer[\"vars\"] if c not in variables)\n        return variables", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.share_Plot.share.return.new": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.share_Plot.share.return.new", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 625, "end_line": 642, "span_ids": ["Plot.share"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@build_plot_signature\nclass Plot:\n\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        new = self._clone()\n        new._shares.update(shares)\n        return new", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.limit_Plot.limit.return.new": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.limit_Plot.limit.return.new", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 644, "end_line": 663, "span_ids": ["Plot.limit"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@build_plot_signature\nclass Plot:\n\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        new = self._clone()\n        new._limits.update(limits)\n        return new", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.label_Plot.label.return.new": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.label_Plot.label.return.new", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 665, "end_line": 691, "span_ids": ["Plot.label"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@build_plot_signature\nclass Plot:\n\n    def label(self, *, title=None, **variables: str | Callable[[str], str]) -> 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        When using a single subplot, `title=` sets its title.\n\n        Examples\n        --------\n        .. include:: ../docstrings/objects.Plot.label.rst\n\n\n        \"\"\"\n        new = self._clone()\n        if title is not None:\n            new._labels[\"title\"] = title\n        new._labels.update(variables)\n        return new", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.layout_Plot.layout.return.new": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.layout_Plot.layout.return.new", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 693, "end_line": 734, "span_ids": ["Plot.layout"], "tokens": 314}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@build_plot_signature\nclass Plot:\n\n    def layout(\n        self,\n        *,\n        size: tuple[float, float] | Default = default,\n        engine: str | None | 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\n        Examples\n        --------\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\n        return new", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot._TODO_def_legend_ugh__Plot.theme.return.new": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot._TODO_def_legend_ugh__Plot.theme.return.new", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 736, "end_line": 769, "span_ids": ["Plot.theme", "Plot.layout"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@build_plot_signature\nclass Plot:\n\n    # TODO def legend (ugh)\n\n    def theme(self, *args: dict[str, Any]) -> Plot:\n        \"\"\"\n        Control the default 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        new = self._clone()\n\n        # We can skip this whole block on Python 3.8+ with positional-only syntax\n        nargs = len(args)\n        if nargs != 1:\n            err = f\"theme() takes 1 positional argument, but {nargs} were given\"\n            raise TypeError(err)\n\n        rc = args[0]\n        new._theme.update(rc)\n\n        return new", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.save_Plot.save.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.save_Plot.save.return.self", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 771, "end_line": 787, "span_ids": ["Plot.save"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@build_plot_signature\nclass Plot:\n\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        # 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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.show_Plot.plot.with_theme_context_self__.return.self__plot_pyplot_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot.show_Plot.plot.with_theme_context_self__.return.self__plot_pyplot_", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 789, "end_line": 814, "span_ids": ["Plot.show", "Plot.plot"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@build_plot_signature\nclass Plot:\n\n    def show(self, **kwargs) -> None:\n        \"\"\"\n        Compile the plot and display it by hooking into pyplot.\n\n        Calling this method is not necessary to render a plot in notebook context,\n        but it may be in other environments (e.g., in a terminal). After compiling the\n        plot, it calls :func:`matplotlib.pyplot.show` (passing any keyword parameters).\n\n        Unlike other :class:`Plot` methods, there is no return value. This should be\n        the last method you call when specifying a plot.\n\n        \"\"\"\n        # TODO make pyplot configurable at the class level, and when not using,\n        # import IPython.display and call on self to populate cell output?\n\n        # Keep an eye on whether matplotlib implements \"attaching\" an existing\n        # figure to pyplot: https://github.com/matplotlib/matplotlib/pull/14024\n\n        self.plot(pyplot=True).show(**kwargs)\n\n    def plot(self, pyplot: bool = False) -> Plotter:\n        \"\"\"\n        Compile the plot spec and return the Plotter object.\n        \"\"\"\n        with theme_context(self._theme_with_defaults()):\n            return self._plot(pyplot)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot._plot_Plot._plot.return.plotter": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plot._plot_Plot._plot.return.plotter", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 816, "end_line": 850, "span_ids": ["Plot._plot"], "tokens": 304}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@build_plot_signature\nclass Plot:\n\n    def _plot(self, pyplot: bool = False) -> Plotter:\n\n        # TODO if we have _target object, pyplot should be determined by whether it\n        # is hooked into the pyplot state machine (how do we check?)\n\n        plotter = Plotter(pyplot=pyplot, theme=self._theme_with_defaults())\n\n        # Process the variable assignments and initialize the figure\n        common, layers = plotter._extract_data(self)\n        plotter._setup_figure(self, common, layers)\n\n        # Process the scale spec for coordinate variables and transform their data\n        coord_vars = [v for v in self._variables if re.match(r\"^x|y\", v)]\n        plotter._setup_scales(self, common, layers, coord_vars)\n\n        # Apply statistical transform(s)\n        plotter._compute_stats(self, layers)\n\n        # Process scale spec for semantic variables and coordinates computed by stat\n        plotter._setup_scales(self, common, layers)\n\n        # TODO Remove these after updating other methods\n        # ---- Maybe have debug= param that attaches these when True?\n        plotter._data = common\n        plotter._layers = layers\n\n        # Process the data for each layer and add matplotlib artists\n        for layer in layers:\n            plotter._plot_layer(self, layer)\n\n        # Add various figure decorations\n        plotter._make_legend(self)\n        plotter._finalize_figure(self)\n\n        return plotter", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._extract_data_Plotter._resolve_label.return.label": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._extract_data_Plotter._resolve_label.return.label", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 942, "end_line": 971, "span_ids": ["Plotter._resolve_label", "Plotter._extract_data"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Plotter:\n\n    def _extract_data(self, p: Plot) -> tuple[PlotData, list[Layer]]:\n\n        common_data = (\n            p._data\n            .join(None, p._facet_spec.get(\"variables\"))\n            .join(None, p._pair_spec.get(\"variables\"))\n        )\n\n        layers: list[Layer] = []\n        for layer in p._layers:\n            spec = layer.copy()\n            spec[\"data\"] = common_data.join(layer.get(\"source\"), layer.get(\"vars\"))\n            layers.append(spec)\n\n        return common_data, layers\n\n    def _resolve_label(self, p: Plot, var: str, auto_label: str | None) -> str:\n\n        label: str\n        if var in p._labels:\n            manual_label = p._labels[var]\n            if callable(manual_label) and auto_label is not None:\n                label = manual_label(auto_label)\n            else:\n                label = cast(str, manual_label)\n        elif auto_label is None:\n            label = \"\"\n        else:\n            label = auto_label\n        return label", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._setup_figure.for_sub_in_subplots__Plotter._setup_figure.for_sub_in_subplots_.if_title_parts_.elif_not_has_col_or_has_.title_text.ax_set_title_title_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._setup_figure.for_sub_in_subplots__Plotter._setup_figure.for_sub_in_subplots_.if_title_parts_.elif_not_has_col_or_has_.title_text.ax_set_title_title_", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 998, "end_line": 1071, "span_ids": ["Plotter._setup_figure"], "tokens": 722}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Plotter:\n\n    def _setup_figure(self, p: Plot, common: PlotData, layers: list[Layer]) -> None:\n        # ... other code\n        for sub in subplots:\n            ax = sub[\"ax\"]\n            for axis in \"xy\":\n                axis_key = sub[axis]\n\n                # ~~ Axis labels\n\n                # TODO Should we make it possible to use only one x/y label for\n                # all rows/columns in a faceted plot? Maybe using sub{axis}label,\n                # although the alignments of the labels from that method leaves\n                # something to be desired (in terms of how it defines 'centered').\n                names = [\n                    common.names.get(axis_key),\n                    *(layer[\"data\"].names.get(axis_key) for layer in layers)\n                ]\n                auto_label = next((name for name in names if name is not None), None)\n                label = self._resolve_label(p, axis_key, auto_label)\n                ax.set(**{f\"{axis}label\": label})\n\n                # ~~ Decoration visibility\n\n                # TODO there should be some override (in Plot.layout?) so that\n                # axis / tick labels can be shown on interior shared axes if desired\n\n                axis_obj = getattr(ax, f\"{axis}axis\")\n                visible_side = {\"x\": \"bottom\", \"y\": \"left\"}.get(axis)\n                show_axis_label = (\n                    sub[visible_side]\n                    or not p._pair_spec.get(\"cross\", True)\n                    or (\n                        axis in p._pair_spec.get(\"structure\", {})\n                        and bool(p._pair_spec.get(\"wrap\"))\n                    )\n                )\n                axis_obj.get_label().set_visible(show_axis_label)\n\n                show_tick_labels = (\n                    show_axis_label\n                    or subplot_spec.get(f\"share{axis}\") not in (\n                        True, \"all\", {\"x\": \"col\", \"y\": \"row\"}[axis]\n                    )\n                )\n                for group in (\"major\", \"minor\"):\n                    for t in getattr(axis_obj, f\"get_{group}ticklabels\")():\n                        t.set_visible(show_tick_labels)\n\n            # TODO we want right-side titles for row facets in most cases?\n            # Let's have what we currently call \"margin titles\" but properly using the\n            # ax.set_title interface (see my gist)\n            title_parts = []\n            for dim in [\"col\", \"row\"]:\n                if sub[dim] is not None:\n                    val = self._resolve_label(p, \"title\", f\"{sub[dim]}\")\n                    if dim in p._labels:\n                        key = self._resolve_label(p, dim, common.names.get(dim))\n                        val = f\"{key} {val}\"\n                    title_parts.append(val)\n\n            has_col = sub[\"col\"] is not None\n            has_row = sub[\"row\"] is not None\n            show_title = (\n                has_col and has_row\n                or (has_col or has_row) and p._facet_spec.get(\"wrap\")\n                or (has_col and sub[\"top\"])\n                # TODO or has_row and sub[\"right\"] and \n                or has_row  # TODO and not \n            )\n            if title_parts:\n                title = \" | \".join(title_parts)\n                title_text = ax.set_title(title)\n                title_text.set_visible(show_title)\n            elif not (has_col or has_row):\n                title = self._resolve_label(p, \"title\", None)\n                title_text = ax.set_title(title)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._compute_stats_Plotter._compute_stats.for_layer_in_layers_.for_coord_vars_in_iter_ax.if_pair_vars_.else_.data.frame.res": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._compute_stats_Plotter._compute_stats.for_layer_in_layers_.for_coord_vars_in_iter_ax.if_pair_vars_.else_.data.frame.res", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1073, "end_line": 1125, "span_ids": ["Plotter._compute_stats"], "tokens": 356}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Plotter:\n\n    def _compute_stats(self, spec: Plot, layers: list[Layer]) -> None:\n\n        grouping_vars = [v for v in PROPERTIES if v not in \"xy\"]\n        grouping_vars += [\"col\", \"row\", \"group\"]\n\n        pair_vars = spec._pair_spec.get(\"structure\", {})\n\n        for layer in layers:\n\n            data = layer[\"data\"]\n            mark = layer[\"mark\"]\n            stat = layer[\"stat\"]\n\n            if stat is None:\n                continue\n\n            iter_axes = itertools.product(*[\n                pair_vars.get(axis, [axis]) for axis in \"xy\"\n            ])\n\n            old = data.frame\n\n            if pair_vars:\n                data.frames = {}\n                data.frame = data.frame.iloc[:0]  # TODO to simplify typing\n\n            for coord_vars in iter_axes:\n\n                pairings = \"xy\", coord_vars\n\n                df = old.copy()\n                scales = self._scales.copy()\n\n                for axis, var in zip(*pairings):\n                    if axis != var:\n                        df = df.rename(columns={var: axis})\n                        drop_cols = [x for x in df if re.match(rf\"{axis}\\d+\", x)]\n                        df = df.drop(drop_cols, axis=1)\n                        scales[axis] = scales[var]\n\n                orient = layer[\"orient\"] or mark._infer_orient(scales)\n\n                if stat.group_by_orient:\n                    grouper = [orient, *grouping_vars]\n                else:\n                    grouper = grouping_vars\n                groupby = GroupBy(grouper)\n                res = stat(df, groupby, orient, scales)\n\n                if pair_vars:\n                    data.frames[coord_vars] = res\n                else:\n                    data.frame = res", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._get_scale_Plotter._get_subplot_data.return.seed_values": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._get_scale_Plotter._get_subplot_data.return.seed_values", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1127, "end_line": 1162, "span_ids": ["Plotter._get_subplot_data", "Plotter._get_scale"], "tokens": 284}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Plotter:\n\n    def _get_scale(\n        self, spec: Plot, var: str, prop: Property, values: Series\n    ) -> Scale:\n\n        if var in spec._scales:\n            arg = spec._scales[var]\n            if arg is None or isinstance(arg, Scale):\n                scale = arg\n            else:\n                scale = prop.infer_scale(arg, values)\n        else:\n            scale = prop.default_scale(values)\n\n        return scale\n\n    def _get_subplot_data(self, df, var, view, share_state):\n\n        if share_state in [True, \"all\"]:\n            # The all-shared case is easiest, every subplot sees all the data\n            seed_values = df[var]\n        else:\n            # Otherwise, we need to setup separate scales for different subplots\n            if share_state in [False, \"none\"]:\n                # Fully independent axes are also easy: use each subplot's data\n                idx = self._get_subplot_index(df, view)\n            elif share_state in df:\n                # Sharing within row/col is more complicated\n                use_rows = df[share_state] == view[share_state]\n                idx = df.index[use_rows]\n            else:\n                # This configuration doesn't make much sense, but it's fine\n                idx = df.index\n\n            seed_values = df.loc[idx, var]\n\n        return seed_values", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._setup_scales_Plotter._setup_scales.for_var_in_variables_.for_layer_new_series_in_.if_var_in_layer_df_.layer_df_var_new_serie": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._setup_scales_Plotter._setup_scales.for_var_in_variables_.for_layer_new_series_in_.if_var_in_layer_df_.layer_df_var_new_serie", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1164, "end_line": 1282, "span_ids": ["Plotter._setup_scales"], "tokens": 1194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Plotter:\n\n    def _setup_scales(\n        self, p: Plot,\n        common: PlotData,\n        layers: list[Layer],\n        variables: list[str] | None = None,\n    ) -> None:\n\n        if variables is None:\n            # Add variables that have data but not a scale, which happens\n            # because this method can be called multiple time, to handle\n            # variables added during the Stat transform.\n            variables = []\n            for layer in layers:\n                variables.extend(layer[\"data\"].frame.columns)\n                for df in layer[\"data\"].frames.values():\n                    variables.extend(v for v in df if v not in variables)\n            variables = [v for v in variables if v not in self._scales]\n\n        for var in variables:\n\n            # Determine whether this is a coordinate variable\n            # (i.e., x/y, paired x/y, or derivative such as xmax)\n            m = re.match(r\"^(?P(?Px|y)\\d*).*\", var)\n            if m is None:\n                coord = axis = None\n            else:\n                coord = m[\"coord\"]\n                axis = m[\"axis\"]\n\n            # Get keys that handle things like x0, xmax, properly where relevant\n            prop_key = var if axis is None else axis\n            scale_key = var if coord is None else coord\n\n            if prop_key not in PROPERTIES:\n                continue\n\n            # Concatenate layers, using only the relevant coordinate and faceting vars,\n            # This is unnecessarily wasteful, as layer data will often be redundant.\n            # But figuring out the minimal amount we need is more complicated.\n            cols = [var, \"col\", \"row\"]\n            parts = [common.frame.filter(cols)]\n            for layer in layers:\n                parts.append(layer[\"data\"].frame.filter(cols))\n                for df in layer[\"data\"].frames.values():\n                    parts.append(df.filter(cols))\n            var_df = pd.concat(parts, ignore_index=True)\n\n            prop = PROPERTIES[prop_key]\n            scale = self._get_scale(p, scale_key, prop, var_df[var])\n\n            if scale_key not in p._variables:\n                # TODO this implies that the variable was added by the stat\n                # It allows downstream orientation inference to work properly.\n                # But it feels rather hacky, so ideally revisit.\n                scale._priority = 0  # type: ignore\n\n            if axis is None:\n                # We could think about having a broader concept of (un)shared properties\n                # In general, not something you want to do (different scales in facets)\n                # But could make sense e.g. with paired plots. Build later.\n                share_state = None\n                subplots = []\n            else:\n                share_state = self._subplots.subplot_spec[f\"share{axis}\"]\n                subplots = [view for view in self._subplots if view[axis] == coord]\n\n            # Shared categorical axes are broken on matplotlib<3.4.0.\n            # https://github.com/matplotlib/matplotlib/pull/18308\n            # This only affects us when sharing *paired* axes. This is a novel/niche\n            # behavior, so we will raise rather than hack together a workaround.\n            if axis is not None and Version(mpl.__version__) < Version(\"3.4.0\"):\n                from seaborn._core.scales import Nominal\n                paired_axis = axis in p._pair_spec.get(\"structure\", {})\n                cat_scale = isinstance(scale, Nominal)\n                ok_dim = {\"x\": \"col\", \"y\": \"row\"}[axis]\n                shared_axes = share_state not in [False, \"none\", ok_dim]\n                if paired_axis and cat_scale and shared_axes:\n                    err = \"Sharing paired categorical axes requires matplotlib>=3.4.0\"\n                    raise RuntimeError(err)\n\n            if scale is None:\n                self._scales[var] = Scale._identity()\n            else:\n                self._scales[var] = scale._setup(var_df[var], prop)\n\n            # Everything below here applies only to coordinate variables\n            # We additionally skip it when we're working with a value\n            # that is derived from a coordinate we've already processed.\n            # e.g., the Stat consumed y and added ymin/ymax. In that case,\n            # we've already setup the y scale and ymin/max are in scale space.\n            if axis is None or (var != coord and coord in p._variables):\n                continue\n\n            # Set up an empty series to receive the transformed values.\n            # We need this to handle piecemeal transforms of categories -> floats.\n            transformed_data = []\n            for layer in layers:\n                index = layer[\"data\"].frame.index\n                empty_series = pd.Series(dtype=float, index=index, name=var)\n                transformed_data.append(empty_series)\n\n            for view in subplots:\n\n                axis_obj = getattr(view[\"ax\"], f\"{axis}axis\")\n                seed_values = self._get_subplot_data(var_df, var, view, share_state)\n                view_scale = scale._setup(seed_values, prop, axis=axis_obj)\n                set_scale_obj(view[\"ax\"], axis, view_scale._matplotlib_scale)\n\n                for layer, new_series in zip(layers, transformed_data):\n                    layer_df = layer[\"data\"].frame\n                    if var in layer_df:\n                        idx = self._get_subplot_index(layer_df, view)\n                        new_series.loc[idx] = view_scale(layer_df.loc[idx, var])\n\n            # Now the transformed data series are complete, set update the layer data\n            for layer, new_series in zip(layers, transformed_data):\n                layer_df = layer[\"data\"].frame\n                if var in layer_df:\n                    layer_df[var] = new_series", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._make_legend_Plotter._make_legend.for_name___handles_.if_base_legend_.else_.self__figure_legends_appe": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._make_legend_Plotter._make_legend.for_name___handles_.if_base_legend_.else_.self__figure_legends_appe", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1591, "end_line": 1638, "span_ids": ["Plotter._make_legend"], "tokens": 432}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Plotter:\n\n    def _make_legend(self, p: Plot) -> None:\n        \"\"\"Create the legend artist(s) and add onto the figure.\"\"\"\n        # Combine artists representing same information across layers\n        # Input list has an entry for each distinct variable in each layer\n        # Output dict has an entry for each distinct variable\n        merged_contents: dict[\n            tuple[str, str | int], tuple[list[Artist], list[str]],\n        ] = {}\n        for key, artists, labels in self._legend_contents:\n            # Key is (name, id); we need the id to resolve variable uniqueness,\n            # but will need the name in the next step to title the legend\n            if key in merged_contents:\n                # Copy so inplace updates don't propagate back to legend_contents\n                existing_artists = merged_contents[key][0]\n                for i, artist in enumerate(existing_artists):\n                    # Matplotlib accepts a tuple of artists and will overlay them\n                    if isinstance(artist, tuple):\n                        artist += artist[i],\n                    else:\n                        existing_artists[i] = artist, artists[i]\n            else:\n                merged_contents[key] = artists.copy(), labels\n\n        # TODO explain\n        loc = \"center right\" if self._pyplot else \"center left\"\n\n        base_legend = None\n        for (name, _), (handles, labels) in merged_contents.items():\n\n            legend = mpl.legend.Legend(\n                self._figure,\n                handles,\n                labels,\n                title=name,\n                loc=loc,\n                bbox_to_anchor=(.98, .55),\n            )\n\n            if base_legend:\n                # Matplotlib has no public API for this so it is a bit of a hack.\n                # Ideally we'd define our own legend class with more flexibility,\n                # but that is a lot of work!\n                base_legend_box = base_legend.get_children()[0]\n                this_legend_box = legend.get_children()[0]\n                base_legend_box.get_children().extend(this_legend_box.get_children())\n            else:\n                base_legend = legend\n                self._figure.legends.append(legend)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._finalize_figure_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/plot.py_Plotter._finalize_figure_", "embedding": null, "metadata": {"file_path": "seaborn/_core/plot.py", "file_name": "plot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1640, "end_line": 1662, "span_ids": ["Plotter._finalize_figure"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Plotter:\n\n    def _finalize_figure(self, p: Plot) -> None:\n\n        for sub in self._subplots:\n            ax = sub[\"ax\"]\n            for axis in \"xy\":\n                axis_key = sub[axis]\n\n                # Axis limits\n                if axis_key in p._limits:\n                    convert_units = getattr(ax, f\"{axis}axis\").convert_units\n                    a, b = p._limits[axis_key]\n                    lo = a if a is None else convert_units(a)\n                    hi = b if b is None else convert_units(b)\n                    if isinstance(a, str):\n                        lo = cast(float, lo) - 0.5\n                    if isinstance(b, str):\n                        hi = cast(float, hi) + 0.5\n                    ax.set(**{f\"{axis}lim\": (lo, hi)})\n\n        engine_default = None if p._target is not None else \"tight\"\n        layout_engine = p._layout_spec.get(\"engine\", engine_default)\n        set_layout_engine(self._figure, layout_engine)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_PointSize_Alpha._TODO_validate_enforce": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/properties.py_PointSize_Alpha._TODO_validate_enforce", "embedding": null, "metadata": {"file_path": "seaborn/_core/properties.py", "file_name": "properties.py", "file_type": "text/x-python", "category": "implementation", "start_line": 259, "end_line": 298, "span_ids": ["EdgeWidth.default_range", "EdgeWidth", "Alpha", "PointSize._forward", "PointSize", "PointSize._inverse", "LineWidth.default_range", "LineWidth", "Stroke"], "tokens": 312}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PointSize(IntervalProperty):\n    \"\"\"Size (diameter) of a point mark, in points, with scaling by area.\"\"\"\n    _default_range = 2, 8  # TODO use rcparams?\n\n    def _forward(self, values):\n        \"\"\"Square native values to implement linear scaling of point area.\"\"\"\n        return np.square(values)\n\n    def _inverse(self, values):\n        \"\"\"Invert areal values back to point diameter.\"\"\"\n        return np.sqrt(values)\n\n\nclass LineWidth(IntervalProperty):\n    \"\"\"Thickness of a line mark, in points.\"\"\"\n    @property\n    def default_range(self) -> tuple[float, float]:\n        \"\"\"Min and max values used by default for semantic mapping.\"\"\"\n        base = mpl.rcParams[\"lines.linewidth\"]\n        return base * .5, base * 2\n\n\nclass EdgeWidth(IntervalProperty):\n    \"\"\"Thickness of the edges on a patch mark, in points.\"\"\"\n    @property\n    def default_range(self) -> tuple[float, float]:\n        \"\"\"Min and max values used by default for semantic mapping.\"\"\"\n        base = mpl.rcParams[\"patch.linewidth\"]\n        return base * .5, base * 2\n\n\nclass Stroke(IntervalProperty):\n    \"\"\"Thickness of lines that define point glyphs.\"\"\"\n    _default_range = .25, 2.5\n\n\nclass Alpha(IntervalProperty):\n    \"\"\"Opacity of the color values for an arbitrary mark.\"\"\"\n    _default_range = .3, .95\n    # TODO validate / enforce that output is in [0, 1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Scale_Scale._get_formatter.raise_NotImplementedError": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Scale_Scale._get_formatter.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 51, "end_line": 78, "span_ids": ["Scale.__post_init__", "Scale.tick", "Scale.label", "Scale._get_formatter", "Scale._get_locators", "Scale"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Scale:\n    \"\"\"Base class for objects that map data values to visual properties.\"\"\"\n\n    values: tuple | str | list | dict | None\n\n    _priority: ClassVar[int]\n    _pipeline: Pipeline\n    _matplotlib_scale: ScaleBase\n    _spacer: staticmethod\n    _legend: tuple[list[str], list[Any]] | None\n\n    def __post_init__(self):\n\n        self._tick_params = None\n        self._label_params = None\n        self._legend = None\n\n    def tick(self):\n        raise NotImplementedError()\n\n    def label(self):\n        raise NotImplementedError()\n\n    def _get_locators(self):\n        raise NotImplementedError()\n\n    def _get_formatter(self, locator: Locator | None = None):\n        raise NotImplementedError()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Scale._get_scale_Scale._get_scale.return.InternalScale_name_forw": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Scale._get_scale_Scale._get_scale.return.InternalScale_name_forw", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 80, "end_line": 92, "span_ids": ["Scale._get_scale.InternalScale", "Scale._get_scale", "Scale._get_scale.InternalScale.set_default_locators_and_formatters"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Scale:\n\n    def _get_scale(self, name: str, forward: Callable, inverse: Callable):\n\n        major_locator, minor_locator = self._get_locators(**self._tick_params)\n        major_formatter = self._get_formatter(major_locator, **self._label_params)\n\n        class InternalScale(mpl.scale.FuncScale):\n            def set_default_locators_and_formatters(self, axis):\n                axis.set_major_locator(major_locator)\n                if minor_locator is not None:\n                    axis.set_minor_locator(minor_locator)\n                axis.set_major_formatter(major_formatter)\n\n        return InternalScale(name, (forward, inverse))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Scale._spacing_Scale._identity.return.Identity_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Scale._spacing_Scale._identity.return.Identity_", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 94, "end_line": 128, "span_ids": ["Scale._spacing", "Scale._identity.Identity:2", "Scale._setup", "Scale.__call__", "Scale._identity.Identity", "Scale._identity"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Scale:\n\n    def _spacing(self, x: Series) -> float:\n        return self._spacer(x)\n\n    def _setup(\n        self, data: Series, prop: Property, axis: Axis | None = None,\n    ) -> Scale:\n        raise NotImplementedError()\n\n    def __call__(self, data: Series) -> ArrayLike:\n\n        # TODO sometimes we need to handle scalars (e.g. for Line)\n        # but what is the best way to do that?\n        scalar_data = np.isscalar(data)\n        if scalar_data:\n            data = np.array([data])\n\n        for func in self._pipeline:\n            if func is not None:\n                data = func(data)\n\n        if scalar_data:\n            data = data[0]\n\n        return data\n\n    @staticmethod\n    def _identity():\n\n        class Identity(Scale):\n            _pipeline = []\n            _spacer = None\n            _legend = None\n            _matplotlib_scale = None\n\n        return Identity()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Nominal_Nominal._setup._TODO_define_this_more_c": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Nominal_Nominal._setup._TODO_define_this_more_c", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 131, "end_line": 196, "span_ids": ["Nominal", "Nominal._setup.CatScale", "Nominal._setup", "Nominal._setup.CatScale:2"], "tokens": 612}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Nominal(Scale):\n    \"\"\"\n    A categorical scale without relative importance / magnitude.\n    \"\"\"\n    # Categorical (convert to strings), un-sortable\n\n    values: tuple | str | list | dict | None = None\n    order: list | None = None\n\n    _priority: ClassVar[int] = 3\n\n    def _setup(\n        self, data: Series, prop: Property, axis: Axis | None = None,\n    ) -> Scale:\n\n        new = copy(self)\n        if new._tick_params is None:\n            new = new.tick()\n        if new._label_params is None:\n            new = new.label()\n\n        # TODO flexibility over format() which isn't great for numbers / dates\n        stringify = np.vectorize(format)\n\n        units_seed = categorical_order(data, new.order)\n\n        # TODO move to Nominal._get_scale?\n        # TODO this needs some more complicated rethinking about how to pass\n        # a unit dictionary down to these methods, along with how much we want\n        # to invest in their API. What is it useful for tick() to do here?\n        # (Ordinal may be different if we draw that contrast).\n        # Any customization we do to allow, e.g., label wrapping will probably\n        # require defining our own Formatter subclass.\n        # We could also potentially implement auto-wrapping in an Axis subclass\n        # (see Axis.draw ... it already is computing the bboxes).\n        # major_locator, minor_locator = new._get_locators(**new._tick_params)\n        # major_formatter = new._get_formatter(major_locator, **new._label_params)\n\n        class CatScale(mpl.scale.LinearScale):\n            name = None  # To work around mpl<3.4 compat issues\n\n            def set_default_locators_and_formatters(self, axis):\n                ...\n                # axis.set_major_locator(major_locator)\n                # if minor_locator is not None:\n                #     axis.set_minor_locator(minor_locator)\n                # axis.set_major_formatter(major_formatter)\n\n        mpl_scale = CatScale(data.name)\n        if axis is None:\n            axis = PseudoAxis(mpl_scale)\n\n            # TODO Currently just used in non-Coordinate contexts, but should\n            # we use this to (A) set the padding we want for categorial plots\n            # and (B) allow the values parameter for a Coordinate to set xlim/ylim\n            axis.set_view_interval(0, len(units_seed) - 1)\n\n        new._matplotlib_scale = mpl_scale\n\n        # TODO array cast necessary to handle float/int mixture, which we need\n        # to solve in a more systematic way probably\n        # (i.e. if we have [1, 2.5], do we want [1.0, 2.5]? Unclear)\n        axis.update_units(stringify(np.array(units_seed)))\n\n        # TODO define this more centrally\n        # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Nominal._setup.convert_units_Nominal._setup.return.new": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Nominal._setup.convert_units_Nominal._setup.return.new", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 197, "end_line": 222, "span_ids": ["Nominal._setup.CatScale:2"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Nominal(Scale):\n\n    def _setup(\n        self, data: Series, prop: Property, axis: Axis | None = None,\n    ) -> Scale:\n        # ... other code\n        def convert_units(x):\n            # TODO only do this with explicit order?\n            # (But also category dtype?)\n            # TODO isin fails when units_seed mixes numbers and strings (numpy error?)\n            # but np.isin also does not seem any faster? (Maybe not broadcasting in C)\n            # keep = x.isin(units_seed)\n            keep = np.array([x_ in units_seed for x_ in x], bool)\n            out = np.full(len(x), np.nan)\n            out[keep] = axis.convert_units(stringify(x[keep]))\n            return out\n\n        new._pipeline = [\n            convert_units,\n            prop.get_mapping(new, data),\n            # TODO how to handle color representation consistency?\n        ]\n\n        def spacer(x):\n            return 1\n\n        new._spacer = spacer\n\n        if prop.legend:\n            new._legend = units_seed, list(stringify(units_seed))\n\n        return new", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Nominal.tick_Nominal.tick.return.new": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Nominal.tick_Nominal.tick.return.new", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 224, "end_line": 246, "span_ids": ["Nominal.tick"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Nominal(Scale):\n\n    def tick(self, locator: Locator | None = None):\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            At the moment, it is probably not very useful.\n\n        Parameters\n        ----------\n        locator : :class:`matplotlib.ticker.Locator` subclass\n            Pre-configured matplotlib locator; other parameters will not be used.\n\n        Returns\n        -------\n        Copy of self with new tick configuration.\n\n        \"\"\"\n        new = copy(self)\n        new._tick_params = {\n            \"locator\": locator,\n        }\n        return new", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Nominal.label_Discrete._": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Nominal.label_Discrete._", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 248, "end_line": 301, "span_ids": ["Nominal._get_locators", "Discrete", "Ordinal", "Nominal.label", "Nominal._get_formatter"], "tokens": 273}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Nominal(Scale):\n\n    def label(self, formatter: Formatter | None = None):\n        \"\"\"\n        Configure the selection of labels for the scale's axis or legend.\n\n        .. note::\n            This API is under construction and will be enhanced over time.\n            At the moment, it is probably not very useful.\n\n        Parameters\n        ----------\n        formatter : :class:`matplotlib.ticker.Formatter` subclass\n            Pre-configured matplotlib formatter; other parameters will not be used.\n\n        Returns\n        -------\n        scale\n            Copy of self with new tick configuration.\n\n        \"\"\"\n        new = copy(self)\n        new._label_params = {\n            \"formatter\": formatter,\n        }\n        return new\n\n    def _get_locators(self, locator):\n\n        if locator is not None:\n            return locator, None\n\n        locator = mpl.category.StrCategoryLocator({})\n\n        return locator, None\n\n    def _get_formatter(self, locator, formatter):\n\n        if formatter is not None:\n            return formatter\n\n        formatter = mpl.category.StrCategoryFormatter({})\n\n        return formatter\n\n\n@dataclass\nclass Ordinal(Scale):\n    # Categorical (convert to strings), sortable, can skip ticklabels\n    ...\n\n\n@dataclass\nclass Discrete(Scale):\n    # Numeric, integral, can skip ticks/ticklabels\n    ...", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_ContinuousBase_ContinuousBase._setup.return.new": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_ContinuousBase_ContinuousBase._setup.return.new", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 304, "end_line": 372, "span_ids": ["ContinuousBase", "ContinuousBase._setup"], "tokens": 465}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass ContinuousBase(Scale):\n\n    values: tuple | str | None = None\n    norm: tuple | None = None\n\n    def _setup(\n        self, data: Series, prop: Property, axis: Axis | None = None,\n    ) -> Scale:\n\n        new = copy(self)\n        if new._tick_params is None:\n            new = new.tick()\n        if new._label_params is None:\n            new = new.label()\n\n        forward, inverse = new._get_transform()\n\n        mpl_scale = new._get_scale(data.name, forward, inverse)\n\n        if axis is None:\n            axis = PseudoAxis(mpl_scale)\n            axis.update_units(data)\n\n        mpl_scale.set_default_locators_and_formatters(axis)\n        new._matplotlib_scale = mpl_scale\n\n        normalize: Optional[Callable[[ArrayLike], ArrayLike]]\n        if prop.normed:\n            if new.norm is None:\n                vmin, vmax = data.min(), data.max()\n            else:\n                vmin, vmax = new.norm\n            vmin, vmax = axis.convert_units((vmin, vmax))\n            a = forward(vmin)\n            b = forward(vmax) - forward(vmin)\n\n            def normalize(x):\n                return (x - a) / b\n\n        else:\n            normalize = vmin = vmax = None\n\n        new._pipeline = [\n            axis.convert_units,\n            forward,\n            normalize,\n            prop.get_mapping(new, data)\n        ]\n\n        def spacer(x):\n            x = x.dropna().unique()\n            if len(x) < 2:\n                return np.nan\n            return np.min(np.diff(np.sort(x)))\n        new._spacer = spacer\n\n        # TODO How to allow disabling of legend for all uses of property?\n        # Could add a Scale parameter, or perhaps Scale.suppress()?\n        # Are there other useful parameters that would be in Scale.legend()\n        # besides allowing Scale.legend(False)?\n        if prop.legend:\n            axis.set_view_interval(vmin, vmax)\n            locs = axis.major.locator()\n            locs = locs[(vmin <= locs) & (locs <= vmax)]\n            labels = axis.major.formatter.format_ticks(locs)\n            new._legend = list(locs), list(labels)\n\n        return new", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_ContinuousBase._get_transform_ContinuousBase._get_transform.if_arg_is_None_.elif_isinstance_arg_str_.if_arg_ln_.else_.raise_ValueError_f_Unknow": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_ContinuousBase._get_transform_ContinuousBase._get_transform.if_arg_is_None_.elif_isinstance_arg_str_.if_arg_ln_.else_.raise_ValueError_f_Unknow", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 374, "end_line": 405, "span_ids": ["ContinuousBase._get_transform"], "tokens": 244}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass ContinuousBase(Scale):\n\n    def _get_transform(self):\n\n        arg = self.trans\n\n        def get_param(method, default):\n            if arg == method:\n                return default\n            return float(arg[len(method):])\n\n        if arg is None:\n            return _make_identity_transforms()\n        elif isinstance(arg, tuple):\n            return arg\n        elif isinstance(arg, str):\n            if arg == \"ln\":\n                return _make_log_transforms()\n            elif arg == \"logit\":\n                base = get_param(\"logit\", 10)\n                return _make_logit_transforms(base)\n            elif arg.startswith(\"log\"):\n                base = get_param(\"log\", 10)\n                return _make_log_transforms(base)\n            elif arg.startswith(\"symlog\"):\n                c = get_param(\"symlog\", 1)\n                return _make_symlog_transforms(c)\n            elif arg.startswith(\"pow\"):\n                exp = get_param(\"pow\", 2)\n                return _make_power_transforms(exp)\n            elif arg == \"sqrt\":\n                return _make_sqrt_transforms()\n            else:\n                raise ValueError(f\"Unknown value provided for trans: {arg!r}\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Continuous_Continuous.tick.return.new": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Continuous_Continuous.tick.return.new", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 408, "end_line": 480, "span_ids": ["Continuous.tick", "Continuous"], "tokens": 541}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Continuous(ContinuousBase):\n    \"\"\"\n    A numeric scale supporting norms and functional transforms.\n    \"\"\"\n    values: tuple | str | None = None\n    trans: str | Transforms | None = None\n\n    # TODO Add this to deal with outliers?\n    # outside: Literal[\"keep\", \"drop\", \"clip\"] = \"keep\"\n\n    _priority: ClassVar[int] = 1\n\n    def tick(\n        self,\n        locator: Locator | None = None, *,\n        at: Sequence[float] = 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        # 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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Continuous.label_Continuous.label.return.new": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Continuous.label_Continuous.label.return.new", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 482, "end_line": 530, "span_ids": ["Continuous.label"], "tokens": 422}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Continuous(ContinuousBase):\n\n    def label(\n        self,\n        formatter: Formatter | None = None, *,\n        like: str | Callable | None = None,\n        base: int | None = None,\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 that consumes a number\n            and returns a string.\n        base : number\n            Use log formatter (with scientific notation) having this value as the base.\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        # 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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Continuous._parse_for_log_params_Continuous._parse_for_log_params.return.log_base_symlog_thresh": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Continuous._parse_for_log_params_Continuous._parse_for_log_params.return.log_base_symlog_thresh", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 532, "end_line": 544, "span_ids": ["Continuous._parse_for_log_params"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Continuous(ContinuousBase):\n\n    def _parse_for_log_params(\n        self, trans: str | Transforms | None\n    ) -> tuple[float | None, float | None]:\n\n        log_base = symlog_thresh = None\n        if isinstance(trans, str):\n            m = re.match(r\"^log(\\d*)\", trans)\n            if m is not None:\n                log_base = float(m[1] or 10)\n            m = re.match(r\"symlog(\\d*)\", trans)\n            if m is not None:\n                symlog_thresh = float(m[1] or 1)\n        return log_base, symlog_thresh", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Continuous._get_locators_Continuous._get_locators.return.major_locator_minor_loca": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Continuous._get_locators_Continuous._get_locators.return.major_locator_minor_loca", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 546, "end_line": 600, "span_ids": ["Continuous._get_locators"], "tokens": 441}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Continuous(ContinuousBase):\n\n    def _get_locators(self, locator, at, upto, count, every, between, minor):\n\n        log_base, symlog_thresh = self._parse_for_log_params(self.trans)\n\n        if locator is not None:\n            major_locator = locator\n\n        elif upto is not None:\n            if log_base:\n                major_locator = LogLocator(base=log_base, numticks=upto)\n            else:\n                major_locator = MaxNLocator(upto, steps=[1, 1.5, 2, 2.5, 3, 5, 10])\n\n        elif count is not None:\n            if between is None:\n                # This is rarely useful (unless you are setting limits)\n                major_locator = LinearLocator(count)\n            else:\n                if log_base or symlog_thresh:\n                    forward, inverse = self._get_transform()\n                    lo, hi = forward(between)\n                    ticks = inverse(np.linspace(lo, hi, num=count))\n                else:\n                    ticks = np.linspace(*between, num=count)\n                major_locator = FixedLocator(ticks)\n\n        elif every is not None:\n            if between is None:\n                major_locator = MultipleLocator(every)\n            else:\n                lo, hi = between\n                ticks = np.arange(lo, hi + every, every)\n                major_locator = FixedLocator(ticks)\n\n        elif at is not None:\n            major_locator = FixedLocator(at)\n\n        else:\n            if log_base:\n                major_locator = LogLocator(log_base)\n            elif symlog_thresh:\n                major_locator = SymmetricalLogLocator(linthresh=symlog_thresh, base=10)\n            else:\n                major_locator = AutoLocator()\n\n        if minor is None:\n            minor_locator = LogLocator(log_base, subs=None) if log_base else None\n        else:\n            if log_base:\n                subs = np.linspace(0, log_base, minor + 2)[1:-1]\n                minor_locator = LogLocator(log_base, subs=subs)\n            else:\n                minor_locator = AutoMinorLocator(minor + 1)\n\n        return major_locator, minor_locator", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Continuous._get_formatter_Continuous._get_formatter.return.formatter": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Continuous._get_formatter_Continuous._get_formatter.return.formatter", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 602, "end_line": 639, "span_ids": ["Continuous._get_formatter"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Continuous(ContinuousBase):\n\n    def _get_formatter(self, locator, formatter, like, base, unit):\n\n        log_base, symlog_thresh = self._parse_for_log_params(self.trans)\n        if base is None:\n            if symlog_thresh:\n                log_base = 10\n            base = log_base\n\n        if formatter is not None:\n            return formatter\n\n        if like is not None:\n            if isinstance(like, str):\n                if \"{x\" in like or \"{pos\" in like:\n                    fmt = like\n                else:\n                    fmt = f\"{{x:{like}}}\"\n                formatter = StrMethodFormatter(fmt)\n            else:\n                formatter = FuncFormatter(like)\n\n        elif base is not None:\n            # We could add other log options if necessary\n            formatter = LogFormatterSciNotation(base)\n\n        elif unit is not None:\n            if isinstance(unit, tuple):\n                sep, unit = unit\n            elif not unit:\n                sep = \"\"\n            else:\n                sep = \" \"\n            formatter = EngFormatter(unit, sep=sep)\n\n        else:\n            formatter = ScalarFormatter()\n\n        return formatter", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Temporal_Temporal._priority.2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Temporal_Temporal._priority.2", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 642, "end_line": 659, "span_ids": ["Temporal"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Temporal(ContinuousBase):\n    \"\"\"\n    A scale for date/time data.\n    \"\"\"\n    # TODO date: bool?\n    # For when we only care about the time component, would affect\n    # default formatter and norm conversion. Should also happen in\n    # Property.default_scale. The alternative was having distinct\n    # Calendric / Temporal scales, but that feels a bit fussy, and it\n    # would get in the way of using first-letter shorthands because\n    # Calendric and Continuous would collide. Still, we haven't implemented\n    # those yet, and having a clear distinction betewen date(time) / time\n    # may be more useful.\n\n    trans = None\n\n    _priority: ClassVar[int] = 2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Temporal.tick_Temporal.tick.return.new": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Temporal.tick_Temporal.tick.return.new", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 661, "end_line": 693, "span_ids": ["Temporal.tick"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Temporal(ContinuousBase):\n\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        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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Temporal.label_Temporal.label.return.new": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Temporal.label_Temporal.label.return.new", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 695, "end_line": 722, "span_ids": ["Temporal.label"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Temporal(ContinuousBase):\n\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        new = copy(self)\n        new._label_params = {\"formatter\": formatter, \"concise\": concise}\n        return new", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Temporal._get_locators_Temporal._get_formatter.return.formatter": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_Temporal._get_locators_Temporal._get_formatter.return.formatter", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 724, "end_line": 749, "span_ids": ["Temporal._get_locators", "Temporal._get_formatter"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Temporal(ContinuousBase):\n\n    def _get_locators(self, locator, upto):\n\n        if locator is not None:\n            major_locator = locator\n        elif upto is not None:\n            major_locator = AutoDateLocator(minticks=2, maxticks=upto)\n\n        else:\n            major_locator = AutoDateLocator(minticks=2, maxticks=6)\n        minor_locator = None\n\n        return major_locator, minor_locator\n\n    def _get_formatter(self, locator, formatter, concise):\n\n        if formatter is not None:\n            return formatter\n\n        if concise:\n            # TODO ideally we would have concise coordinate ticks,\n            # but full semantic ticks. Is that possible?\n            formatter = ConciseDateFormatter(locator)\n        else:\n            formatter = AutoDateFormatter(locator)\n\n        return formatter", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py___PseudoAxis.set_units.self.units.units": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py___PseudoAxis.set_units.self.units.units", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 752, "end_line": 836, "span_ids": ["PseudoAxis.set_units", "PseudoAxis.set_major_locator", "Temporal._get_formatter", "PseudoAxis.get_tick_space", "PseudoAxis.set_major_formatter", "PseudoAxis.set_minor_locator", "PseudoAxis.set_view_interval", "PseudoAxis", "PseudoAxis.set_minor_formatter", "PseudoAxis.get_data_interval", "PseudoAxis.set_data_interval", "PseudoAxis.get_view_interval"], "tokens": 603}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# ----------------------------------------------------------------------------------- #\n\n\n# TODO Have this separate from Temporal or have Temporal(date=True) or similar?\n# class Calendric(Scale):\n\n# TODO Needed? Or handle this at layer (in stat or as param, eg binning=)\n# class Binned(Scale):\n\n# TODO any need for color-specific scales?\n# class Sequential(Continuous):\n# class Diverging(Continuous):\n# class Qualitative(Nominal):\n\n\n# ----------------------------------------------------------------------------------- #\n\n\nclass PseudoAxis:\n    \"\"\"\n    Internal class implementing minimal interface equivalent to matplotlib Axis.\n\n    Coordinate variables are typically scaled by attaching the Axis object from\n    the figure where the plot will end up. Matplotlib has no similar concept of\n    and axis for the other mappable variables (color, etc.), but to simplify the\n    code, this object acts like an Axis and can be used to scale other variables.\n\n    \"\"\"\n    axis_name = \"\"  # Matplotlib requirement but not actually used\n\n    def __init__(self, scale):\n\n        self.converter = None\n        self.units = None\n        self.scale = scale\n        self.major = mpl.axis.Ticker()\n        self.minor = mpl.axis.Ticker()\n\n        # It appears that this needs to be initialized this way on matplotlib 3.1,\n        # but not later versions. It is unclear whether there are any issues with it.\n        self._data_interval = None, None\n\n        scale.set_default_locators_and_formatters(self)\n        # self.set_default_intervals()  Is this ever needed?\n\n    def set_view_interval(self, vmin, vmax):\n        self._view_interval = vmin, vmax\n\n    def get_view_interval(self):\n        return self._view_interval\n\n    # TODO do we want to distinguish view/data intervals? e.g. for a legend\n    # we probably want to represent the full range of the data values, but\n    # still norm the colormap. If so, we'll need to track data range separately\n    # from the norm, which we currently don't do.\n\n    def set_data_interval(self, vmin, vmax):\n        self._data_interval = vmin, vmax\n\n    def get_data_interval(self):\n        return self._data_interval\n\n    def get_tick_space(self):\n        # TODO how to do this in a configurable / auto way?\n        # Would be cool to have legend density adapt to figure size, etc.\n        return 5\n\n    def set_major_locator(self, locator):\n        self.major.locator = locator\n        locator.set_axis(self)\n\n    def set_major_formatter(self, formatter):\n        self.major.formatter = formatter\n        formatter.set_axis(self)\n\n    def set_minor_locator(self, locator):\n        self.minor.locator = locator\n        locator.set_axis(self)\n\n    def set_minor_formatter(self, formatter):\n        self.minor.formatter = formatter\n        formatter.set_axis(self)\n\n    def set_units(self, units):\n        self.units = units", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_None_10__make_logit_transforms.return.logit_expit": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_core/scales.py_None_10__make_logit_transforms.return.logit_expit", "embedding": null, "metadata": {"file_path": "seaborn/_core/scales.py", "file_name": "scales.py", "file_type": "text/x-python", "category": "implementation", "start_line": 876, "end_line": 900, "span_ids": ["PseudoAxis.get_majorticklocs", "_make_identity_transforms", "_make_logit_transforms"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# ------------------------------------------------------------------------------------ #\n# Transform function creation\n\n\ndef _make_identity_transforms() -> Transforms:\n\n    def identity(x):\n        return x\n\n    return identity, identity\n\n\ndef _make_logit_transforms(base: float = None) -> Transforms:\n\n    log, exp = _make_log_transforms(base)\n\n    def logit(x):\n        with np.errstate(invalid=\"ignore\", divide=\"ignore\"):\n            return log(x) - log(1 - x)\n\n    def expit(x):\n        with np.errstate(invalid=\"ignore\", divide=\"ignore\"):\n            return exp(x) / (1 + exp(x))\n\n    return logit, expit", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/area.py_from___future___import_an_AreaBase._plot.for_ax_ax_patches_in_pat.for_patch_in_ax_patches_.ax_add_patch_patch_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/area.py_from___future___import_an_AreaBase._plot.for_ax_ax_patches_in_pat.for_patch_in_ax_patches_.ax_add_patch_patch_", "embedding": null, "metadata": {"file_path": "seaborn/_marks/area.py", "file_name": "area.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 51, "span_ids": ["AreaBase", "AreaBase._plot", "imports"], "tokens": 312}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from __future__ import annotations\nfrom collections import defaultdict\nfrom dataclasses import dataclass\n\nimport numpy as np\nimport matplotlib as mpl\n\nfrom seaborn._marks.base import (\n    Mark,\n    Mappable,\n    MappableBool,\n    MappableFloat,\n    MappableColor,\n    MappableStyle,\n    resolve_properties,\n    resolve_color,\n    document_properties,\n)\n\n\nclass AreaBase:\n\n    def _plot(self, split_gen, scales, orient):\n\n        patches = defaultdict(list)\n\n        for keys, data, ax in split_gen():\n\n            kws = {}\n            data = self._standardize_coordinate_parameters(data, orient)\n            resolved = resolve_properties(self, keys, scales)\n            verts = self._get_verts(data, orient)\n            ax.update_datalim(verts)\n\n            # TODO should really move this logic into resolve_color\n            fc = resolve_color(self, keys, \"\", scales)\n            if not resolved[\"fill\"]:\n                fc = mpl.colors.to_rgba(fc, 0)\n\n            kws[\"facecolor\"] = fc\n            kws[\"edgecolor\"] = resolve_color(self, keys, \"edge\", scales)\n            kws[\"linewidth\"] = resolved[\"edgewidth\"]\n            kws[\"linestyle\"] = resolved[\"edgestyle\"]\n\n            patches[ax].append(mpl.patches.Polygon(verts, **kws))\n\n        for ax, ax_patches in patches.items():\n\n            for patch in ax_patches:\n                self._postprocess_artist(patch, ax, orient)\n                ax.add_patch(patch)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/area.py_AreaBase._standardize_coordinate_parameters_AreaBase._get_verts.return.verts": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/area.py_AreaBase._standardize_coordinate_parameters_AreaBase._get_verts.return.verts", "embedding": null, "metadata": {"file_path": "seaborn/_marks/area.py", "file_name": "area.py", "file_type": "text/x-python", "category": "implementation", "start_line": 53, "end_line": 69, "span_ids": ["AreaBase._get_verts", "AreaBase._standardize_coordinate_parameters", "AreaBase._postprocess_artist"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AreaBase:\n\n    def _standardize_coordinate_parameters(self, data, orient):\n        return data\n\n    def _postprocess_artist(self, artist, ax, orient):\n        pass\n\n    def _get_verts(self, data, orient):\n\n        dv = {\"x\": \"y\", \"y\": \"x\"}[orient]\n        data = data.sort_values(orient)\n        verts = np.concatenate([\n            data[[orient, f\"{dv}min\"]].to_numpy(),\n            data[[orient, f\"{dv}max\"]].to_numpy()[::-1],\n        ])\n        if orient == \"y\":\n            verts = verts[:, ::-1]\n        return verts", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/area.py_AreaBase._legend_artist_AreaBase._legend_artist.return.mpl_patches_Patch_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/area.py_AreaBase._legend_artist_AreaBase._legend_artist.return.mpl_patches_Patch_", "embedding": null, "metadata": {"file_path": "seaborn/_marks/area.py", "file_name": "area.py", "file_type": "text/x-python", "category": "implementation", "start_line": 71, "end_line": 86, "span_ids": ["AreaBase._legend_artist"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AreaBase:\n\n    def _legend_artist(self, variables, value, scales):\n\n        keys = {v: value for v in variables}\n        resolved = resolve_properties(self, keys, scales)\n\n        fc = resolve_color(self, keys, \"\", scales)\n        if not resolved[\"fill\"]:\n            fc = mpl.colors.to_rgba(fc, 0)\n\n        return mpl.patches.Patch(\n            facecolor=fc,\n            edgecolor=resolve_color(self, keys, \"edge\", scales),\n            linewidth=resolved[\"edgewidth\"],\n            linestyle=resolved[\"edgestyle\"],\n            **self.artist_kws,\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/area.py_Area._postprocess_artist_Area._postprocess_artist.artist_sticky_edges_val_i": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/area.py_Area._postprocess_artist_Area._postprocess_artist.artist_sticky_edges_val_i", "embedding": null, "metadata": {"file_path": "seaborn/_marks/area.py", "file_name": "area.py", "file_type": "text/x-python", "category": "implementation", "start_line": 119, "end_line": 136, "span_ids": ["Area._postprocess_artist"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@document_properties\n@dataclass\nclass Area(AreaBase, Mark):\n\n    def _postprocess_artist(self, artist, ax, orient):\n\n        # TODO copying a lot of code from Bar, let's abstract this\n        # See comments there, I am not going to repeat them too\n\n        artist.set_linewidth(artist.get_linewidth() * 2)\n\n        linestyle = artist.get_linestyle()\n        if linestyle[1]:\n            linestyle = (linestyle[0], tuple(x / 2 for x in linestyle[1]))\n        artist.set_linestyle(linestyle)\n\n        artist.set_clip_path(artist.get_path(), artist.get_transform() + ax.transData)\n        if self.artist_kws.get(\"clip_on\", True):\n            artist.set_clip_box(ax.bbox)\n\n        val_idx = [\"y\", \"x\"].index(orient)\n        artist.sticky_edges[val_idx][:] = (0, np.inf)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/area.py_Band_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/area.py_Band_", "embedding": null, "metadata": {"file_path": "seaborn/_marks/area.py", "file_name": "area.py", "file_type": "text/x-python", "category": "implementation", "start_line": 139, "end_line": 166, "span_ids": ["Band._standardize_coordinate_parameters", "Band"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@document_properties\n@dataclass\nclass Band(AreaBase, Mark):\n    \"\"\"\n    A fill mark representing an interval between values.\n\n    See also\n    --------\n    Area : A fill mark drawn from a baseline to data values.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Band.rst\n\n    \"\"\"\n    color: MappableColor = Mappable(\"C0\", )\n    alpha: MappableFloat = Mappable(.2, )\n    fill: MappableBool = Mappable(True, )\n    edgecolor: MappableColor = Mappable(depend=\"color\", )\n    edgealpha: MappableFloat = Mappable(1, )\n    edgewidth: MappableFloat = Mappable(0, )\n    edgestyle: MappableFloat = Mappable(\"-\", )\n\n    def _standardize_coordinate_parameters(self, data, orient):\n        # dv = {\"x\": \"y\", \"y\": \"x\"}[orient]\n        # TODO assert that all(ymax >= ymin)?\n        return data", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_from___future___import_an_if_TYPE_CHECKING_.from_seaborn__core_scales": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_from___future___import_an_if_TYPE_CHECKING_.from_seaborn__core_scales", "embedding": null, "metadata": {"file_path": "seaborn/_marks/bar.py", "file_name": "bar.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 25, "span_ids": ["imports:9", "impl", "imports"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from __future__ import annotations\nfrom collections import defaultdict\nfrom dataclasses import dataclass\n\nimport numpy as np\nimport matplotlib as mpl\n\nfrom seaborn._marks.base import (\n    Mark,\n    Mappable,\n    MappableBool,\n    MappableColor,\n    MappableFloat,\n    MappableStyle,\n    resolve_properties,\n    resolve_color,\n    document_properties\n)\nfrom seaborn.external.version import Version\n\nfrom typing import TYPE_CHECKING\nif TYPE_CHECKING:\n    from typing import Any\n    from matplotlib.artist import Artist\n    from seaborn._core.scales import Scale", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_BarBase_BarBase._make_patches.return.bars_vals": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_BarBase_BarBase._make_patches.return.bars_vals", "embedding": null, "metadata": {"file_path": "seaborn/_marks/bar.py", "file_name": "bar.py", "file_type": "text/x-python", "category": "implementation", "start_line": 28, "end_line": 73, "span_ids": ["BarBase", "BarBase._make_patches"], "tokens": 408}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BarBase(Mark):\n\n    def _make_patches(self, data, scales, orient):\n\n        kws = self._resolve_properties(data, scales)\n        if orient == \"x\":\n            kws[\"x\"] = (data[\"x\"] - data[\"width\"] / 2).to_numpy()\n            kws[\"y\"] = data[\"baseline\"].to_numpy()\n            kws[\"w\"] = data[\"width\"].to_numpy()\n            kws[\"h\"] = (data[\"y\"] - data[\"baseline\"]).to_numpy()\n        else:\n            kws[\"x\"] = data[\"baseline\"].to_numpy()\n            kws[\"y\"] = (data[\"y\"] - data[\"width\"] / 2).to_numpy()\n            kws[\"w\"] = (data[\"x\"] - data[\"baseline\"]).to_numpy()\n            kws[\"h\"] = data[\"width\"].to_numpy()\n\n        kws.pop(\"width\", None)\n        kws.pop(\"baseline\", None)\n\n        val_dim = {\"x\": \"h\", \"y\": \"w\"}[orient]\n        bars, vals = [], []\n\n        for i in range(len(data)):\n\n            row = {k: v[i] for k, v in kws.items()}\n\n            # Skip bars with no value. It's possible we'll want to make this\n            # an option (i.e so you have an artist for animating or annotating),\n            # but let's keep things simple for now.\n            if not np.nan_to_num(row[val_dim]):\n                continue\n\n            bar = mpl.patches.Rectangle(\n                xy=(row[\"x\"], row[\"y\"]),\n                width=row[\"w\"],\n                height=row[\"h\"],\n                facecolor=row[\"facecolor\"],\n                edgecolor=row[\"edgecolor\"],\n                linestyle=row[\"edgestyle\"],\n                linewidth=row[\"edgewidth\"],\n                **self.artist_kws,\n            )\n            bars.append(bar)\n            vals.append(row[val_dim])\n\n        return bars, vals", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_BarBase._resolve_properties_BarBase._resolve_properties.return.resolved": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_BarBase._resolve_properties_BarBase._resolve_properties.return.resolved", "embedding": null, "metadata": {"file_path": "seaborn/_marks/bar.py", "file_name": "bar.py", "file_type": "text/x-python", "category": "implementation", "start_line": 75, "end_line": 89, "span_ids": ["BarBase._resolve_properties"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BarBase(Mark):\n\n    def _resolve_properties(self, data, scales):\n\n        resolved = resolve_properties(self, data, scales)\n\n        resolved[\"facecolor\"] = resolve_color(self, data, \"\", scales)\n        resolved[\"edgecolor\"] = resolve_color(self, data, \"edge\", scales)\n\n        fc = resolved[\"facecolor\"]\n        if isinstance(fc, tuple):\n            resolved[\"facecolor\"] = fc[0], fc[1], fc[2], fc[3] * resolved[\"fill\"]\n        else:\n            fc[:, 3] = fc[:, 3] * resolved[\"fill\"]  # TODO Is inplace mod a problem?\n            resolved[\"facecolor\"] = fc\n\n        return resolved", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_BarBase._legend_artist_BarBase._legend_artist.return.artist": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_BarBase._legend_artist_BarBase._legend_artist.return.artist", "embedding": null, "metadata": {"file_path": "seaborn/_marks/bar.py", "file_name": "bar.py", "file_type": "text/x-python", "category": "implementation", "start_line": 91, "end_line": 103, "span_ids": ["BarBase._legend_artist"], "tokens": 113}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BarBase(Mark):\n\n    def _legend_artist(\n        self, variables: list[str], value: Any, scales: dict[str, Scale],\n    ) -> Artist:\n        # TODO return some sensible default?\n        key = {v: value for v in variables}\n        key = self._resolve_properties(key, scales)\n        artist = mpl.patches.Patch(\n            facecolor=key[\"facecolor\"],\n            edgecolor=key[\"edgecolor\"],\n            linewidth=key[\"edgewidth\"],\n            linestyle=key[\"edgestyle\"],\n        )\n        return artist", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_Bar_Bar._TODO_is_this_mappable": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_Bar_Bar._TODO_is_this_mappable", "embedding": null, "metadata": {"file_path": "seaborn/_marks/bar.py", "file_name": "bar.py", "file_type": "text/x-python", "category": "implementation", "start_line": 106, "end_line": 131, "span_ids": ["Bar"], "tokens": 239}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@document_properties\n@dataclass\nclass Bar(BarBase):\n    \"\"\"\n    A bar mark drawn between baseline and data values.\n\n    See also\n    --------\n    Bars : A faster bar mark with defaults more suitable for histograms.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Bar.rst\n\n    \"\"\"\n    color: MappableColor = Mappable(\"C0\", grouping=False)\n    alpha: MappableFloat = Mappable(.7, grouping=False)\n    fill: MappableBool = Mappable(True, grouping=False)\n    edgecolor: MappableColor = Mappable(depend=\"color\", grouping=False)\n    edgealpha: MappableFloat = Mappable(1, grouping=False)\n    edgewidth: MappableFloat = Mappable(rc=\"patch.linewidth\", grouping=False)\n    edgestyle: MappableStyle = Mappable(\"-\", grouping=False)\n    # pattern: MappableString = Mappable(None)  # TODO no Property yet\n\n    width: MappableFloat = Mappable(.8, grouping=False)\n    baseline: MappableFloat = Mappable(0, grouping=False)  # TODO *is* this mappable?", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_Bar._plot_Bar._plot.for___data_ax_in_split_.ax_add_container_containe": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_Bar._plot_Bar._plot.for___data_ax_in_split_.ax_add_container_containe", "embedding": null, "metadata": {"file_path": "seaborn/_marks/bar.py", "file_name": "bar.py", "file_type": "text/x-python", "category": "implementation", "start_line": 133, "end_line": 173, "span_ids": ["Bar._plot"], "tokens": 467}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@document_properties\n@dataclass\nclass Bar(BarBase):\n\n    def _plot(self, split_gen, scales, orient):\n\n        val_idx = [\"y\", \"x\"].index(orient)\n\n        for _, data, ax in split_gen():\n\n            bars, vals = self._make_patches(data, scales, orient)\n\n            for bar in bars:\n\n                # Because we are clipping the artist (see below), the edges end up\n                # looking half as wide as they actually are. I don't love this clumsy\n                # workaround, which is going to cause surprises if you work with the\n                # artists directly. We may need to revisit after feedback.\n                bar.set_linewidth(bar.get_linewidth() * 2)\n                linestyle = bar.get_linestyle()\n                if linestyle[1]:\n                    linestyle = (linestyle[0], tuple(x / 2 for x in linestyle[1]))\n                bar.set_linestyle(linestyle)\n\n                # This is a bit of a hack to handle the fact that the edge lines are\n                # centered on the actual extents of the bar, and overlap when bars are\n                # stacked or dodged. We may discover that this causes problems and needs\n                # to be revisited at some point. Also it should be faster to clip with\n                # a bbox than a path, but I cant't work out how to get the intersection\n                # with the axes bbox.\n                bar.set_clip_path(bar.get_path(), bar.get_transform() + ax.transData)\n                if self.artist_kws.get(\"clip_on\", True):\n                    # It seems the above hack undoes the default axes clipping\n                    bar.set_clip_box(ax.bbox)\n                bar.sticky_edges[val_idx][:] = (0, np.inf)\n                ax.add_patch(bar)\n\n            # Add a container which is useful for, e.g. Axes.bar_label\n            if Version(mpl.__version__) >= Version(\"3.4.0\"):\n                orientation = {\"x\": \"vertical\", \"y\": \"horizontal\"}[orient]\n                container_kws = dict(datavalues=vals, orientation=orientation)\n            else:\n                container_kws = {}\n            container = mpl.container.BarContainer(bars, **container_kws)\n            ax.add_container(container)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_Bars_Bars._TODO_is_this_mappable": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_Bars_Bars._TODO_is_this_mappable", "embedding": null, "metadata": {"file_path": "seaborn/_marks/bar.py", "file_name": "bar.py", "file_type": "text/x-python", "category": "implementation", "start_line": 176, "end_line": 201, "span_ids": ["Bars"], "tokens": 238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@document_properties\n@dataclass\nclass Bars(BarBase):\n    \"\"\"\n    A faster bar mark with defaults more suitable histograms.\n\n    See also\n    --------\n    Bar : A bar mark drawn between baseline and data values.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Bars.rst\n\n    \"\"\"\n    color: MappableColor = Mappable(\"C0\", grouping=False)\n    alpha: MappableFloat = Mappable(.7, grouping=False)\n    fill: MappableBool = Mappable(True, grouping=False)\n    edgecolor: MappableColor = Mappable(rc=\"patch.edgecolor\", grouping=False)\n    edgealpha: MappableFloat = Mappable(1, grouping=False)\n    edgewidth: MappableFloat = Mappable(auto=True, grouping=False)\n    edgestyle: MappableStyle = Mappable(\"-\", grouping=False)\n    # pattern: MappableString = Mappable(None)  # TODO no Property yet\n\n    width: MappableFloat = Mappable(1, grouping=False)\n    baseline: MappableFloat = Mappable(0, grouping=False)  # TODO *is* this mappable?", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_Bars._plot_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/bar.py_Bars._plot_", "embedding": null, "metadata": {"file_path": "seaborn/_marks/bar.py", "file_name": "bar.py", "file_type": "text/x-python", "category": "implementation", "start_line": 203, "end_line": 251, "span_ids": ["Bars._plot"], "tokens": 432}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@document_properties\n@dataclass\nclass Bars(BarBase):\n\n    def _plot(self, split_gen, scales, orient):\n\n        ori_idx = [\"x\", \"y\"].index(orient)\n        val_idx = [\"y\", \"x\"].index(orient)\n\n        patches = defaultdict(list)\n        for _, data, ax in split_gen():\n            bars, _ = self._make_patches(data, scales, orient)\n            patches[ax].extend(bars)\n\n        collections = {}\n        for ax, ax_patches in patches.items():\n\n            col = mpl.collections.PatchCollection(ax_patches, match_original=True)\n            col.sticky_edges[val_idx][:] = (0, np.inf)\n            ax.add_collection(col, autolim=False)\n            collections[ax] = col\n\n            # Workaround for matplotlib autoscaling bug\n            # https://github.com/matplotlib/matplotlib/issues/11898\n            # https://github.com/matplotlib/matplotlib/issues/23129\n            xys = np.vstack([path.vertices for path in col.get_paths()])\n            ax.update_datalim(xys)\n\n        if \"edgewidth\" not in scales and isinstance(self.edgewidth, Mappable):\n\n            for ax in collections:\n                ax.autoscale_view()\n\n            def get_dimensions(collection):\n                edges, widths = [], []\n                for verts in (path.vertices for path in collection.get_paths()):\n                    edges.append(min(verts[:, ori_idx]))\n                    widths.append(np.ptp(verts[:, ori_idx]))\n                return np.array(edges), np.array(widths)\n\n            min_width = np.inf\n            for ax, col in collections.items():\n                edges, widths = get_dimensions(col)\n                points = 72 / ax.figure.dpi * abs(\n                    ax.transData.transform([edges + widths] * 2)\n                    - ax.transData.transform([edges] * 2)\n                )\n                min_width = min(min_width, min(points[:, ori_idx]))\n\n            linewidth = min(.1 * min_width, mpl.rcParams[\"patch.linewidth\"])\n            for _, col in collections.items():\n                col.set_linewidth(linewidth)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/base.py_resolve_color_resolve_color._i_e_set_fillalpha_to_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/base.py_resolve_color_resolve_color._i_e_set_fillalpha_to_", "embedding": null, "metadata": {"file_path": "seaborn/_marks/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 234, "end_line": 287, "span_ids": ["resolve_color"], "tokens": 498}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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    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)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/base.py_document_properties_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/base.py_document_properties_", "embedding": null, "metadata": {"file_path": "seaborn/_marks/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 290, "end_line": 310, "span_ids": ["document_properties"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def document_properties(mark):\n\n    properties = [f.name for f in fields(mark) if isinstance(f.default, Mappable)]\n    text = [\n        \"\",\n        \"    This mark defines the following properties:\",\n        textwrap.fill(\n            \", \".join([f\"|{p}|\" for p in properties]),\n            width=78, initial_indent=\" \" * 8, subsequent_indent=\" \" * 8,\n        ),\n    ]\n\n    docstring_lines = mark.__doc__.split(\"\\n\")\n    new_docstring = \"\\n\".join([\n        *docstring_lines[:2],\n        *text,\n        *docstring_lines[2:],\n    ])\n    mark.__doc__ = new_docstring\n    return mark", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_from___future___import_an_if_TYPE_CHECKING_.from_seaborn__core_scales": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_from___future___import_an_if_TYPE_CHECKING_.from_seaborn__core_scales", "embedding": null, "metadata": {"file_path": "seaborn/_marks/dot.py", "file_name": "dot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 24, "span_ids": ["impl", "imports", "imports:7"], "tokens": 110}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from __future__ import annotations\nfrom dataclasses import dataclass\n\nimport numpy as np\nimport matplotlib as mpl\n\nfrom seaborn._marks.base import (\n    Mark,\n    Mappable,\n    MappableBool,\n    MappableFloat,\n    MappableString,\n    MappableColor,\n    MappableStyle,\n    resolve_properties,\n    resolve_color,\n    document_properties,\n)\n\nfrom typing import TYPE_CHECKING\nif TYPE_CHECKING:\n    from typing import Any\n    from matplotlib.artist import Artist\n    from seaborn._core.scales import Scale", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_DotBase_DotBase._resolve_properties.return.resolved": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_DotBase_DotBase._resolve_properties.return.resolved", "embedding": null, "metadata": {"file_path": "seaborn/_marks/dot.py", "file_name": "dot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 27, "end_line": 60, "span_ids": ["DotBase", "DotBase._resolve_properties", "DotBase._resolve_paths"], "tokens": 219}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DotBase(Mark):\n\n    def _resolve_paths(self, data):\n\n        paths = []\n        path_cache = {}\n        marker = data[\"marker\"]\n\n        def get_transformed_path(m):\n            return m.get_path().transformed(m.get_transform())\n\n        if isinstance(marker, mpl.markers.MarkerStyle):\n            return get_transformed_path(marker)\n\n        for m in marker:\n            if m not in path_cache:\n                path_cache[m] = get_transformed_path(m)\n            paths.append(path_cache[m])\n        return paths\n\n    def _resolve_properties(self, data, scales):\n\n        resolved = resolve_properties(self, data, scales)\n        resolved[\"path\"] = self._resolve_paths(resolved)\n        resolved[\"size\"] = resolved[\"pointsize\"] ** 2\n\n        if isinstance(data, dict):  # Properties for single dot\n            filled_marker = resolved[\"marker\"].is_filled()\n        else:\n            filled_marker = [m.is_filled() for m in resolved[\"marker\"]]\n\n        resolved[\"fill\"] = resolved[\"fill\"] * filled_marker\n\n        return resolved", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_DotBase._plot_DotBase._plot.for___data_ax_in_split_.ax_add_collection_points_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_DotBase._plot_DotBase._plot.for___data_ax_in_split_.ax_add_collection_points_", "embedding": null, "metadata": {"file_path": "seaborn/_marks/dot.py", "file_name": "dot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 62, "end_line": 85, "span_ids": ["DotBase._plot"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DotBase(Mark):\n\n    def _plot(self, split_gen, scales, orient):\n\n        # TODO Not backcompat with allowed (but nonfunctional) univariate plots\n        # (That should be solved upstream by defaulting to \"\" for unset x/y?)\n        # (Be mindful of xmin/xmax, etc!)\n\n        for _, data, ax in split_gen():\n\n            offsets = np.column_stack([data[\"x\"], data[\"y\"]])\n            data = self._resolve_properties(data, scales)\n\n            points = mpl.collections.PathCollection(\n                offsets=offsets,\n                paths=data[\"path\"],\n                sizes=data[\"size\"],\n                facecolors=data[\"facecolor\"],\n                edgecolors=data[\"edgecolor\"],\n                linewidths=data[\"linewidth\"],\n                linestyles=data[\"edgestyle\"],\n                transOffset=ax.transData,\n                transform=mpl.transforms.IdentityTransform(),\n                **self.artist_kws,\n            )\n            ax.add_collection(points)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_DotBase._legend_artist_DotBase._legend_artist.return.mpl_collections_PathColle": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_DotBase._legend_artist_DotBase._legend_artist.return.mpl_collections_PathColle", "embedding": null, "metadata": {"file_path": "seaborn/_marks/dot.py", "file_name": "dot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 87, "end_line": 103, "span_ids": ["DotBase._legend_artist"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DotBase(Mark):\n\n    def _legend_artist(\n        self, variables: list[str], value: Any, scales: dict[str, Scale],\n    ) -> Artist:\n\n        key = {v: value for v in variables}\n        res = self._resolve_properties(key, scales)\n\n        return mpl.collections.PathCollection(\n            paths=[res[\"path\"]],\n            sizes=[res[\"size\"]],\n            facecolors=[res[\"facecolor\"]],\n            edgecolors=[res[\"edgecolor\"]],\n            linewidths=[res[\"linewidth\"]],\n            linestyles=[res[\"edgestyle\"]],\n            transform=mpl.transforms.IdentityTransform(),\n            **self.artist_kws,\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_Dot_Dot.edgestyle.Mappable_grouping_Fa": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_Dot_Dot.edgestyle.Mappable_grouping_Fa", "embedding": null, "metadata": {"file_path": "seaborn/_marks/dot.py", "file_name": "dot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 106, "end_line": 130, "span_ids": ["Dot"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@document_properties\n@dataclass\nclass Dot(DotBase):\n    \"\"\"\n    A mark suitable for dot plots or less-dense scatterplots.\n\n    See also\n    --------\n    Dots : A dot mark defined by strokes to better handle overplotting.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Dot.rst\n\n    \"\"\"\n    marker: MappableString = Mappable(\"o\", grouping=False)\n    pointsize: MappableFloat = Mappable(6, grouping=False)  # TODO rcParam?\n    stroke: MappableFloat = Mappable(.75, grouping=False)  # TODO rcParam?\n    color: MappableColor = Mappable(\"C0\", grouping=False)\n    alpha: MappableFloat = Mappable(1, grouping=False)\n    fill: MappableBool = Mappable(True, grouping=False)\n    edgecolor: MappableColor = Mappable(depend=\"color\", grouping=False)\n    edgealpha: MappableFloat = Mappable(depend=\"alpha\", grouping=False)\n    edgewidth: MappableFloat = Mappable(.5, grouping=False)  # TODO rcParam?\n    edgestyle: MappableStyle = Mappable(\"-\", grouping=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_Dot._resolve_properties_Dot._resolve_properties.return.resolved": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_Dot._resolve_properties_Dot._resolve_properties.return.resolved", "embedding": null, "metadata": {"file_path": "seaborn/_marks/dot.py", "file_name": "dot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 132, "end_line": 157, "span_ids": ["Dot._resolve_properties"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@document_properties\n@dataclass\nclass Dot(DotBase):\n\n    def _resolve_properties(self, data, scales):\n\n        resolved = super()._resolve_properties(data, scales)\n        filled = resolved[\"fill\"]\n\n        main_stroke = resolved[\"stroke\"]\n        edge_stroke = resolved[\"edgewidth\"]\n        resolved[\"linewidth\"] = np.where(filled, edge_stroke, main_stroke)\n\n        main_color = resolve_color(self, data, \"\", scales)\n        edge_color = resolve_color(self, data, \"edge\", scales)\n\n        if not np.isscalar(filled):\n            # Expand dims to use in np.where with rgba arrays\n            filled = filled[:, None]\n        resolved[\"edgecolor\"] = np.where(filled, edge_color, main_color)\n\n        filled = np.squeeze(filled)\n        if isinstance(main_color, tuple):\n            # TODO handle this in resolve_color\n            main_color = tuple([*main_color[:3], main_color[3] * filled])\n        else:\n            main_color = np.c_[main_color[:, :3], main_color[:, 3] * filled]\n        resolved[\"facecolor\"] = main_color\n\n        return resolved", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_Dots_Dots.fillalpha.Mappable_2_grouping_Fal": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_Dots_Dots.fillalpha.Mappable_2_grouping_Fal", "embedding": null, "metadata": {"file_path": "seaborn/_marks/dot.py", "file_name": "dot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 160, "end_line": 183, "span_ids": ["Dots"], "tokens": 229}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@document_properties\n@dataclass\nclass Dots(DotBase):\n    \"\"\"\n    A dot mark defined by strokes to better handle overplotting.\n\n    See also\n    --------\n    Dot : A mark suitable for dot plots or less-dense scatterplots.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Dots.rst\n\n    \"\"\"\n    # TODO retype marker as MappableMarker\n    marker: MappableString = Mappable(rc=\"scatter.marker\", grouping=False)\n    pointsize: MappableFloat = Mappable(4, grouping=False)  # TODO rcParam?\n    stroke: MappableFloat = Mappable(.75, grouping=False)  # TODO rcParam?\n    color: MappableColor = Mappable(\"C0\", grouping=False)\n    alpha: MappableFloat = Mappable(1, grouping=False)  # TODO auto alpha?\n    fill: MappableBool = Mappable(True, grouping=False)\n    fillcolor: MappableColor = Mappable(depend=\"color\", grouping=False)\n    fillalpha: MappableFloat = Mappable(.2, grouping=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_Dots._resolve_properties_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/dot.py_Dots._resolve_properties_", "embedding": null, "metadata": {"file_path": "seaborn/_marks/dot.py", "file_name": "dot.py", "file_type": "text/x-python", "category": "implementation", "start_line": 185, "end_line": 201, "span_ids": ["Dots._resolve_properties"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@document_properties\n@dataclass\nclass Dots(DotBase):\n\n    def _resolve_properties(self, data, scales):\n\n        resolved = super()._resolve_properties(data, scales)\n        resolved[\"linewidth\"] = resolved.pop(\"stroke\")\n        resolved[\"facecolor\"] = resolve_color(self, data, \"fill\", scales)\n        resolved[\"edgecolor\"] = resolve_color(self, data, \"\", scales)\n        resolved.setdefault(\"edgestyle\", (0, None))\n\n        fc = resolved[\"facecolor\"]\n        if isinstance(fc, tuple):\n            resolved[\"facecolor\"] = fc[0], fc[1], fc[2], fc[3] * resolved[\"fill\"]\n        else:\n            fc[:, 3] = fc[:, 3] * resolved[\"fill\"]  # TODO Is inplace mod a problem?\n            resolved[\"facecolor\"] = fc\n\n        return resolved", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/line.py_from___future___import_an_Path._sort.False": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/line.py_from___future___import_an_Path._sort.False", "embedding": null, "metadata": {"file_path": "seaborn/_marks/line.py", "file_name": "line.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 47, "span_ids": ["Path", "imports"], "tokens": 306}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from __future__ import annotations\nfrom dataclasses import dataclass\nfrom typing import ClassVar\n\nimport numpy as np\nimport matplotlib as mpl\n\nfrom seaborn._marks.base import (\n    Mark,\n    Mappable,\n    MappableFloat,\n    MappableString,\n    MappableColor,\n    resolve_properties,\n    resolve_color,\n    document_properties,\n)\nfrom seaborn.external.version import Version\n\n\n@document_properties\n@dataclass\nclass Path(Mark):\n    \"\"\"\n    A mark connecting data points in the order they appear.\n\n    See also\n    --------\n    Line : A mark connecting data points with sorting along the orientation axis.\n    Paths : A faster but less-flexible mark for drawing many paths.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Path.rst\n\n    \"\"\"\n    color: MappableColor = Mappable(\"C0\")\n    alpha: MappableFloat = Mappable(1)\n    linewidth: MappableFloat = Mappable(rc=\"lines.linewidth\")\n    linestyle: MappableString = Mappable(rc=\"lines.linestyle\")\n    marker: MappableString = Mappable(rc=\"lines.marker\")\n    pointsize: MappableFloat = Mappable(rc=\"lines.markersize\")\n    fillcolor: MappableColor = Mappable(depend=\"color\")\n    edgecolor: MappableColor = Mappable(depend=\"color\")\n    edgewidth: MappableFloat = Mappable(rc=\"lines.markeredgewidth\")\n\n    _sort: ClassVar[bool] = False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/line.py_Path._plot_Path._plot.for_keys_data_ax_in_spl.ax_add_line_line_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/line.py_Path._plot_Path._plot.for_keys_data_ax_in_spl.ax_add_line_line_", "embedding": null, "metadata": {"file_path": "seaborn/_marks/line.py", "file_name": "line.py", "file_type": "text/x-python", "category": "implementation", "start_line": 49, "end_line": 81, "span_ids": ["Path._plot"], "tokens": 307}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@document_properties\n@dataclass\nclass Path(Mark):\n\n    def _plot(self, split_gen, scales, orient):\n\n        for keys, data, ax in split_gen(keep_na=not self._sort):\n\n            vals = resolve_properties(self, keys, scales)\n            vals[\"color\"] = resolve_color(self, keys, scales=scales)\n            vals[\"fillcolor\"] = resolve_color(self, keys, prefix=\"fill\", scales=scales)\n            vals[\"edgecolor\"] = resolve_color(self, keys, prefix=\"edge\", scales=scales)\n\n            # https://github.com/matplotlib/matplotlib/pull/16692\n            if Version(mpl.__version__) < Version(\"3.3.0\"):\n                vals[\"marker\"] = vals[\"marker\"]._marker\n\n            if self._sort:\n                data = data.sort_values(orient)\n\n            artist_kws = self.artist_kws.copy()\n            self._handle_capstyle(artist_kws, vals)\n\n            line = mpl.lines.Line2D(\n                data[\"x\"].to_numpy(),\n                data[\"y\"].to_numpy(),\n                color=vals[\"color\"],\n                linewidth=vals[\"linewidth\"],\n                linestyle=vals[\"linestyle\"],\n                marker=vals[\"marker\"],\n                markersize=vals[\"pointsize\"],\n                markerfacecolor=vals[\"fillcolor\"],\n                markeredgecolor=vals[\"edgecolor\"],\n                markeredgewidth=vals[\"edgewidth\"],\n                **artist_kws,\n            )\n            ax.add_line(line)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/line.py_Path._legend_artist_Path._handle_capstyle.if_vals_linestyle_1_i.kws_dash_capstyle_ca": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/line.py_Path._legend_artist_Path._handle_capstyle.if_vals_linestyle_1_i.kws_dash_capstyle_ca", "embedding": null, "metadata": {"file_path": "seaborn/_marks/line.py", "file_name": "line.py", "file_type": "text/x-python", "category": "implementation", "start_line": 83, "end_line": 117, "span_ids": ["Path._legend_artist", "Path._handle_capstyle"], "tokens": 346}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@document_properties\n@dataclass\nclass Path(Mark):\n\n    def _legend_artist(self, variables, value, scales):\n\n        keys = {v: value for v in variables}\n        vals = resolve_properties(self, keys, scales)\n        vals[\"color\"] = resolve_color(self, keys, scales=scales)\n        vals[\"fillcolor\"] = resolve_color(self, keys, prefix=\"fill\", scales=scales)\n        vals[\"edgecolor\"] = resolve_color(self, keys, prefix=\"edge\", scales=scales)\n\n        # https://github.com/matplotlib/matplotlib/pull/16692\n        if Version(mpl.__version__) < Version(\"3.3.0\"):\n            vals[\"marker\"] = vals[\"marker\"]._marker\n\n        artist_kws = self.artist_kws.copy()\n        self._handle_capstyle(artist_kws, vals)\n\n        return mpl.lines.Line2D(\n            [], [],\n            color=vals[\"color\"],\n            linewidth=vals[\"linewidth\"],\n            linestyle=vals[\"linestyle\"],\n            marker=vals[\"marker\"],\n            markersize=vals[\"pointsize\"],\n            markerfacecolor=vals[\"fillcolor\"],\n            markeredgecolor=vals[\"edgecolor\"],\n            markeredgewidth=vals[\"edgewidth\"],\n            **artist_kws,\n        )\n\n    def _handle_capstyle(self, kws, vals):\n\n        # Work around for this matplotlib issue:\n        # https://github.com/matplotlib/matplotlib/issues/23437\n        if vals[\"linestyle\"][1] is None:\n            capstyle = kws.get(\"solid_capstyle\", mpl.rcParams[\"lines.solid_capstyle\"])\n            kws[\"dash_capstyle\"] = capstyle", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/line.py_Line_Paths.__post_init__.self_artist_kws_setdefaul": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/line.py_Line_Paths.__post_init__.self_artist_kws_setdefaul", "embedding": null, "metadata": {"file_path": "seaborn/_marks/line.py", "file_name": "line.py", "file_type": "text/x-python", "category": "implementation", "start_line": 120, "end_line": 167, "span_ids": ["Line", "Paths", "Paths.__post_init__"], "tokens": 330}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@document_properties\n@dataclass\nclass Line(Path):\n    \"\"\"\n    A mark connecting data points with sorting along the orientation axis.\n\n    See also\n    --------\n    Path : A mark connecting data points in the order they appear.\n    Lines : A faster but less-flexible mark for drawing many lines.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Line.rst\n\n    \"\"\"\n    _sort: ClassVar[bool] = True\n\n\n@document_properties\n@dataclass\nclass Paths(Mark):\n    \"\"\"\n    A faster but less-flexible mark for drawing many paths.\n\n    See also\n    --------\n    Path : A mark connecting data points in the order they appear.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Paths.rst\n\n    \"\"\"\n    color: MappableColor = Mappable(\"C0\")\n    alpha: MappableFloat = Mappable(1)\n    linewidth: MappableFloat = Mappable(rc=\"lines.linewidth\")\n    linestyle: MappableString = Mappable(rc=\"lines.linestyle\")\n\n    _sort: ClassVar[bool] = False\n\n    def __post_init__(self):\n\n        # LineCollection artists have a capstyle property but don't source its value\n        # from the rc, so we do that manually here. Unfortunately, because we add\n        # only one LineCollection, we have the use the same capstyle for all lines\n        # even when they are dashed. It's a slight inconsistency, but looks fine IMO.\n        self.artist_kws.setdefault(\"capstyle\", mpl.rcParams[\"lines.solid_capstyle\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/line.py_Paths._setup_lines_Paths._setup_lines.return.line_data": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/line.py_Paths._setup_lines_Paths._setup_lines.return.line_data", "embedding": null, "metadata": {"file_path": "seaborn/_marks/line.py", "file_name": "line.py", "file_type": "text/x-python", "category": "implementation", "start_line": 169, "end_line": 196, "span_ids": ["Paths._setup_lines"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@document_properties\n@dataclass\nclass Paths(Mark):\n\n    def _setup_lines(self, split_gen, scales, orient):\n\n        line_data = {}\n\n        for keys, data, ax in split_gen(keep_na=not self._sort):\n\n            if ax not in line_data:\n                line_data[ax] = {\n                    \"segments\": [],\n                    \"colors\": [],\n                    \"linewidths\": [],\n                    \"linestyles\": [],\n                }\n\n            vals = resolve_properties(self, keys, scales)\n            vals[\"color\"] = resolve_color(self, keys, scales=scales)\n\n            if self._sort:\n                data = data.sort_values(orient)\n\n            # Column stack to avoid block consolidation\n            xy = np.column_stack([data[\"x\"], data[\"y\"]])\n            line_data[ax][\"segments\"].append(xy)\n            line_data[ax][\"colors\"].append(vals[\"color\"])\n            line_data[ax][\"linewidths\"].append(vals[\"linewidth\"])\n            line_data[ax][\"linestyles\"].append(vals[\"linestyle\"])\n\n        return line_data", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/line.py_Paths._plot_Lines._sort.True": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/line.py_Paths._plot_Lines._sort.True", "embedding": null, "metadata": {"file_path": "seaborn/_marks/line.py", "file_name": "line.py", "file_type": "text/x-python", "category": "implementation", "start_line": 198, "end_line": 243, "span_ids": ["Paths._plot", "Paths._legend_artist", "Lines"], "tokens": 320}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@document_properties\n@dataclass\nclass Paths(Mark):\n\n    def _plot(self, split_gen, scales, orient):\n\n        line_data = self._setup_lines(split_gen, scales, orient)\n\n        for ax, ax_data in line_data.items():\n            lines = mpl.collections.LineCollection(**ax_data, **self.artist_kws)\n            # Handle datalim update manually\n            # https://github.com/matplotlib/matplotlib/issues/23129\n            ax.add_collection(lines, autolim=False)\n            xy = np.concatenate(ax_data[\"segments\"])\n            ax.update_datalim(xy)\n\n    def _legend_artist(self, variables, value, scales):\n\n        key = resolve_properties(self, {v: value for v in variables}, scales)\n\n        artist_kws = self.artist_kws.copy()\n        capstyle = artist_kws.pop(\"capstyle\")\n        artist_kws[\"solid_capstyle\"] = capstyle\n        artist_kws[\"dash_capstyle\"] = capstyle\n\n        return mpl.lines.Line2D(\n            [], [],\n            color=key[\"color\"],\n            linewidth=key[\"linewidth\"],\n            linestyle=key[\"linestyle\"],\n            **artist_kws,\n        )\n\n\n@document_properties\n@dataclass\nclass Lines(Paths):\n    \"\"\"\n    A faster but less-flexible mark for drawing many lines.\n\n    See also\n    --------\n    Line : A mark connecting data points with sorting along the orientation axis.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Lines.rst\n\n    \"\"\"\n    _sort: ClassVar[bool] = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/line.py_Range_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_marks/line.py_Range_", "embedding": null, "metadata": {"file_path": "seaborn/_marks/line.py", "file_name": "line.py", "file_type": "text/x-python", "category": "implementation", "start_line": 246, "end_line": 288, "span_ids": ["Range", "Range._setup_lines"], "tokens": 306}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@document_properties\n@dataclass\nclass Range(Paths):\n    \"\"\"\n    An oriented line mark drawn between min/max values.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Range.rst\n\n    \"\"\"\n    def _setup_lines(self, split_gen, scales, orient):\n\n        line_data = {}\n\n        other = {\"x\": \"y\", \"y\": \"x\"}[orient]\n\n        for keys, data, ax in split_gen(keep_na=not self._sort):\n\n            if ax not in line_data:\n                line_data[ax] = {\n                    \"segments\": [],\n                    \"colors\": [],\n                    \"linewidths\": [],\n                    \"linestyles\": [],\n                }\n\n            vals = resolve_properties(self, keys, scales)\n            vals[\"color\"] = resolve_color(self, keys, scales=scales)\n\n            cols = [orient, f\"{other}min\", f\"{other}max\"]\n            data = data[cols].melt(orient, value_name=other)[[\"x\", \"y\"]]\n            segments = [d.to_numpy() for _, d in data.groupby(orient)]\n\n            line_data[ax][\"segments\"].extend(segments)\n\n            n = len(segments)\n            line_data[ax][\"colors\"].extend([vals[\"color\"]] * n)\n            line_data[ax][\"linewidths\"].extend([vals[\"linewidth\"]] * n)\n            line_data[ax][\"linestyles\"].extend([vals[\"linestyle\"]] * n)\n\n        return line_data", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_SemanticMapping_SemanticMapping.map.return.plotter": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_SemanticMapping_SemanticMapping.map.return.plotter", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 29, "end_line": 56, "span_ids": ["SemanticMapping", "SemanticMapping.map"], "tokens": 245}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SemanticMapping:\n    \"\"\"Base class for mapping data values to plot attributes.\"\"\"\n\n    # -- Default attributes that all SemanticMapping subclasses must set\n\n    # Whether the mapping is numeric, categorical, or datetime\n    map_type = None\n\n    # Ordered list of unique values in the input data\n    levels = None\n\n    # A mapping from the data values to corresponding plot attributes\n    lookup_table = None\n\n    def __init__(self, plotter):\n\n        # TODO Putting this here so we can continue to use a lot of the\n        # logic that's built into the library, but the idea of this class\n        # is to move towards semantic mappings that are agnostic about the\n        # kind of plot they're going to be used to draw.\n        # Fully achieving that is going to take some thinking.\n        self.plotter = plotter\n\n    def map(cls, plotter, *args, **kwargs):\n        # This method is assigned the __init__ docstring\n        method_name = f\"_{cls.__name__[:-7].lower()}_map\"\n        setattr(plotter, method_name, cls(plotter, *args, **kwargs))\n        return plotter", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_SemanticMapping._check_list_length_SemanticMapping.__call__.if_isinstance_key_list_.else_.return.self__lookup_single_key_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_SemanticMapping._check_list_length_SemanticMapping.__call__.if_isinstance_key_list_.else_.return.self__lookup_single_key_", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 58, "end_line": 91, "span_ids": ["SemanticMapping.__call__", "SemanticMapping._check_list_length", "SemanticMapping._lookup_single"], "tokens": 311}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SemanticMapping:\n\n    def _check_list_length(self, levels, values, variable):\n        \"\"\"Input check when values are provided as a list.\"\"\"\n        # Copied from _core/properties; eventually will be replaced for that.\n        message = \"\"\n        if len(levels) > len(values):\n            message = \" \".join([\n                f\"\\nThe {variable} list has fewer values ({len(values)})\",\n                f\"than needed ({len(levels)}) and will cycle, which may\",\n                \"produce an uninterpretable plot.\"\n            ])\n            values = [x for _, x in zip(levels, itertools.cycle(values))]\n\n        elif len(values) > len(levels):\n            message = \" \".join([\n                f\"The {variable} list has more values ({len(values)})\",\n                f\"than needed ({len(levels)}), which may not be intended.\",\n            ])\n            values = values[:len(levels)]\n\n        if message:\n            warnings.warn(message, UserWarning, stacklevel=6)\n\n        return values\n\n    def _lookup_single(self, key):\n        \"\"\"Apply the mapping to a single data value.\"\"\"\n        return self.lookup_table[key]\n\n    def __call__(self, key, *args, **kwargs):\n        \"\"\"Get the attribute(s) values for the data key.\"\"\"\n        if isinstance(key, (list, np.ndarray, pd.Series)):\n            return [self._lookup_single(k, *args, **kwargs) for k in key]\n        else:\n            return self._lookup_single(key, *args, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_HueMapping._lookup_single_HueMapping._lookup_single.return.value": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_HueMapping._lookup_single_HueMapping._lookup_single.return.value", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 170, "end_line": 196, "span_ids": ["HueMapping._lookup_single"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@share_init_params_with_map\nclass HueMapping(SemanticMapping):\n\n    def _lookup_single(self, key):\n        \"\"\"Get the color for a single value, using colormap to interpolate.\"\"\"\n        try:\n            # Use a value that's in the original data vector\n            value = self.lookup_table[key]\n        except KeyError:\n\n            if self.norm is None:\n                # Currently we only get here in scatterplot with hue_order,\n                # because scatterplot does not consider hue a grouping variable\n                # So unused hue levels are in the data, but not the lookup table\n                return (0, 0, 0, 0)\n\n            # Use the colormap to interpolate between existing datapoints\n            # (e.g. in the context of making a continuous legend)\n            try:\n                normed = self.norm(key)\n            except TypeError as err:\n                if np.isnan(key):\n                    value = (0, 0, 0, 0)\n                else:\n                    raise err\n            else:\n                if np.ma.is_masked(normed):\n                    normed = np.nan\n                value = self.cmap(normed)\n        return value", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_HueMapping.infer_map_type_HueMapping.categorical_mapping.return.levels_lookup_table": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_oldcore.py_HueMapping.infer_map_type_HueMapping.categorical_mapping.return.levels_lookup_table", "embedding": null, "metadata": {"file_path": "seaborn/_oldcore.py", "file_name": "_oldcore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 198, "end_line": 245, "span_ids": ["HueMapping.infer_map_type", "HueMapping.categorical_mapping"], "tokens": 336}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@share_init_params_with_map\nclass HueMapping(SemanticMapping):\n\n    def infer_map_type(self, palette, norm, input_format, var_type):\n        \"\"\"Determine how to implement the mapping.\"\"\"\n        if palette in QUAL_PALETTES:\n            map_type = \"categorical\"\n        elif norm is not None:\n            map_type = \"numeric\"\n        elif isinstance(palette, (dict, list)):\n            map_type = \"categorical\"\n        elif input_format == \"wide\":\n            map_type = \"categorical\"\n        else:\n            map_type = var_type\n\n        return map_type\n\n    def categorical_mapping(self, data, palette, order):\n        \"\"\"Determine colors when the hue mapping is categorical.\"\"\"\n        # -- Identify the order and name of the levels\n\n        levels = categorical_order(data, order)\n        n_colors = len(levels)\n\n        # -- Identify the set of colors to use\n\n        if isinstance(palette, dict):\n\n            missing = set(levels) - set(palette)\n            if any(missing):\n                err = \"The palette dictionary is missing keys: {}\"\n                raise ValueError(err.format(missing))\n\n            lookup_table = palette\n\n        else:\n\n            if palette is None:\n                if n_colors <= len(get_color_cycle()):\n                    colors = color_palette(None, n_colors)\n                else:\n                    colors = color_palette(\"husl\", n_colors)\n            elif isinstance(palette, list):\n                colors = self._check_list_length(levels, palette, \"palette\")\n            else:\n                colors = color_palette(palette, n_colors)\n\n            lookup_table = dict(zip(levels, colors))\n\n        return levels, lookup_table", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/aggregation.py_Est_Est._process.return.pd_DataFrame_res_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/aggregation.py_Est_Est._process.return.pd_DataFrame_res_", "embedding": null, "metadata": {"file_path": "seaborn/_stats/aggregation.py", "file_name": "aggregation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 45, "end_line": 77, "span_ids": ["Est._process", "Est"], "tokens": 297}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Est(Stat):\n    \"\"\"\n    Calculate a point estimate and error bar interval.\n\n    Parameters\n    ----------\n    func : str or callable\n        Name of a :class:`numpy.ndarray` method or a vector -> scalar function.\n    errorbar : str, (str, float) tuple, or callable\n        Name of errorbar method (one of \"ci\", \"pi\", \"se\" or \"sd\"), or a tuple\n        with a method name ane a level parameter, or a function that maps from a\n        vector to a (min, max) interval.\n    n_boot : int\n       Number of bootstrap samples to draw for \"ci\" errorbars.\n    seed : int\n        Seed for the PRNG used to draw bootstrap samples.\n\n    \"\"\"\n    func: str | Callable[[Vector], float] = \"mean\"\n    errorbar: str | tuple[str, float] = (\"ci\", 95)\n    n_boot: int = 1000\n    seed: int | None = None\n\n    group_by_orient: ClassVar[bool] = True\n\n    def _process(\n        self, data: DataFrame, var: str, estimator: EstimateAggregator\n    ) -> DataFrame:\n        # Needed because GroupBy.apply assumes func is DataFrame -> DataFrame\n        # which we could probably make more general to allow Series return\n        res = estimator(data, var)\n        return pd.DataFrame([res])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/aggregation.py_Est.__call___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/aggregation.py_Est.__call___", "embedding": null, "metadata": {"file_path": "seaborn/_stats/aggregation.py", "file_name": "aggregation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 79, "end_line": 105, "span_ids": ["Rolling.__call__", "Est.__call__", "Rolling"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Est(Stat):\n\n    def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame:\n\n        boot_kws = {\"n_boot\": self.n_boot, \"seed\": self.seed}\n        engine = EstimateAggregator(self.func, self.errorbar, **boot_kws)\n\n        var = {\"x\": \"y\", \"y\": \"x\"}.get(orient)\n        res = (\n            groupby\n            .apply(data, self._process, var, engine)\n            .dropna(subset=[\"x\", \"y\"])\n            .reset_index(drop=True)\n        )\n\n        res = res.fillna({f\"{var}min\": res[var], f\"{var}max\": res[var]})\n\n        return res\n\n\n@dataclass\nclass Rolling(Stat):\n    ...\n\n    def __call__(self, data, groupby, orient, scales):\n        ...", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/histogram.py_from___future___import_an_Hist._but_it_only_computes_un": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/histogram.py_from___future___import_an_Hist._but_it_only_computes_un", "embedding": null, "metadata": {"file_path": "seaborn/_stats/histogram.py", "file_name": "histogram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 35, "span_ids": ["imports:9", "Hist", "impl", "imports"], "tokens": 255}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from __future__ import annotations\nfrom dataclasses import dataclass\nfrom functools import partial\n\nimport numpy as np\nimport pandas as pd\n\nfrom seaborn._core.groupby import GroupBy\nfrom seaborn._stats.base import Stat\n\nfrom typing import TYPE_CHECKING\nif TYPE_CHECKING:\n    from numpy.typing import ArrayLike\n\n\n@dataclass\nclass Hist(Stat):\n    \"\"\"\n    Bin observations, count them, and optionally normalize or cumulate.\n    \"\"\"\n    stat: str = \"count\"  # TODO how to do validation on this arg?\n\n    bins: str | int | ArrayLike = \"auto\"\n    binwidth: float | None = None\n    binrange: tuple[float, float] | None = None\n    common_norm: bool | list[str] = True\n    common_bins: bool | list[str] = True\n    cumulative: bool = False\n\n    # TODO Require this to be set here or have interface with scale?\n    # Q: would Discrete() scale imply binwidth=1 or bins centered on integers?\n    discrete: bool = False\n\n    # TODO Note that these methods are mostly copied from _statistics.Histogram,\n    # but it only computes univariate histograms. We should reconcile the code.", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/histogram.py_Hist._define_bin_edges_Hist._define_bin_edges.return.bin_edges": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/histogram.py_Hist._define_bin_edges_Hist._define_bin_edges.return.bin_edges", "embedding": null, "metadata": {"file_path": "seaborn/_stats/histogram.py", "file_name": "histogram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 37, "end_line": 56, "span_ids": ["Hist._define_bin_edges"], "tokens": 163}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Hist(Stat):\n\n    def _define_bin_edges(self, vals, weight, bins, binwidth, binrange, discrete):\n        \"\"\"Inner function that takes bin parameters as arguments.\"\"\"\n        vals = vals.dropna()\n\n        if binrange is None:\n            start, stop = vals.min(), vals.max()\n        else:\n            start, stop = binrange\n\n        if discrete:\n            bin_edges = np.arange(start - .5, stop + 1.5)\n        elif binwidth is not None:\n            step = binwidth\n            bin_edges = np.arange(start, stop + step, step)\n        else:\n            bin_edges = np.histogram_bin_edges(vals, bins, binrange, weight)\n\n        # TODO warning or cap on too many bins?\n\n        return bin_edges", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/histogram.py_Hist._define_bin_params_Hist._define_bin_params.return.bin_kws": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/histogram.py_Hist._define_bin_params_Hist._define_bin_params.return.bin_kws", "embedding": null, "metadata": {"file_path": "seaborn/_stats/histogram.py", "file_name": "histogram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 58, "end_line": 78, "span_ids": ["Hist._define_bin_params"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Hist(Stat):\n\n    def _define_bin_params(self, data, orient, scale_type):\n        \"\"\"Given data, return numpy.histogram parameters to define bins.\"\"\"\n        vals = data[orient]\n        weight = data.get(\"weight\", None)\n\n        # TODO We'll want this for ordinal / discrete scales too\n        # (Do we need discrete as a parameter or just infer from scale?)\n        discrete = self.discrete or scale_type == \"nominal\"\n\n        bin_edges = self._define_bin_edges(\n            vals, weight, self.bins, self.binwidth, self.binrange, discrete,\n        )\n\n        if isinstance(self.bins, (str, int)):\n            n_bins = len(bin_edges) - 1\n            bin_range = bin_edges.min(), bin_edges.max()\n            bin_kws = dict(bins=n_bins, range=bin_range)\n        else:\n            bin_kws = dict(bins=bin_edges)\n\n        return bin_kws", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/histogram.py_Hist._get_bins_and_eval_Hist._eval.return.pd_DataFrame_orient_pos": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/histogram.py_Hist._get_bins_and_eval_Hist._eval.return.pd_DataFrame_orient_pos", "embedding": null, "metadata": {"file_path": "seaborn/_stats/histogram.py", "file_name": "histogram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 80, "end_line": 99, "span_ids": ["Hist._eval", "Hist._get_bins_and_eval"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Hist(Stat):\n\n    def _get_bins_and_eval(self, data, orient, groupby, scale_type):\n\n        bin_kws = self._define_bin_params(data, orient, scale_type)\n        return groupby.apply(data, self._eval, orient, bin_kws)\n\n    def _eval(self, data, orient, bin_kws):\n\n        vals = data[orient]\n        weight = data.get(\"weight\", None)\n\n        density = self.stat == \"density\"\n        hist, bin_edges = np.histogram(\n            vals, **bin_kws, weights=weight, density=density,\n        )\n\n        width = np.diff(bin_edges)\n        pos = bin_edges[:-1] + width / 2\n        other = {\"x\": \"y\", \"y\": \"x\"}[orient]\n\n        return pd.DataFrame({orient: pos, other: hist, \"space\": width})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/histogram.py_Hist._normalize_Hist._normalize.return.data_assign_other_his": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/histogram.py_Hist._normalize_Hist._normalize.return.data_assign_other_his", "embedding": null, "metadata": {"file_path": "seaborn/_stats/histogram.py", "file_name": "histogram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 101, "end_line": 119, "span_ids": ["Hist._normalize"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Hist(Stat):\n\n    def _normalize(self, data, orient):\n\n        other = \"y\" if orient == \"x\" else \"x\"\n        hist = data[other]\n\n        if self.stat == \"probability\" or self.stat == \"proportion\":\n            hist = hist.astype(float) / hist.sum()\n        elif self.stat == \"percent\":\n            hist = hist.astype(float) / hist.sum() * 100\n        elif self.stat == \"frequency\":\n            hist = hist.astype(float) / data[\"space\"]\n\n        if self.cumulative:\n            if self.stat in [\"density\", \"frequency\"]:\n                hist = (hist * data[\"space\"]).cumsum()\n            else:\n                hist = hist.cumsum()\n\n        return data.assign(**{other: hist})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/histogram.py_Hist.__call___": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/_stats/histogram.py_Hist.__call___", "embedding": null, "metadata": {"file_path": "seaborn/_stats/histogram.py", "file_name": "histogram.py", "file_type": "text/x-python", "category": "implementation", "start_line": 121, "end_line": 156, "span_ids": ["Hist.__call__"], "tokens": 347}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Hist(Stat):\n\n    def __call__(self, data, groupby, orient, scales):\n\n        # TODO better to do this as an isinstance check?\n        # We are only asking about Nominal scales now,\n        # but presumably would apply to Ordinal too?\n        scale_type = scales[orient].__class__.__name__.lower()\n        grouping_vars = [v for v in data if v in groupby.order]\n        if not grouping_vars or self.common_bins is True:\n            bin_kws = self._define_bin_params(data, orient, scale_type)\n            data = groupby.apply(data, self._eval, orient, bin_kws)\n        else:\n            if self.common_bins is False:\n                bin_groupby = GroupBy(grouping_vars)\n            else:\n                bin_groupby = GroupBy(self.common_bins)\n            data = bin_groupby.apply(\n                data, self._get_bins_and_eval, orient, groupby, scale_type,\n            )\n\n        # TODO Make this an option?\n        # (This needs to be tested if enabled, and maybe should be in _eval)\n        # other = {\"x\": \"y\", \"y\": \"x\"}[orient]\n        # data = data[data[other] > 0]\n\n        if not grouping_vars or self.common_norm is True:\n            data = self._normalize(data, orient)\n        else:\n            if self.common_norm is False:\n                norm_grouper = grouping_vars\n            else:\n                norm_grouper = self.common_norm\n            normalize = partial(self._normalize, orient=orient)\n            data = GroupBy(norm_grouper).apply(data, normalize)\n\n        return data", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py__BaseGrid__BaseGrid.figure.return.self__figure": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py__BaseGrid__BaseGrid.figure.return.self__figure", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 32, "end_line": 54, "span_ids": ["_BaseGrid.figure", "_BaseGrid.fig", "_BaseGrid", "_BaseGrid.set"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _BaseGrid:\n    \"\"\"Base class for grids of subplots.\"\"\"\n\n    def set(self, **kwargs):\n        \"\"\"Set attributes on each subplot Axes.\"\"\"\n        for ax in self.axes.flat:\n            if ax is not None:  # Handle removed axes\n                ax.set(**kwargs)\n        return self\n\n    @property\n    def fig(self):\n        \"\"\"DEPRECATED: prefer the `figure` property.\"\"\"\n        # Grid.figure is preferred because it matches the Axes attribute name.\n        # But as the maintanace burden on having this property is minimal,\n        # let's be slow about formally deprecating it. For now just note its deprecation\n        # in the docstring; add a warning in version 0.13, and eventually remove it.\n        return self._figure\n\n    @property\n    def figure(self):\n        \"\"\"Access the :class:`matplotlib.figure.Figure` object underlying the grid.\"\"\"\n        return self._figure", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py__BaseGrid.apply__BaseGrid.apply.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py__BaseGrid.apply__BaseGrid.apply.return.self", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 56, "end_line": 69, "span_ids": ["_BaseGrid.apply"], "tokens": 115}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _BaseGrid:\n\n    def apply(self, func, *args, **kwargs):\n        \"\"\"\n        Pass the grid to a user-supplied function and return self.\n\n        The `func` must accept an object of this type for its first\n        positional argument. Additional arguments are passed through.\n        The return value of `func` is ignored; this method returns self.\n        See the `pipe` method if you want the return value.\n\n        Added in v0.12.0.\n\n        \"\"\"\n        func(self, *args, **kwargs)\n        return self", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py__BaseGrid.pipe__BaseGrid.savefig.self_figure_savefig_args": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py__BaseGrid.pipe__BaseGrid.savefig.self_figure_savefig_args", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 71, "end_line": 95, "span_ids": ["_BaseGrid.pipe", "_BaseGrid.savefig"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _BaseGrid:\n\n    def pipe(self, func, *args, **kwargs):\n        \"\"\"\n        Pass the grid to a user-supplied function and return its value.\n\n        The `func` must accept an object of this type for its first\n        positional argument. Additional arguments are passed through.\n        The return value of `func` becomes the return value of this method.\n        See the `apply` method if you want to return self instead.\n\n        Added in v0.12.0.\n\n        \"\"\"\n        return func(self, *args, **kwargs)\n\n    def savefig(self, *args, **kwargs):\n        \"\"\"\n        Save an image of the plot.\n\n        This wraps :meth:`matplotlib.figure.Figure.savefig`, using bbox_inches=\"tight\"\n        by default. Parameters are passed through to the matplotlib function.\n\n        \"\"\"\n        kwargs = kwargs.copy()\n        kwargs.setdefault(\"bbox_inches\", \"tight\")\n        self.figure.savefig(*args, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_Grid_Grid.tight_layout.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_Grid_Grid.tight_layout.return.self", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 98, "end_line": 119, "span_ids": ["Grid", "Grid.tight_layout"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Grid(_BaseGrid):\n    \"\"\"A grid that can have multiple subplots and an external legend.\"\"\"\n    _margin_titles = False\n    _legend_out = True\n\n    def __init__(self):\n\n        self._tight_layout_rect = [0, 0, 1, 1]\n        self._tight_layout_pad = None\n\n        # This attribute is set externally and is a hack to handle newer functions that\n        # don't add proxy artists onto the Axes. We need an overall cleaner approach.\n        self._extract_legend_handles = False\n\n    def tight_layout(self, *args, **kwargs):\n        \"\"\"Call fig.tight_layout within rect that exclude the legend.\"\"\"\n        kwargs = kwargs.copy()\n        kwargs.setdefault(\"rect\", self._tight_layout_rect)\n        if self._tight_layout_pad is not None:\n            kwargs.setdefault(\"pad\", self._tight_layout_pad)\n        self._figure.tight_layout(*args, **kwargs)\n        return self", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_Grid._get_palette_Grid._get_palette.return.palette": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_Grid._get_palette_Grid._get_palette.return.palette", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 244, "end_line": 272, "span_ids": ["Grid._get_palette"], "tokens": 225}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Grid(_BaseGrid):\n\n    def _get_palette(self, data, hue, hue_order, palette):\n        \"\"\"Get a list of colors for the hue variable.\"\"\"\n        if hue is None:\n            palette = color_palette(n_colors=1)\n\n        else:\n            hue_names = categorical_order(data[hue], hue_order)\n            n_colors = len(hue_names)\n\n            # By default use either the current color palette or HUSL\n            if palette is None:\n                current_palette = utils.get_color_cycle()\n                if n_colors > len(current_palette):\n                    colors = color_palette(\"husl\", n_colors)\n                else:\n                    colors = color_palette(n_colors=n_colors)\n\n            # Allow for palette to map from hue variable names\n            elif isinstance(palette, dict):\n                color_names = [palette[h] for h in hue_names]\n                colors = color_palette(color_names, n_colors)\n\n            # Otherwise act as if we just got a list of colors\n            else:\n                colors = color_palette(palette, n_colors)\n\n            palette = color_palette(colors, n_colors)\n\n        return palette", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_Grid.legend_Grid.tick_params.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_Grid.legend_Grid.tick_params.return.self", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 274, "end_line": 301, "span_ids": ["Grid.tick_params", "Grid.legend"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Grid(_BaseGrid):\n\n    @property\n    def legend(self):\n        \"\"\"The :class:`matplotlib.legend.Legend` object, if present.\"\"\"\n        try:\n            return self._legend\n        except AttributeError:\n            return None\n\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        for ax in self.figure.axes:\n            ax.tick_params(axis=axis, **kwargs)\n        return self", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid.refline_FacetGrid.refline.return.self": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/axisgrid.py_FacetGrid.refline_FacetGrid.refline.return.self", "embedding": null, "metadata": {"file_path": "seaborn/axisgrid.py", "file_name": "axisgrid.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1030, "end_line": 1062, "span_ids": ["FacetGrid.refline"], "tokens": 275}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FacetGrid(Grid):\n\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 `\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        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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__LVPlotter._lvplot__LVPlotter._lvplot._If_we_only_have_one_dat": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__LVPlotter._lvplot__LVPlotter._lvplot._If_we_only_have_one_dat", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1841, "end_line": 1875, "span_ids": ["_LVPlotter._lvplot"], "tokens": 356}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _LVPlotter(_CategoricalPlotter):\n\n    def _lvplot(self, box_data, positions,\n                color=[255. / 256., 185. / 256., 0.],\n                widths=1, ax=None, box_kws=None,\n                flier_kws=None,\n                line_kws=None):\n\n        # -- Default keyword dicts - based on\n        # distributions.plot_univariate_histogram\n        box_kws = {} if box_kws is None else box_kws.copy()\n        flier_kws = {} if flier_kws is None else flier_kws.copy()\n        line_kws = {} if line_kws is None else line_kws.copy()\n\n        # Set the default kwargs for the boxes\n        box_default_kws = dict(edgecolor=self.gray,\n                               linewidth=self.linewidth)\n        for k, v in box_default_kws.items():\n            box_kws.setdefault(k, v)\n\n        # Set the default kwargs for the lines denoting medians\n        line_default_kws = dict(\n            color=\".15\", alpha=0.45, solid_capstyle=\"butt\", linewidth=self.linewidth\n        )\n        for k, v in line_default_kws.items():\n            line_kws.setdefault(k, v)\n\n        # Set the default kwargs for the outliers scatterplot\n        flier_default_kws = dict(marker='d', color=self.gray)\n        for k, v in flier_default_kws.items():\n            flier_kws.setdefault(k, v)\n\n        vert = self.orient == \"v\"\n        x = positions[0]\n        box_data = np.asarray(box_data)\n\n        # If we only have one data point, plot a line\n        # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__LVPlotter._lvplot.if_len_box_data_1___LVPlotter._lvplot.if_len_box_data_1_.else_.ax_add_collection_collect": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py__LVPlotter._lvplot.if_len_box_data_1___LVPlotter._lvplot.if_len_box_data_1_.else_.ax_add_collection_collect", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1876, "end_line": 1975, "span_ids": ["_LVPlotter._lvplot"], "tokens": 929}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _LVPlotter(_CategoricalPlotter):\n\n    def _lvplot(self, box_data, positions,\n                color=[255. / 256., 185. / 256., 0.],\n                widths=1, ax=None, box_kws=None,\n                flier_kws=None,\n                line_kws=None):\n        # ... other code\n        if len(box_data) == 1:\n            line_kws.update({\n                'color': box_kws['edgecolor'],\n                'linestyle': box_kws.get('linestyle', '-'),\n                'linewidth': max(box_kws[\"linewidth\"], line_kws[\"linewidth\"])\n            })\n            ys = [box_data[0], box_data[0]]\n            xs = [x - widths / 2, x + widths / 2]\n            if vert:\n                xx, yy = xs, ys\n            else:\n                xx, yy = ys, xs\n            ax.plot(xx, yy, **line_kws)\n        else:\n            # Get the number of data points and calculate \"depth\" of\n            # letter-value plot\n            box_ends, k = self._lv_box_ends(box_data)\n\n            # Anonymous functions for calculating the width and height\n            # of the letter value boxes\n            width = self._width_functions(self.scale)\n\n            # Function to find height of boxes\n            def height(b):\n                return b[1] - b[0]\n\n            # Functions to construct the letter value boxes\n            def vert_perc_box(x, b, i, k, w):\n                rect = Patches.Rectangle((x - widths * w / 2, b[0]),\n                                         widths * w,\n                                         height(b), fill=True)\n                return rect\n\n            def horz_perc_box(x, b, i, k, w):\n                rect = Patches.Rectangle((b[0], x - widths * w / 2),\n                                         height(b), widths * w,\n                                         fill=True)\n                return rect\n\n            # Scale the width of the boxes so the biggest starts at 1\n            w_area = np.array([width(height(b), i, k)\n                               for i, b in enumerate(box_ends)])\n            w_area = w_area / np.max(w_area)\n\n            # Calculate the medians\n            y = np.median(box_data)\n\n            # Calculate the outliers and plot (only if showfliers == True)\n            outliers = []\n            if self.showfliers:\n                outliers = self._lv_outliers(box_data, k)\n            hex_color = mpl.colors.rgb2hex(color)\n\n            if vert:\n                box_func = vert_perc_box\n                xs_median = [x - widths / 2, x + widths / 2]\n                ys_median = [y, y]\n                xs_outliers = np.full(len(outliers), x)\n                ys_outliers = outliers\n\n            else:\n                box_func = horz_perc_box\n                xs_median = [y, y]\n                ys_median = [x - widths / 2, x + widths / 2]\n                xs_outliers = outliers\n                ys_outliers = np.full(len(outliers), x)\n\n            # Plot the medians\n            ax.plot(\n                xs_median,\n                ys_median,\n                **line_kws\n            )\n\n            # Plot outliers (if any)\n            if len(outliers) > 0:\n                ax.scatter(xs_outliers, ys_outliers,\n                           **flier_kws\n                           )\n\n            # Construct a color map from the input color\n            rgb = [hex_color, (1, 1, 1)]\n            cmap = mpl.colors.LinearSegmentedColormap.from_list('new_map', rgb)\n            # Make sure that the last boxes contain hue and are not pure white\n            rgb = [hex_color, cmap(.85)]\n            cmap = mpl.colors.LinearSegmentedColormap.from_list('new_map', rgb)\n\n            # Update box_kws with `cmap` if not defined in dict until now\n            box_kws.setdefault('cmap', cmap)\n\n            boxes = [box_func(x, b[0], i, k, b[1])\n                     for i, b in enumerate(zip(box_ends, w_area))]\n\n            collection = PatchCollection(boxes, **box_kws)\n\n            # Set the color gradation, first box will have color=hex_color\n            collection.set_array(np.array(np.linspace(1, 0, len(boxes))))\n\n            # Plot the boxes\n            ax.add_collection(collection)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_violinplot.__doc___violinplot.__doc__.dedent_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_violinplot.__doc___violinplot.__doc__.dedent_", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2316, "end_line": 2395, "span_ids": ["impl:14"], "tokens": 737}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "violinplot.__doc__ = dedent(\"\"\"\\\n    Draw a combination of boxplot and kernel density estimate.\n\n    A violin plot plays a similar role as a box and whisker plot. It shows the\n    distribution of quantitative data across several levels of one (or more)\n    categorical variables such that those distributions can be compared. Unlike\n    a box plot, in which all of the plot components correspond to actual\n    datapoints, the violin plot features a kernel density estimation of the\n    underlying distribution.\n\n    This can be an effective and attractive way to show multiple distributions\n    of data at once, but keep in mind that the estimation procedure is\n    influenced by the sample size, and violins for relatively small samples\n    might look misleadingly smooth.\n\n    {categorical_narrative}\n\n    Parameters\n    ----------\n    {categorical_data}\n    {input_params}\n    {order_vars}\n    bw : {{'scott', 'silverman', float}}, optional\n        Either the name of a reference rule or the scale factor to use when\n        computing the kernel bandwidth. The actual kernel size will be\n        determined by multiplying the scale factor by the standard deviation of\n        the data within each bin.\n    cut : float, optional\n        Distance, in units of bandwidth size, to extend the density past the\n        extreme datapoints. Set to 0 to limit the violin range within the range\n        of the observed data (i.e., to have the same effect as ``trim=True`` in\n        ``ggplot``.\n    scale : {{\"area\", \"count\", \"width\"}}, optional\n        The method used to scale the width of each violin. If ``area``, each\n        violin will have the same area. If ``count``, the width of the violins\n        will be scaled by the number of observations in that bin. If ``width``,\n        each violin will have the same width.\n    scale_hue : bool, optional\n        When nesting violins using a ``hue`` variable, this parameter\n        determines whether the scaling is computed within each level of the\n        major grouping variable (``scale_hue=True``) or across all the violins\n        on the plot (``scale_hue=False``).\n    gridsize : int, optional\n        Number of points in the discrete grid used to compute the kernel\n        density estimate.\n    {width}\n    inner : {{\"box\", \"quartile\", \"point\", \"stick\", None}}, optional\n        Representation of the datapoints in the violin interior. If ``box``,\n        draw a miniature boxplot. If ``quartiles``, draw the quartiles of the\n        distribution.  If ``point`` or ``stick``, show each underlying\n        datapoint. Using ``None`` will draw unadorned violins.\n    split : bool, optional\n        When using hue nesting with a variable that takes two levels, setting\n        ``split`` to True will draw half of a violin for each level. This can\n        make it easier to directly compare the distributions.\n    {dodge}\n    {orient}\n    {linewidth}\n    {color}\n    {palette}\n    {saturation}\n    {ax_in}\n\n    Returns\n    -------\n    {ax_out}\n\n    See Also\n    --------\n    {boxplot}\n    {stripplot}\n    {swarmplot}\n    {catplot}\n\n    Examples\n    --------\n\n    .. include:: ../docstrings/violinplot.rst\n\n    \"\"\").format(**_categorical_docs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_boxenplot_boxenplot.return.ax": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/categorical.py_boxenplot_boxenplot.return.ax", "embedding": null, "metadata": {"file_path": "seaborn/categorical.py", "file_name": "categorical.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2398, "end_line": 2415, "span_ids": ["boxenplot"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def boxenplot(\n    data=None, *, x=None, y=None, hue=None, order=None, hue_order=None,\n    orient=None, color=None, palette=None, saturation=.75,\n    width=.8, dodge=True, k_depth='tukey', linewidth=None,\n    scale='exponential', outlier_prop=0.007, trust_alpha=0.05,\n    showfliers=True,\n    ax=None, box_kws=None, flier_kws=None, line_kws=None,\n):\n    plotter = _LVPlotter(x, y, hue, data, order, hue_order,\n                         orient, color, palette, saturation,\n                         width, dodge, k_depth, linewidth, scale,\n                         outlier_prop, trust_alpha, showfliers)\n\n    if ax is None:\n        ax = plt.gca()\n\n    plotter.plot(ax, box_kws, flier_kws, line_kws)\n    return ax", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/cm.py__lut_dict_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/cm.py__lut_dict_", "embedding": null, "metadata": {"file_path": "seaborn/cm.py", "file_name": "cm.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1565, "end_line": 1587, "span_ids": ["impl:13"], "tokens": 163}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "_lut_dict = dict(\n    rocket=_rocket_lut,\n    mako=_mako_lut,\n    icefire=_icefire_lut,\n    vlag=_vlag_lut,\n    flare=_flare_lut,\n    crest=_crest_lut,\n\n)\n\nfor _name, _lut in _lut_dict.items():\n\n    _cmap = colors.ListedColormap(_lut, _name)\n    locals()[_name] = _cmap\n\n    _cmap_r = colors.ListedColormap(_lut[::-1], _name + \"_r\")\n    locals()[_name + \"_r\"] = _cmap_r\n\n    register_colormap(_name, _cmap)\n    register_colormap(_name + \"_r\", _cmap_r)\n\ndel colors, register_colormap", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/appdirs.py__get_win_folder_with_jna_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/external/appdirs.py__get_win_folder_with_jna_", "embedding": null, "metadata": {"file_path": "seaborn/external/appdirs.py", "file_name": "appdirs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 206, "end_line": 246, "span_ids": ["_get_win_folder_with_jna", "impl:22"], "tokens": 348}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _get_win_folder_with_jna(csidl_name):\n    import array\n    from com.sun import jna\n    from com.sun.jna.platform import win32\n\n    buf_size = win32.WinDef.MAX_PATH * 2\n    buf = array.zeros('c', buf_size)\n    shell = win32.Shell32.INSTANCE\n    shell.SHGetFolderPath(None, getattr(win32.ShlObj, csidl_name), None, win32.ShlObj.SHGFP_TYPE_CURRENT, buf)\n    dir = jna.Native.toString(buf.tostring()).rstrip(\"\\0\")\n\n    # Downgrade to short path name if have highbit chars. See\n    # .\n    has_high_char = False\n    for c in dir:\n        if ord(c) > 255:\n            has_high_char = True\n            break\n    if has_high_char:\n        buf = array.zeros('c', buf_size)\n        kernel = win32.Kernel32.INSTANCE\n        if kernel.GetShortPathName(dir, buf, buf_size):\n            dir = jna.Native.toString(buf.tostring()).rstrip(\"\\0\")\n\n    return dir\n\nif system == \"win32\":\n    try:\n        import win32com.shell\n        _get_win_folder = _get_win_folder_with_pywin32\n    except ImportError:\n        try:\n            from ctypes import windll\n            _get_win_folder = _get_win_folder_with_ctypes\n        except ImportError:\n            try:\n                import com.sun.jna\n                _get_win_folder = _get_win_folder_with_jna\n            except ImportError:\n                _get_win_folder = _get_win_folder_from_registry", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py_set_axes_style._": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/rcmod.py_set_axes_style._", "embedding": null, "metadata": {"file_path": "seaborn/rcmod.py", "file_name": "rcmod.py", "file_type": "text/x-python", "category": "implementation", "start_line": 126, "end_line": 175, "span_ids": ["axes_style", "reset_defaults", "set", "reset_orig"], "tokens": 340}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def set(*args, **kwargs):\n    \"\"\"\n    Alias for :func:`set_theme`, which is the preferred interface.\n\n    This function may be removed in the future.\n    \"\"\"\n    set_theme(*args, **kwargs)\n\n\ndef reset_defaults():\n    \"\"\"Restore all RC params to default settings.\"\"\"\n    mpl.rcParams.update(mpl.rcParamsDefault)\n\n\ndef reset_orig():\n    \"\"\"Restore all RC params to original settings (respects custom rc).\"\"\"\n    from . import _orig_rc_params\n    mpl.rcParams.update(_orig_rc_params)\n\n\ndef axes_style(style=None, rc=None):\n    \"\"\"\n    Get 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    This function can also be used as a context manager to temporarily\n    alter the global defaults. See :func:`set_theme` or :func:`set_style`\n    to modify the global defaults for all plots.\n\n    Parameters\n    ----------\n    style : None, 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/axes_style.rst\n\n    \"\"\"\n    # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__regression_docs_update___lmplot.return.facets": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/regression.py__regression_docs_update___lmplot.return.facets", "embedding": null, "metadata": {"file_path": "seaborn/regression.py", "file_name": "regression.py", "file_type": "text/x-python", "category": "implementation", "start_line": 557, "end_line": 641, "span_ids": ["lmplot", "impl:13"], "tokens": 852}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "_regression_docs.update(_facet_docs)\n\n\ndef lmplot(\n    data=None, *,\n    x=None, y=None, hue=None, col=None, row=None,\n    palette=None, col_wrap=None, height=5, aspect=1, markers=\"o\",\n    sharex=None, sharey=None, hue_order=None, col_order=None, row_order=None,\n    legend=True, legend_out=None, x_estimator=None, x_bins=None,\n    x_ci=\"ci\", scatter=True, fit_reg=True, ci=95, n_boot=1000,\n    units=None, seed=None, order=1, logistic=False, lowess=False,\n    robust=False, logx=False, x_partial=None, y_partial=None,\n    truncate=True, x_jitter=None, y_jitter=None, scatter_kws=None,\n    line_kws=None, facet_kws=None,\n):\n\n    if facet_kws is None:\n        facet_kws = {}\n\n    def facet_kw_deprecation(key, val):\n        msg = (\n            f\"{key} is deprecated from the `lmplot` function signature. \"\n            \"Please update your code to pass it using `facet_kws`.\"\n        )\n        if val is not None:\n            warnings.warn(msg, UserWarning)\n            facet_kws[key] = val\n\n    facet_kw_deprecation(\"sharex\", sharex)\n    facet_kw_deprecation(\"sharey\", sharey)\n    facet_kw_deprecation(\"legend_out\", legend_out)\n\n    if data is None:\n        raise TypeError(\"Missing required keyword argument `data`.\")\n\n    # Reduce the dataframe to only needed columns\n    need_cols = [x, y, hue, col, row, units, x_partial, y_partial]\n    cols = np.unique([a for a in need_cols if a is not None]).tolist()\n    data = data[cols]\n\n    # Initialize the grid\n    facets = FacetGrid(\n        data, row=row, col=col, hue=hue,\n        palette=palette,\n        row_order=row_order, col_order=col_order, hue_order=hue_order,\n        height=height, aspect=aspect, col_wrap=col_wrap,\n        **facet_kws,\n    )\n\n    # Add the markers here as FacetGrid has figured out how many levels of the\n    # hue variable are needed and we don't want to duplicate that process\n    if facets.hue_names is None:\n        n_markers = 1\n    else:\n        n_markers = len(facets.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 markers \"\n                         \"for each level of the hue variable\")\n    facets.hue_kws = {\"marker\": markers}\n\n    def update_datalim(data, x, y, ax, **kws):\n        xys = data[[x, y]].to_numpy().astype(float)\n        ax.update_datalim(xys, updatey=False)\n        ax.autoscale_view(scaley=False)\n\n    facets.map_dataframe(update_datalim, x=x, y=y)\n\n    # Draw the regression plot on each facet\n    regplot_kws = dict(\n        x_estimator=x_estimator, x_bins=x_bins, x_ci=x_ci,\n        scatter=scatter, fit_reg=fit_reg, ci=ci, n_boot=n_boot, units=units,\n        seed=seed, order=order, logistic=logistic, lowess=lowess,\n        robust=robust, logx=logx, x_partial=x_partial, y_partial=y_partial,\n        truncate=truncate, x_jitter=x_jitter, y_jitter=y_jitter,\n        scatter_kws=scatter_kws, line_kws=line_kws,\n    )\n    facets.map_dataframe(regplot, x=x, y=y, **regplot_kws)\n    facets.set_axis_labels(x, y)\n\n    # Add a legend\n    if legend and (hue is not None) and (hue not in [col, row]):\n        facets.add_legend()\n    return facets", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_load_dataset_load_dataset._Set_some_columns_as_a_c": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_load_dataset_load_dataset._Set_some_columns_as_a_c", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 533, "end_line": 593, "span_ids": ["load_dataset"], "tokens": 529}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def 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    # 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\"https://raw.githubusercontent.com/mwaskom/seaborn-data/master/{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    # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_load_dataset.if_name_tips__load_dataset.return.df": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py_load_dataset.if_name_tips__load_dataset.return.df", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 595, "end_line": 638, "span_ids": ["load_dataset"], "tokens": 508}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def load_dataset(name, cache=True, data_home=None, **kws):\n    # ... other code\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", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__deprecate_ci__deprecate_ci.return.errorbar": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__deprecate_ci__deprecate_ci.return.errorbar", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 826, "end_line": 848, "span_ids": ["_deprecate_ci"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _deprecate_ci(errorbar, ci):\n    \"\"\"\n    Warn on usage of ci= and convert to appropriate errorbar= arg.\n\n    ci was deprecated when errorbar was added in 0.12. It should not be removed\n    completely for some time, but it can be moved out of function definitions\n    (and extracted from kwargs) after one cycle.\n\n    \"\"\"\n    if ci != \"deprecated\":\n        if ci is None:\n            errorbar = None\n        elif ci == \"sd\":\n            errorbar = \"sd\"\n        else:\n            errorbar = (\"ci\", ci)\n        msg = (\n            \"\\n\\nThe `ci` parameter is deprecated. \"\n            f\"Use `errorbar={repr(errorbar)}` for the same effect.\\n\"\n        )\n        warnings.warn(msg, FutureWarning, stacklevel=3)\n\n    return errorbar", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__disable_autolayout_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/seaborn/utils.py__disable_autolayout_", "embedding": null, "metadata": {"file_path": "seaborn/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 851, "end_line": 868, "span_ids": ["_disable_autolayout"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@contextmanager\ndef _disable_autolayout():\n    \"\"\"Context manager for preventing rc-controlled auto-layout behavior.\"\"\"\n    # This is a workaround for an issue in matplotlib, for details see\n    # https://github.com/mwaskom/seaborn/issues/2914\n    # The only affect of this rcParam is to set the default value for\n    # layout= in plt.figure, so we could just do that instead.\n    # But then we would need to own the complexity of the transition\n    # from tight_layout=True -> layout=\"tight\". This seems easier,\n    # but can be removed when (if) that is simpler on the matplotlib side,\n    # or if the layout algorithms are improved to handle figure legends.\n    orig_val = mpl.rcParams[\"figure.autolayout\"]\n    try:\n        mpl.rcParams[\"figure.autolayout\"] = False\n        yield\n    finally:\n        mpl.rcParams[\"figure.autolayout\"] = orig_val", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_io_assert_gridspec_shape.if_Version_mpl___version_.else_.assert_gs_ncols_ncols": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_io_assert_gridspec_shape.if_Version_mpl___version_.else_.assert_gs_ncols_ncols", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 42, "span_ids": ["assert_gridspec_shape", "impl", "imports"], "tokens": 279}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import io\nimport xml\nimport functools\nimport itertools\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nfrom PIL import Image\n\nimport pytest\nfrom pandas.testing import assert_frame_equal, assert_series_equal\nfrom numpy.testing import assert_array_equal\n\nfrom seaborn._core.plot import Plot, Default\nfrom seaborn._core.scales import Nominal, Continuous\nfrom seaborn._core.rules import categorical_order\nfrom seaborn._core.moves import Move, Shift, Dodge\nfrom seaborn._stats.aggregation import Agg\nfrom seaborn._marks.base import Mark\nfrom seaborn._stats.base import Stat\nfrom seaborn.external.version import Version\n\nassert_vector_equal = functools.partial(\n    # TODO do we care about int/float dtype consistency?\n    # Eventually most variables become floats ... but does it matter when?\n    # (Or rather, does it matter if it happens too early?)\n    assert_series_equal, check_names=False, check_dtype=False,\n)\n\n\ndef assert_gridspec_shape(ax, nrows=1, ncols=1):\n\n    gs = ax.get_gridspec()\n    if Version(mpl.__version__) < Version(\"3.2\"):\n        assert gs._nrows == nrows\n        assert gs._ncols == ncols\n    else:\n        assert gs.nrows == nrows\n        assert gs.ncols == ncols", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLayerAddition.test_variable_list_TestLayerAddition.test_variable_list.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLayerAddition.test_variable_list_TestLayerAddition.test_variable_list.None_5", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 284, "end_line": 306, "span_ids": ["TestLayerAddition.test_variable_list"], "tokens": 246}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLayerAddition:\n\n    def test_variable_list(self, long_df):\n\n        p = Plot(long_df, x=\"x\", y=\"y\")\n        assert p._variables == [\"x\", \"y\"]\n\n        p = Plot(long_df).add(MockMark(), x=\"x\", y=\"y\")\n        assert p._variables == [\"x\", \"y\"]\n\n        p = Plot(long_df, y=\"x\", color=\"a\").add(MockMark(), x=\"y\")\n        assert p._variables == [\"y\", \"color\", \"x\"]\n\n        p = Plot(long_df, x=\"x\", y=\"y\", color=\"a\").add(MockMark(), color=None)\n        assert p._variables == [\"x\", \"y\", \"color\"]\n\n        p = (\n            Plot(long_df, x=\"x\", y=\"y\")\n            .add(MockMark(), color=\"a\")\n            .add(MockMark(), alpha=\"s\")\n        )\n        assert p._variables == [\"x\", \"y\", \"color\", \"alpha\"]\n\n        p = Plot(long_df, y=\"x\").pair(x=[\"a\", \"b\"])\n        assert p._variables == [\"y\", \"x0\", \"x1\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLayerAddition.test_type_checks_TestLayerAddition.test_type_checks.None_3.p_add_MockMark_MockMar": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestLayerAddition.test_type_checks_TestLayerAddition.test_type_checks.None_3.p_add_MockMark_MockMar", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 308, "end_line": 329, "span_ids": ["TestLayerAddition.test_type_checks.MockStat:2", "TestLayerAddition.test_type_checks.MockMove:2", "TestLayerAddition.test_type_checks.MockMove", "TestLayerAddition.test_type_checks.MockStat", "TestLayerAddition.test_type_checks"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLayerAddition:\n\n    def test_type_checks(self):\n\n        p = Plot()\n        with pytest.raises(TypeError, match=\"mark must be a Mark instance\"):\n            p.add(MockMark)\n\n        class MockStat(Stat):\n            pass\n\n        class MockMove(Move):\n            pass\n\n        err = \"Transforms must have at most one Stat type\"\n\n        with pytest.raises(TypeError, match=err):\n            p.add(MockMark(), MockStat)\n\n        with pytest.raises(TypeError, match=err):\n            p.add(MockMark(), MockMove(), MockStat())\n\n        with pytest.raises(TypeError, match=err):\n            p.add(MockMark(), MockMark(), MockStat())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_computed_var_ticks_TestScaling.test_computed_var_ticks.assert_array_equal_ax_get": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_computed_var_ticks_TestScaling.test_computed_var_ticks.assert_array_equal_ax_get", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 456, "end_line": 467, "span_ids": ["TestScaling.test_computed_var_ticks", "TestScaling.test_computed_var_ticks.Identity.__call__", "TestScaling.test_computed_var_ticks.Identity"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScaling:\n\n    def test_computed_var_ticks(self, long_df):\n\n        class Identity(Stat):\n            def __call__(self, df, groupby, orient, scales):\n                other = {\"x\": \"y\", \"y\": \"x\"}[orient]\n                return df.assign(**{other: df[orient]})\n\n        tick_locs = [1, 2, 5]\n        scale = Continuous().tick(at=tick_locs)\n        p = Plot(long_df, \"x\").add(MockMark(), Identity()).scale(y=scale).plot()\n        ax = p._figure.axes[0]\n        assert_array_equal(ax.get_yticks(), tick_locs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_computed_var_transform_TestScaling.test_computed_var_transform.assert_array_equal_xfm_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_computed_var_transform_TestScaling.test_computed_var_transform.assert_array_equal_xfm_1", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 469, "end_line": 479, "span_ids": ["TestScaling.test_computed_var_transform", "TestScaling.test_computed_var_transform.Identity.__call__", "TestScaling.test_computed_var_transform.Identity"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScaling:\n\n    def test_computed_var_transform(self, long_df):\n\n        class Identity(Stat):\n            def __call__(self, df, groupby, orient, scales):\n                other = {\"x\": \"y\", \"y\": \"x\"}[orient]\n                return df.assign(**{other: df[orient]})\n\n        p = Plot(long_df, \"x\").add(MockMark(), Identity()).scale(y=\"log\").plot()\n        ax = p._figure.axes[0]\n        xfm = ax.yaxis.get_transform().transform\n        assert_array_equal(xfm([1, 10, 100]), [0, 1, 2])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_explicit_range_with_axis_scaling_TestScaling.test_derived_range_with_axis_scaling.assert_vector_equal_m_pas": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestScaling.test_explicit_range_with_axis_scaling_TestScaling.test_derived_range_with_axis_scaling.assert_vector_equal_m_pas", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 481, "end_line": 500, "span_ids": ["TestScaling.test_derived_range_with_axis_scaling", "TestScaling.test_explicit_range_with_axis_scaling", "TestScaling.test_derived_range_with_axis_scaling.AddOne.__call__", "TestScaling.test_derived_range_with_axis_scaling.AddOne"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScaling:\n\n    def test_explicit_range_with_axis_scaling(self):\n\n        x = [1, 2, 3]\n        ymin = [10, 100, 1000]\n        ymax = [20, 200, 2000]\n        m = MockMark()\n        Plot(x=x, ymin=ymin, ymax=ymax).add(m).scale(y=\"log\").plot()\n        assert_vector_equal(m.passed_data[0][\"ymax\"], pd.Series(ymax, dtype=float))\n\n    def test_derived_range_with_axis_scaling(self):\n\n        class AddOne(Stat):\n            def __call__(self, df, *args):\n                return df.assign(ymax=df[\"y\"] + 1)\n\n        x = y = [1, 10, 100]\n\n        m = MockMark()\n        Plot(x, y).add(m, AddOne()).scale(y=\"log\").plot()\n        assert_vector_equal(m.passed_data[0][\"ymax\"], pd.Series([10., 100., 1000.]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_theme_default_TestPlotting.test_stat_and_move.assert_vector_equal_m_pas": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_theme_default_TestPlotting.test_stat_and_move.assert_vector_equal_m_pas", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 876, "end_line": 922, "span_ids": ["TestPlotting.test_theme_error", "TestPlotting.test_theme_default", "TestPlotting.test_theme_params", "TestPlotting.test_move", "TestPlotting.test_stat", "TestPlotting.test_stat_and_move"], "tokens": 420}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    def test_theme_default(self):\n\n        p = Plot().plot()\n        assert mpl.colors.same_color(p._figure.axes[0].get_facecolor(), \"#EAEAF2\")\n\n    def test_theme_params(self):\n\n        color = \"r\"\n        p = Plot().theme({\"axes.facecolor\": color}).plot()\n        assert mpl.colors.same_color(p._figure.axes[0].get_facecolor(), color)\n\n    def test_theme_error(self):\n\n        p = Plot()\n        with pytest.raises(TypeError, match=r\"theme\\(\\) takes 1 positional\"):\n            p.theme(\"arg1\", \"arg2\")\n\n    def test_stat(self, long_df):\n\n        orig_df = long_df.copy(deep=True)\n\n        m = MockMark()\n        Plot(long_df, x=\"a\", y=\"z\").add(m, Agg()).plot()\n\n        expected = long_df.groupby(\"a\", sort=False)[\"z\"].mean().reset_index(drop=True)\n        assert_vector_equal(m.passed_data[0][\"y\"], expected)\n\n        assert_frame_equal(long_df, orig_df)   # Test data was not mutated\n\n    def test_move(self, long_df):\n\n        orig_df = long_df.copy(deep=True)\n\n        m = MockMark()\n        Plot(long_df, x=\"z\", y=\"z\").add(m, Shift(x=1)).plot()\n        assert_vector_equal(m.passed_data[0][\"x\"], long_df[\"z\"] + 1)\n        assert_vector_equal(m.passed_data[0][\"y\"], long_df[\"z\"])\n\n        assert_frame_equal(long_df, orig_df)   # Test data was not mutated\n\n    def test_stat_and_move(self, long_df):\n\n        m = MockMark()\n        Plot(long_df, x=\"a\", y=\"z\").add(m, Agg(), Shift(y=1)).plot()\n\n        expected = long_df.groupby(\"a\", sort=False)[\"z\"].mean().reset_index(drop=True)\n        assert_vector_equal(m.passed_data[0][\"y\"], expected + 1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_stat_log_scale_TestPlotting.test_stat_log_scale._Test_data_was_not_mutat": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_stat_log_scale_TestPlotting.test_stat_log_scale._Test_data_was_not_mutat", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 924, "end_line": 936, "span_ids": ["TestPlotting.test_stat_log_scale"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    def test_stat_log_scale(self, long_df):\n\n        orig_df = long_df.copy(deep=True)\n\n        m = MockMark()\n        Plot(long_df, x=\"a\", y=\"z\").add(m, Agg()).scale(y=\"log\").plot()\n\n        x = long_df[\"a\"]\n        y = np.log10(long_df[\"z\"])\n        expected = y.groupby(x, sort=False).mean().reset_index(drop=True)\n        assert_vector_equal(m.passed_data[0][\"y\"], 10 ** expected)\n\n        assert_frame_equal(long_df, orig_df)   # Test data was not mutated", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_move_log_scale_TestPlotting.test_multi_move_with_pairing.for_frame_in_m_passed_dat.assert_vector_equal_frame": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_move_log_scale_TestPlotting.test_multi_move_with_pairing.for_frame_in_m_passed_dat.assert_vector_equal_frame", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 938, "end_line": 958, "span_ids": ["TestPlotting.test_multi_move", "TestPlotting.test_multi_move_with_pairing", "TestPlotting.test_move_log_scale"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    def test_move_log_scale(self, long_df):\n\n        m = MockMark()\n        Plot(\n            long_df, x=\"z\", y=\"z\"\n        ).scale(x=\"log\").add(m, Shift(x=-1)).plot()\n        assert_vector_equal(m.passed_data[0][\"x\"], long_df[\"z\"] / 10)\n\n    def test_multi_move(self, long_df):\n\n        m = MockMark()\n        move_stack = [Shift(1), Shift(2)]\n        Plot(long_df, x=\"x\", y=\"y\").add(m, *move_stack).plot()\n        assert_vector_equal(m.passed_data[0][\"x\"], long_df[\"x\"] + 3)\n\n    def test_multi_move_with_pairing(self, long_df):\n        m = MockMark()\n        move_stack = [Shift(1), Shift(2)]\n        Plot(long_df, x=\"x\").pair(y=[\"y\", \"z\"]).add(m, *move_stack).plot()\n        for frame in m.passed_data:\n            assert_vector_equal(frame[\"x\"], long_df[\"x\"] + 3)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_move_with_range_TestPlotting.test_move_with_range.for_i_df_in_m_passed_dat.assert_array_equal_df_x_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_move_with_range_TestPlotting.test_move_with_range.for_i_df_in_m_passed_dat.assert_array_equal_df_x_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 960, "end_line": 972, "span_ids": ["TestPlotting.test_move_with_range"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    def test_move_with_range(self, long_df):\n\n        x = [0, 0, 1, 1, 2, 2]\n        group = [0, 1, 0, 1, 0, 1]\n        ymin = np.arange(6)\n        ymax = np.arange(6) * 2\n\n        m = MockMark()\n        Plot(x=x, group=group, ymin=ymin, ymax=ymax).add(m, Dodge()).plot()\n\n        signs = [-1, +1]\n        for i, df in m.passed_data[0].groupby(\"group\"):\n            assert_array_equal(df[\"x\"], np.arange(3) + signs[i] * 0.2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_methods_clone_TestPlotting.test_on_figure.assert_p__figure_is_f": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_methods_clone_TestPlotting.test_on_figure.assert_p__figure_is_f", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 974, "end_line": 1067, "span_ids": ["TestPlotting.test_layout_size", "TestPlotting.test_save", "TestPlotting.test_on_axes", "TestPlotting.test_methods_clone", "TestPlotting.test_png_repr", "TestPlotting.test_default_is_no_pyplot", "TestPlotting.test_on_figure", "TestPlotting.test_show", "TestPlotting.test_with_pyplot"], "tokens": 618}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    def test_methods_clone(self, long_df):\n\n        p1 = Plot(long_df, \"x\", \"y\")\n        p2 = p1.add(MockMark()).facet(\"a\")\n\n        assert p1 is not p2\n        assert not p1._layers\n        assert not p1._facet_spec\n\n    def test_default_is_no_pyplot(self):\n\n        p = Plot().plot()\n\n        assert not plt.get_fignums()\n        assert isinstance(p._figure, mpl.figure.Figure)\n\n    def test_with_pyplot(self):\n\n        p = Plot().plot(pyplot=True)\n\n        assert len(plt.get_fignums()) == 1\n        fig = plt.gcf()\n        assert p._figure is fig\n\n    def test_show(self):\n\n        p = Plot()\n\n        with warnings.catch_warnings(record=True) as msg:\n            out = p.show(block=False)\n        assert out is None\n        assert not hasattr(p, \"_figure\")\n\n        assert len(plt.get_fignums()) == 1\n        fig = plt.gcf()\n\n        gui_backend = (\n            # From https://github.com/matplotlib/matplotlib/issues/20281\n            fig.canvas.manager.show != mpl.backend_bases.FigureManagerBase.show\n        )\n        if not gui_backend:\n            assert msg\n\n    def test_png_repr(self):\n\n        p = Plot()\n        data, metadata = p._repr_png_()\n        img = Image.open(io.BytesIO(data))\n\n        assert not hasattr(p, \"_figure\")\n        assert isinstance(data, bytes)\n        assert img.format == \"PNG\"\n        assert sorted(metadata) == [\"height\", \"width\"]\n        # TODO test retina scaling\n\n    def test_save(self):\n\n        buf = io.BytesIO()\n\n        p = Plot().save(buf)\n        assert isinstance(p, Plot)\n        img = Image.open(buf)\n        assert img.format == \"PNG\"\n\n        buf = io.StringIO()\n        Plot().save(buf, format=\"svg\")\n        tag = xml.etree.ElementTree.fromstring(buf.getvalue()).tag\n        assert tag == \"{http://www.w3.org/2000/svg}svg\"\n\n    def test_layout_size(self):\n\n        size = (4, 2)\n        p = Plot().layout(size=size).plot()\n        assert tuple(p._figure.get_size_inches()) == size\n\n    def test_on_axes(self):\n\n        ax = mpl.figure.Figure().subplots()\n        m = MockMark()\n        p = Plot().on(ax).add(m).plot()\n        assert m.passed_axes == [ax]\n        assert p._figure is ax.figure\n\n    @pytest.mark.parametrize(\"facet\", [True, False])\n    def test_on_figure(self, facet):\n\n        f = mpl.figure.Figure()\n        m = MockMark()\n        p = Plot().on(f).add(m)\n        if facet:\n            p = p.facet([\"a\", \"b\"])\n        p = p.plot()\n        assert m.passed_axes == f.axes\n        assert p._figure is f", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_on_subfigure_TestPlotting.test_on_subfigure.assert_p__figure_is_sf2_f": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_on_subfigure_TestPlotting.test_on_subfigure.assert_p__figure_is_sf2_f", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1069, "end_line": 1084, "span_ids": ["TestPlotting.test_on_subfigure"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    @pytest.mark.skipif(\n        Version(mpl.__version__) < Version(\"3.4\"),\n        reason=\"mpl<3.4 does not have SubFigure\",\n    )\n    @pytest.mark.parametrize(\"facet\", [True, False])\n    def test_on_subfigure(self, facet):\n\n        sf1, sf2 = mpl.figure.Figure().subfigures(2)\n        sf1.subplots()\n        m = MockMark()\n        p = Plot().on(sf2).add(m)\n        if facet:\n            p = p.facet([\"a\", \"b\"])\n        p = p.plot()\n        assert m.passed_axes == sf2.figure.axes[1:]\n        assert p._figure is sf2.figure", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_limits_TestPlotting.test_limits.assert_ax_get_xlim_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_limits_TestPlotting.test_limits.assert_ax_get_xlim_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1145, "end_line": 1160, "span_ids": ["TestPlotting.test_limits"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    def test_limits(self, long_df):\n\n        limit = (-2, 24)\n        p = Plot(long_df, x=\"x\", y=\"y\").limit(x=limit).plot()\n        ax = p._figure.axes[0]\n        assert ax.get_xlim() == limit\n\n        limit = (np.datetime64(\"2005-01-01\"), np.datetime64(\"2008-01-01\"))\n        p = Plot(long_df, x=\"d\", y=\"y\").limit(x=limit).plot()\n        ax = p._figure.axes[0]\n        assert ax.get_xlim() == tuple(mpl.dates.date2num(limit))\n\n        limit = (\"b\", \"c\")\n        p = Plot(x=[\"a\", \"b\", \"c\", \"d\"], y=[1, 2, 3, 4]).limit(x=limit).plot()\n        ax = p._figure.axes[0]\n        assert ax.get_xlim() == (0.5, 2.5)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_labels_axis_TestPlotting.test_labels_legend.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_labels_axis_TestPlotting.test_labels_legend.None_1", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1162, "end_line": 1184, "span_ids": ["TestPlotting.test_labels_axis", "TestPlotting.test_labels_legend"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    def test_labels_axis(self, long_df):\n\n        label = \"Y axis\"\n        p = Plot(long_df, x=\"x\", y=\"y\").label(y=label).plot()\n        ax = p._figure.axes[0]\n        assert ax.get_ylabel() == label\n\n        label = str.capitalize\n        p = Plot(long_df, x=\"x\", y=\"y\").label(y=label).plot()\n        ax = p._figure.axes[0]\n        assert ax.get_ylabel() == \"Y\"\n\n    def test_labels_legend(self, long_df):\n\n        m = MockMark()\n\n        label = \"A\"\n        p = Plot(long_df, x=\"x\", y=\"y\", color=\"a\").add(m).label(color=label).plot()\n        assert p._figure.legends[0].get_title().get_text() == label\n\n        func = str.capitalize\n        p = Plot(long_df, x=\"x\", y=\"y\", color=\"a\").add(m).label(color=func).plot()\n        assert p._figure.legends[0].get_title().get_text() == label", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_labels_facets_TestPlotting.test_title_single.assert_p__figure_axes_0_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_labels_facets_TestPlotting.test_title_single.assert_p__figure_axes_0_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1186, "end_line": 1199, "span_ids": ["TestPlotting.test_labels_facets", "TestPlotting.test_title_single"], "tokens": 160}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    def test_labels_facets(self):\n\n        data = {\"a\": [\"b\", \"c\"], \"x\": [\"y\", \"z\"]}\n        p = Plot(data).facet(\"a\", \"x\").label(col=str.capitalize, row=\"$x$\").plot()\n        axs = np.reshape(p._figure.axes, (2, 2))\n        for (i, j), ax in np.ndenumerate(axs):\n            expected = f\"A {data['a'][j]} | $x$ {data['x'][i]}\"\n            assert ax.get_title() == expected\n\n    def test_title_single(self):\n\n        label = \"A\"\n        p = Plot().label(title=label).plot()\n        assert p._figure.axes[0].get_title() == label", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_title_facet_function_TestPlotting.test_title_facet_function.None_1.assert_ax_get_title_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPlotting.test_title_facet_function_TestPlotting.test_title_facet_function.None_1.assert_ax_get_title_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1201, "end_line": 1212, "span_ids": ["TestPlotting.test_title_facet_function"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPlotting:\n\n    def test_title_facet_function(self):\n\n        titles = [\"a\", \"b\"]\n        p = Plot().facet(titles).label(title=str.capitalize).plot()\n        for i, ax in enumerate(p._figure.axes):\n            assert ax.get_title() == titles[i].upper()\n\n        cols, rows = [\"a\", \"b\"], [\"x\", \"y\"]\n        p = Plot().facet(cols, rows).label(title=str.capitalize).plot()\n        for i, ax in enumerate(p._figure.axes):\n            expected = \" | \".join([cols[i % 2].upper(), rows[i // 2].upper()])\n            assert ax.get_title() == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestFacetInterface.test_layout_algo_TestFacetInterface.test_layout_algo.assert_sep1_sep2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestFacetInterface.test_layout_algo_TestFacetInterface.test_layout_algo.assert_sep1_sep2", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1300, "end_line": 1320, "span_ids": ["TestFacetInterface.test_layout_algo"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetInterface:\n\n    @pytest.mark.parametrize(\"algo\", [\"tight\", \"constrained\"])\n    def test_layout_algo(self, algo):\n\n        if algo == \"constrained\" and Version(mpl.__version__) < Version(\"3.3.0\"):\n            pytest.skip(\"constrained_layout requires matplotlib>=3.3\")\n\n        p = Plot().facet([\"a\", \"b\"]).limit(x=(.1, .9))\n\n        p1 = p.layout(engine=algo).plot()\n        p2 = p.layout(engine=None).plot()\n\n        # Force a draw (we probably need a method for this)\n        p1.save(io.BytesIO())\n        p2.save(io.BytesIO())\n\n        bb11, bb12 = [ax.get_position() for ax in p1._figure.axes]\n        bb21, bb22 = [ax.get_position() for ax in p2._figure.axes]\n\n        sep1 = bb12.corners()[0, 0] - bb11.corners()[2, 0]\n        sep2 = bb22.corners()[0, 0] - bb21.corners()[2, 0]\n        assert sep1 < sep2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_list_of_vectors_TestPairInterface.test_with_no_variables.assert_len_p__figure_axes": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_list_of_vectors_TestPairInterface.test_with_no_variables.assert_len_p__figure_axes", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1434, "end_line": 1445, "span_ids": ["TestPairInterface.test_with_no_variables", "TestPairInterface.test_list_of_vectors"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairInterface:\n\n    def test_list_of_vectors(self, long_df):\n\n        x_vars = [\"x\", \"z\"]\n        p = Plot(long_df, y=\"y\").pair(x=[long_df[x] for x in x_vars]).plot()\n        assert len(p._figure.axes) == len(x_vars)\n        for ax, x_i in zip(p._figure.axes, x_vars):\n            assert ax.get_xlabel() == x_i\n\n    def test_with_no_variables(self, long_df):\n\n        p = Plot(long_df).pair().plot()\n        assert len(p._figure.axes) == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_x_wrapping_TestPairInterface.test_x_wrapping.for_ax_var_in_zip_p__fig.assert_label_get_text_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_x_wrapping_TestPairInterface.test_x_wrapping.for_ax_var_in_zip_p__fig.assert_label_get_text_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1533, "end_line": 1544, "span_ids": ["TestPairInterface.test_x_wrapping"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairInterface:\n\n    def test_x_wrapping(self, long_df):\n\n        x_vars = [\"f\", \"x\", \"y\", \"z\"]\n        wrap = 3\n        p = Plot(long_df, y=\"y\").pair(x=x_vars, wrap=wrap).plot()\n\n        assert_gridspec_shape(p._figure.axes[0], len(x_vars) // wrap + 1, wrap)\n        assert len(p._figure.axes) == len(x_vars)\n        for ax, var in zip(p._figure.axes, x_vars):\n            label = ax.xaxis.get_label()\n            assert label.get_visible()\n            assert label.get_text() == var", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_y_wrapping_TestPairInterface.test_y_wrapping.for_i_ax_in_enumerate_p_.assert_label_get_text_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_y_wrapping_TestPairInterface.test_y_wrapping.for_i_ax_in_enumerate_p_.assert_label_get_text_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1546, "end_line": 1562, "span_ids": ["TestPairInterface.test_y_wrapping"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairInterface:\n\n    def test_y_wrapping(self, long_df):\n\n        y_vars = [\"f\", \"x\", \"y\", \"z\"]\n        wrap = 3\n        p = Plot(long_df, x=\"x\").pair(y=y_vars, wrap=wrap).plot()\n\n        n_row, n_col = wrap, len(y_vars) // wrap + 1\n        assert_gridspec_shape(p._figure.axes[0], n_row, n_col)\n        assert len(p._figure.axes) == len(y_vars)\n        label_array = np.empty(n_row * n_col, object)\n        label_array[:len(y_vars)] = y_vars\n        label_array = label_array.reshape((n_row, n_col), order=\"F\")\n        label_array = [y for y in label_array.flat if y is not None]\n        for i, ax in enumerate(p._figure.axes):\n            label = ax.yaxis.get_label()\n            assert label.get_visible()\n            assert label.get_text() == label_array[i]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_cross_mismatched_lengths_TestPairInterface.test_labels.assert_ax1_get_xlabel_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_plot.py_TestPairInterface.test_cross_mismatched_lengths_TestPairInterface.test_labels.assert_ax1_get_xlabel_", "embedding": null, "metadata": {"file_path": "tests/_core/test_plot.py", "file_name": "test_plot.py", "file_type": "text/x-python", "category": "test", "start_line": 1579, "end_line": 1633, "span_ids": ["TestPairInterface.test_two_variables_single_order_error", "TestPairInterface.test_labels", "TestPairInterface.test_limits", "TestPairInterface.test_computed_coordinate_orient_inference.MockComputeStat", "TestPairInterface.test_orient_inference.CaptureOrientMove", "TestPairInterface.test_orient_inference.CaptureOrientMove.__call__", "TestPairInterface.test_computed_coordinate_orient_inference", "TestPairInterface.test_cross_mismatched_lengths", "TestPairInterface.test_computed_coordinate_orient_inference.MockComputeStat.__call__", "TestPairInterface.test_orient_inference"], "tokens": 475}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairInterface:\n\n    def test_cross_mismatched_lengths(self, long_df):\n\n        p = Plot(long_df)\n        with pytest.raises(ValueError, match=\"Lengths of the `x` and `y`\"):\n            p.pair(x=[\"a\", \"b\"], y=[\"x\", \"y\", \"z\"], cross=False)\n\n    def test_orient_inference(self, long_df):\n\n        orient_list = []\n\n        class CaptureOrientMove(Move):\n            def __call__(self, data, groupby, orient, scales):\n                orient_list.append(orient)\n                return data\n\n        (\n            Plot(long_df, x=\"x\")\n            .pair(y=[\"b\", \"z\"])\n            .add(MockMark(), CaptureOrientMove())\n            .plot()\n        )\n\n        assert orient_list == [\"y\", \"x\"]\n\n    def test_computed_coordinate_orient_inference(self, long_df):\n\n        class MockComputeStat(Stat):\n            def __call__(self, df, groupby, orient, scales):\n                other = {\"x\": \"y\", \"y\": \"x\"}[orient]\n                return df.assign(**{other: df[orient] * 2})\n\n        m = MockMark()\n        Plot(long_df, y=\"y\").add(m, MockComputeStat()).plot()\n        assert m.passed_orient == \"y\"\n\n    def test_two_variables_single_order_error(self, long_df):\n\n        p = Plot(long_df)\n        err = \"When faceting on both col= and row=, passing `order`\"\n        with pytest.raises(RuntimeError, match=err):\n            p.facet(col=\"a\", row=\"b\", order=[\"a\", \"b\", \"c\"])\n\n    def test_limits(self, long_df):\n\n        limit = (-2, 24)\n        p = Plot(long_df, y=\"y\").pair(x=[\"x\", \"z\"]).limit(x1=limit).plot()\n        ax1 = p._figure.axes[1]\n        assert ax1.get_xlim() == limit\n\n    def test_labels(self, long_df):\n\n        label = \"Z\"\n        p = Plot(long_df, y=\"y\").pair(x=[\"x\", \"z\"]).label(x1=label).plot()\n        ax1 = p._figure.axes[1]\n        assert ax1.get_xlabel() == label", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_re_TestContinuous.test_color_callable_values._FIXME_RGBA": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_re_TestContinuous.test_color_callable_values._FIXME_RGBA", "embedding": null, "metadata": {"file_path": "tests/_core/test_scales.py", "file_name": "test_scales.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 115, "span_ids": ["TestContinuous.test_coordinate_defaults", "TestContinuous.test_color_defaults", "TestContinuous.test_interval_with_norm", "TestContinuous.test_color_tuple_values", "TestContinuous.test_interval_defaults", "TestContinuous.setup_ticks", "TestContinuous", "TestContinuous.x", "TestContinuous.test_color_named_values", "TestContinuous.test_color_callable_values", "TestContinuous.test_coordinate_transform_error", "TestContinuous.test_interval_with_range_norm_and_transform", "imports", "TestContinuous.test_interval_with_range", "TestContinuous.test_coordinate_transform_with_parameter", "TestContinuous.test_coordinate_transform", "TestContinuous.setup_labels"], "tokens": 859}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import re\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib as mpl\n\nimport pytest\nfrom numpy.testing import assert_array_equal\nfrom pandas.testing import assert_series_equal\n\nfrom seaborn._core.scales import (\n    Nominal,\n    Continuous,\n    Temporal,\n    PseudoAxis,\n)\nfrom seaborn._core.properties import (\n    IntervalProperty,\n    ObjectProperty,\n    Coordinate,\n    Alpha,\n    Color,\n    Fill,\n)\nfrom seaborn.palettes import color_palette\nfrom seaborn.external.version import Version\n\n\nclass TestContinuous:\n\n    @pytest.fixture\n    def x(self):\n        return pd.Series([1, 3, 9], name=\"x\", dtype=float)\n\n    def setup_ticks(self, x, *args, **kwargs):\n\n        s = Continuous().tick(*args, **kwargs)._setup(x, Coordinate())\n        a = PseudoAxis(s._matplotlib_scale)\n        a.set_view_interval(0, 1)\n        return a\n\n    def setup_labels(self, x, *args, **kwargs):\n\n        s = Continuous().label(*args, **kwargs)._setup(x, Coordinate())\n        a = PseudoAxis(s._matplotlib_scale)\n        a.set_view_interval(0, 1)\n        locs = a.major.locator()\n        return a, locs\n\n    def test_coordinate_defaults(self, x):\n\n        s = Continuous()._setup(x, Coordinate())\n        assert_series_equal(s(x), x)\n\n    def test_coordinate_transform(self, x):\n\n        s = Continuous(trans=\"log\")._setup(x, Coordinate())\n        assert_series_equal(s(x), np.log10(x))\n\n    def test_coordinate_transform_with_parameter(self, x):\n\n        s = Continuous(trans=\"pow3\")._setup(x, Coordinate())\n        assert_series_equal(s(x), np.power(x, 3))\n\n    def test_coordinate_transform_error(self, x):\n\n        s = Continuous(trans=\"bad\")\n        with pytest.raises(ValueError, match=\"Unknown value provided\"):\n            s._setup(x, Coordinate())\n\n    def test_interval_defaults(self, x):\n\n        s = Continuous()._setup(x, IntervalProperty())\n        assert_array_equal(s(x), [0, .25, 1])\n\n    def test_interval_with_range(self, x):\n\n        s = Continuous((1, 3))._setup(x, IntervalProperty())\n        assert_array_equal(s(x), [1, 1.5, 3])\n\n    def test_interval_with_norm(self, x):\n\n        s = Continuous(norm=(3, 7))._setup(x, IntervalProperty())\n        assert_array_equal(s(x), [-.5, 0, 1.5])\n\n    def test_interval_with_range_norm_and_transform(self, x):\n\n        x = pd.Series([1, 10, 100])\n        # TODO param order?\n        s = Continuous((2, 3), (10, 100), \"log\")._setup(x, IntervalProperty())\n        assert_array_equal(s(x), [1, 2, 3])\n\n    def test_color_defaults(self, x):\n\n        cmap = color_palette(\"ch:\", as_cmap=True)\n        s = Continuous()._setup(x, Color())\n        assert_array_equal(s(x), cmap([0, .25, 1])[:, :3])  # FIXME RGBA\n\n    def test_color_named_values(self, x):\n\n        cmap = color_palette(\"viridis\", as_cmap=True)\n        s = Continuous(\"viridis\")._setup(x, Color())\n        assert_array_equal(s(x), cmap([0, .25, 1])[:, :3])  # FIXME RGBA\n\n    def test_color_tuple_values(self, x):\n\n        cmap = color_palette(\"blend:b,g\", as_cmap=True)\n        s = Continuous((\"b\", \"g\"))._setup(x, Color())\n        assert_array_equal(s(x), cmap([0, .25, 1])[:, :3])  # FIXME RGBA\n\n    def test_color_callable_values(self, x):\n\n        cmap = color_palette(\"light:r\", as_cmap=True)\n        s = Continuous(cmap)._setup(x, Color())\n        assert_array_equal(s(x), cmap([0, .25, 1])[:, :3])  # FIXME RGBA", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestContinuous.test_color_with_norm_TestContinuous.test_log_tick_upto.assert_a_major_locator_nu": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestContinuous.test_color_with_norm_TestContinuous.test_log_tick_upto.assert_a_major_locator_nu", "embedding": null, "metadata": {"file_path": "tests/_core/test_scales.py", "file_name": "test_scales.py", "file_type": "text/x-python", "category": "test", "start_line": 117, "end_line": 204, "span_ids": ["TestContinuous.test_log_tick_upto", "TestContinuous.test_tick_every", "TestContinuous.test_log_tick_default", "TestContinuous.test_tick_count", "TestContinuous.test_tick_locator", "TestContinuous.test_color_with_norm", "TestContinuous.test_tick_upto", "TestContinuous.test_tick_minor", "TestContinuous.test_tick_count_between", "TestContinuous.test_color_with_transform", "TestContinuous.test_tick_every_between", "TestContinuous.test_tick_at", "TestContinuous.test_tick_locator_input_check"], "tokens": 800}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestContinuous:\n\n    def test_color_with_norm(self, x):\n\n        cmap = color_palette(\"ch:\", as_cmap=True)\n        s = Continuous(norm=(3, 7))._setup(x, Color())\n        assert_array_equal(s(x), cmap([-.5, 0, 1.5])[:, :3])  # FIXME RGBA\n\n    def test_color_with_transform(self, x):\n\n        x = pd.Series([1, 10, 100], name=\"x\", dtype=float)\n        cmap = color_palette(\"ch:\", as_cmap=True)\n        s = Continuous(trans=\"log\")._setup(x, Color())\n        assert_array_equal(s(x), cmap([0, .5, 1])[:, :3])  # FIXME RGBA\n\n    def test_tick_locator(self, x):\n\n        locs = [.2, .5, .8]\n        locator = mpl.ticker.FixedLocator(locs)\n        a = self.setup_ticks(x, locator)\n        assert_array_equal(a.major.locator(), locs)\n\n    def test_tick_locator_input_check(self, x):\n\n        err = \"Tick locator must be an instance of .*?, not .\"\n        with pytest.raises(TypeError, match=err):\n            Continuous().tick((1, 2))\n\n    def test_tick_upto(self, x):\n\n        for n in [2, 5, 10]:\n            a = self.setup_ticks(x, upto=n)\n            assert len(a.major.locator()) <= (n + 1)\n\n    def test_tick_every(self, x):\n\n        for d in [.05, .2, .5]:\n            a = self.setup_ticks(x, every=d)\n            assert np.allclose(np.diff(a.major.locator()), d)\n\n    def test_tick_every_between(self, x):\n\n        lo, hi = .2, .8\n        for d in [.05, .2, .5]:\n            a = self.setup_ticks(x, every=d, between=(lo, hi))\n            expected = np.arange(lo, hi + d, d)\n            assert_array_equal(a.major.locator(), expected)\n\n    def test_tick_at(self, x):\n\n        locs = [.2, .5, .9]\n        a = self.setup_ticks(x, at=locs)\n        assert_array_equal(a.major.locator(), locs)\n\n    def test_tick_count(self, x):\n\n        n = 8\n        a = self.setup_ticks(x, count=n)\n        assert_array_equal(a.major.locator(), np.linspace(0, 1, n))\n\n    def test_tick_count_between(self, x):\n\n        n = 5\n        lo, hi = .2, .7\n        a = self.setup_ticks(x, count=n, between=(lo, hi))\n        assert_array_equal(a.major.locator(), np.linspace(lo, hi, n))\n\n    def test_tick_minor(self, x):\n\n        n = 3\n        a = self.setup_ticks(x, count=2, minor=n)\n        # I am not sure why matplotlib's minor ticks include the\n        # largest major location but exclude the smalllest one ...\n        expected = np.linspace(0, 1, n + 2)[1:]\n        assert_array_equal(a.minor.locator(), expected)\n\n    def test_log_tick_default(self, x):\n\n        s = Continuous(trans=\"log\")._setup(x, Coordinate())\n        a = PseudoAxis(s._matplotlib_scale)\n        a.set_view_interval(.5, 1050)\n        ticks = a.major.locator()\n        assert np.allclose(np.diff(np.log10(ticks)), 1)\n\n    def test_log_tick_upto(self, x):\n\n        n = 3\n        s = Continuous(trans=\"log\").tick(upto=n)._setup(x, Coordinate())\n        a = PseudoAxis(s._matplotlib_scale)\n        assert a.major.locator.numticks == n", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestContinuous.test_log_tick_count_TestContinuous.test_log_tick_every.with_pytest_raises_Runtim.Continuous_trans_log_t": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestContinuous.test_log_tick_count_TestContinuous.test_log_tick_every.with_pytest_raises_Runtim.Continuous_trans_log_t", "embedding": null, "metadata": {"file_path": "tests/_core/test_scales.py", "file_name": "test_scales.py", "file_type": "text/x-python", "category": "test", "start_line": 206, "end_line": 219, "span_ids": ["TestContinuous.test_log_tick_every", "TestContinuous.test_log_tick_count"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestContinuous:\n\n    def test_log_tick_count(self, x):\n\n        with pytest.raises(RuntimeError, match=\"`count` requires\"):\n            Continuous(trans=\"log\").tick(count=4)\n\n        s = Continuous(trans=\"log\").tick(count=4, between=(1, 1000))\n        a = PseudoAxis(s._setup(x, Coordinate())._matplotlib_scale)\n        a.set_view_interval(.5, 1050)\n        assert_array_equal(a.major.locator(), [1, 10, 100, 1000])\n\n    def test_log_tick_every(self, x):\n\n        with pytest.raises(RuntimeError, match=\"`every` not supported\"):\n            Continuous(trans=\"log\").tick(every=2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestContinuous.test_symlog_tick_default_TestContinuous.test_symlog_tick_default.assert_pos_ticks_0_0": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestContinuous.test_symlog_tick_default_TestContinuous.test_symlog_tick_default.assert_pos_ticks_0_0", "embedding": null, "metadata": {"file_path": "tests/_core/test_scales.py", "file_name": "test_scales.py", "file_type": "text/x-python", "category": "test", "start_line": 221, "end_line": 230, "span_ids": ["TestContinuous.test_symlog_tick_default"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestContinuous:\n\n    def test_symlog_tick_default(self, x):\n\n        s = Continuous(trans=\"symlog\")._setup(x, Coordinate())\n        a = PseudoAxis(s._matplotlib_scale)\n        a.set_view_interval(-1050, 1050)\n        ticks = a.major.locator()\n        assert ticks[0] == -ticks[-1]\n        pos_ticks = np.sort(np.unique(np.abs(ticks)))\n        assert np.allclose(np.diff(np.log10(pos_ticks[1:])), 1)\n        assert pos_ticks[0] == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestContinuous.test_label_formatter_TestContinuous.test_label_type_checks.None_1.s_label_like_2_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestContinuous.test_label_formatter_TestContinuous.test_label_type_checks.None_1.s_label_like_2_", "embedding": null, "metadata": {"file_path": "tests/_core/test_scales.py", "file_name": "test_scales.py", "file_type": "text/x-python", "category": "test", "start_line": 232, "end_line": 304, "span_ids": ["TestContinuous.test_label_unit_with_sep", "TestContinuous.test_label_like_function", "TestContinuous.test_label_base_from_transform", "TestContinuous.test_label_unit", "TestContinuous.test_label_base", "TestContinuous.test_label_like_string", "TestContinuous.test_label_type_checks", "TestContinuous.test_label_formatter", "TestContinuous.test_label_empty_unit", "TestContinuous.test_label_like_pattern"], "tokens": 640}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestContinuous:\n\n    def test_label_formatter(self, x):\n\n        fmt = mpl.ticker.FormatStrFormatter(\"%.3f\")\n        a, locs = self.setup_labels(x, fmt)\n        labels = a.major.formatter.format_ticks(locs)\n        for text in labels:\n            assert re.match(r\"^\\d\\.\\d{3}$\", text)\n\n    def test_label_like_pattern(self, x):\n\n        a, locs = self.setup_labels(x, like=\".4f\")\n        labels = a.major.formatter.format_ticks(locs)\n        for text in labels:\n            assert re.match(r\"^\\d\\.\\d{4}$\", text)\n\n    def test_label_like_string(self, x):\n\n        a, locs = self.setup_labels(x, like=\"x = {x:.1f}\")\n        labels = a.major.formatter.format_ticks(locs)\n        for text in labels:\n            assert re.match(r\"^x = \\d\\.\\d$\", text)\n\n    def test_label_like_function(self, x):\n\n        a, locs = self.setup_labels(x, like=\"{:^5.1f}\".format)\n        labels = a.major.formatter.format_ticks(locs)\n        for text in labels:\n            assert re.match(r\"^ \\d\\.\\d $\", text)\n\n    def test_label_base(self, x):\n\n        a, locs = self.setup_labels(100 * x, base=2)\n        labels = a.major.formatter.format_ticks(locs)\n        for text in labels[1:]:\n            assert not text or \"2^\" in text\n\n    def test_label_unit(self, x):\n\n        a, locs = self.setup_labels(1000 * x, unit=\"g\")\n        labels = a.major.formatter.format_ticks(locs)\n        for text in labels[1:-1]:\n            assert re.match(r\"^\\d+ mg$\", text)\n\n    def test_label_unit_with_sep(self, x):\n\n        a, locs = self.setup_labels(1000 * x, unit=(\"\", \"g\"))\n        labels = a.major.formatter.format_ticks(locs)\n        for text in labels[1:-1]:\n            assert re.match(r\"^\\d+mg$\", text)\n\n    def test_label_empty_unit(self, x):\n\n        a, locs = self.setup_labels(1000 * x, unit=\"\")\n        labels = a.major.formatter.format_ticks(locs)\n        for text in labels[1:-1]:\n            assert re.match(r\"^\\d+m$\", text)\n\n    def test_label_base_from_transform(self, x):\n\n        s = Continuous(trans=\"log\")\n        a = PseudoAxis(s._setup(x, Coordinate())._matplotlib_scale)\n        a.set_view_interval(10, 1000)\n        label, = a.major.formatter.format_ticks([100])\n        assert r\"10^{2}\" in label\n\n    def test_label_type_checks(self):\n\n        s = Continuous()\n        with pytest.raises(TypeError, match=\"Label formatter must be\"):\n            s.label(\"{x}\")\n\n        with pytest.raises(TypeError, match=\"`like` must be\"):\n            s.label(like=2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestTemporal_TestTemporal.test_tick_upto.assert_set_locator_maxtic": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestTemporal_TestTemporal.test_tick_upto.assert_set_locator_maxtic", "embedding": null, "metadata": {"file_path": "tests/_core/test_scales.py", "file_name": "test_scales.py", "file_type": "text/x-python", "category": "test", "start_line": 550, "end_line": 631, "span_ids": ["TestTemporal.test_interval_defaults", "TestTemporal.test_coordinate_axis", "TestTemporal.test_tick_locator", "TestTemporal.test_color_defaults", "TestTemporal.test_interval_with_range", "TestTemporal.test_tick_upto", "TestTemporal", "TestTemporal.t", "TestTemporal.x", "TestTemporal.test_interval_with_norm", "TestTemporal.test_coordinate_defaults", "TestTemporal.test_color_named_values"], "tokens": 757}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestTemporal:\n\n    @pytest.fixture\n    def t(self):\n        dates = pd.to_datetime([\"1972-09-27\", \"1975-06-24\", \"1980-12-14\"])\n        return pd.Series(dates, name=\"x\")\n\n    @pytest.fixture\n    def x(self, t):\n        return pd.Series(mpl.dates.date2num(t), name=t.name)\n\n    def test_coordinate_defaults(self, t, x):\n\n        s = Temporal()._setup(t, Coordinate())\n        assert_array_equal(s(t), x)\n\n    def test_interval_defaults(self, t, x):\n\n        s = Temporal()._setup(t, IntervalProperty())\n        normed = (x - x.min()) / (x.max() - x.min())\n        assert_array_equal(s(t), normed)\n\n    def test_interval_with_range(self, t, x):\n\n        values = (1, 3)\n        s = Temporal((1, 3))._setup(t, IntervalProperty())\n        normed = (x - x.min()) / (x.max() - x.min())\n        expected = normed * (values[1] - values[0]) + values[0]\n        assert_array_equal(s(t), expected)\n\n    def test_interval_with_norm(self, t, x):\n\n        norm = t[1], t[2]\n        s = Temporal(norm=norm)._setup(t, IntervalProperty())\n        n = mpl.dates.date2num(norm)\n        normed = (x - n[0]) / (n[1] - n[0])\n        assert_array_equal(s(t), normed)\n\n    def test_color_defaults(self, t, x):\n\n        cmap = color_palette(\"ch:\", as_cmap=True)\n        s = Temporal()._setup(t, Color())\n        normed = (x - x.min()) / (x.max() - x.min())\n        assert_array_equal(s(t), cmap(normed)[:, :3])  # FIXME RGBA\n\n    def test_color_named_values(self, t, x):\n\n        name = \"viridis\"\n        cmap = color_palette(name, as_cmap=True)\n        s = Temporal(name)._setup(t, Color())\n        normed = (x - x.min()) / (x.max() - x.min())\n        assert_array_equal(s(t), cmap(normed)[:, :3])  # FIXME RGBA\n\n    def test_coordinate_axis(self, t, x):\n\n        ax = mpl.figure.Figure().subplots()\n        s = Temporal()._setup(t, Coordinate(), ax.xaxis)\n        assert_array_equal(s(t), x)\n        locator = ax.xaxis.get_major_locator()\n        formatter = ax.xaxis.get_major_formatter()\n        assert isinstance(locator, mpl.dates.AutoDateLocator)\n        assert isinstance(formatter, mpl.dates.AutoDateFormatter)\n\n    @pytest.mark.skipif(\n        Version(mpl.__version__) < Version(\"3.3.0\"),\n        reason=\"Test requires new matplotlib date epoch.\"\n    )\n    def test_tick_locator(self, t):\n\n        locator = mpl.dates.YearLocator(month=3, day=15)\n        s = Temporal().tick(locator)\n        a = PseudoAxis(s._setup(t, Coordinate())._matplotlib_scale)\n        a.set_view_interval(0, 365)\n        assert 73 in a.major.locator()\n\n    def test_tick_upto(self, t, x):\n\n        n = 8\n        ax = mpl.figure.Figure().subplots()\n        Temporal().tick(upto=n)._setup(t, Coordinate(), ax.xaxis)\n        locator = ax.xaxis.get_major_locator()\n        assert set(locator.maxticks.values()) == {n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestTemporal.test_label_formatter_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_scales.py_TestTemporal.test_label_formatter_", "embedding": null, "metadata": {"file_path": "tests/_core/test_scales.py", "file_name": "test_scales.py", "file_type": "text/x-python", "category": "test", "start_line": 633, "end_line": 652, "span_ids": ["TestTemporal.test_label_formatter", "TestTemporal.test_label_concise"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestTemporal:\n\n    @pytest.mark.skipif(\n        Version(mpl.__version__) < Version(\"3.3.0\"),\n        reason=\"Test requires new matplotlib date epoch.\"\n    )\n    def test_label_formatter(self, t):\n\n        formatter = mpl.dates.DateFormatter(\"%Y\")\n        s = Temporal().label(formatter)\n        a = PseudoAxis(s._setup(t, Coordinate())._matplotlib_scale)\n        a.set_view_interval(10, 1000)\n        label, = a.major.formatter.format_ticks([100])\n        assert label == \"1970\"\n\n    def test_label_concise(self, t, x):\n\n        ax = mpl.figure.Figure().subplots()\n        Temporal().label(concise=True)._setup(t, Coordinate(), ax.xaxis)\n        formatter = ax.xaxis.get_major_formatter()\n        assert isinstance(formatter, mpl.dates.ConciseDateFormatter)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_y_paired_and_wrapped_TestSubplotSpec.test_y_paired_and_wrapped_single_row.None_4": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_core/test_subplots.py_TestSubplotSpec.test_y_paired_and_wrapped_TestSubplotSpec.test_y_paired_and_wrapped_single_row.None_4", "embedding": null, "metadata": {"file_path": "tests/_core/test_subplots.py", "file_name": "test_subplots.py", "file_type": "text/x-python", "category": "test", "start_line": 182, "end_line": 204, "span_ids": ["TestSubplotSpec.test_y_paired_and_wrapped", "TestSubplotSpec.test_y_paired_and_wrapped_single_row"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSubplotSpec:\n\n    def test_y_paired_and_wrapped(self):\n\n        y = [\"a\", \"b\", \"x\", \"y\", \"z\"]\n        wrap = 2\n        s = Subplots({}, {}, {\"structure\": {\"y\": y}, \"wrap\": wrap})\n\n        assert s.n_subplots == len(y)\n        assert s.subplot_spec[\"ncols\"] == len(y) // wrap + 1\n        assert s.subplot_spec[\"nrows\"] == wrap\n        assert s.subplot_spec[\"sharex\"] is True\n        assert s.subplot_spec[\"sharey\"] is False\n\n    def test_y_paired_and_wrapped_single_row(self):\n\n        y = [\"x\", \"y\", \"z\"]\n        wrap = 1\n        s = Subplots({}, {}, {\"structure\": {\"y\": y}, \"wrap\": wrap})\n\n        assert s.n_subplots == len(y)\n        assert s.subplot_spec[\"ncols\"] == len(y)\n        assert s.subplot_spec[\"nrows\"] == 1\n        assert s.subplot_spec[\"sharex\"] is True\n        assert s.subplot_spec[\"sharey\"] is False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_area.py_TestAreaMarks.test_set_parameters_TestAreaMarks.test_set_parameters.assert_ls_expected": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_area.py_TestAreaMarks.test_set_parameters_TestAreaMarks.test_set_parameters.assert_ls_expected", "embedding": null, "metadata": {"file_path": "tests/_marks/test_area.py", "file_name": "test_area.py", "file_type": "text/x-python", "category": "test", "start_line": 36, "end_line": 63, "span_ids": ["TestAreaMarks.test_set_parameters"], "tokens": 244}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestAreaMarks:\n\n    def test_set_parameters(self):\n\n        x, y = [1, 2, 3], [1, 2, 1]\n        mark = Area(\n            color=\"C2\",\n            alpha=.3,\n            edgecolor=\".3\",\n            edgealpha=.8,\n            edgewidth=2,\n            edgestyle=(0, (2, 1)),\n        )\n        p = Plot(x=x, y=y).add(mark).plot()\n        ax = p._figure.axes[0]\n        poly = ax.patches[0]\n\n        fc = poly.get_facecolor()\n        assert_array_equal(fc, to_rgba(mark.color, mark.alpha))\n\n        ec = poly.get_edgecolor()\n        assert_array_equal(ec, to_rgba(mark.edgecolor, mark.edgealpha))\n\n        lw = poly.get_linewidth()\n        assert_array_equal(lw, mark.edgewidth * 2)\n\n        ls = poly.get_linestyle()\n        dash_on, dash_off = mark.edgestyle[1]\n        expected = (0, (mark.edgewidth * dash_on / 4, mark.edgewidth * dash_off / 4))\n        assert ls == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_area.py_TestAreaMarks.test_mapped_TestAreaMarks.test_mapped.assert_lws_0_lws_1_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_area.py_TestAreaMarks.test_mapped_TestAreaMarks.test_mapped.assert_lws_0_lws_1_", "embedding": null, "metadata": {"file_path": "tests/_marks/test_area.py", "file_name": "test_area.py", "file_type": "text/x-python", "category": "test", "start_line": 65, "end_line": 87, "span_ids": ["TestAreaMarks.test_mapped"], "tokens": 351}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestAreaMarks:\n\n    def test_mapped(self):\n\n        x, y = [1, 2, 3, 2, 3, 4], [1, 2, 1, 1, 3, 2]\n        g = [\"a\", \"a\", \"a\", \"b\", \"b\", \"b\"]\n        p = Plot(x=x, y=y, color=g, edgewidth=g).add(Area()).plot()\n        ax = p._figure.axes[0]\n\n        expected_x = [1, 2, 3, 3, 2, 1, 1], [2, 3, 4, 4, 3, 2, 2]\n        expected_y = [0, 0, 0, 1, 2, 1, 0], [0, 0, 0, 2, 3, 1, 0]\n\n        for i, poly in enumerate(ax.patches):\n            verts = poly.get_path().vertices.T\n            assert_array_equal(verts[0], expected_x[i])\n            assert_array_equal(verts[1], expected_y[i])\n\n        fcs = [p.get_facecolor() for p in ax.patches]\n        assert_array_equal(fcs, to_rgba_array([\"C0\", \"C1\"], .2))\n\n        ecs = [p.get_edgecolor() for p in ax.patches]\n        assert_array_equal(ecs, to_rgba_array([\"C0\", \"C1\"], 1))\n\n        lws = [p.get_linewidth() for p in ax.patches]\n        assert lws[0] > lws[1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_area.py_TestAreaMarks.test_unfilled_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_area.py_TestAreaMarks.test_unfilled_", "embedding": null, "metadata": {"file_path": "tests/_marks/test_area.py", "file_name": "test_area.py", "file_type": "text/x-python", "category": "test", "start_line": 89, "end_line": 109, "span_ids": ["TestAreaMarks.test_band", "TestAreaMarks.test_unfilled"], "tokens": 249}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestAreaMarks:\n\n    def test_unfilled(self):\n\n        x, y = [1, 2, 3], [1, 2, 1]\n        p = Plot(x=x, y=y).add(Area(fill=False)).plot()\n        ax = p._figure.axes[0]\n        poly = ax.patches[0]\n        assert poly.get_facecolor() == to_rgba(\"C0\", 0)\n\n    def test_band(self):\n\n        x, ymin, ymax = [1, 2, 4], [2, 1, 4], [3, 3, 5]\n        p = Plot(x=x, ymin=ymin, ymax=ymax).add(Band()).plot()\n        ax = p._figure.axes[0]\n        verts = ax.patches[0].get_path().vertices.T\n\n        expected_x = [1, 2, 4, 4, 2, 1, 1]\n        assert_array_equal(verts[0], expected_x)\n\n        expected_y = [2, 1, 4, 5, 3, 3, 2]\n        assert_array_equal(verts[1], expected_y)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_np_TestBar.test_numeric_positions_horizontal.for_i_bar_in_enumerate_b.self_check_bar_bar_0_y_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_np_TestBar.test_numeric_positions_horizontal.for_i_bar_in_enumerate_b.self_check_bar_bar_0_y_", "embedding": null, "metadata": {"file_path": "tests/_marks/test_bar.py", "file_name": "test_bar.py", "file_type": "text/x-python", "category": "test", "start_line": 2, "end_line": 62, "span_ids": ["TestBar.test_numeric_positions_vertical", "TestBar.test_categorical_positions_horizontal", "TestBar.test_categorical_positions_vertical", "imports", "TestBar.check_bar", "TestBar", "TestBar.plot_bars", "TestBar.test_numeric_positions_horizontal"], "tokens": 521}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nimport pandas as pd\nfrom matplotlib.colors import to_rgba, to_rgba_array\n\nimport pytest\nfrom numpy.testing import assert_array_equal\n\nfrom seaborn._core.plot import Plot\nfrom seaborn._marks.bar import Bar, Bars\n\n\nclass TestBar:\n\n    def plot_bars(self, variables, mark_kws, layer_kws):\n\n        p = Plot(**variables).add(Bar(**mark_kws), **layer_kws).plot()\n        ax = p._figure.axes[0]\n        return [bar for barlist in ax.containers for bar in barlist]\n\n    def check_bar(self, bar, x, y, width, height):\n\n        assert bar.get_x() == pytest.approx(x)\n        assert bar.get_y() == pytest.approx(y)\n        assert bar.get_width() == pytest.approx(width)\n        assert bar.get_height() == pytest.approx(height)\n\n    def test_categorical_positions_vertical(self):\n\n        x = [\"a\", \"b\"]\n        y = [1, 2]\n        w = .8\n        bars = self.plot_bars({\"x\": x, \"y\": y}, {}, {})\n        for i, bar in enumerate(bars):\n            self.check_bar(bar, i - w / 2, 0, w, y[i])\n\n    def test_categorical_positions_horizontal(self):\n\n        x = [1, 2]\n        y = [\"a\", \"b\"]\n        w = .8\n        bars = self.plot_bars({\"x\": x, \"y\": y}, {}, {})\n        for i, bar in enumerate(bars):\n            self.check_bar(bar, 0, i - w / 2, x[i], w)\n\n    def test_numeric_positions_vertical(self):\n\n        x = [1, 2]\n        y = [3, 4]\n        w = .8\n        bars = self.plot_bars({\"x\": x, \"y\": y}, {}, {})\n        for i, bar in enumerate(bars):\n            self.check_bar(bar, x[i] - w / 2, 0, w, y[i])\n\n    def test_numeric_positions_horizontal(self):\n\n        x = [1, 2]\n        y = [3, 4]\n        w = .8\n        bars = self.plot_bars({\"x\": x, \"y\": y}, {}, {\"orient\": \"h\"})\n        for i, bar in enumerate(bars):\n            self.check_bar(bar, 0, y[i] - w / 2, x[i], w)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBar.test_set_properties_TestBar.test_set_properties.for_bar_in_ax_patches_.assert_bar_get_linestyle_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBar.test_set_properties_TestBar.test_set_properties.for_bar_in_ax_patches_.assert_bar_get_linestyle_", "embedding": null, "metadata": {"file_path": "tests/_marks/test_bar.py", "file_name": "test_bar.py", "file_type": "text/x-python", "category": "test", "start_line": 64, "end_line": 86, "span_ids": ["TestBar.test_set_properties"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBar:\n\n    def test_set_properties(self):\n\n        x = [\"a\", \"b\", \"c\"]\n        y = [1, 3, 2]\n\n        mark = Bar(\n            color=\"C2\",\n            alpha=.5,\n            edgecolor=\".3\",\n            edgealpha=.9,\n            edgestyle=(2, 1),\n            edgewidth=1.5,\n        )\n\n        p = Plot(x, y).add(mark).plot()\n        ax = p._figure.axes[0]\n        for bar in ax.patches:\n            assert bar.get_facecolor() == to_rgba(mark.color, mark.alpha)\n            assert bar.get_edgecolor() == to_rgba(mark.edgecolor, mark.edgealpha)\n            # See comments in plotting method for why we need these adjustments\n            assert bar.get_linewidth() == mark.edgewidth * 2\n            expected_dashes = (mark.edgestyle[0] / 2, mark.edgestyle[1] / 2)\n            assert bar.get_linestyle() == (0, expected_dashes)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBar.test_mapped_properties_TestBar.test_mapped_properties.assert_ax_patches_0_get_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBar.test_mapped_properties_TestBar.test_mapped_properties.assert_ax_patches_0_get_", "embedding": null, "metadata": {"file_path": "tests/_marks/test_bar.py", "file_name": "test_bar.py", "file_type": "text/x-python", "category": "test", "start_line": 88, "end_line": 98, "span_ids": ["TestBar.test_mapped_properties"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBar:\n\n    def test_mapped_properties(self):\n\n        x = [\"a\", \"b\"]\n        y = [1, 2]\n        mark = Bar(alpha=.2)\n        p = Plot(x, y, color=x, edgewidth=y).add(mark).plot()\n        ax = p._figure.axes[0]\n        for i, bar in enumerate(ax.patches):\n            assert bar.get_facecolor() == to_rgba(f\"C{i}\", mark.alpha)\n            assert bar.get_edgecolor() == to_rgba(f\"C{i}\", 1)\n        assert ax.patches[0].get_linewidth() < ax.patches[1].get_linewidth()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBar.test_zero_height_skipped_TestBar.test_artist_kws_clip.assert_patch_clipbox_is_N": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBar.test_zero_height_skipped_TestBar.test_artist_kws_clip.assert_patch_clipbox_is_N", "embedding": null, "metadata": {"file_path": "tests/_marks/test_bar.py", "file_name": "test_bar.py", "file_type": "text/x-python", "category": "test", "start_line": 100, "end_line": 110, "span_ids": ["TestBar.test_artist_kws_clip", "TestBar.test_zero_height_skipped"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBar:\n\n    def test_zero_height_skipped(self):\n\n        p = Plot([\"a\", \"b\", \"c\"], [1, 0, 2]).add(Bar()).plot()\n        ax = p._figure.axes[0]\n        assert len(ax.patches) == 2\n\n    def test_artist_kws_clip(self):\n\n        p = Plot([\"a\", \"b\"], [1, 2]).add(Bar({\"clip_on\": False})).plot()\n        patch = p._figure.axes[0].patches[0]\n        assert patch.clipbox is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBars_TestBars.test_positions.for_i_path_in_enumerate_.assert_verts_3_1_y_i": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBars_TestBars.test_positions.for_i_path_in_enumerate_.assert_verts_3_1_y_i", "embedding": null, "metadata": {"file_path": "tests/_marks/test_bar.py", "file_name": "test_bar.py", "file_type": "text/x-python", "category": "test", "start_line": 113, "end_line": 138, "span_ids": ["TestBars.y", "TestBars.x", "TestBars.color", "TestBars", "TestBars.test_positions"], "tokens": 238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBars:\n\n    @pytest.fixture\n    def x(self):\n        return pd.Series([4, 5, 6, 7, 8], name=\"x\")\n\n    @pytest.fixture\n    def y(self):\n        return pd.Series([2, 8, 3, 5, 9], name=\"y\")\n\n    @pytest.fixture\n    def color(self):\n        return pd.Series([\"a\", \"b\", \"c\", \"a\", \"c\"], name=\"color\")\n\n    def test_positions(self, x, y):\n\n        p = Plot(x, y).add(Bars()).plot()\n        ax = p._figure.axes[0]\n        paths = ax.collections[0].get_paths()\n        assert len(paths) == len(x)\n        for i, path in enumerate(paths):\n            verts = path.vertices\n            assert verts[0, 0] == pytest.approx(x[i] - .5)\n            assert verts[1, 0] == pytest.approx(x[i] + .5)\n            assert verts[0, 1] == 0\n            assert verts[3, 1] == y[i]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBars.test_positions_horizontal_TestBars.test_positions_horizontal.for_i_path_in_enumerate_.assert_verts_1_0_y_i": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBars.test_positions_horizontal_TestBars.test_positions_horizontal.for_i_path_in_enumerate_.assert_verts_1_0_y_i", "embedding": null, "metadata": {"file_path": "tests/_marks/test_bar.py", "file_name": "test_bar.py", "file_type": "text/x-python", "category": "test", "start_line": 140, "end_line": 151, "span_ids": ["TestBars.test_positions_horizontal"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBars:\n\n    def test_positions_horizontal(self, x, y):\n\n        p = Plot(x=y, y=x).add(Bars(), orient=\"h\").plot()\n        ax = p._figure.axes[0]\n        paths = ax.collections[0].get_paths()\n        assert len(paths) == len(x)\n        for i, path in enumerate(paths):\n            verts = path.vertices\n            assert verts[0, 1] == pytest.approx(x[i] - .5)\n            assert verts[3, 1] == pytest.approx(x[i] + .5)\n            assert verts[0, 0] == 0\n            assert verts[1, 0] == y[i]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBars.test_width_TestBars.test_mapped_edgewidth.assert_array_equal_np_arg": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBars.test_width_TestBars.test_mapped_edgewidth.assert_array_equal_np_arg", "embedding": null, "metadata": {"file_path": "tests/_marks/test_bar.py", "file_name": "test_bar.py", "file_type": "text/x-python", "category": "test", "start_line": 153, "end_line": 177, "span_ids": ["TestBars.test_width", "TestBars.test_mapped_edgewidth", "TestBars.test_mapped_color_direct_alpha"], "tokens": 277}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBars:\n\n    def test_width(self, x, y):\n\n        p = Plot(x, y).add(Bars(width=.4)).plot()\n        ax = p._figure.axes[0]\n        paths = ax.collections[0].get_paths()\n        for i, path in enumerate(paths):\n            verts = path.vertices\n            assert verts[0, 0] == pytest.approx(x[i] - .2)\n            assert verts[1, 0] == pytest.approx(x[i] + .2)\n\n    def test_mapped_color_direct_alpha(self, x, y, color):\n\n        alpha = .5\n        p = Plot(x, y, color=color).add(Bars(alpha=alpha)).plot()\n        ax = p._figure.axes[0]\n        fcs = ax.collections[0].get_facecolors()\n        expected = to_rgba_array([\"C0\", \"C1\", \"C2\", \"C0\", \"C2\"], alpha)\n        assert_array_equal(fcs, expected)\n\n    def test_mapped_edgewidth(self, x, y):\n\n        p = Plot(x, y, edgewidth=y).add(Bars()).plot()\n        ax = p._figure.axes[0]\n        lws = ax.collections[0].get_linewidths()\n        assert_array_equal(np.argsort(lws), np.argsort(y))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBars.test_auto_edgewidth_TestBars.test_auto_edgewidth.assert_lw0_lw1_all_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBars.test_auto_edgewidth_TestBars.test_auto_edgewidth.assert_lw0_lw1_all_", "embedding": null, "metadata": {"file_path": "tests/_marks/test_bar.py", "file_name": "test_bar.py", "file_type": "text/x-python", "category": "test", "start_line": 179, "end_line": 190, "span_ids": ["TestBars.test_auto_edgewidth"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBars:\n\n    def test_auto_edgewidth(self):\n\n        x0 = np.arange(10)\n        x1 = np.arange(1000)\n\n        p0 = Plot(x0, x0).add(Bars()).plot()\n        p1 = Plot(x1, x1).add(Bars()).plot()\n\n        lw0 = p0._figure.axes[0].collections[0].get_linewidths()\n        lw1 = p1._figure.axes[0].collections[0].get_linewidths()\n\n        assert (lw0 > lw1).all()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBars.test_unfilled_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_bar.py_TestBars.test_unfilled_", "embedding": null, "metadata": {"file_path": "tests/_marks/test_bar.py", "file_name": "test_bar.py", "file_type": "text/x-python", "category": "test", "start_line": 192, "end_line": 200, "span_ids": ["TestBars.test_unfilled"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBars:\n\n    def test_unfilled(self, x, y):\n\n        p = Plot(x, y).add(Bars(fill=False, edgecolor=\"C4\")).plot()\n        ax = p._figure.axes[0]\n        fcs = ax.collections[0].get_facecolors()\n        ecs = ax.collections[0].get_edgecolors()\n        assert_array_equal(fcs, to_rgba_array([\"C0\"] * len(x), 0))\n        assert_array_equal(ecs, to_rgba_array([\"C4\"] * len(x), 1))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_from_matplotlib_colors_im_DotBase.check_colors.assert_array_equal_getter": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_from_matplotlib_colors_im_DotBase.check_colors.assert_array_equal_getter", "embedding": null, "metadata": {"file_path": "tests/_marks/test_dot.py", "file_name": "test_dot.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 30, "span_ids": ["DotBase.check_colors", "DotBase", "imports", "default_palette", "DotBase.check_offsets"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from matplotlib.colors import to_rgba, to_rgba_array\n\nimport pytest\nfrom numpy.testing import assert_array_equal\n\nfrom seaborn.palettes import color_palette\nfrom seaborn._core.plot import Plot\nfrom seaborn._marks.dot import Dot, Dots\n\n\n@pytest.fixture(autouse=True)\ndef default_palette():\n    with color_palette(\"deep\"):\n        yield\n\n\nclass DotBase:\n\n    def check_offsets(self, points, x, y):\n\n        offsets = points.get_offsets().T\n        assert_array_equal(offsets[0], x)\n        assert_array_equal(offsets[1], y)\n\n    def check_colors(self, part, points, colors, alpha=None):\n\n        rgba = to_rgba_array(colors, alpha)\n\n        getter = getattr(points, f\"get_{part}colors\")\n        assert_array_equal(getter(), rgba)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDot_TestDot.test_simple.self_check_colors_edge_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDot_TestDot.test_simple.self_check_colors_edge_", "embedding": null, "metadata": {"file_path": "tests/_marks/test_dot.py", "file_name": "test_dot.py", "file_type": "text/x-python", "category": "test", "start_line": 33, "end_line": 44, "span_ids": ["TestDot", "TestDot.test_simple"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDot(DotBase):\n\n    def test_simple(self):\n\n        x = [1, 2, 3]\n        y = [4, 5, 2]\n        p = Plot(x=x, y=y).add(Dot()).plot()\n        ax = p._figure.axes[0]\n        points, = ax.collections\n        self.check_offsets(points, x, y)\n        self.check_colors(\"face\", points, [\"C0\"] * 3, 1)\n        self.check_colors(\"edge\", points, [\"C0\"] * 3, 1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDot.test_filled_unfilled_mix_TestDot.test_filled_unfilled_mix.assert_array_equal_points": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDot.test_filled_unfilled_mix_TestDot.test_filled_unfilled_mix.assert_array_equal_points", "embedding": null, "metadata": {"file_path": "tests/_marks/test_dot.py", "file_name": "test_dot.py", "file_type": "text/x-python", "category": "test", "start_line": 46, "end_line": 62, "span_ids": ["TestDot.test_filled_unfilled_mix"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDot(DotBase):\n\n    def test_filled_unfilled_mix(self):\n\n        x = [1, 2]\n        y = [4, 5]\n        marker = [\"a\", \"b\"]\n        shapes = [\"o\", \"x\"]\n\n        mark = Dot(edgecolor=\"w\", stroke=2, edgewidth=1)\n        p = Plot(x=x, y=y).add(mark, marker=marker).scale(marker=shapes).plot()\n        ax = p._figure.axes[0]\n        points, = ax.collections\n        self.check_offsets(points, x, y)\n        self.check_colors(\"face\", points, [\"C0\", to_rgba(\"C0\", 0)], None)\n        self.check_colors(\"edge\", points, [\"w\", \"C0\"], 1)\n\n        expected = [mark.edgewidth, mark.stroke]\n        assert_array_equal(points.get_linewidths(), expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDot.test_missing_coordinate_data_TestDot.test_missing_semantic_data.self_check_offsets_points": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDot.test_missing_coordinate_data_TestDot.test_missing_semantic_data.self_check_offsets_points", "embedding": null, "metadata": {"file_path": "tests/_marks/test_dot.py", "file_name": "test_dot.py", "file_type": "text/x-python", "category": "test", "start_line": 64, "end_line": 84, "span_ids": ["TestDot.test_missing_semantic_data", "TestDot.test_missing_coordinate_data"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDot(DotBase):\n\n    def test_missing_coordinate_data(self):\n\n        x = [1, float(\"nan\"), 3]\n        y = [5, 3, 4]\n\n        p = Plot(x=x, y=y).add(Dot()).plot()\n        ax = p._figure.axes[0]\n        points, = ax.collections\n        self.check_offsets(points, [1, 3], [5, 4])\n\n    @pytest.mark.parametrize(\"prop\", [\"color\", \"fill\", \"marker\", \"pointsize\"])\n    def test_missing_semantic_data(self, prop):\n\n        x = [1, 2, 3]\n        y = [5, 3, 4]\n        z = [\"a\", float(\"nan\"), \"b\"]\n\n        p = Plot(x=x, y=y, **{prop: z}).add(Dot()).plot()\n        ax = p._figure.axes[0]\n        points, = ax.collections\n        self.check_offsets(points, [1, 3], [5, 4])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDots_TestDots.test_simple.self_check_colors_edge_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDots_TestDots.test_simple.self_check_colors_edge_", "embedding": null, "metadata": {"file_path": "tests/_marks/test_dot.py", "file_name": "test_dot.py", "file_type": "text/x-python", "category": "test", "start_line": 87, "end_line": 98, "span_ids": ["TestDots.test_simple", "TestDots"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDots(DotBase):\n\n    def test_simple(self):\n\n        x = [1, 2, 3]\n        y = [4, 5, 2]\n        p = Plot(x=x, y=y).add(Dots()).plot()\n        ax = p._figure.axes[0]\n        points, = ax.collections\n        self.check_offsets(points, x, y)\n        self.check_colors(\"face\", points, [\"C0\"] * 3, .2)\n        self.check_colors(\"edge\", points, [\"C0\"] * 3, 1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDots.test_color_direct_TestDots.test_color_direct.self_check_colors_edge_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDots.test_color_direct_TestDots.test_color_direct.self_check_colors_edge_", "embedding": null, "metadata": {"file_path": "tests/_marks/test_dot.py", "file_name": "test_dot.py", "file_type": "text/x-python", "category": "test", "start_line": 100, "end_line": 109, "span_ids": ["TestDots.test_color_direct"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDots(DotBase):\n\n    def test_color_direct(self):\n\n        x = [1, 2, 3]\n        y = [4, 5, 2]\n        p = Plot(x=x, y=y).add(Dots(color=\"g\")).plot()\n        ax = p._figure.axes[0]\n        points, = ax.collections\n        self.check_offsets(points, x, y)\n        self.check_colors(\"face\", points, [\"g\"] * 3, .2)\n        self.check_colors(\"edge\", points, [\"g\"] * 3, 1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDots.test_color_mapped_TestDots.test_color_mapped.self_check_colors_edge_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDots.test_color_mapped_TestDots.test_color_mapped.self_check_colors_edge_", "embedding": null, "metadata": {"file_path": "tests/_marks/test_dot.py", "file_name": "test_dot.py", "file_type": "text/x-python", "category": "test", "start_line": 111, "end_line": 121, "span_ids": ["TestDots.test_color_mapped"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDots(DotBase):\n\n    def test_color_mapped(self):\n\n        x = [1, 2, 3]\n        y = [4, 5, 2]\n        c = [\"a\", \"b\", \"a\"]\n        p = Plot(x=x, y=y, color=c).add(Dots()).plot()\n        ax = p._figure.axes[0]\n        points, = ax.collections\n        self.check_offsets(points, x, y)\n        self.check_colors(\"face\", points, [\"C0\", \"C1\", \"C0\"], .2)\n        self.check_colors(\"edge\", points, [\"C0\", \"C1\", \"C0\"], 1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDots.test_fill_TestDots.test_fill.self_check_colors_edge_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDots.test_fill_TestDots.test_fill.self_check_colors_edge_", "embedding": null, "metadata": {"file_path": "tests/_marks/test_dot.py", "file_name": "test_dot.py", "file_type": "text/x-python", "category": "test", "start_line": 123, "end_line": 133, "span_ids": ["TestDots.test_fill"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDots(DotBase):\n\n    def test_fill(self):\n\n        x = [1, 2, 3]\n        y = [4, 5, 2]\n        c = [\"a\", \"b\", \"a\"]\n        p = Plot(x=x, y=y, color=c).add(Dots(fill=False)).plot()\n        ax = p._figure.axes[0]\n        points, = ax.collections\n        self.check_offsets(points, x, y)\n        self.check_colors(\"face\", points, [\"C0\", \"C1\", \"C0\"], 0)\n        self.check_colors(\"edge\", points, [\"C0\", \"C1\", \"C0\"], 1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDots.test_pointsize_TestDots.test_stroke.assert_array_equal_points": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDots.test_pointsize_TestDots.test_stroke.assert_array_equal_points", "embedding": null, "metadata": {"file_path": "tests/_marks/test_dot.py", "file_name": "test_dot.py", "file_type": "text/x-python", "category": "test", "start_line": 135, "end_line": 155, "span_ids": ["TestDots.test_stroke", "TestDots.test_pointsize"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDots(DotBase):\n\n    def test_pointsize(self):\n\n        x = [1, 2, 3]\n        y = [4, 5, 2]\n        s = 3\n        p = Plot(x=x, y=y).add(Dots(pointsize=s)).plot()\n        ax = p._figure.axes[0]\n        points, = ax.collections\n        self.check_offsets(points, x, y)\n        assert_array_equal(points.get_sizes(), [s ** 2] * 3)\n\n    def test_stroke(self):\n\n        x = [1, 2, 3]\n        y = [4, 5, 2]\n        s = 3\n        p = Plot(x=x, y=y).add(Dots(stroke=s)).plot()\n        ax = p._figure.axes[0]\n        points, = ax.collections\n        self.check_offsets(points, x, y)\n        assert_array_equal(points.get_linewidths(), [s] * 3)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDots.test_filled_unfilled_mix_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_dot.py_TestDots.test_filled_unfilled_mix_", "embedding": null, "metadata": {"file_path": "tests/_marks/test_dot.py", "file_name": "test_dot.py", "file_type": "text/x-python", "category": "test", "start_line": 157, "end_line": 172, "span_ids": ["TestDots.test_filled_unfilled_mix"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDots(DotBase):\n\n    def test_filled_unfilled_mix(self):\n\n        x = [1, 2]\n        y = [4, 5]\n        marker = [\"a\", \"b\"]\n        shapes = [\"o\", \"x\"]\n\n        mark = Dots(stroke=2)\n        p = Plot(x=x, y=y).add(mark, marker=marker).scale(marker=shapes).plot()\n        ax = p._figure.axes[0]\n        points, = ax.collections\n        self.check_offsets(points, x, y)\n        self.check_colors(\"face\", points, [to_rgba(\"C0\", .2), to_rgba(\"C0\", 0)], None)\n        self.check_colors(\"edge\", points, [\"C0\", \"C0\"], 1)\n        assert_array_equal(points.get_linewidths(), [mark.stroke] * 2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_np_TestPath.test_xy_data.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_np_TestPath.test_xy_data.None_3", "embedding": null, "metadata": {"file_path": "tests/_marks/test_line.py", "file_name": "test_line.py", "file_type": "text/x-python", "category": "test", "start_line": 2, "end_line": 25, "span_ids": ["TestPath.test_xy_data", "imports", "TestPath"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nimport matplotlib as mpl\nfrom matplotlib.colors import same_color, to_rgba\n\nfrom numpy.testing import assert_array_equal\n\nfrom seaborn._core.plot import Plot\nfrom seaborn._marks.line import Line, Path, Lines, Paths, Range\n\n\nclass TestPath:\n\n    def test_xy_data(self):\n\n        x = [1, 5, 3, np.nan, 2]\n        y = [1, 4, 2, 5, 3]\n        g = [1, 2, 1, 1, 2]\n        p = Plot(x=x, y=y, group=g).add(Path()).plot()\n        line1, line2 = p._figure.axes[0].get_lines()\n\n        assert_array_equal(line1.get_xdata(), [1, 3, np.nan])\n        assert_array_equal(line1.get_ydata(), [1, 2, np.nan])\n        assert_array_equal(line2.get_xdata(), [5, 2])\n        assert_array_equal(line2.get_ydata(), [4, 3])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_shared_colors_direct_TestPath.test_separate_colors_direct.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_shared_colors_direct_TestPath.test_separate_colors_direct.None_3", "embedding": null, "metadata": {"file_path": "tests/_marks/test_line.py", "file_name": "test_line.py", "file_type": "text/x-python", "category": "test", "start_line": 27, "end_line": 46, "span_ids": ["TestPath.test_shared_colors_direct", "TestPath.test_separate_colors_direct"], "tokens": 221}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPath:\n\n    def test_shared_colors_direct(self):\n\n        x = y = [1, 2, 3]\n        m = Path(color=\"r\")\n        p = Plot(x=x, y=y).add(m).plot()\n        line, = p._figure.axes[0].get_lines()\n        assert same_color(line.get_color(), \"r\")\n        assert same_color(line.get_markeredgecolor(), \"r\")\n        assert same_color(line.get_markerfacecolor(), \"r\")\n\n    def test_separate_colors_direct(self):\n\n        x = y = [1, 2, 3]\n        y = [1, 2, 3]\n        m = Path(color=\"r\", edgecolor=\"g\", fillcolor=\"b\")\n        p = Plot(x=x, y=y).add(m).plot()\n        line, = p._figure.axes[0].get_lines()\n        assert same_color(line.get_color(), m.color)\n        assert same_color(line.get_markeredgecolor(), m.edgecolor)\n        assert same_color(line.get_markerfacecolor(), m.fillcolor)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_shared_colors_mapped_TestPath.test_shared_colors_mapped.for_i_line_in_enumerate_.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_shared_colors_mapped_TestPath.test_shared_colors_mapped.for_i_line_in_enumerate_.None_2", "embedding": null, "metadata": {"file_path": "tests/_marks/test_line.py", "file_name": "test_line.py", "file_type": "text/x-python", "category": "test", "start_line": 48, "end_line": 58, "span_ids": ["TestPath.test_shared_colors_mapped"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPath:\n\n    def test_shared_colors_mapped(self):\n\n        x = y = [1, 2, 3, 4]\n        c = [\"a\", \"a\", \"b\", \"b\"]\n        m = Path()\n        p = Plot(x=x, y=y, color=c).add(m).plot()\n        ax = p._figure.axes[0]\n        for i, line in enumerate(ax.get_lines()):\n            assert same_color(line.get_color(), f\"C{i}\")\n            assert same_color(line.get_markeredgecolor(), f\"C{i}\")\n            assert same_color(line.get_markerfacecolor(), f\"C{i}\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_separate_colors_mapped_TestPath.test_separate_colors_mapped.for_i_line_in_enumerate_.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_separate_colors_mapped_TestPath.test_separate_colors_mapped.for_i_line_in_enumerate_.None_2", "embedding": null, "metadata": {"file_path": "tests/_marks/test_line.py", "file_name": "test_line.py", "file_type": "text/x-python", "category": "test", "start_line": 60, "end_line": 71, "span_ids": ["TestPath.test_separate_colors_mapped"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPath:\n\n    def test_separate_colors_mapped(self):\n\n        x = y = [1, 2, 3, 4]\n        c = [\"a\", \"a\", \"b\", \"b\"]\n        d = [\"x\", \"y\", \"x\", \"y\"]\n        m = Path()\n        p = Plot(x=x, y=y, color=c, fillcolor=d).add(m).plot()\n        ax = p._figure.axes[0]\n        for i, line in enumerate(ax.get_lines()):\n            assert same_color(line.get_color(), f\"C{i // 2}\")\n            assert same_color(line.get_markeredgecolor(), f\"C{i // 2}\")\n            assert same_color(line.get_markerfacecolor(), f\"C{i % 2}\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_color_with_alpha_TestPath.test_color_with_alpha.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_color_with_alpha_TestPath.test_color_with_alpha.None_3", "embedding": null, "metadata": {"file_path": "tests/_marks/test_line.py", "file_name": "test_line.py", "file_type": "text/x-python", "category": "test", "start_line": 73, "end_line": 81, "span_ids": ["TestPath.test_color_with_alpha"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPath:\n\n    def test_color_with_alpha(self):\n\n        x = y = [1, 2, 3]\n        m = Path(color=(.4, .9, .2, .5), fillcolor=(.2, .2, .3, .9))\n        p = Plot(x=x, y=y).add(m).plot()\n        line, = p._figure.axes[0].get_lines()\n        assert same_color(line.get_color(), m.color)\n        assert same_color(line.get_markeredgecolor(), m.color)\n        assert same_color(line.get_markerfacecolor(), m.fillcolor)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_color_and_alpha_TestPath.test_color_and_alpha.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_color_and_alpha_TestPath.test_color_and_alpha.None_3", "embedding": null, "metadata": {"file_path": "tests/_marks/test_line.py", "file_name": "test_line.py", "file_type": "text/x-python", "category": "test", "start_line": 83, "end_line": 91, "span_ids": ["TestPath.test_color_and_alpha"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPath:\n\n    def test_color_and_alpha(self):\n\n        x = y = [1, 2, 3]\n        m = Path(color=(.4, .9, .2), fillcolor=(.2, .2, .3), alpha=.5)\n        p = Plot(x=x, y=y).add(m).plot()\n        line, = p._figure.axes[0].get_lines()\n        assert same_color(line.get_color(), to_rgba(m.color, m.alpha))\n        assert same_color(line.get_markeredgecolor(), to_rgba(m.color, m.alpha))\n        assert same_color(line.get_markerfacecolor(), to_rgba(m.fillcolor, m.alpha))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_other_props_direct_TestPath.test_other_props_direct.assert_line_get_markeredg": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_other_props_direct_TestPath.test_other_props_direct.assert_line_get_markeredg", "embedding": null, "metadata": {"file_path": "tests/_marks/test_line.py", "file_name": "test_line.py", "file_type": "text/x-python", "category": "test", "start_line": 93, "end_line": 103, "span_ids": ["TestPath.test_other_props_direct"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPath:\n\n    def test_other_props_direct(self):\n\n        x = y = [1, 2, 3]\n        m = Path(marker=\"s\", linestyle=\"--\", linewidth=3, pointsize=10, edgewidth=1)\n        p = Plot(x=x, y=y).add(m).plot()\n        line, = p._figure.axes[0].get_lines()\n        assert line.get_marker() == m.marker\n        assert line.get_linestyle() == m.linestyle\n        assert line.get_linewidth() == m.linewidth\n        assert line.get_markersize() == m.pointsize\n        assert line.get_markeredgewidth() == m.edgewidth", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_other_props_mapped_TestPath.test_other_props_mapped.assert_line1_get_markersi": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_other_props_mapped_TestPath.test_other_props_mapped.assert_line1_get_markersi", "embedding": null, "metadata": {"file_path": "tests/_marks/test_line.py", "file_name": "test_line.py", "file_type": "text/x-python", "category": "test", "start_line": 105, "end_line": 115, "span_ids": ["TestPath.test_other_props_mapped"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPath:\n\n    def test_other_props_mapped(self):\n\n        x = y = [1, 2, 3, 4]\n        g = [\"a\", \"a\", \"b\", \"b\"]\n        m = Path()\n        p = Plot(x=x, y=y, marker=g, linestyle=g, pointsize=g).add(m).plot()\n        line1, line2 = p._figure.axes[0].get_lines()\n        assert line1.get_marker() != line2.get_marker()\n        # Matplotlib bug in storing linestyle from dash pattern\n        # assert line1.get_linestyle() != line2.get_linestyle()\n        assert line1.get_markersize() != line2.get_markersize()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_capstyle_TestPath.test_capstyle.assert_line_get_solid_cap": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPath.test_capstyle_TestPath.test_capstyle.assert_line_get_solid_cap", "embedding": null, "metadata": {"file_path": "tests/_marks/test_line.py", "file_name": "test_line.py", "file_type": "text/x-python", "category": "test", "start_line": 117, "end_line": 132, "span_ids": ["TestPath.test_capstyle"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPath:\n\n    def test_capstyle(self):\n\n        x = y = [1, 2]\n        rc = {\"lines.solid_capstyle\": \"projecting\", \"lines.dash_capstyle\": \"round\"}\n\n        p = Plot(x, y).add(Path()).theme(rc).plot()\n        line, = p._figure.axes[0].get_lines()\n        assert line.get_dash_capstyle() == \"projecting\"\n\n        p = Plot(x, y).add(Path(linestyle=\"--\")).theme(rc).plot()\n        line, = p._figure.axes[0].get_lines()\n        assert line.get_dash_capstyle() == \"round\"\n\n        p = Plot(x, y).add(Path({\"solid_capstyle\": \"butt\"})).theme(rc).plot()\n        line, = p._figure.axes[0].get_lines()\n        assert line.get_solid_capstyle() == \"butt\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestLine_TestLine.test_xy_data.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestLine_TestLine.test_xy_data.None_3", "embedding": null, "metadata": {"file_path": "tests/_marks/test_line.py", "file_name": "test_line.py", "file_type": "text/x-python", "category": "test", "start_line": 135, "end_line": 150, "span_ids": ["TestLine", "TestLine.test_xy_data"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLine:\n\n    # Most behaviors shared with Path and covered by above tests\n\n    def test_xy_data(self):\n\n        x = [1, 5, 3, np.nan, 2]\n        y = [1, 4, 2, 5, 3]\n        g = [1, 2, 1, 1, 2]\n        p = Plot(x=x, y=y, group=g).add(Line()).plot()\n        line1, line2 = p._figure.axes[0].get_lines()\n\n        assert_array_equal(line1.get_xdata(), [1, 3])\n        assert_array_equal(line1.get_ydata(), [1, 2])\n        assert_array_equal(line2.get_xdata(), [2, 5])\n        assert_array_equal(line2.get_ydata(), [3, 4])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPaths_TestPaths.test_xy_data.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPaths_TestPaths.test_xy_data.None_3", "embedding": null, "metadata": {"file_path": "tests/_marks/test_line.py", "file_name": "test_line.py", "file_type": "text/x-python", "category": "test", "start_line": 153, "end_line": 169, "span_ids": ["TestPaths.test_xy_data", "TestPaths"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPaths:\n\n    def test_xy_data(self):\n\n        x = [1, 5, 3, np.nan, 2]\n        y = [1, 4, 2, 5, 3]\n        g = [1, 2, 1, 1, 2]\n        p = Plot(x=x, y=y, group=g).add(Paths()).plot()\n        lines, = p._figure.axes[0].collections\n\n        verts = lines.get_paths()[0].vertices.T\n        assert_array_equal(verts[0], [1, 3, np.nan])\n        assert_array_equal(verts[1], [1, 2, np.nan])\n\n        verts = lines.get_paths()[1].vertices.T\n        assert_array_equal(verts[0], [5, 2])\n        assert_array_equal(verts[1], [4, 3])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPaths.test_props_direct_TestPaths.test_props_direct.assert_lines_get_linestyl": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPaths.test_props_direct_TestPaths.test_props_direct.assert_lines_get_linestyl", "embedding": null, "metadata": {"file_path": "tests/_marks/test_line.py", "file_name": "test_line.py", "file_type": "text/x-python", "category": "test", "start_line": 171, "end_line": 180, "span_ids": ["TestPaths.test_props_direct"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPaths:\n\n    def test_props_direct(self):\n\n        x = y = [1, 2, 3]\n        m = Paths(color=\"r\", linewidth=1, linestyle=(3, 1))\n        p = Plot(x=x, y=y).add(m).plot()\n        lines, = p._figure.axes[0].collections\n\n        assert same_color(lines.get_color().squeeze(), m.color)\n        assert lines.get_linewidth().item() == m.linewidth\n        assert lines.get_linestyle()[0] == (0, list(m.linestyle))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPaths.test_props_mapped_TestPaths.test_props_mapped.assert_lines_get_linestyl": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPaths.test_props_mapped_TestPaths.test_props_mapped.assert_lines_get_linestyl", "embedding": null, "metadata": {"file_path": "tests/_marks/test_line.py", "file_name": "test_line.py", "file_type": "text/x-python", "category": "test", "start_line": 182, "end_line": 191, "span_ids": ["TestPaths.test_props_mapped"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPaths:\n\n    def test_props_mapped(self):\n\n        x = y = [1, 2, 3, 4]\n        g = [\"a\", \"a\", \"b\", \"b\"]\n        p = Plot(x=x, y=y, color=g, linewidth=g, linestyle=g).add(Paths()).plot()\n        lines, = p._figure.axes[0].collections\n\n        assert not np.array_equal(lines.get_colors()[0], lines.get_colors()[1])\n        assert lines.get_linewidths()[0] != lines.get_linewidth()[1]\n        assert lines.get_linestyle()[0] != lines.get_linestyle()[1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPaths.test_color_with_alpha_TestPaths.test_color_and_alpha.assert_same_color_lines_g": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPaths.test_color_with_alpha_TestPaths.test_color_and_alpha.assert_same_color_lines_g", "embedding": null, "metadata": {"file_path": "tests/_marks/test_line.py", "file_name": "test_line.py", "file_type": "text/x-python", "category": "test", "start_line": 193, "end_line": 207, "span_ids": ["TestPaths.test_color_and_alpha", "TestPaths.test_color_with_alpha"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPaths:\n\n    def test_color_with_alpha(self):\n\n        x = y = [1, 2, 3]\n        m = Paths(color=(.2, .6, .9, .5))\n        p = Plot(x=x, y=y).add(m).plot()\n        lines, = p._figure.axes[0].collections\n        assert same_color(lines.get_colors().squeeze(), m.color)\n\n    def test_color_and_alpha(self):\n\n        x = y = [1, 2, 3]\n        m = Paths(color=(.2, .6, .9), alpha=.5)\n        p = Plot(x=x, y=y).add(m).plot()\n        lines, = p._figure.axes[0].collections\n        assert same_color(lines.get_colors().squeeze(), to_rgba(m.color, m.alpha))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPaths.test_capstyle_TestPaths.test_capstyle.with_mpl_rc_context_rc_.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestPaths.test_capstyle_TestPaths.test_capstyle.with_mpl_rc_context_rc_.None_2", "embedding": null, "metadata": {"file_path": "tests/_marks/test_line.py", "file_name": "test_line.py", "file_type": "text/x-python", "category": "test", "start_line": 209, "end_line": 225, "span_ids": ["TestPaths.test_capstyle"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPaths:\n\n    def test_capstyle(self):\n\n        x = y = [1, 2]\n        rc = {\"lines.solid_capstyle\": \"projecting\"}\n\n        with mpl.rc_context(rc):\n            p = Plot(x, y).add(Paths()).plot()\n            lines = p._figure.axes[0].collections[0]\n            assert lines.get_capstyle() == \"projecting\"\n\n            p = Plot(x, y).add(Paths(linestyle=\"--\")).plot()\n            lines = p._figure.axes[0].collections[0]\n            assert lines.get_capstyle() == \"projecting\"\n\n            p = Plot(x, y).add(Paths({\"capstyle\": \"butt\"})).plot()\n            lines = p._figure.axes[0].collections[0]\n            assert lines.get_capstyle() == \"butt\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestLines_TestLines.test_xy_data.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestLines_TestLines.test_xy_data.None_3", "embedding": null, "metadata": {"file_path": "tests/_marks/test_line.py", "file_name": "test_line.py", "file_type": "text/x-python", "category": "test", "start_line": 228, "end_line": 244, "span_ids": ["TestLines.test_xy_data", "TestLines"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLines:\n\n    def test_xy_data(self):\n\n        x = [1, 5, 3, np.nan, 2]\n        y = [1, 4, 2, 5, 3]\n        g = [1, 2, 1, 1, 2]\n        p = Plot(x=x, y=y, group=g).add(Lines()).plot()\n        lines, = p._figure.axes[0].collections\n\n        verts = lines.get_paths()[0].vertices.T\n        assert_array_equal(verts[0], [1, 3])\n        assert_array_equal(verts[1], [1, 2])\n\n        verts = lines.get_paths()[1].vertices.T\n        assert_array_equal(verts[0], [2, 5])\n        assert_array_equal(verts[1], [3, 4])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestRange_TestRange.test_xy_data.for_i_path_in_enumerate_.None_1": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestRange_TestRange.test_xy_data.for_i_path_in_enumerate_.None_1", "embedding": null, "metadata": {"file_path": "tests/_marks/test_line.py", "file_name": "test_line.py", "file_type": "text/x-python", "category": "test", "start_line": 247, "end_line": 261, "span_ids": ["TestRange", "TestRange.test_xy_data"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRange:\n\n    def test_xy_data(self):\n\n        x = [1, 2]\n        ymin = [1, 4]\n        ymax = [2, 3]\n\n        p = Plot(x=x, ymin=ymin, ymax=ymax).add(Range()).plot()\n        lines, = p._figure.axes[0].collections\n\n        for i, path in enumerate(lines.get_paths()):\n            verts = path.vertices.T\n            assert_array_equal(verts[0], [x[i], x[i]])\n            assert_array_equal(verts[1], [ymin[i], ymax[i]])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestRange.test_mapped_color_TestRange.test_mapped_color.for_i_path_in_enumerate_.assert_same_color_lines_g": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestRange.test_mapped_color_TestRange.test_mapped_color.for_i_path_in_enumerate_.assert_same_color_lines_g", "embedding": null, "metadata": {"file_path": "tests/_marks/test_line.py", "file_name": "test_line.py", "file_type": "text/x-python", "category": "test", "start_line": 263, "end_line": 277, "span_ids": ["TestRange.test_mapped_color"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRange:\n\n    def test_mapped_color(self):\n\n        x = [1, 2, 1, 2]\n        ymin = [1, 4, 3, 2]\n        ymax = [2, 3, 1, 4]\n        group = [\"a\", \"a\", \"b\", \"b\"]\n\n        p = Plot(x=x, ymin=ymin, ymax=ymax, color=group).add(Range()).plot()\n        lines, = p._figure.axes[0].collections\n\n        for i, path in enumerate(lines.get_paths()):\n            verts = path.vertices.T\n            assert_array_equal(verts[0], [x[i], x[i]])\n            assert_array_equal(verts[1], [ymin[i], ymax[i]])\n            assert same_color(lines.get_colors()[i], f\"C{i // 2}\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestRange.test_direct_properties_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_marks/test_line.py_TestRange.test_direct_properties_", "embedding": null, "metadata": {"file_path": "tests/_marks/test_line.py", "file_name": "test_line.py", "file_type": "text/x-python", "category": "test", "start_line": 279, "end_line": 292, "span_ids": ["TestRange.test_direct_properties"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRange:\n\n    def test_direct_properties(self):\n\n        x = [1, 2]\n        ymin = [1, 4]\n        ymax = [2, 3]\n\n        m = Range(color=\"r\", linewidth=4)\n        p = Plot(x=x, ymin=ymin, ymax=ymax).add(m).plot()\n        lines, = p._figure.axes[0].collections\n\n        for i, path in enumerate(lines.get_paths()):\n            assert same_color(lines.get_colors()[i], m.color)\n            assert lines.get_linewidths()[i] == m.linewidth", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_aggregation.py_np_AggregationFixtures.get_groupby.return.GroupBy_cols_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_aggregation.py_np_AggregationFixtures.get_groupby.return.GroupBy_cols_", "embedding": null, "metadata": {"file_path": "tests/_stats/test_aggregation.py", "file_name": "test_aggregation.py", "file_type": "text/x-python", "category": "test", "start_line": 2, "end_line": 29, "span_ids": ["AggregationFixtures.get_groupby", "AggregationFixtures.df", "imports", "AggregationFixtures"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nimport pandas as pd\n\nimport pytest\nfrom pandas.testing import assert_frame_equal\n\nfrom seaborn._core.groupby import GroupBy\nfrom seaborn._stats.aggregation import Agg, Est\n\n\nclass AggregationFixtures:\n\n    @pytest.fixture\n    def df(self, rng):\n\n        n = 30\n        return pd.DataFrame(dict(\n            x=rng.uniform(0, 7, n).round(),\n            y=rng.normal(size=n),\n            color=rng.choice([\"a\", \"b\", \"c\"], n),\n            group=rng.choice([\"x\", \"y\"], n),\n        ))\n\n    def get_groupby(self, df, orient):\n\n        other = {\"x\": \"y\", \"y\": \"x\"}[orient]\n        cols = [c for c in df if c != other]\n        return GroupBy(cols)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_aggregation.py_TestAgg_TestAgg.test_func.assert_frame_equal_res_e": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_aggregation.py_TestAgg_TestAgg.test_func.assert_frame_equal_res_e", "embedding": null, "metadata": {"file_path": "tests/_stats/test_aggregation.py", "file_name": "test_aggregation.py", "file_type": "text/x-python", "category": "test", "start_line": 32, "end_line": 75, "span_ids": ["TestAgg.test_default_multi", "TestAgg.test_func", "TestAgg", "TestAgg.test_default"], "tokens": 334}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestAgg(AggregationFixtures):\n\n    def test_default(self, df):\n\n        ori = \"x\"\n        df = df[[\"x\", \"y\"]]\n        gb = self.get_groupby(df, ori)\n        res = Agg()(df, gb, ori, {})\n\n        expected = df.groupby(\"x\", as_index=False)[\"y\"].mean()\n        assert_frame_equal(res, expected)\n\n    def test_default_multi(self, df):\n\n        ori = \"x\"\n        gb = self.get_groupby(df, ori)\n        res = Agg()(df, gb, ori, {})\n\n        grp = [\"x\", \"color\", \"group\"]\n        index = pd.MultiIndex.from_product(\n            [sorted(df[\"x\"].unique()), df[\"color\"].unique(), df[\"group\"].unique()],\n            names=[\"x\", \"color\", \"group\"]\n        )\n        expected = (\n            df\n            .groupby(grp)\n            .agg(\"mean\")\n            .reindex(index=index)\n            .dropna()\n            .reset_index()\n            .reindex(columns=df.columns)\n        )\n        assert_frame_equal(res, expected)\n\n    @pytest.mark.parametrize(\"func\", [\"max\", lambda x: float(len(x) % 2)])\n    def test_func(self, df, func):\n\n        ori = \"x\"\n        df = df[[\"x\", \"y\"]]\n        gb = self.get_groupby(df, ori)\n        res = Agg(func)(df, gb, ori, {})\n\n        expected = df.groupby(\"x\", as_index=False)[\"y\"].agg(func)\n        assert_frame_equal(res, expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_aggregation.py_TestEst_TestEst.test_mean_sd.assert_frame_equal_res_e": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_aggregation.py_TestEst_TestEst.test_mean_sd.assert_frame_equal_res_e", "embedding": null, "metadata": {"file_path": "tests/_stats/test_aggregation.py", "file_name": "test_aggregation.py", "file_type": "text/x-python", "category": "test", "start_line": 78, "end_line": 94, "span_ids": ["TestEst.test_mean_sd", "TestEst"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestEst(AggregationFixtures):\n\n    # Note: Most of the underlying code is exercised in tests/test_statistics\n\n    @pytest.mark.parametrize(\"func\", [np.mean, \"mean\"])\n    def test_mean_sd(self, df, func):\n\n        ori = \"x\"\n        df = df[[\"x\", \"y\"]]\n        gb = self.get_groupby(df, ori)\n        res = Est(func, \"sd\")(df, gb, ori, {})\n\n        grouped = df.groupby(\"x\", as_index=False)[\"y\"]\n        est = grouped.mean()\n        err = grouped.std().fillna(0)  # fillna needed only on pinned tests\n        expected = est.assign(ymin=est[\"y\"] - err[\"y\"], ymax=est[\"y\"] + err[\"y\"])\n        assert_frame_equal(res, expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_aggregation.py_TestEst.test_sd_single_obs_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_aggregation.py_TestEst.test_sd_single_obs_", "embedding": null, "metadata": {"file_path": "tests/_stats/test_aggregation.py", "file_name": "test_aggregation.py", "file_type": "text/x-python", "category": "test", "start_line": 96, "end_line": 126, "span_ids": ["TestEst.test_median_pi", "TestEst.test_seed", "TestEst.test_sd_single_obs"], "tokens": 284}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestEst(AggregationFixtures):\n\n    def test_sd_single_obs(self):\n\n        y = 1.5\n        ori = \"x\"\n        df = pd.DataFrame([{\"x\": \"a\", \"y\": y}])\n        gb = self.get_groupby(df, ori)\n        res = Est(\"mean\", \"sd\")(df, gb, ori, {})\n        expected = df.assign(ymin=y, ymax=y)\n        assert_frame_equal(res, expected)\n\n    def test_median_pi(self, df):\n\n        ori = \"x\"\n        df = df[[\"x\", \"y\"]]\n        gb = self.get_groupby(df, ori)\n        res = Est(\"median\", (\"pi\", 100))(df, gb, ori, {})\n\n        grouped = df.groupby(\"x\", as_index=False)[\"y\"]\n        est = grouped.median()\n        expected = est.assign(ymin=grouped.min()[\"y\"], ymax=grouped.max()[\"y\"])\n        assert_frame_equal(res, expected)\n\n    def test_seed(self, df):\n\n        ori = \"x\"\n        gb = self.get_groupby(df, ori)\n        args = df, gb, ori, {}\n        res1 = Est(\"mean\", \"ci\", seed=99)(*args)\n        res2 = Est(\"mean\", \"ci\", seed=99)(*args)\n        assert_frame_equal(res1, res2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_histogram.py_np_TestHist.test_proportion_stat.assert_out_y_sum_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_histogram.py_np_TestHist.test_proportion_stat.assert_out_y_sum_", "embedding": null, "metadata": {"file_path": "tests/_stats/test_histogram.py", "file_name": "test_histogram.py", "file_type": "text/x-python", "category": "test", "start_line": 2, "end_line": 105, "span_ids": ["TestHist.test_string_bins", "TestHist.test_discrete_bins", "TestHist.single_args.Scale", "TestHist.triple_args.Scale:2", "TestHist.test_discrete_bins_from_nominal_scale", "TestHist", "TestHist.single_args.Scale:2", "TestHist.triple_args", "TestHist.test_int_bins", "TestHist.test_array_bins", "TestHist.triple_args.Scale", "TestHist.single_args", "TestHist.test_binwidth", "TestHist.test_binrange", "imports", "TestHist.test_count_stat", "TestHist.test_proportion_stat", "TestHist.test_probability_stat"], "tokens": 845}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nimport pandas as pd\n\nimport pytest\nfrom numpy.testing import assert_array_equal\n\nfrom seaborn._core.groupby import GroupBy\nfrom seaborn._stats.histogram import Hist\n\n\nclass TestHist:\n\n    @pytest.fixture\n    def single_args(self):\n\n        groupby = GroupBy([\"group\"])\n\n        class Scale:\n            scale_type = \"continuous\"\n\n        return groupby, \"x\", {\"x\": Scale()}\n\n    @pytest.fixture\n    def triple_args(self):\n\n        groupby = GroupBy([\"group\", \"a\", \"s\"])\n\n        class Scale:\n            scale_type = \"continuous\"\n\n        return groupby, \"x\", {\"x\": Scale()}\n\n    def test_string_bins(self, long_df):\n\n        h = Hist(bins=\"sqrt\")\n        bin_kws = h._define_bin_params(long_df, \"x\", \"continuous\")\n        assert bin_kws[\"range\"] == (long_df[\"x\"].min(), long_df[\"x\"].max())\n        assert bin_kws[\"bins\"] == int(np.sqrt(len(long_df)))\n\n    def test_int_bins(self, long_df):\n\n        n = 24\n        h = Hist(bins=n)\n        bin_kws = h._define_bin_params(long_df, \"x\", \"continuous\")\n        assert bin_kws[\"range\"] == (long_df[\"x\"].min(), long_df[\"x\"].max())\n        assert bin_kws[\"bins\"] == n\n\n    def test_array_bins(self, long_df):\n\n        bins = [-3, -2, 1, 2, 3]\n        h = Hist(bins=bins)\n        bin_kws = h._define_bin_params(long_df, \"x\", \"continuous\")\n        assert_array_equal(bin_kws[\"bins\"], bins)\n\n    def test_binwidth(self, long_df):\n\n        binwidth = .5\n        h = Hist(binwidth=binwidth)\n        bin_kws = h._define_bin_params(long_df, \"x\", \"continuous\")\n        n_bins = bin_kws[\"bins\"]\n        left, right = bin_kws[\"range\"]\n        assert (right - left) / n_bins == pytest.approx(binwidth)\n\n    def test_binrange(self, long_df):\n\n        binrange = (-4, 4)\n        h = Hist(binrange=binrange)\n        bin_kws = h._define_bin_params(long_df, \"x\", \"continuous\")\n        assert bin_kws[\"range\"] == binrange\n\n    def test_discrete_bins(self, long_df):\n\n        h = Hist(discrete=True)\n        x = long_df[\"x\"].astype(int)\n        bin_kws = h._define_bin_params(long_df.assign(x=x), \"x\", \"continuous\")\n        assert bin_kws[\"range\"] == (x.min() - .5, x.max() + .5)\n        assert bin_kws[\"bins\"] == (x.max() - x.min() + 1)\n\n    def test_discrete_bins_from_nominal_scale(self, rng):\n\n        h = Hist()\n        x = rng.randint(0, 5, 10)\n        df = pd.DataFrame({\"x\": x})\n        bin_kws = h._define_bin_params(df, \"x\", \"nominal\")\n        assert bin_kws[\"range\"] == (x.min() - .5, x.max() + .5)\n        assert bin_kws[\"bins\"] == (x.max() - x.min() + 1)\n\n    def test_count_stat(self, long_df, single_args):\n\n        h = Hist(stat=\"count\")\n        out = h(long_df, *single_args)\n        assert out[\"y\"].sum() == len(long_df)\n\n    def test_probability_stat(self, long_df, single_args):\n\n        h = Hist(stat=\"probability\")\n        out = h(long_df, *single_args)\n        assert out[\"y\"].sum() == 1\n\n    def test_proportion_stat(self, long_df, single_args):\n\n        h = Hist(stat=\"proportion\")\n        out = h(long_df, *single_args)\n        assert out[\"y\"].sum() == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_histogram.py_TestHist.test_percent_stat_TestHist.test_histogram_single.assert_array_equal_out_s": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_histogram.py_TestHist.test_percent_stat_TestHist.test_histogram_single.assert_array_equal_out_s", "embedding": null, "metadata": {"file_path": "tests/_stats/test_histogram.py", "file_name": "test_histogram.py", "file_type": "text/x-python", "category": "test", "start_line": 107, "end_line": 196, "span_ids": ["TestHist.test_density_stat", "TestHist.test_cumulative_count", "TestHist.test_cumulative_density", "TestHist.test_percent_stat", "TestHist.test_cumulative_proportion", "TestHist.test_common_norm_default", "TestHist.test_frequency_stat", "TestHist.test_common_norm_false", "TestHist.test_common_bins_default", "TestHist.test_common_bins_subset", "TestHist.test_common_bins_false", "TestHist.test_histogram_single", "TestHist.test_common_norm_subset"], "tokens": 772}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHist:\n\n    def test_percent_stat(self, long_df, single_args):\n\n        h = Hist(stat=\"percent\")\n        out = h(long_df, *single_args)\n        assert out[\"y\"].sum() == 100\n\n    def test_density_stat(self, long_df, single_args):\n\n        h = Hist(stat=\"density\")\n        out = h(long_df, *single_args)\n        assert (out[\"y\"] * out[\"space\"]).sum() == 1\n\n    def test_frequency_stat(self, long_df, single_args):\n\n        h = Hist(stat=\"frequency\")\n        out = h(long_df, *single_args)\n        assert (out[\"y\"] * out[\"space\"]).sum() == len(long_df)\n\n    def test_cumulative_count(self, long_df, single_args):\n\n        h = Hist(stat=\"count\", cumulative=True)\n        out = h(long_df, *single_args)\n        assert out[\"y\"].max() == len(long_df)\n\n    def test_cumulative_proportion(self, long_df, single_args):\n\n        h = Hist(stat=\"proportion\", cumulative=True)\n        out = h(long_df, *single_args)\n        assert out[\"y\"].max() == 1\n\n    def test_cumulative_density(self, long_df, single_args):\n\n        h = Hist(stat=\"density\", cumulative=True)\n        out = h(long_df, *single_args)\n        assert out[\"y\"].max() == 1\n\n    def test_common_norm_default(self, long_df, triple_args):\n\n        h = Hist(stat=\"percent\")\n        out = h(long_df, *triple_args)\n        assert out[\"y\"].sum() == pytest.approx(100)\n\n    def test_common_norm_false(self, long_df, triple_args):\n\n        h = Hist(stat=\"percent\", common_norm=False)\n        out = h(long_df, *triple_args)\n        for _, out_part in out.groupby([\"a\", \"s\"]):\n            assert out_part[\"y\"].sum() == pytest.approx(100)\n\n    def test_common_norm_subset(self, long_df, triple_args):\n\n        h = Hist(stat=\"percent\", common_norm=[\"a\"])\n        out = h(long_df, *triple_args)\n        for _, out_part in out.groupby([\"a\"]):\n            assert out_part[\"y\"].sum() == pytest.approx(100)\n\n    def test_common_bins_default(self, long_df, triple_args):\n\n        h = Hist()\n        out = h(long_df, *triple_args)\n        bins = []\n        for _, out_part in out.groupby([\"a\", \"s\"]):\n            bins.append(tuple(out_part[\"x\"]))\n        assert len(set(bins)) == 1\n\n    def test_common_bins_false(self, long_df, triple_args):\n\n        h = Hist(common_bins=False)\n        out = h(long_df, *triple_args)\n        bins = []\n        for _, out_part in out.groupby([\"a\", \"s\"]):\n            bins.append(tuple(out_part[\"x\"]))\n        assert len(set(bins)) == len(out.groupby([\"a\", \"s\"]))\n\n    def test_common_bins_subset(self, long_df, triple_args):\n\n        h = Hist(common_bins=False)\n        out = h(long_df, *triple_args)\n        bins = []\n        for _, out_part in out.groupby([\"a\"]):\n            bins.append(tuple(out_part[\"x\"]))\n        assert len(set(bins)) == out[\"a\"].nunique()\n\n    def test_histogram_single(self, long_df, single_args):\n\n        h = Hist()\n        out = h(long_df, *single_args)\n        hist, edges = np.histogram(long_df[\"x\"], bins=\"auto\")\n        assert_array_equal(out[\"y\"], hist)\n        assert_array_equal(out[\"space\"], np.diff(edges))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_histogram.py_TestHist.test_histogram_multiple_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/_stats/test_histogram.py_TestHist.test_histogram_multiple_", "embedding": null, "metadata": {"file_path": "tests/_stats/test_histogram.py", "file_name": "test_histogram.py", "file_type": "text/x-python", "category": "test", "start_line": 198, "end_line": 208, "span_ids": ["TestHist.test_histogram_multiple"], "tokens": 133}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHist:\n\n    def test_histogram_multiple(self, long_df, triple_args):\n\n        h = Hist()\n        out = h(long_df, *triple_args)\n        bins = np.histogram_bin_edges(long_df[\"x\"], \"auto\")\n        for (a, s), out_part in out.groupby([\"a\", \"s\"]):\n            x = long_df.loc[(long_df[\"a\"] == a) & (long_df[\"s\"] == s), \"x\"]\n            hist, edges = np.histogram(x, bins=bins)\n            assert_array_equal(out_part[\"y\"], hist)\n            assert_array_equal(out_part[\"space\"], np.diff(edges))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_apply_TestFacetGrid.test_pipe.assert_g_figure_get_facec": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_apply_TestFacetGrid.test_pipe.assert_g_figure_get_facec", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 676, "end_line": 697, "span_ids": ["TestFacetGrid.test_pipe", "TestFacetGrid.test_apply"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_apply(self, long_df):\n\n        def f(grid, color):\n            grid.figure.set_facecolor(color)\n\n        color = (.1, .6, .3, .9)\n        g = ag.FacetGrid(long_df)\n        res = g.apply(f, color)\n        assert res is g\n        assert g.figure.get_facecolor() == color\n\n    def test_pipe(self, long_df):\n\n        def f(grid, color):\n            grid.figure.set_facecolor(color)\n            return color\n\n        color = (.1, .6, .3, .9)\n        g = ag.FacetGrid(long_df)\n        res = g.pipe(f, color)\n        assert res == color\n        assert g.figure.get_facecolor() == color", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_tick_params_TestFacetGrid.test_tick_params.for_ax_in_g_axes_flat_.for_axis_in_xaxis_ya.for_tick_in_getattr_ax_a.assert_tick_get_pad_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestFacetGrid.test_tick_params_TestFacetGrid.test_tick_params.for_ax_in_g_axes_flat_.for_axis_in_xaxis_ya.for_tick_in_getattr_ax_a.assert_tick_get_pad_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 699, "end_line": 710, "span_ids": ["TestFacetGrid.test_tick_params"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestFacetGrid:\n\n    def test_tick_params(self):\n\n        g = ag.FacetGrid(self.df, row=\"a\", col=\"b\")\n        color = \"blue\"\n        pad = 3\n        g.tick_params(pad=pad, color=color)\n        for ax in g.axes.flat:\n            for axis in [\"xaxis\", \"yaxis\"]:\n                for tick in getattr(ax, axis).get_major_ticks():\n                    assert mpl.colors.same_color(tick.tick1line.get_color(), color)\n                    assert mpl.colors.same_color(tick.tick2line.get_color(), color)\n                    assert tick.get_pad() == pad", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_corner_TestPairGrid.test_corner.assert_g_axes_0_0_get_y": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_corner_TestPairGrid.test_corner.assert_g_axes_0_0_get_y", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 792, "end_line": 809, "span_ids": ["TestPairGrid.test_corner"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_corner(self):\n\n        plot_vars = [\"x\", \"y\", \"z\"]\n        g = ag.PairGrid(self.df, vars=plot_vars, corner=True)\n        corner_size = sum(i + 1 for i in range(len(plot_vars)))\n        assert len(g.figure.axes) == corner_size\n\n        g.map_diag(plt.hist)\n        assert len(g.figure.axes) == (corner_size + len(plot_vars))\n\n        for ax in np.diag(g.axes):\n            assert not ax.yaxis.get_visible()\n\n        plot_vars = [\"x\", \"y\", \"z\"]\n        g = ag.PairGrid(self.df, vars=plot_vars, corner=True)\n        g.map(scatterplot)\n        assert len(g.figure.axes) == corner_size\n        assert g.axes[0, 0].get_ylabel() == \"x\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_pairplot_markers_TestPairGrid.test_pairplot_markers.with_pytest_warns_UserWar.g.ag_pairplot_self_df_hue_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_pairplot_markers_TestPairGrid.test_pairplot_markers.with_pytest_warns_UserWar.g.ag_pairplot_self_df_hue_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1415, "end_line": 1425, "span_ids": ["TestPairGrid.test_pairplot_markers"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_pairplot_markers(self):\n\n        vars = [\"x\", \"y\", \"z\"]\n        markers = [\"o\", \"X\", \"s\"]\n        g = ag.pairplot(self.df, hue=\"a\", vars=vars, markers=markers)\n        m1 = g._legend.legendHandles[0].get_paths()[0]\n        m2 = g._legend.legendHandles[1].get_paths()[0]\n        assert m1 != m2\n\n        with pytest.warns(UserWarning):\n            g = ag.pairplot(self.df, hue=\"a\", vars=vars, markers=markers[:-2])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_corner_despine_TestPairGrid.test_tick_params.for_ax_in_g_axes_flat_.for_axis_in_xaxis_ya.for_tick_in_getattr_ax_a.assert_tick_get_pad_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_axisgrid.py_TestPairGrid.test_corner_despine_TestPairGrid.test_tick_params.for_ax_in_g_axes_flat_.for_axis_in_xaxis_ya.for_tick_in_getattr_ax_a.assert_tick_get_pad_", "embedding": null, "metadata": {"file_path": "tests/test_axisgrid.py", "file_name": "test_axisgrid.py", "file_type": "text/x-python", "category": "test", "start_line": 1427, "end_line": 1458, "span_ids": ["TestPairGrid.test_legend", "TestPairGrid.test_corner_set", "TestPairGrid.test_corner_despine", "TestPairGrid.test_tick_params"], "tokens": 273}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPairGrid:\n\n    def test_corner_despine(self):\n\n        g = ag.PairGrid(self.df, corner=True, despine=False)\n        g.map_diag(histplot)\n        assert g.axes[0, 0].spines[\"top\"].get_visible()\n\n    def test_corner_set(self):\n\n        g = ag.PairGrid(self.df, corner=True, despine=False)\n        g.set(xlim=(0, 10))\n        assert g.axes[-1, 0].get_xlim() == (0, 10)\n\n    def test_legend(self):\n\n        g1 = ag.pairplot(self.df, hue=\"a\")\n        assert isinstance(g1.legend, mpl.legend.Legend)\n\n        g2 = ag.pairplot(self.df)\n        assert g2.legend is None\n\n    def test_tick_params(self):\n\n        g = ag.PairGrid(self.df)\n        color = \"red\"\n        pad = 3\n        g.tick_params(pad=pad, color=color)\n        for ax in g.axes.flat:\n            for axis in [\"xaxis\", \"yaxis\"]:\n                for tick in getattr(ax, axis).get_major_ticks():\n                    assert mpl.colors.same_color(tick.tick1line.get_color(), color)\n                    assert mpl.colors.same_color(tick.tick2line.get_color(), color)\n                    assert tick.get_pad() == pad", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestStripPlot.test_jitter_TestSwarmPlot.func.staticmethod_partial_swar": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestStripPlot.test_jitter_TestSwarmPlot.func.staticmethod_partial_swar", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2158, "end_line": 2197, "span_ids": ["TestSwarmPlot", "TestStripPlot.test_jitter"], "tokens": 308}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestStripPlot(SharedScatterTests):\n\n    @pytest.mark.parametrize(\n        \"orient,jitter\",\n        itertools.product([\"v\", \"h\"], [True, .1]),\n    )\n    def test_jitter(self, long_df, orient, jitter):\n\n        cat_var, val_var = \"a\", \"y\"\n        if orient == \"v\":\n            x_var, y_var = cat_var, val_var\n            cat_idx, val_idx = 0, 1\n        else:\n            x_var, y_var = val_var, cat_var\n            cat_idx, val_idx = 1, 0\n\n        cat_vals = categorical_order(long_df[cat_var])\n\n        ax = stripplot(\n            data=long_df, x=x_var, y=y_var, jitter=jitter,\n        )\n\n        if jitter is True:\n            jitter_range = .4\n        else:\n            jitter_range = 2 * jitter\n\n        for i, level in enumerate(cat_vals):\n\n            vals = long_df.loc[long_df[cat_var] == level, val_var]\n            points = ax.collections[i].get_offsets().T\n            cat_points = points[cat_idx]\n            val_points = points[val_idx]\n\n            assert_array_equal(val_points, vals)\n            assert np.std(cat_points) > 0\n            assert np.ptp(cat_points) <= jitter_range\n\n\nclass TestSwarmPlot(SharedScatterTests):\n\n    func = staticmethod(partial(swarmplot, warn_thresh=1))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter_TestBarPlotter.test_nested_width.None_2": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter_TestBarPlotter.test_nested_width.None_2", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2200, "end_line": 2227, "span_ids": ["TestBarPlotter", "TestBarPlotter.test_nested_width"], "tokens": 263}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBarPlotter(CategoricalFixture):\n\n    default_kws = dict(\n        data=None, x=None, y=None, hue=None, units=None,\n        estimator=\"mean\", errorbar=(\"ci\", 95), n_boot=100, seed=None,\n        order=None, hue_order=None,\n        orient=None, color=None, palette=None,\n        saturation=.75, width=0.8,\n        errcolor=\".26\", errwidth=None,\n        capsize=None, dodge=True\n    )\n\n    def test_nested_width(self):\n\n        ax = cat.barplot(data=self.df, x=\"g\", y=\"y\", hue=\"h\")\n        for bar in ax.patches:\n            assert bar.get_width() == pytest.approx(.8 / 2)\n        ax.clear()\n\n        ax = cat.barplot(data=self.df, x=\"g\", y=\"y\", hue=\"g\", width=.5)\n        for bar in ax.patches:\n            assert bar.get_width() == pytest.approx(.5 / 3)\n        ax.clear()\n\n        ax = cat.barplot(data=self.df, x=\"g\", y=\"y\", hue=\"g\", dodge=False)\n        for bar in ax.patches:\n            assert bar.get_width() == pytest.approx(.8)\n        ax.clear()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_errorbar_TestBarPlotter.test_errorbar.for_i_line_in_enumerate_.assert_array_equal_line_g": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBarPlotter.test_errorbar_TestBarPlotter.test_errorbar.for_i_line_in_enumerate_.assert_array_equal_line_g", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2455, "end_line": 2465, "span_ids": ["TestBarPlotter.test_errorbar"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBarPlotter(CategoricalFixture):\n\n    def test_errorbar(self, long_df):\n\n        ax = cat.barplot(data=long_df, x=\"a\", y=\"y\", errorbar=(\"sd\", 2))\n        order = categorical_order(long_df[\"a\"])\n\n        for i, line in enumerate(ax.lines):\n            sub_df = long_df.loc[long_df[\"a\"] == order[i], \"y\"]\n            mean = sub_df.mean()\n            sd = sub_df.std()\n            expected = mean - 2 * sd, mean + 2 * sd\n            assert_array_equal(line.get_ydata(), expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_errorbar_TestPointPlotter.test_errorbar.for_i_line_in_enumerate_.assert_array_equal_line_g": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestPointPlotter.test_errorbar_TestPointPlotter.test_errorbar.for_i_line_in_enumerate_.assert_array_equal_line_g", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2733, "end_line": 2745, "span_ids": ["TestPointPlotter.test_errorbar"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPointPlotter(CategoricalFixture):\n\n    def test_errorbar(self, long_df):\n\n        ax = cat.pointplot(\n            data=long_df, x=\"a\", y=\"y\", errorbar=(\"sd\", 2), join=False\n        )\n        order = categorical_order(long_df[\"a\"])\n\n        for i, line in enumerate(ax.lines):\n            sub_df = long_df.loc[long_df[\"a\"] == order[i], \"y\"]\n            mean = sub_df.mean()\n            sd = sub_df.std()\n            expected = mean - 2 * sd, mean + 2 * sd\n            assert_array_equal(line.get_ydata(), expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCatPlot.test_ax_kwarg_removal_TestCatPlot.test_share_xy.None_9.assert_len_ax_collections": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestCatPlot.test_ax_kwarg_removal_TestCatPlot.test_share_xy.None_9.assert_len_ax_collections", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 2911, "end_line": 2970, "span_ids": ["TestCatPlot.test_share_xy", "TestCatPlot.test_ax_kwarg_removal"], "tokens": 610}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCatPlot(CategoricalFixture):\n\n    def test_ax_kwarg_removal(self):\n\n        f, ax = plt.subplots()\n        with pytest.warns(UserWarning, match=\"catplot is a figure-level\"):\n            g = cat.catplot(x=\"g\", y=\"y\", data=self.df, ax=ax)\n        assert len(ax.collections) == 0\n        assert len(g.ax.collections) > 0\n\n    def test_share_xy(self):\n\n        # Test default behavior works\n        g = cat.catplot(x=\"g\", y=\"y\", col=\"g\", data=self.df, sharex=True)\n        for ax in g.axes.flat:\n            assert len(ax.collections) == len(self.df.g.unique())\n\n        g = cat.catplot(x=\"y\", y=\"g\", col=\"g\", data=self.df, sharey=True)\n        for ax in g.axes.flat:\n            assert len(ax.collections) == len(self.df.g.unique())\n\n        # Test unsharing workscol\n        with pytest.warns(UserWarning):\n            g = cat.catplot(\n                x=\"g\", y=\"y\", col=\"g\", data=self.df, sharex=False, kind=\"bar\",\n            )\n            for ax in g.axes.flat:\n                assert len(ax.patches) == 1\n\n        with pytest.warns(UserWarning):\n            g = cat.catplot(\n                x=\"y\", y=\"g\", col=\"g\", data=self.df, sharey=False, kind=\"bar\",\n            )\n            for ax in g.axes.flat:\n                assert len(ax.patches) == 1\n\n        # Make sure no warning is raised if color is provided on unshared plot\n        with pytest.warns(None) as record:\n            g = cat.catplot(\n                x=\"g\", y=\"y\", col=\"g\", data=self.df, sharex=False, color=\"b\"\n            )\n            assert not len(record)\n        for ax in g.axes.flat:\n            assert ax.get_xlim() == (-.5, .5)\n\n        with pytest.warns(None) as record:\n            g = cat.catplot(\n                x=\"y\", y=\"g\", col=\"g\", data=self.df, sharey=False, color=\"r\"\n            )\n            assert not len(record)\n        for ax in g.axes.flat:\n            assert ax.get_ylim() == (.5, -.5)\n\n        # Make sure order is used if given, regardless of sharex value\n        order = self.df.g.unique()\n        g = cat.catplot(x=\"g\", y=\"y\", col=\"g\", data=self.df, sharex=False, order=order)\n        for ax in g.axes.flat:\n            assert len(ax.collections) == len(self.df.g.unique())\n\n        g = cat.catplot(x=\"y\", y=\"g\", col=\"g\", data=self.df, sharey=False, order=order)\n        for ax in g.axes.flat:\n            assert len(ax.collections) == len(self.df.g.unique())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_axes_data_TestBoxenPlotter.test_box_colors.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_axes_data_TestBoxenPlotter.test_box_colors.None_3", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 3181, "end_line": 3215, "span_ids": ["TestBoxenPlotter.test_axes_data", "TestBoxenPlotter.test_box_colors"], "tokens": 273}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxenPlotter(CategoricalFixture):\n\n    def test_axes_data(self):\n\n        ax = cat.boxenplot(x=\"g\", y=\"y\", data=self.df)\n        patches = filter(self.ispatch, ax.collections)\n        assert len(list(patches)) == 3\n\n        plt.close(\"all\")\n\n        ax = cat.boxenplot(x=\"g\", y=\"y\", hue=\"h\", data=self.df)\n        patches = filter(self.ispatch, ax.collections)\n        assert len(list(patches)) == 6\n\n        plt.close(\"all\")\n\n    def test_box_colors(self):\n\n        pal = palettes.color_palette()\n\n        ax = cat.boxenplot(\n            x=\"g\", y=\"y\", data=self.df, saturation=1, showfliers=False\n        )\n        ax.figure.canvas.draw()\n        for i, box in enumerate(ax.collections):\n            assert same_color(box.get_facecolor()[0], pal[i])\n\n        plt.close(\"all\")\n\n        ax = cat.boxenplot(\n            x=\"g\", y=\"y\", hue=\"h\", data=self.df, saturation=1, showfliers=False\n        )\n        ax.figure.canvas.draw()\n        for i, box in enumerate(ax.collections):\n            assert same_color(box.get_facecolor()[0], pal[i % 2])\n\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_line_kws_TestBoxenPlotter.test_line_kws.plt_close_all_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_line_kws_TestBoxenPlotter.test_line_kws.plt_close_all_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 3365, "end_line": 3377, "span_ids": ["TestBoxenPlotter.test_line_kws"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxenPlotter(CategoricalFixture):\n\n    def test_line_kws(self):\n        line_kws = {'linewidth': 5, 'color': 'purple',\n                    'linestyle': '-.'}\n\n        ax = cat.boxenplot(data=self.df, y='y', line_kws=line_kws)\n\n        median_line = ax.lines[0]\n\n        assert median_line.get_linewidth() == line_kws['linewidth']\n        assert median_line.get_linestyle() == line_kws['linestyle']\n        assert median_line.get_color() == line_kws['color']\n\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_flier_kws_TestBoxenPlotter.test_flier_kws.plt_close_all_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_flier_kws_TestBoxenPlotter.test_flier_kws.plt_close_all_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 3379, "end_line": 3399, "span_ids": ["TestBoxenPlotter.test_flier_kws"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxenPlotter(CategoricalFixture):\n\n    def test_flier_kws(self):\n        flier_kws = {\n            'marker': 'v',\n            'color': np.array([[1, 0, 0, 1]]),\n            's': 5,\n        }\n\n        ax = cat.boxenplot(data=self.df, y='y', x='g', flier_kws=flier_kws)\n\n        outliers_scatter = ax.findobj(mpl.collections.PathCollection)[0]\n\n        # The number of vertices for a triangle is 3, the length of Path\n        # collection objects is defined as n + 1 vertices.\n        assert len(outliers_scatter.get_paths()[0]) == 4\n        assert len(outliers_scatter.get_paths()[-1]) == 4\n\n        assert (outliers_scatter.get_facecolor() == flier_kws['color']).all()\n\n        assert np.unique(outliers_scatter.get_sizes()) == flier_kws['s']\n\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_box_kws_TestBoxenPlotter.test_box_kws.plt_close_all_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_categorical.py_TestBoxenPlotter.test_box_kws_TestBoxenPlotter.test_box_kws.plt_close_all_", "embedding": null, "metadata": {"file_path": "tests/test_categorical.py", "file_name": "test_categorical.py", "file_type": "text/x-python", "category": "test", "start_line": 3401, "end_line": 3417, "span_ids": ["TestBoxenPlotter.test_box_kws"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestBoxenPlotter(CategoricalFixture):\n\n    def test_box_kws(self):\n\n        box_kws = {'linewidth': 5, 'edgecolor': np.array([[0, 1, 0, 1]])}\n\n        ax = cat.boxenplot(data=self.df, y='y', x='g',\n                           box_kws=box_kws)\n\n        boxes = ax.findobj(mpl.collections.PatchCollection)[0]\n\n        # The number of vertices for a triangle is 3, the length of Path\n        # collection objects is defined as n + 1 vertices.\n        assert len(boxes.get_paths()[0]) == 5\n        assert len(boxes.get_paths()[-1]) == 5\n\n        assert np.unique(boxes.get_linewidth() == box_kws['linewidth'])\n\n        plt.close(\"all\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestRugPlot.test_multiple_rugs_TestRugPlot.test_log_scale.assert_array_almost_equal": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestRugPlot.test_multiple_rugs_TestRugPlot.test_log_scale.assert_array_almost_equal", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 305, "end_line": 342, "span_ids": ["TestRugPlot.test_log_scale", "TestRugPlot.test_axis_labels", "TestRugPlot.test_multiple_rugs", "TestRugPlot.test_matplotlib_kwargs"], "tokens": 295}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRugPlot(SharedAxesLevelTests):\n\n    def test_multiple_rugs(self):\n\n        values = np.linspace(start=0, stop=1, num=5)\n        ax = rugplot(x=values)\n        ylim = ax.get_ylim()\n\n        rugplot(x=values, ax=ax, expand_margins=False)\n\n        assert ylim == ax.get_ylim()\n\n    def test_matplotlib_kwargs(self, flat_series):\n\n        lw = 2\n        alpha = .2\n        ax = rugplot(y=flat_series, linewidth=lw, alpha=alpha)\n        rug = ax.collections[0]\n        assert np.all(rug.get_alpha() == alpha)\n        assert np.all(rug.get_linewidth() == lw)\n\n    def test_axis_labels(self, flat_series):\n\n        ax = rugplot(x=flat_series)\n        assert ax.get_xlabel() == flat_series.name\n        assert not ax.get_ylabel()\n\n    def test_log_scale(self, long_df):\n\n        ax1, ax2 = plt.figure().subplots(2)\n\n        ax2.set_xscale(\"log\")\n\n        rugplot(data=long_df, x=\"z\", ax=ax1)\n        rugplot(data=long_df, x=\"z\", ax=ax2)\n\n        rug1 = np.stack(ax1.collections[0].get_segments())\n        rug2 = np.stack(ax2.collections[0].get_segments())\n\n        assert_array_almost_equal(rug1, rug2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_wide_vs_long_data_TestKDEPlotUnivariate.test_empty_data.assert_not_ax_lines": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_wide_vs_long_data_TestKDEPlotUnivariate.test_empty_data.assert_not_ax_lines", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 393, "end_line": 413, "span_ids": ["TestKDEPlotUnivariate.test_flat_vector", "TestKDEPlotUnivariate.test_empty_data", "TestKDEPlotUnivariate.test_wide_vs_long_data"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    def test_wide_vs_long_data(self, wide_df):\n\n        f, (ax1, ax2) = plt.subplots(ncols=2)\n        kdeplot(data=wide_df, ax=ax1, common_norm=False, common_grid=False)\n        for col in wide_df:\n            kdeplot(data=wide_df, x=col, ax=ax2)\n\n        for l1, l2 in zip(ax1.lines[::-1], ax2.lines):\n            assert_array_equal(l1.get_xydata(), l2.get_xydata())\n\n    def test_flat_vector(self, long_df):\n\n        f, ax = plt.subplots()\n        kdeplot(data=long_df[\"x\"])\n        kdeplot(x=long_df[\"x\"])\n        assert_array_equal(ax.lines[0].get_xydata(), ax.lines[1].get_xydata())\n\n    def test_empty_data(self):\n\n        ax = kdeplot(x=[])\n        assert not ax.lines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_singular_data_TestKDEPlotUnivariate.test_singular_data.None_3": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_singular_data_TestKDEPlotUnivariate.test_singular_data.None_3", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 415, "end_line": 433, "span_ids": ["TestKDEPlotUnivariate.test_singular_data"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    def test_singular_data(self):\n\n        with pytest.warns(UserWarning):\n            ax = kdeplot(x=np.ones(10))\n        assert not ax.lines\n\n        with pytest.warns(UserWarning):\n            ax = kdeplot(x=[5])\n        assert not ax.lines\n\n        with pytest.warns(UserWarning):\n            # https://github.com/mwaskom/seaborn/issues/2762\n            ax = kdeplot(x=[1929245168.06679] * 18)\n        assert not ax.lines\n\n        with warnings.catch_warnings():\n            warnings.simplefilter(\"error\", UserWarning)\n            ax = kdeplot(x=[5], warn_singular=False)\n        assert not ax.lines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_variable_assignment_TestKDEPlotUnivariate.test_shade_deprecation.assert_array_equal_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestKDEPlotUnivariate.test_variable_assignment_TestKDEPlotUnivariate.test_shade_deprecation.assert_array_equal_", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 435, "end_line": 485, "span_ids": ["TestKDEPlotUnivariate.test_shade_deprecation", "TestKDEPlotUnivariate.test_kernel_deprecation", "TestKDEPlotUnivariate.test_variable_assignment", "TestKDEPlotUnivariate.test_bw_deprecation", "TestKDEPlotUnivariate.test_vertical_deprecation"], "tokens": 452}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestKDEPlotUnivariate(SharedAxesLevelTests):\n\n    def test_variable_assignment(self, long_df):\n\n        f, ax = plt.subplots()\n        kdeplot(data=long_df, x=\"x\", fill=True)\n        kdeplot(data=long_df, y=\"x\", fill=True)\n\n        v0 = ax.collections[0].get_paths()[0].vertices\n        v1 = ax.collections[1].get_paths()[0].vertices[:, [1, 0]]\n\n        assert_array_equal(v0, v1)\n\n    def test_vertical_deprecation(self, long_df):\n\n        f, ax = plt.subplots()\n        kdeplot(data=long_df, y=\"x\")\n\n        with pytest.warns(UserWarning):\n            kdeplot(data=long_df, x=\"x\", vertical=True)\n\n        assert_array_equal(ax.lines[0].get_xydata(), ax.lines[1].get_xydata())\n\n    def test_bw_deprecation(self, long_df):\n\n        f, ax = plt.subplots()\n        kdeplot(data=long_df, x=\"x\", bw_method=\"silverman\")\n\n        with pytest.warns(UserWarning):\n            kdeplot(data=long_df, x=\"x\", bw=\"silverman\")\n\n        assert_array_equal(ax.lines[0].get_xydata(), ax.lines[1].get_xydata())\n\n    def test_kernel_deprecation(self, long_df):\n\n        f, ax = plt.subplots()\n        kdeplot(data=long_df, x=\"x\")\n\n        with pytest.warns(UserWarning):\n            kdeplot(data=long_df, x=\"x\", kernel=\"epi\")\n\n        assert_array_equal(ax.lines[0].get_xydata(), ax.lines[1].get_xydata())\n\n    def test_shade_deprecation(self, long_df):\n\n        f, ax = plt.subplots()\n        with pytest.warns(FutureWarning):\n            kdeplot(data=long_df, x=\"x\", shade=True)\n        kdeplot(data=long_df, x=\"x\", fill=True)\n        fill1, fill2 = ax.collections\n        assert_array_equal(\n            fill1.get_paths()[0].vertices, fill2.get_paths()[0].vertices\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_discrete_TestHistPlotUnivariate.test_categorical_yaxis_inversion.assert_ymax_ymin": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_discrete_TestHistPlotUnivariate.test_categorical_yaxis_inversion.assert_ymax_ymin", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1450, "end_line": 1472, "span_ids": ["TestHistPlotUnivariate.test_discrete", "TestHistPlotUnivariate.test_categorical_yaxis_inversion", "TestHistPlotUnivariate.test_discrete_categorical_default"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_discrete(self, long_df):\n\n        ax = histplot(long_df, x=\"s\", discrete=True)\n\n        data_min = long_df[\"s\"].min()\n        data_max = long_df[\"s\"].max()\n        assert len(ax.patches) == (data_max - data_min + 1)\n\n        for i, bar in enumerate(ax.patches):\n            assert bar.get_width() == 1\n            assert bar.get_x() == (data_min + i - .5)\n\n    def test_discrete_categorical_default(self, long_df):\n\n        ax = histplot(long_df, x=\"a\")\n        for i, bar in enumerate(ax.patches):\n            assert bar.get_width() == 1\n\n    def test_categorical_yaxis_inversion(self, long_df):\n\n        ax = histplot(long_df, y=\"a\")\n        ymax, ymin = ax.get_ylim()\n        assert ymax > ymin", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_log_scale_dodge_TestHistPlotUnivariate.test_log_scale_dodge.assert_np_unique_np_round": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_distributions.py_TestHistPlotUnivariate.test_log_scale_dodge_TestHistPlotUnivariate.test_log_scale_dodge.assert_np_unique_np_round", "embedding": null, "metadata": {"file_path": "tests/test_distributions.py", "file_name": "test_distributions.py", "file_type": "text/x-python", "category": "test", "start_line": 1742, "end_line": 1749, "span_ids": ["TestHistPlotUnivariate.test_log_scale_dodge"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHistPlotUnivariate(SharedAxesLevelTests):\n\n    def test_log_scale_dodge(self, rng):\n\n        x = rng.lognormal(0, 2, 100)\n        hue = np.repeat([\"a\", \"b\"], 50)\n        ax = histplot(x=x, hue=hue, bins=5, log_scale=True, multiple=\"dodge\")\n        x_min = np.log([b.get_x() for b in ax.patches])\n        x_max = np.log([b.get_x() + b.get_width() for b in ax.patches])\n        assert np.unique(np.round(x_max - x_min, 10)).size == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_ticklabels_off_TestHeatmap.test_custom_ticklabels.assert_p_yticklabels_y": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_matrix.py_TestHeatmap.test_ticklabels_off_TestHeatmap.test_custom_ticklabels.assert_p_yticklabels_y", "embedding": null, "metadata": {"file_path": "tests/test_matrix.py", "file_name": "test_matrix.py", "file_type": "text/x-python", "category": "test", "start_line": 268, "end_line": 284, "span_ids": ["TestHeatmap.test_ticklabels_off", "TestHeatmap.test_custom_ticklabels"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestHeatmap:\n\n    def test_ticklabels_off(self):\n        kws = self.default_kws.copy()\n        kws['xticklabels'] = False\n        kws['yticklabels'] = False\n        p = mat._HeatMapper(self.df_norm, **kws)\n        assert p.xticklabels == []\n        assert p.yticklabels == []\n\n    def test_custom_ticklabels(self):\n        kws = self.default_kws.copy()\n        xticklabels = list('iheartheatmaps'[:self.df_norm.shape[1]])\n        yticklabels = list('heatmapsarecool'[:self.df_norm.shape[0]])\n        kws['xticklabels'] = xticklabels\n        kws['yticklabels'] = yticklabels\n        p = mat._HeatMapper(self.df_norm, **kws)\n        assert p.xticklabels == xticklabels\n        assert p.yticklabels == yticklabels", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_TestPalette_TestPalette.test_set_palette.assert_mpl_colors_same_co": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_rcmod.py_TestPalette_TestPalette.test_set_palette.assert_mpl_colors_same_co", "embedding": null, "metadata": {"file_path": "tests/test_rcmod.py", "file_name": "test_rcmod.py", "file_type": "text/x-python", "category": "test", "start_line": 247, "end_line": 265, "span_ids": ["TestPalette", "TestPalette.test_set_palette"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPalette:\n\n    def test_set_palette(self):\n\n        rcmod.set_palette(\"deep\")\n        assert utils.get_color_cycle() == palettes.color_palette(\"deep\", 10)\n\n        rcmod.set_palette(\"pastel6\")\n        assert utils.get_color_cycle() == palettes.color_palette(\"pastel6\", 6)\n\n        rcmod.set_palette(\"dark\", 4)\n        assert utils.get_color_cycle() == palettes.color_palette(\"dark\", 4)\n\n        rcmod.set_palette(\"Set2\", color_codes=True)\n        assert utils.get_color_cycle() == palettes.color_palette(\"Set2\", 8)\n\n        assert mpl.colors.same_color(\n            mpl.rcParams[\"patch.facecolor\"], palettes.color_palette()[0]\n        )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_regplot_scatter_kws_alpha_TestRegressionPlots.test_regplot_scatter_kws_alpha.for_line_in_ax_lines_.assert_line_get_alpha_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_regression.py_TestRegressionPlots.test_regplot_scatter_kws_alpha_TestRegressionPlots.test_regplot_scatter_kws_alpha.for_line_in_ax_lines_.assert_line_get_alpha_", "embedding": null, "metadata": {"file_path": "tests/test_regression.py", "file_name": "test_regression.py", "file_type": "text/x-python", "category": "test", "start_line": 498, "end_line": 531, "span_ids": ["TestRegressionPlots.test_regplot_scatter_kws_alpha"], "tokens": 377}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRegressionPlots:\n\n    def test_regplot_scatter_kws_alpha(self):\n\n        f, ax = plt.subplots()\n        color = np.array([[0.3, 0.8, 0.5, 0.5]])\n        ax = lm.regplot(x=\"x\", y=\"y\", data=self.df,\n                        scatter_kws={'color': color})\n        assert ax.collections[0]._alpha is None\n        assert ax.collections[0]._facecolors[0, 3] == 0.5\n\n        f, ax = plt.subplots()\n        color = np.array([[0.3, 0.8, 0.5]])\n        ax = lm.regplot(x=\"x\", y=\"y\", data=self.df,\n                        scatter_kws={'color': color})\n        assert ax.collections[0]._alpha == 0.8\n\n        f, ax = plt.subplots()\n        color = np.array([[0.3, 0.8, 0.5]])\n        ax = lm.regplot(x=\"x\", y=\"y\", data=self.df,\n                        scatter_kws={'color': color, 'alpha': 0.4})\n        assert ax.collections[0]._alpha == 0.4\n\n        f, ax = plt.subplots()\n        color = 'r'\n        ax = lm.regplot(x=\"x\", y=\"y\", data=self.df,\n                        scatter_kws={'color': color})\n        assert ax.collections[0]._alpha == 0.8\n\n        f, ax = plt.subplots()\n        alpha = .3\n        ax = lm.regplot(x=\"x\", y=\"y\", data=self.df,\n                        x_bins=5, fit_reg=False,\n                        scatter_kws={\"alpha\": alpha})\n        for line in ax.lines:\n            assert line.get_alpha() == alpha", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_orient_TestLinePlotter.test_orient.with_pytest_raises_ValueE.lineplot_long_df_x_y_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestLinePlotter.test_orient_TestLinePlotter.test_orient.with_pytest_raises_ValueE.lineplot_long_df_x_y_", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 1071, "end_line": 1094, "span_ids": ["TestLinePlotter.test_orient"], "tokens": 322}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestLinePlotter(SharedAxesLevelTests, Helpers):\n\n    def test_orient(self, long_df):\n\n        long_df = long_df.drop(\"x\", axis=1).rename(columns={\"s\": \"y\", \"y\": \"x\"})\n\n        ax1 = plt.figure().subplots()\n        lineplot(data=long_df, x=\"x\", y=\"y\", orient=\"y\", errorbar=\"sd\")\n        assert len(ax1.lines) == len(ax1.collections)\n        line, = ax1.lines\n        expected = long_df.groupby(\"y\").agg({\"x\": \"mean\"}).reset_index()\n        assert_array_almost_equal(line.get_xdata(), expected[\"x\"])\n        assert_array_almost_equal(line.get_ydata(), expected[\"y\"])\n        ribbon_y = ax1.collections[0].get_paths()[0].vertices[:, 1]\n        assert_array_equal(np.unique(ribbon_y), long_df[\"y\"].sort_values().unique())\n\n        ax2 = plt.figure().subplots()\n        lineplot(\n            data=long_df, x=\"x\", y=\"y\", orient=\"y\", errorbar=\"sd\", err_style=\"bars\"\n        )\n        segments = ax2.collections[0].get_segments()\n        for i, val in enumerate(sorted(long_df[\"y\"].unique())):\n            assert (segments[i][:, 1] == val).all()\n\n        with pytest.raises(ValueError, match=\"`orient` must be either 'x' or 'y'\"):\n            lineplot(long_df, x=\"y\", y=\"x\", orient=\"bad\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_supplied_color_array_TestScatterPlotter.test_hue_order.assert_t_get_text_for_": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_relational.py_TestScatterPlotter.test_supplied_color_array_TestScatterPlotter.test_hue_order.assert_t_get_text_for_", "embedding": null, "metadata": {"file_path": "tests/test_relational.py", "file_name": "test_relational.py", "file_type": "text/x-python", "category": "test", "start_line": 1629, "end_line": 1661, "span_ids": ["TestScatterPlotter.test_hue_order", "TestScatterPlotter.test_supplied_color_array"], "tokens": 327}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScatterPlotter(SharedAxesLevelTests, Helpers):\n\n    def test_supplied_color_array(self, long_df):\n\n        cmap = get_colormap(\"Blues\")\n        norm = mpl.colors.Normalize()\n        colors = cmap(norm(long_df[\"y\"].to_numpy()))\n\n        keys = [\"c\", \"facecolor\", \"facecolors\"]\n\n        if Version(mpl.__version__) >= Version(\"3.1.0\"):\n            # https://github.com/matplotlib/matplotlib/pull/12851\n            keys.append(\"fc\")\n\n        for key in keys:\n\n            ax = plt.figure().subplots()\n            scatterplot(data=long_df, x=\"x\", y=\"y\", **{key: colors})\n            _draw_figure(ax.figure)\n            assert_array_equal(ax.collections[0].get_facecolors(), colors)\n\n        ax = plt.figure().subplots()\n        scatterplot(data=long_df, x=\"x\", y=\"y\", c=long_df[\"y\"], cmap=cmap)\n        _draw_figure(ax.figure)\n        assert_array_equal(ax.collections[0].get_facecolors(), colors)\n\n    def test_hue_order(self, long_df):\n\n        order = categorical_order(long_df[\"a\"])\n        unused = order.pop()\n\n        ax = scatterplot(data=long_df, x=\"x\", y=\"y\", hue=\"a\", hue_order=order)\n        points = ax.collections[0]\n        assert (points.get_facecolors()[long_df[\"a\"] == unused] == 0).all()\n        assert [t.get_text() for t in ax.legend_.texts] == order", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestEstimateAggregator_TestEstimateAggregator.test_custom_func_estimator.assert_out_x_func_l": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestEstimateAggregator_TestEstimateAggregator.test_custom_func_estimator.assert_out_x_func_l", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 487, "end_line": 509, "span_ids": ["TestEstimateAggregator.test_name_estimator", "TestEstimateAggregator.test_custom_func_estimator", "TestEstimateAggregator.test_func_estimator", "TestEstimateAggregator"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestEstimateAggregator:\n\n    def test_func_estimator(self, long_df):\n\n        func = np.mean\n        agg = EstimateAggregator(func)\n        out = agg(long_df, \"x\")\n        assert out[\"x\"] == func(long_df[\"x\"])\n\n    def test_name_estimator(self, long_df):\n\n        agg = EstimateAggregator(\"mean\")\n        out = agg(long_df, \"x\")\n        assert out[\"x\"] == long_df[\"x\"].mean()\n\n    def test_custom_func_estimator(self, long_df):\n\n        def func(x):\n            return np.asarray(x).min()\n\n        agg = EstimateAggregator(func)\n        out = agg(long_df, \"x\")\n        assert out[\"x\"] == func(long_df[\"x\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestEstimateAggregator.test_se_errorbars_TestEstimateAggregator.test_se_errorbars.None_5": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_statistics.py_TestEstimateAggregator.test_se_errorbars_TestEstimateAggregator.test_se_errorbars.None_5", "embedding": null, "metadata": {"file_path": "tests/test_statistics.py", "file_name": "test_statistics.py", "file_type": "text/x-python", "category": "test", "start_line": 511, "end_line": 523, "span_ids": ["TestEstimateAggregator.test_se_errorbars"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestEstimateAggregator:\n\n    def test_se_errorbars(self, long_df):\n\n        agg = EstimateAggregator(\"mean\", \"se\")\n        out = agg(long_df, \"x\")\n        assert out[\"x\"] == long_df[\"x\"].mean()\n        assert out[\"xmin\"] == (long_df[\"x\"].mean() - long_df[\"x\"].sem())\n        assert out[\"xmax\"] == (long_df[\"x\"].mean() + long_df[\"x\"].sem())\n\n        agg = EstimateAggregator(\"mean\", (\"se\", 2))\n        out = agg(long_df, \"x\")\n        assert out[\"x\"] == long_df[\"x\"].mean()\n        assert out[\"xmin\"] == (long_df[\"x\"].mean() - 2 * long_df[\"x\"].sem())\n        assert out[\"xmax\"] == (long_df[\"x\"].mean() + 2 * long_df[\"x\"].sem())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_locator_to_legend_entries_test_locator_to_legend_entries.for_i_exp_in_enumerate_.assert_re_match_f_1e_0_ex": {"__data__": {"id_": "/tmp/repos/swe-bench_mwaskom__seaborn/tests/test_utils.py_test_locator_to_legend_entries_test_locator_to_legend_entries.for_i_exp_in_enumerate_.assert_re_match_f_1e_0_ex", "embedding": null, "metadata": {"file_path": "tests/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 306, "end_line": 335, "span_ids": ["test_locator_to_legend_entries"], "tokens": 326}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_locator_to_legend_entries():\n\n    locator = mpl.ticker.MaxNLocator(nbins=3)\n    limits = (0.09, 0.4)\n    levels, str_levels = utils.locator_to_legend_entries(\n        locator, limits, float\n    )\n    assert str_levels == [\"0.15\", \"0.30\"]\n\n    limits = (0.8, 0.9)\n    levels, str_levels = utils.locator_to_legend_entries(\n        locator, limits, float\n    )\n    assert str_levels == [\"0.80\", \"0.84\", \"0.88\"]\n\n    limits = (1, 6)\n    levels, str_levels = utils.locator_to_legend_entries(locator, limits, int)\n    assert str_levels == [\"2\", \"4\", \"6\"]\n\n    locator = mpl.ticker.LogLocator(numticks=5)\n    limits = (5, 1425)\n    levels, str_levels = utils.locator_to_legend_entries(locator, limits, int)\n    if Version(mpl.__version__) >= Version(\"3.1\"):\n        assert str_levels == ['10', '100', '1000']\n\n    limits = (0.00003, 0.02)\n    _, str_levels = utils.locator_to_legend_entries(locator, limits, float)\n    for i, exp in enumerate([4, 3, 2]):\n        # Use regex as mpl switched to minus sign, not hyphen, in 3.6\n        assert re.match(f\"1e.0{exp}\", str_levels[i])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}}}
\ No newline at end of file